思科cisco实验,单臂路由如何设置?

 嗡嗡   2021-03-01 20:49   1378 人阅读  0 条评论

单臂路由1.jpeg.jpg

交换机配置如下:

SW1#conf t

SW1(config)#vlan 100

SW1(config-vlan)#exit

SW1(config)#vlan 200

SW1(config-vlan)#exit

SW1(config)#int e0/1

SW1(config-if)#sw mo ac

SW1(config-if)#sw ac vlan 100

SW1(config-if)#no shu

SW1(config-if)#exit

SW1(config)#int e0/2

SW1(config-if)#sw mo ac

SW1(config-if)#sw ac vlan 200

SW1(config-if)#no sh

SW1(config-if)#exit

SW1(config)#int e0/0

SW1(config-if)#sw tr en do  //设置封装模式为dot1q

SW1(config-if)#sw mo tr

*Mar  1 12:27:52.096: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down

SW1(config-if)#sw mo trunk 

SW1(config-if)#

*Mar  1 12:27:55.096: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up

SW1(config-if)#

*Mar  1 12:27:56.953: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down

SW1(config-if)#no shu

SW1(config-if)#exit

路由器配置如下:

R1(config)#int e0/0   

R1(config-if)#no sh  //开启物理端口

R1(config-if)#exit

R1(config)#int e0/0.100   //设置子端口

R1(config-subif)#encapsulation dot1Q 100  //设置封装tag

R1(config-subif)#ip add 1.1.1.1 255.255.255.0   //设置端口地址

R1(config-subif)#no sh

R1(config-subif)#int e0/0.200

R1(config-subif)#en

R1(config-subif)#encapsulation dot1Q 200

R1(config-subif)#ip add 1.1.2.1 255.255.255.0

R1(config-subif)#no shu

R1(config-subif)#exit

测试结果:

PC1#ping 1.1.2.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 1.1.2.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms


PC2#ping 

*Mar  1 12:46:06.637: %SYS-5-CONFIG_I: Configured from console by console

PC2#ping 1.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/202/1008 ms


本文地址:http://www.xhfww.com/?id=418
版权声明:本文为原创文章,版权归 嗡嗡 所有,欢迎分享本文,转载请保留出处!

 发表评论


表情

还没有留言,还不快点抢沙发?