华为路由器rip静态共存案例优先级
同一个局域网里同时有rip与静态
华为路由器rip静态共存案例优先级
第一步
[ar1]interface GigabitEthernet 0/0/0
[ar1-GigabitEthernet0/0/0]ip address 192.168.12.1 24
[ar1]interface GigabitEthernet 0/0/1
[ar1-GigabitEthernet0/0/1]ip address 192.168.13.1 24
[ar2]interface GigabitEthernet 0/0/0
[ar2-GigabitEthernet0/0/0]ip address 192.168.12.2 24
//建议做完每一步,可以ping一下同端接口检测一下
[ar2-GigabitEthernet0/0/0]ping 192.168.12.1
PING 192.168.12.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.12.1: bytes=56 Sequence=1 ttl=255 time=90 ms
Reply from 192.168.12.1: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.12.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 192.168.12.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.12.1: bytes=56 Sequence=5 ttl=255 time=30 ms
[ar2]interface GigabitEthernet 0/0/1
[ar2-GigabitEthernet0/0/1]ip address 192.168.24.2 24
[ar4]interface GigabitEthernet 0/0/0
[ar4-GigabitEthernet0/0/0]ip address 192.168.24.4 24
[ar4-GigabitEthernet0/0/0]ping 192.168.24.2
PING 192.168.24.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.24.2: bytes=56 Sequence=1 ttl=255 time=110 ms
Reply from 192.168.24.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.24.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 192.168.24.2: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 192.168.24.2: bytes=56 Sequence=5 ttl=255 time=20 ms
— 192.168.24.2 ping statistics —
[ar4]interface GigabitEthernet 0/0/1
[ar4-GigabitEthernet0/0/1]ip address 192.168.34.4 24
[ar3]interface GigabitEthernet 0/0/0
[ar3-GigabitEthernet0/0/0]ip address 192.168.13.3 24
[ar3-GigabitEthernet0/0/0]ping 192.168.13.1
PING 192.168.13.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.13.1: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 192.168.13.1: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 192.168.13.1: bytes=56 Sequence=3 ttl=255 time=30 ms
— 192.168.13.1 ping statistics —
[ar3]interface GigabitEthernet 0/0/1
[ar3-GigabitEthernet0/0/1]ip address 192.168.34.3 24
[ar3-GigabitEthernet0/0/1]ping 192.168.34.4
PING 192.168.34.4: 56 data bytes, press CTRL_C to break
Reply from 192.168.34.4: bytes=56 Sequence=1 ttl=255 time=80 ms
Reply from 192.168.34.4: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.34.4: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 192.168.34.4: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.34.4: bytes=56 Sequence=5 ttl=255 time=10 ms
— 192.168.34.4 ping statistics —
第二部配置LoopBack
[ar1]interface LoopBack 0
[ar1-LoopBack0]ip address 1.1.1.1 32
[ar4]interface LoopBack 0
[ar4-LoopBack0]ip address 4.4.4.4 32
第三部配置ar1,ar2.ar4的rip
Enter system view, return user view with Ctrl+Z.
[ar1]rip
[ar1-rip-1]version 2
[ar1-rip-1]network 192.168.12.0
[ar1-rip-1]network 1.0.0.0
[ar2]rip
[ar2-rip-1]version 2
[ar2-rip-1]network 192.168.12.0
[ar2-rip-1]network 192.168.23.0
[ar4]rip
[ar4-rip-1]version 2
[ar4-rip-1]network 192.168.24.0
[ar4-rip-1]network 4.0.0.0
//检查连通性
ping -a 1.1.1.1 4.4.4.4
PING 4.4.4.4: 56 data bytes, press CTRL_C to break
Reply from 4.4.4.4: bytes=56 Sequence=1 ttl=254 time=40 ms
Reply from 4.4.4.4: bytes=56 Sequence=2 ttl=254 time=20 ms
Reply from 4.4.4.4: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 4.4.4.4: bytes=56 Sequence=4 ttl=254 time=20 ms
Reply from 4.4.4.4: bytes=56 Sequence=5 ttl=254 time=30 ms
//指定1.1.1.1去ping4.4.4.4
tracert -a 1.1.1.1 4.4.4.4
traceroute to 4.4.4.4(4.4.4.4), max hops: 30 ,packet length: 40,press CTRL_C t
o break
1 192.168.12.2 30 ms 20 ms 20 ms
2 192.168.24.4 30 ms 10 ms 20 ms
//检查访问路劲
第四部配置静态a1,a3,a4
[ar1]ip route-static 4.4.4.4 32 GigabitEthernet 0/0/1 192.168.13.3
[ar3]ip route-static 4.4.4.4 32 GigabitEthernet 0/0/1 192.168.34.4
[ar3]ip route-static 1.1.1.1 32 GigabitEthernet 0/0/0 192.168.13.1
[ar4]ip route-static 1.1.1.1 32 GigabitEthernet 0/0/1 192.168.34.3
[ar1]tracert -a 1.1.1.1 4.4.4.4
traceroute to 4.4.4.4(4.4.4.4), max hops: 30 ,packet length: 40,press CTRL_C t
o break
1 192.168.13.3 30 ms 20 ms 10 ms
2 192.168.34.4 20 ms 20 ms 20 ms
//由于静态优先级比rip高,所以优先选择静态,
THE END