Layer-3 Switch inter-Vlan routing experiment record

Source: Internet
Author: User

Note: switchport mode trunk can run directly on the 2950 switch, which enables 802.1q directly. To enable the relay function on vswitches such as 3550 and 4500, you must first select the encapsulation method, that is, run switchport trunk encapsulation dot1q.
 
 
 
 
 
 
 
Sw0 # vlan database
 
Sw0 (vlan) # vtp domain Contoso
Sw0 (vlan) # vtp password Contoso
Sw0 (vlan) # vtp server
 
Sw0 (vlan) # vlan 10
Sw0 (vlan) # vlan 20
 
Sw0 (config) # interface range gigabitEthernet 0/1-2
Sw0 (config-if-range) # switchport trunk encapsulation dot1q
Sw0 (config-if-range) # switch mode trunk
 
Sw0 (config) # interface vlan 10
Sw0 (config-if) # ip address 192.168.0.1 255.255.255.0
 
Sw0 (config) # interface vlan 20
Sw0 (config-if) # ip address 192.168.1.1 255.255.255.0
 
 
 
Sw1 # vlan database
Sw1 (vlan) # vtp domain Contoso
Sw1 (vlan) # vtp password Contoso
Sw1 (vlan) # vtp client
 
Sw1 (config) # interface gigabitEthernet 1/1
Sw1 (config-if) # switchport mode trunk
 
Sw1 (config) # interface range fastEthernet 0/1-10
Sw1 (config-if-range) # switchport access vlan 10
 
 
Sw2 # vlan database
Sw2 (vlan) # vtp domain Contoso
Sw2 (vlan) # vtp password Contoso
Sw2 (vlan) # vtp client
 
Sw2 (config) # interface gigabitEthernet 1/1
Sw2 (config-if) # switchport mode trunk
 
Sw2 (config) # interface range fastEthernet 0/1-10
Sw2 (config-if-range) # switchport access vlan 20
 
 
Related viewing commands
Show interface trunk
Show vlan
Show vtp status
Show interfaces gigabitEthernet 0/1 switchport
This article is from the "light rain in September" blog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.