使用思科3640实现不同网段通讯
211403875.png
R1-->3600(当做交换机使用) R2->PC(当做pc使用) R3-->PC(当做pc使用)
R1的配置
R1#vlan database
R1(vlan)#vlan 2
R1(vlan)#apply
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int vlan 2
R1(config-if)#ip address 192.168.10.1 255.255.255.0
R1(config-if)#ip address192.168.20.1 255.255.255.0secondary //可以配置多个seconday
R1(config-if)#ip address 192.168.30.1 255.255.255.0 secondary
R1(config)#int f0/2
R1(config-if)#switchport access vlan 2
R1(config)#int f0/3
R1(config-if)#switchport access vlan 2
R2充当pc
R2#vlan database
R2(vlan)#vlan 2
R2(vlan)#apply
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int vlan 2
R2(config-if)#ip address 192.168.10.1 255.255.255.0
R2(config)#int f0/2
R2(config-if)#switchport access vlan 2
R3充当pc
R3#vlan database
R3(vlan)#vlan 2
R3(vlan)#apply
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int vlan 2
R3(config-if)#ip address 192.168.20.1 255.255.255.0
R3(config)#int f0/3
R3(config-if)#switchport access vlan 2
在R2 上 ping R3
R2#ping 192.168.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
如果R2是pc,ip 配置192.168.10.2/24 网关:192.168.10.1
如果R3是pc,ip 配置192.168.20.2/24 网关:192.168.20.1
使用GNS3模拟器错误注意:line protocol is down (模拟器上这个实验做不成。)
必须先把所有线连好,设备的各种模块都插到槽中就位,然后启动路由、交换机设备就可以解决line protocol is down问题了。
阅读(1387) | 评论(0) | 转发(0) |