路由器配置rip(结合cdp)
2011-09-20 11:13
309 查看
小凡模拟器,ios版本为3640,两台路由器R1,R2
R1:
Router>
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int s1/0
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#
*Mar 1 00:03:31.115: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:03:32.115: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to up
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#network 192.168.2.0
R1(config-router)#neighbor 192.168.2.2
R1(config-router)#exit
R1(config)#exit
R1#pin
*Mar 1 00:05:22.023: %SYS-5-CONFIG_I: Configured from console by consoleg
Protocol [ip]:
Target IP address:
% Bad IP address
R1#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/34/56 ms
R1#
R2:
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#int s1/0
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#exit
R2#
R2#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/21/48 ms
R2#
这个实验里面我并没有为任何一台路由器配置时钟频率,但串口照样可以通信,这里另外说明一点,在cisco路由器中,CDP(路由发现协议)默认是全局启动的,因此这里直接用到了neighbor命令。
补充一个实验(配置时钟频率和带宽来实现串口通信):
R1:
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int s1/0
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#bandwidth 64
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
*Mar 1 00:02:18.879: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:02:19.879: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to up
*Mar 1 00:02:48.847: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to down
R1(config)#
*Mar 1 00:03:08.831: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to upe
% Ambiguous command: "e"
R1(config)#exit
R1#
*Mar 1 00:03:13.563: %SYS-5-CONFIG_I: Configured from console by console
R1#
R2:
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#int s1/0
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#
*Mar 1 00:02:42.227: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:02:43.227: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to upexit
R2#
*Mar 1 00:02:45.455: %SYS-5-CONFIG_I: Configured from console by console
配置了时钟频率才能通信,否则,就算当时启用了,过会儿又down了。
R1:
Router>
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int s1/0
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#
*Mar 1 00:03:31.115: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:03:32.115: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to up
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#network 192.168.2.0
R1(config-router)#neighbor 192.168.2.2
R1(config-router)#exit
R1(config)#exit
R1#pin
*Mar 1 00:05:22.023: %SYS-5-CONFIG_I: Configured from console by consoleg
Protocol [ip]:
Target IP address:
% Bad IP address
R1#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/34/56 ms
R1#
R2:
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#int s1/0
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#exit
R2#
R2#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/21/48 ms
R2#
这个实验里面我并没有为任何一台路由器配置时钟频率,但串口照样可以通信,这里另外说明一点,在cisco路由器中,CDP(路由发现协议)默认是全局启动的,因此这里直接用到了neighbor命令。
补充一个实验(配置时钟频率和带宽来实现串口通信):
R1:
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int s1/0
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#bandwidth 64
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
*Mar 1 00:02:18.879: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:02:19.879: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to up
*Mar 1 00:02:48.847: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to down
R1(config)#
*Mar 1 00:03:08.831: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to upe
% Ambiguous command: "e"
R1(config)#exit
R1#
*Mar 1 00:03:13.563: %SYS-5-CONFIG_I: Configured from console by console
R1#
R2:
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#int s1/0
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#
*Mar 1 00:02:42.227: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:02:43.227: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0,
changed state to upexit
R2#
*Mar 1 00:02:45.455: %SYS-5-CONFIG_I: Configured from console by console
配置了时钟频率才能通信,否则,就算当时启用了,过会儿又down了。
相关文章推荐
- Cisco 路由器上的RIP偏移列表配置
- 思科路由器配置rip
- cisco路由器基本实验之三 动态路由之RIP协议的配置(Boson NetSim)
- cisco路由器基本实验之三 动态路由之RIP协议的配置(Boson NetSim)
- Junos路由器静态路由及动态路由rip和ospf配置测试
- 第9章 路由器RIP动态路由配置
- Packet Tracer 5.0实验(九) 路由器RIP动态路由配置
- 路由器RIP配置实验
- Packet Tracer 5.0实验(九) 路由器RIP动态路由配置
- Cisco PT模拟实验(13) 路由器RIP动态路由的配置
- 路由器RIP动态路由配置
- CDP协议 以及 在Cisco路由器上配置WCCP
- 在各路由器进行RIP的基本配置
- 路由器 动态路由(RIP-v1路由信息协议)配置
- cisco路由器基本实验之三 动态路由之RIP协议的配置(Boson NetSim)
- (神州数码)路由器RIP-2配置
- cisco路由器RIP协议安全配置(上)
- cisco路由器基本实验之三 动态路由之RIP协议的配置(Boson NetSim)
- cisco路由器RIP协议安全配置(下)
- juniper路由器的rip配置示例