阿宝和佳佳 发表于 2013-6-25 22:06:39

单臂路由配置案例

单臂路由的配置实例 网络拓扑:
路由器配置:Router>enable Router#configure terminal Enter configuration commands, one perline.End with CNTL/Z.Router(config)#host cisco2811cisco2811(config)# int fa0/0cisco2811(config-if)#no shcisco2811(config-if)#intfa0/0.2cisco2811(config-subif)#encapsulationdot1Q 2cisco2811(config-subif)#ipadd 10.10.10.254 255.255.255.0cisco2811(config-subif)#intfa0/0.3cisco2811(config-subif)#encapsulationdot1Q 3cisco2811(config-subif)#ipadd 10.10.11.254 255.255.255.0cisco2811(config-subif)# 交换机配置:Switch>enableSwitch#configure terminal Enter configuration commands, one perline.End with CNTL/Z.Switch(config)#hostname cisco2960cisco2960(config)#int fa0/3cisco2960(config-if)#switchport mode trunkcisco2960(config-if)#endcisco2960#vlan database % Warning: It is recommended to configureVLAN from config mode,asVLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.cisco2960(vlan)#vlan 2 name gouzhongxingVLAN 2 added:   Name: gouzhongxingcisco2960(vlan)#vlan 3 name lixiaomengVLAN 3 added:   Name: lixiaomengcisco2960(vlan)#exitAPPLY completed.Exiting....cisco2960#configure terminal Enter configuration commands, one perline.End with CNTL/Z.cisco2960(config)#int fa0/1cisco2960(config-if)#switchport mode accesscisco2960(config-if)#switchport access vlan3cisco2960(config-if)#exitcisco2960(config)#int fa0/2cisco2960(config-if)#switchport mode accesscisco2960(config-if)#switchport access vlan2cisco2960(config-if)#endcisco2960#%SYS-5-CONFIG_I: Configured from console byconsolecisco2960#write Building configuration...cisco2960# 测试实验效果:PC>ping 10.10.11.3 Pinging 10.10.11.3 with 32 bytes of data: Reply from 10.10.11.3: bytes=32 time=109msTTL=127Reply from 10.10.11.3: bytes=32 time=125msTTL=127Reply from 10.10.11.3: bytes=32 time=109msTTL=127Reply from 10.10.11.3: bytes=32 time=125msTTL=127 Ping statistics for 10.10.11.3:   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times inmilli-seconds:   Minimum = 109ms, Maximum = 125ms, Average = 117msPC>

Jeff. 发表于 2013-6-26 08:39:49

多谢分享,分享是一种美德,分享是一种精神,分享更是一种习惯。

王晓强 发表于 2013-6-26 09:26:05

cisco2811(config-if)#intfa0/0.2
cisco2811(config-subif)#encapsulationdot1Q 2
cisco2811(config-subif)#ipadd 10.10.10.254 255.255.255.0
cisco2811(config-subif)#intfa0/0.3
cisco2811(config-subif)#encapsulationdot1Q 3
cisco2811(config-subif)#ipadd 10.10.11.254 255.255.255.0
优化建议:
1. 注意单词之间要用空格隔开,比如ip add ,int fa0/0.3
2.贴配置的时候,尽量使用全称,不用简写。简写是为了方便,但不利于新手阅读。
3.适当说明下配置步骤及命令解释。

pens 发表于 2013-6-26 09:30:10

{:soso_e179:}赞一个

FanCy 发表于 2013-6-26 09:32:28

好东西大家分享~。可以参考王老师的优化建议哟{:soso_e121:}

阿宝和佳佳 发表于 2013-6-26 19:02:50

王晓强 发表于 2013-6-26 09:26
cisco2811(config-if)#intfa0/0.2
cisco2811(config-subif)#encapsulationdot1Q 2
cisco2811(config-subi ...

呵呵,谢谢王老师。以后一定的
页: [1]
查看完整版本: 单臂路由配置案例