cisco2811&2960单臂路由及vlan配置实例
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
本文转载自/configure/849279.html 未加任何修改,仅供学习参考
//实现:通过单臂路由实现不同VLAN间相互通信。
//环境:
Router 2811
Cisco 2960
VLAN2-PC01
VLAN3-PC02
//拓扑:如图
//配置Cisco 2960
Cisco 2960>enable
Cisco 2960#configure terminal
Cisco 2960(config)#vlan 2
Cisco 2960(config-vlan)#exit
Cisco 2960(config)#vlan 3
Cisco 2960(config-vlan)#exit
Cisco 2960(config)#interface fastEthernet 0/1
Cisco 2960(config-if)#switchport access vlan 2
Cisco 2960(config-if)#exit
Cisco 2960(config)#interface fastEthernet 0/2
Cisco 2960(config-if)#switchport access vlan 3
Cisco 2960(config-if)#exit
Cisco 2960(config)#interface fastEthernet 0/24
Cisco 2960(config-if)#switchport mode trunk //设置TRUNK Cisco 2960(config-if)#exit
Cisco 2960#write
//配置Router 2811
Router 2811>enable
Router 2811#configure terminal
Router 2811(config)#interface fastEthernet 0/0
Router 2811(config-if)#no shutdown
Router 2811(config-if)#exit
Router 2811(config)#interface fastEthernet 0/0.1 //子接口设置
Router 2811(config-subif)#encapsulation dot1Q 2 //封装协议
Router 2811(config-subif)#ip address 192.168.2.1 255.255.255.0 //ip地址Router 2811(config-subif)#exit
Router 2811(config)#interface fastEthernet 0/0.2
Router 2811(config-subif)#encapsulation dot1Q 3
Router 2811(config-subif)#ip address 192.168.3.1 255.255.255.0 Router 2811(config-subif)#exit
Router 2811#write
Router 2811#show ip route //查看路由表
//测试:(终端计算机)
VLAN2-PC01>ping 192.168.2.1
Pinging 192.168.2.1 with 32 bytes of data:
Reply from 192.168.2.1: bytes=32 time=112ms TTL=255
Ping statistics for 192.168.2.1:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 112ms, Maximum = 112ms, Average = 112ms
Control-C
VLAN2-PC01>ping 192.168.3.1
Pinging 192.168.3.1 with 32 bytes of data:
Reply from 192.168.3.1: bytes=32 time=19ms TTL=255
Ping statistics for 192.168.3.1:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 19ms, Maximum = 19ms, Average = 19ms
Control-C
VLAN2-PC01>ping 192.168.3.101
Pinging 192.168.3.101 with 32 bytes of data:
Reply from 192.168.3.101: bytes=32 time=23ms TTL=127
Reply from 192.168.3.101: bytes=32 time=9ms TTL=127
Ping statistics for 192.168.3.101:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 9ms, Maximum = 23ms, Average = 16ms
Control-C