目录
- 实验条件
- 网络拓朴
- 逻辑拓扑
- 物理拓扑
- 实验目的
- 开始配置
- 配置SW1
- 配置SW2
- 检验证配置结果
实验条件
网络拓朴
逻辑拓扑
物理拓扑
实验目的
- SW1和SW2之间的E2/0-3配置为trunk,使用802.1q协议,不需要配置捆绑
- 根据逻辑图和物理图标识,使得R1~R7之间的直连接口彼此都能ping通
开始配置
根据逻辑拓扑图,整理出一共需要配置VLAN14,15,23,24,35,46,57,67. 所以SW1和SW2上需要配置8个VLAN
配置SW1
SW1#conf t
SW1(config)#vlan 14,15,23,24,35,46,57,67
SW1(config-vlan)#exit
// 配置交换机Trunk口
SW1(config)#int range e2/0-3
SW1(config-if-range)#switchport trunk encapsulation dot1q
SW1(config-if-range)#switchport mode trunk
SW1(config-if-range)#exit
// 配置所有的接口类型为access,虽然都会默认,但最好都是明确的指定一下类型,不要配成协商的
SW1(config-if)#int range e0/0-3
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#int range e1/0-3
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#exit
SW1刷配置:
interface e0/0
switchport access vlan 15 //R1的E0/1
interface e0/1
switchport access vlan 23 //R2的E0/1
interface e0/2
switchport access vlan 23 //R3的E0/1
interface e0/3
switchport access vlan 24 //R4的E0/0
interface e1/0
switchport access vlan 14 //R4的E0/1
interface e1/1
switchport access vlan 15 //R5的E0/1
interface e1/2
switchport access vlan 67 //R6的E0/1
interface e1/3
switchport access vlan 67 //R7的E0/1
配置SW2
SW2#conf t
SW2(config)#vlan 14,15,23,24,35,46,57,67
SW2(config-vlan)#exit
// 配置交换机Trunk口
SW2(config)#int range e2/0-3
SW2(config-if-range)#switchport trunk encapsulation dot1q
SW2(config-if-range)#switchport mode trunk
SW2(config-if-range)#exit
// 配置所有的接口类型为access,虽然都会默认,但最好都是明确的指定一下类型,不要配成协商的
SW2(config-if)#int range e0/0-3
SW2(config-if-range)#switchport mode access
SW2(config-if-range)#int range e1/0-3
SW2(config-if-range)#switchport mode access
SW2(config-if-range)#exit
SW2刷配置:
interface e0/0
switchport access vlan 14 //R1的E0/2
interface e0/1
switchport access vlan 24 //R2的E0/2
interface e0/2
switchport access vlan 35 //R3的E0/2
interface e0/3
switchport access vlan 46 //R4的E0/2
interface e1/0
switchport access vlan 35 //R5的E0/0
interface e1/1
switchport access vlan 57 //R5的E0/2
interface e1/2
switchport access vlan 46 //R6的E0/2
interface e1/3
switchport access vlan 57 //R7的E0/2
检验证配置结果
R1-----R4
R1#ping 123.10.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R1#
R1-----R5
R1#ping 123.10.1.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.6, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R1#
R2-----R4
R2#ping 123.10.1.18
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.18, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R2#
R2-----R3
R2#ping 123.10.1.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.10, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R2#
R3-----R5
R5#ping 123.10.1.13
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.13, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R5#
R5-----R7
R5#ping 123.10.1.30
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.30, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R5#
R7-----R6
R7#ping 123.10.1.25
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.25, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R7#
R6-----R4
R6#ping 123.10.1.21
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.21, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R6#
都可以通了、