RIPv2配置实例1.用户需求:某企业总部计划和它的2个分公司联网。
计划采用2条数字链路连接总部和分公司,并要求总部和分公司的IP网络段不能相同,并且划分广播域隔离广播;不采用三层交换设备;两个分公司联网后能够互相访问;总部和分公司联网后路由器能够自动学习。
2.方案分析与解决:不采用三层交换技术,但要求采用数字链路,可以考虑用路由器。
3.网络拓扑:4.规划网络地址:PC1:192.168.3.2 255.255.255.0 192.168.3.1PC2:192.168.3.3 255.255.255.0 192.168.3.1PC3:192.168.4.2 255.255.255.0 192.168.4.1PC4:192.168.5.2 255.255.255.0 192.168.5.1总部路由器A:F0/0:192.168.3.1 255.255.255.0S1/0:192.168.1.1 255.255.255.0S1/1:192.168.2.1 255.255.255.0分公司路由器B:F0/0:192.168.4.1 255.255.255.0S1/0:192.168.1.2 255.255.255.0分公司路由器C:F0/0:192.168.5.1 255.255.255.0S1/1:192.168.2.2 255.255.255.05.路由器配置:总部A:Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname routerArouterA(config)#int f0/0routerA(config-if)#ip add 192.168.3.1 255.255.255.0routerA(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to uprouterA(config-if)#int s1/0routerA(config-if)#ip add 192.168.1.1 255.255.255.0routerA(config-if)#clock rate 64000routerA(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial1/0, changed state to downrouterA(config-if)#int s1/1routerA(config-if)#ip add 192.168.2.1 255.255.255.0routerA(config-if)#clock rate 64000routerA(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial1/1, changed state to downrouterA(config-if)#exitrouterA(config)#router riprouterA(config-router)#version 2routerA(config-router)#network 192.168.3.0routerA(config-router)#network 192.168.1.0routerA(config-router)#network 192.168.2.0routerA(config-router)#endrouterA#%SYS-5-CONFIG_I: Configured from console by consolerouterA#wrBuilding configuration...[OK]routerA#routerA#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Serial1/0C 192.168.2.0/24 is directly connected, Serial1/1C 192.168.3.0/24 is directly connected, FastEthernet0/0R 192.168.4.0/24 [120/1] via 192.168.1.2, 00:00:00, Serial1/0R 192.168.5.0/24 [120/1] via 192.168.2.2, 00:00:10, Serial1/1routerA#分公司B:Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname routerBrouterB(config)#int f0/0routerB(config-if)#ip add 192.168.4.1 255.255.255.0routerB(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to uprouterB(config-if)#int s1/0routerB(config-if)#ip add 192.168.1.2 255.255.255.0routerB(config-if)#clock rate 64000routerB(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial1/0, changed state to uprouterB(config-if)#exit%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up routerB(config)#router riprouterB(config-router)#version 2routerB(config-router)#network 192.168.4.0routerB(config-router)#network 192.168.1.0routerB(config-router)#endrouterB#%SYS-5-CONFIG_I: Configured from console by consolerouterB#wrBuilding configuration...[OK]routerB#routerB#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Serial1/0R 192.168.2.0/24 [120/1] via 192.168.1.1, 00:00:18, Serial1/0R 192.168.3.0/24 [120/1] via 192.168.1.1, 00:00:18, Serial1/0C 192.168.4.0/24 is directly connected, FastEthernet0/0R 192.168.5.0/24 [120/2] via 192.168.1.1, 00:00:18, Serial1/0routerB#分公司C:Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname routerCrouterC(config)#int f0/0routerC(config-if)#ip add 192.168.5.1 255.255.255.0routerC(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to uprouterC(config-if)#int s1/1routerC(config-if)#ip add 192.168.2.2 255.255.255.0routerC(config-if)#clock rate 64000routerC(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial1/1, changed state to uprouterC(config-if)#exitrouterC(config)#router riprouterC(config-router)#version 2routerC(config-router)#network 192.168.5.0routerC(config-router)#network 192.168.2.0routerC(config-router)#endrouterC#%SYS-5-CONFIG_I: Configured from console by consolerouterC#wrBuilding configuration...[OK]routerC#routerC#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setR 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:17, Serial1/1C 192.168.2.0/24 is directly connected, Serial1/1R 192.168.3.0/24 [120/1] via 192.168.2.1, 00:00:17, Serial1/1R 192.168.4.0/24 [120/2] via 192.168.2.1, 00:00:17, Serial1/1C 192.168.5.0/24 is directly connected, FastEthernet0/0routerC#6.拓展知识:如果用PC终端连接到路由器上,要连路由器的Console口,连PC的RS 232接口。