1、组建拓扑图,编写IP
2、分别给R1,R2,R3,R4,R5部署IP地址
R1部署IP:
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip add
[R1-GigabitEthernet0/0/0]ip address 172.16.1.1 29
R2部署IP
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip add
[R2-GigabitEthernet0/0/0]ip address 172.16.1.2 29
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip add
[R2-GigabitEthernet0/0/1]ip address 172.16.1.9 29
R3部署IP
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip add
[R3-GigabitEthernet0/0/0]ip address 172.16.1.10 29[R3]interface g0/0/1
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/1]ip add
[R3-GigabitEthernet0/0/1]ip address 172.16.1.17 29
R4部署IP
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]ip add
[R4-GigabitEthernet0/0/1]ip address 172.16.1.18 29
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]ip add
[R4-GigabitEthernet0/0/0]ip address 172.16.1.25 29
R5部署IP
[R5]interface g0/0/1
[R5-GigabitEthernet0/0/1]ip add
[R5-GigabitEthernet0/0/1]ip address 172.16.1.26 29
[R5]int
[R5]interface g0/0/0
[R5-GigabitEthernet0/0/0]ip add
[R5-GigabitEthernet0/0/0]ip address 172.16.1.3 29
1、全网可达
分别给R2,R3,R4配环回地址
R2环回
[R2]interface loo
[R2]interface LoopBack 0
[R2-LoopBack0]ip add
[R2-LoopBack0]ip address 192.168.1.1 25
[R2-LoopBack0]q
[R2]int
[R2]interface loo
[R2]interface LoopBack 1
[R2-LoopBack1]ip addd
[R2-LoopBack1]ip add
[R2-LoopBack1]ip address 192.168.1.129 25
R3环回
[R3]interface loo
[R3]interface LoopBack 0
[R3-LoopBack0]ip addd
[R3-LoopBack0]ip add
[R3-LoopBack0]ip address 192.168.2.1 25
[R3-LoopBack0]q
[R3]int
[R3]interface loo
[R3]interface LoopBack 1
[R3-LoopBack1]ip add
[R3-LoopBack1]ip address 192.168.2.129 25
R4环回
[R4]interface loo
[R4]interface LoopBack 0
[R4-LoopBack0]ip
[R4-LoopBack0]ip add
[R4-LoopBack0]ip address 192.168.3.1 25
[R4-LoopBack0]q
[R4]int
[R4]interface loo
[R4]interface LoopBack 1
[R4-LoopBack1]ip add
[R4-LoopBack1]ip address 192.168.3.129 25
在R5pingR1可通
[R5]ping 172.16.1.1
PING 172.16.1.1: 56 data bytes, press CTRL_C to break
Reply from 172.16.1.1: bytes=56 Sequence=1 ttl=255 time=190 ms
Reply from 172.16.1.1: bytes=56 Sequence=2 ttl=255 time=40 ms
Reply from 172.16.1.1: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 172.16.1.1: bytes=56 Sequence=4 ttl=255 time=50 ms
Reply from 172.16.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 172.16.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/72/190 ms
2、R4环回不能被宣告
[R4]int
[R4]interface loo
[R4]interface LoopBack 2
[R4-LoopBack2]ip add
[R4-LoopBack2]ip address 100.1.1.1 24
3、R2,R3,R4环回汇总
R2环回汇总
[R2]int
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]rip sy
[R2-GigabitEthernet0/0/0]rip su
[R2-GigabitEthernet0/0/0]rip summary-address 192.168.1.0 255.255.255.0
[R2-GigabitEthernet0/0/0]q
[R2]int
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]rip su
[R2-GigabitEthernet0/0/1]rip summary-address 192.168.1.0 255.255.255.0
[R2-GigabitEthernet0/0/1]q
[R2]ip rou
[R2]ip route
[R2]ip route-static 192.168.1.0 24 nul.
[R2]ip route-static 192.168.1.0 24 nul 0
[R2]ip route-static 192.168.1.0 24 null 0
R3环回汇总
[R3]int
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip add
[R3-GigabitEthernet0/0/0]rip su
[R3-GigabitEthernet0/0/0]rip summary-address 192.168.2.0 255.255.255.0
[R3-GigabitEthernet0/0/0]q
[R3]int
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]rip su
[R3-GigabitEthernet0/0/1]rip summary-address 192.168.2.0 255.255.255.0
[R3-GigabitEthernet0/0/1]q
[R3]ip rou
[R3]ip route-
[R3]ip route-static 192.168.2.0 24 NULL0
R4环回汇总
[R4]int
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]rip
[R4-GigabitEthernet0/0/1]rip su
[R4-GigabitEthernet0/0/1]rip summary-address 192.168.3.0 255.255.255.0
[R4-GigabitEthernet0/0/1]q
[R4]int
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]q
[R4]int [R2]int
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]rip au
[R2-GigabitEthernet0/0/1]rip authentication-mode md5 u
[R2-GigabitEthernet0/0/1]rip authentication-mode md5 usual huwei
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]rip summary-address 192.168.3.0 255.255.255.0
[R4-GigabitEthernet0/0/0]q
[R4]ip rout
[R4]ip route-
[R4]ip route-static 192.168.3.0 24 NULL 0
环回汇总:
192.168.1.0/24 RIP 100 1 D 172.16.1.2 GigabitEthernet0/0/0
192.168.2.0/24 RIP 100 2 D 172.16.1.2 GigabitEthernet0/0/0
192.168.3.0/24 RIP 100 2 D 172.16.1.3 GigabitEthernet0/0/0
4、在R2与R3之间设置密码
R2端口密码:
[R2]int
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]rip au
[R2-GigabitEthernet0/0/1]rip authentication-mode md5 u
[R2-GigabitEthernet0/0/1]rip authentication-mode md5 usual huwei
R3端口密码:
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]rip
[R3-GigabitEthernet0/0/0]rip au
[R3-GigabitEthernet0/0/0]rip authentication-mode md5 usual huawei
5、加快收敛速度:
[R1]rip 1
[R1-rip-1]timers rip 15 90 60
[R1-rip-1]dis 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
Configured peers : None
Number of routes in database : 9
Number of interfaces enabled : 1
Triggered updates sent : 0
Number of route changes : 54
Number of replies to queries : 2
R2,R3,R4,R5与R1相同