1.测试拓扑:
2.基本配置:
R1:
R1#vlan database
R1(vlan)#vlan 30
VLAN 30 added:
Name: VLAN0030
R1(vlan)#vlan 40
VLAN 40 added:
Name: VLAN0040
R1(vlan)#exit
R1(config)#int f0/5
R1(config-if)#switchport mode access
R1(config-if)#switchport access vlan 40
R1(config)#int range fastEthernet 0/14 - 15
R1(config-if-range)#switchport mode trunk
R2:
R2#vlan database
R2(vlan)#vlan 30
VLAN 30 added:
Name: VLAN0030
R2(vlan)#vlan 40
VLAN 40 added:
Name: VLAN0040
R2(vlan)#exit
R2(config)#int f0/3
R2(config-if)#sw mode acc
R2(config-if)#sw acc vlan 30
R2(config-if)#int f0/4
R2(config-if)#sw mo acc
R2(config-if)#sw acc vlan 40
R2(config-if)#int f0/15
R2(config-if)#sw mode trunk
R3:
R3(config)#int f1/0
R3(config-if)#ip add 10.1.1.3 255.255.255.0
R3(config-if)#no sh
R4:
R4(config)#int f1/0
R4(config-if)#ip add 10.1.1.4 255.255.255.0
R4(config-if)#no sh
R5:
R5(config)#int f1/0
R5(config-if)#ip add 10.1.1.5 255.255.255.0
R5(config-if)#no sh
R5#ping 10.1.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.4, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 20/34/72 ms