- 实验拓扑图
2.4个交换机上的配置
R0交换机的配置
interface FastEthernet0/1
switchport access vlan 100
!
interface FastEthernet0/2
switchport access vlan 200
!
interface FastEthernet0/3
switchport access vlan 300
!
interface FastEthernet0/4
switchport mode trunk
!
R1交换机的配置
interface FastEthernet0/1
switchport access vlan 100
!
interface FastEthernet0/2
switchport access vlan 200
!
interface FastEthernet0/3
switchport access vlan 300
!
interface FastEthernet0/4
switchport mode trunk
!
interface FastEthernet0/5
switchport mode trunk
!
R2交换机的配置
!
interface FastEthernet0/1
switchport access vlan 100
!
interface FastEthernet0/2
switchport access vlan 200
!
interface FastEthernet0/3
switchport access vlan 300
!
interface FastEthernet0/4
switchport mode trunk
!
interface FastEthernet0/5
switchport mode trunk
!
R3交换机的配置
全局下开启 ip routing
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
!
interface Vlan100
mac-address 0002.1703.c501
ip address 192.168.1.1 255.255.255.0
!
interface Vlan200
mac-address 0002.1703.c502
ip address 192.168.2.1 255.255.255.0
!
interface Vlan300
mac-address 0002.1703.c503
ip address 192.168.3.1 255.255.255.0
!