RIP实验二扩展配置
第一步:地址规划
| 设备 | 接口 | 地址 |
|---|---|---|
| R1 | G0/0/0 | 192.168.1.1 24 |
| R2 | G0/0/0 | 192.168.1.2 24 |
| R2 | G0/0/1 | 192.168.2.1 24 |
| R3 | G0/0/0 | 192.168.2.2 24 |
| R3 | G0/0/1 | 192.168.3.1 24 |
| R4 | G0/0/0 | 192.168.3.2 24 |
| R4 | G0/0/1 | 192.168.4.1 24 |
| R5 | G0/0/0 | 192.168.4.2 24 |
| R5 | G0/0/1 | 192.168.1.3 24 |
为了方便配置,将各个地址,描述在拓扑图中
第二步:设备配置
R1地址配置
<Huawei>system-view [Huawei]sysname R1 [R1]interface g0/0/0 [R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
R2地址配置
<Huawei>system-view [Huawei]sysname R2 [R2]interface g0/0/0 [R2-GigabitEthernet0/0/0]ip address 192.168.1.2 24 [R2]interface g0/0/1 [R2-GigabitEthernet0/0/1]ip address 192.168.2.1 24
R3地址配置
<Huawei>system-view [Huawei]sysname R3 [R3]interface g0/0/0 [R3-GigabitEthernet0/0/0]ip address 192.168.2.2 24 [R3]interface g0/0/1 [R3-GigabitEthernet0/0/1]ip address 192.168.3.1 24
R4地址配置
<Huawei>system-view [Huawei]sysname R4 [R4]interface g0/0/0 [R4-GigabitEthernet0/0/0]ip address 192.168.3.2 24 [R4]interface g0/0/1 [R4-GigabitEthernet0/0/1]ip address 192.168.4.1 24
R5地址配置
<Huawei>system-view [R5]interface g0/0/0 [R5-GigabitEthernet0/0/0]ip address 192.168.4.2 24 [R5]interface g0/0/1 [R5-GigabitEthernet0/0/1]ip address 192.168.1.3 24
第三步:测试直连设备间通讯
R1与R2和R5间的通信
[R1]ping 192.168.1.2 PING 192.168.1.2: 56 data bytes, press CTRL_C to break Reply from 192.168.1.2: bytes=56 Sequence=1 ttl=255 time=190 ms Reply from 192.168.1.2: bytes=56 Sequence=2 ttl=255 time=60 ms Reply from 192.168.1.2: bytes=56 Sequence=3 ttl=255 time=40 ms Reply from 192.168.1.2: bytes=56 Sequence=4 ttl=255 time=40 ms Reply from 192.168.1.2: bytes=56 Sequence=5 ttl=255 time=40 ms --- 192.168.1.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 40/74/190 ms [R1]ping 192.168.1.3 PING 192.168.1.3: 56 data bytes, press CTRL_C to break Reply from 192.168.1.3: bytes=56 Sequence=1 ttl=255 time=140 ms Reply from 192.168.1.3: bytes=56 Sequence=2 ttl=255 time=50 ms Reply from 192.168.1.3: bytes=56 Sequence=3 ttl=255 time=40 ms Reply from 192.168.1.3: bytes=56 Sequence=4 ttl=255 time=50 ms Reply from 192.168.1.3: bytes=56 Sequence=5 ttl=255 time=60 ms --- 192.168.1.3 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 40/68/140 ms
第四步:配置路由
R1配置
[R1]rip 1 [R1-rip-1]version 2 [R1-rip-1]network 192.168.1.0
R2配置
[R2]rip 1 [R2-rip-1]version 2 [R2-rip-1]network 192.168.1.0 [R2-rip-1]network 192.168.2.0
R3配置
[R3]rip 1 [R3-rip-1]version 2 [R3-rip-1]network 192.168.2.0 [R3-rip-1]network 192.168.3.0
R4配置
[R4]rip 1 [R4-rip-1]version 2 [R4-rip-1]network 192.168.3.0 [R4-rip-1]network 192.168.4.0
R5配置
[R5]rip 1 [R5-rip-1]version 2 [R5-rip-1]network 192.168.4.0 [R5-rip-1]network 192.168.1.0
第五步:查看路由表
R1路由表
[R1]display ip routing-table protocol rip Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Public routing table : RIP Destinations : 3 Routes : 4 RIP routing table status : <Active> Destinations : 3 Routes : 4 Destination/Mask Proto Pre Cost Flags NextHop Interface 192.168.2.0/24 RIP 100 1 D 192.168.1.2 GigabitEthernet 0/0/0 192.168.3.0/24 RIP 100 2 D 192.168.1.2 GigabitEthernet 0/0/0 RIP 100 2 D 192.168.1.3 GigabitEthernet 0/0/0 192.168.4.0/24 RIP 100 1 D 192.168.1.3 GigabitEthernet 0/0/0 RIP routing table status : <Inactive> Destinations : 0 Routes : 0
R2路由表
[R2]display ip routing-table protocol rip Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Public routing table : RIP Destinations : 2 Routes : 2 RIP routing table status : <Active> Destinations : 2 Routes : 2 Destination/Mask Proto Pre Cost Flags NextHop Interface 192.168.3.0/24 RIP 100 1 D 192.168.2.2 GigabitEthernet 0/0/1 192.168.4.0/24 RIP 100 1 D 192.168.1.3 GigabitEthernet 0/0/0 RIP routing table status : <Inactive> Destinations : 0 Routes : 0
R3路由表
[R3]display ip routing-table protocol rip Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Public routing table : RIP Destinations : 2 Routes : 2 RIP routing table status : <Active> Destinations : 2 Routes : 2 Destination/Mask Proto Pre Cost Flags NextHop Interface 192.168.1.0/24 RIP 100 1 D 192.168.2.1 GigabitEthernet 0/0/0 192.168.4.0/24 RIP 100 1 D 192.168.3.2 GigabitEthernet 0/0/1 RIP routing table status : <Inactive> Destinations : 0 Routes : 0
R4路由表
[R4]display ip routing-table protocol rip Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Public routing table : RIP Destinations : 2 Routes : 2 RIP routing table status : <Active> Destinations : 2 Routes : 2 Destination/Mask Proto Pre Cost Flags NextHop Interface 192.168.1.0/24 RIP 100 1 D 192.168.4.2 GigabitEthernet 0/0/1 192.168.2.0/24 RIP 100 1 D 192.168.3.1 GigabitEthernet 0/0/0 RIP routing table status : <Inactive> Destinations : 0 Routes : 0
R5路由表
[R5]display ip routing-table protocol rip Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Public routing table : RIP Destinations : 2 Routes : 2 RIP routing table status : <Active> Destinations : 2 Routes : 2 Destination/Mask Proto Pre Cost Flags NextHop Interface 192.168.2.0/24 RIP 100 1 D 192.168.1.2 GigabitEthernet 0/0/1 192.168.3.0/24 RIP 100 1 D 192.168.4.1 GigabitEthernet 0/0/0 RIP routing table status : <Inactive> Destinations : 0 Routes : 0
第六步:测试连通性
R1和4之间的连通性测试
[R1]ping 192.168.3.2 PING 192.168.3.2: 56 data bytes, press CTRL_C to break Request time out Request time out Request time out Reply from 192.168.3.2: bytes=56 Sequence=4 ttl=254 time=40 ms Reply from 192.168.3.2: bytes=56 Sequence=5 ttl=254 time=40 ms --- 192.168.3.2 ping statistics --- 5 packet(s) transmitted 2 packet(s) received 60.00% packet loss round-trip min/avg/max = 40/40/40 ms
R4缺省
[R4]interface LoopBack 0 [R4-LoopBack0]ip address 4.4.4.4 24 [R4-LoopBack0]q [R4]rip 1 [R4-rip-1]vers [R4-rip-1]version 2 [R4-rip-1]default-route originate
在R1、R2、R3、R4、R5上面分别查
R1、R2、R3、R5上面查出结果一致,只查一个R1即可
R1
[R1]display ip routing-table protocol rip Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Public routing table : RIP Destinations : 4 Routes : 5 RIP routing table status : <Active> Destinations : 4 Routes : 5 Destination/Mask Proto Pre Cost Flags NextHop Interface 0.0.0.0/0 RIP 100 2 D 192.168.1.3 GigabitEthernet 0/0/0 192.168.2.0/24 RIP 100 1 D 192.168.1.2 GigabitEthernet 0/0/0 192.168.3.0/24 RIP 100 2 D 192.168.1.2 GigabitEthernet 0/0/0 RIP 100 2 D 192.168.1.3 GigabitEthernet 0/0/0 192.168.4.0/24 RIP 100 1 D 192.168.1.3 GigabitEthernet 0/0/0 RIP routing table status : <Inactive> Destinations : 0 Routes : 0
R4需要手动配置
[R4]ip route-static 0.0.0.0 0 loopback 0
R1认证
[R1]interface g0/0/0 [R1-GigabitEthernet0/0/0]rip authentication-mode simple cipher huawei
R2认证
[R2]interface g0/0/0 [R2-GigabitEthernet0/0/0]rip authentication-mode simple cipher huawei [R2]interface g0/0/1 [R2-GigabitEthernet0/0/1]rip authentication-mode simple cipher huawei
R3认证
[R3]interface g0/0/0 [R3-GigabitEthernet0/0/0]rip authentication-mode simple cipher huawei [R3]interface g0/0/1 [R3-GigabitEthernet0/0/1]rip authentication-mode simple cipher huawei
R4认证
[R4]interface g0/0/0 [R4-GigabitEthernet0/0/0]rip authentication-mode simple cipher huawei [R4]interface g0/0/1 [R4-GigabitEthernet0/0/1]rip authentication-mode simple cipher huawei
R5认证
[R5]interface g0/0/0 [R5-GigabitEthernet0/0/0]rip authentication-mode simple cipher huawei [R5]interface g0/0/1 [R5-GigabitEthernet0/0/1]rip authentication-mode simple cipher huawei
R2汇总
[R2]interface LoopBack 0 [R2-LoopBack0]ip address 172.16.1.1 24 [R2]interface LoopBack 1 [R2-LoopBack1]ip address 172.16.2.1 24 [R2]interface LoopBack 2 [R2-LoopBack2]ip address 172.16.3.1 24 [R2]rip 1 [R2-rip-1]version 2 [R2-rip-1]network 172.16.0.0 [R2]interface g0/0/0 [R2-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.252.0 [R2]interface g0/0/1 [R2-GigabitEthernet0/0/1]rip summary-address 172.16.0.0 255.255.252.0
R3汇总
[R3]interface LoopBack 0 [R3-LoopBack0]ip address 172.16.1.1 24 [R3]interface LoopBack 1 [R3-LoopBack1]ip address 172.168.2.1 24 [R3]interface LoopBack 2 [R3-LoopBack2]ip address 172.16.3.1 24 [R3]rip 1 [R3-rip-1]version 2 [R3-rip-1]network 172.16.0.0 [R3]interface g0/0/0 [R3-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.252.0 [R3]interface g0/0/1 [R3-GigabitEthernet0/0/1]rip summary-address 172.16.0.0 255.255.252.0
R4汇总
[R4]interface LoopBack 0 [R4-LoopBack0]ip address 172.16.1.1 24 [R4]interface LoopBack 1 [R4-LoopBack1]ip address 172.16.2.1 24 [R4]interface LoopBack 2 [R4-LoopBack2]ip address 172.16.3.1 24 [R4]rip 1 [R4-rip-1]version 2 [R4-rip-1]network 172.16.0.0 [R4]interface g0/0/0 [R4-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.252.0 [R4]interface g0/0/1 [R4-GigabitEthernet0/0/1]rip summary-address 172.161.0.0 255.255.252.0
R2空接口防环路由
[R2]ip route-static 172.16.0.0 22 NULL 0
R3空接口防环路由
[R3]ip route-static 172.16.0.0 22 NULL 0
R4空接口防环路由
[R4]ip route-static 172.16.0.0 22 NULL 0
R5空接口防环路由
[R5]ip route-static 172.16.0.0 22 NULL 0
R1收敛速度
[R1]rip 1 [R1-rip-1]version 2 [R1-rip-1]timers rip 15 90 60 [R1]display rip Public VPN-instance RIP process : 1 RIP version : 2 Preference : 100 Checkzero : Enabled Default-cost : 0 Summary : Enabled Host-route : Enabled Maximum number of balanced paths : 8 Update time : 15 sec Age time : 90 sec Garbage-collect time : 60 sec Graceful restart : Disabled BFD : Disabled Silent-interfaces : None Default-route : Disabled Verify-source : Enabled Networks : 192.168.1.0 Configured peers : None Number of routes in database : 10 Number of interfaces enabled : 1 Triggered updates sent : 0 Number of route changes : 39 Number of replies to queries : 2
R2收敛速度
[R2]rip 1 [R2-rip-1]version 2 [R2-rip-1]timers rip 15 90 60 [R2]display rip Public VPN-instance RIP process : 1 RIP version : 2 Preference : 100 Checkzero : Enabled Default-cost : 0 Summary : Enabled Host-route : Enabled Maximum number of balanced paths : 8 Update time : 15 sec Age time : 90 sec Garbage-collect time : 60 sec Graceful restart : Disabled BFD : Disabled Silent-interfaces : None Default-route : Disabled Verify-source : Enabled Networks : 172.16.0.0 192.168.2.0 192.168.1.0 Configured peers : None Number of routes in database : 11 Number of interfaces enabled : 5 Triggered updates sent : 9 Number of route changes : 21
R3收敛速度
[R3]rip 1 [R3-rip-1]version 2 [R3-rip-1]timers rip 15 90 60 [R3]display rip Public VPN-instance RIP process : 1 RIP version : 2 Preference : 100 Checkzero : Enabled Default-cost : 0 Summary : Enabled Host-route : Enabled Maximum number of balanced paths : 8 Update time : 15 sec Age time : 90 sec Garbage-collect time : 60 sec Graceful restart : Disabled BFD : Disabled Silent-interfaces : None Default-route : Disabled Verify-source : Enabled Networks : 172.16.0.0 192.168.3.0 192.168.2.0 Configured peers : None Number of routes in database : 9 Number of interfaces enabled : 4 Triggered updates sent : 5 Number of route changes : 23
R4收敛速度
[R4]rip 1 [R4-rip-1]version 2 [R4-rip-1]timers rip 15 90 60 [R4]display rip Public VPN-instance RIP process : 1 RIP version : 2 Preference : 100 Checkzero : Enabled Default-cost : 0 Summary : Enabled Host-route : Enabled Maximum number of balanced paths : 8 Update time : 15 sec Age time : 90 sec Garbage-collect time : 60 sec Graceful restart : Disabled BFD : Disabled Silent-interfaces : None Default-route : Originate Always Default-route Cost : 0 Verify-source : Enabled Networks : 172.16.0.0 192.168.4.0 192.168.3.0 Configured peers : None Number of routes in database : 11 Number of interfaces enabled : 5 Triggered updates sent : 5
R5收敛速度
[R5]rip 1 [R5-rip-1]version 2 [R5-rip-1]timers rip 15 90 60 [R5]display rip Public VPN-instance RIP process : 1 RIP version : 2 Preference : 100 Checkzero : Enabled Default-cost : 0 Summary : Enabled Host-route : Enabled Maximum number of balanced paths : 8 Update time : 15 sec Age time : 90 sec Garbage-collect time : 60 sec Graceful restart : Disabled BFD : Disabled Silent-interfaces : None Default-route : Disabled Verify-source : Enabled Networks : 192.168.1.0 192.168.4.0 Configured peers : None Number of routes in database : 10 Number of interfaces enabled : 2 Triggered updates sent : 6 Number of route changes : 27 Number of replies to queries : 0
