一.搭建拓扑图
二.实验前的准备以及RIP的基本配置
1.网关的配置
AR1
<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys shutiao1
[shutiao1]int g0/0/0
[shutiao1-GigabitEthernet0/0/0]ip ad
[shutiao1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[shutiao1-GigabitEthernet0/0/0]
Dec 25 2024 19:58:32-08:00 shutiao1 %%01IFNET/4/LINK_STATE(l)[0]:The line protoc
ol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[shutiao1-GigabitEthernet0/0/0]q
[shutiao1]int g0/0/1
[shutiao1-GigabitEthernet0/0/1]ipad
[shutiao1-GigabitEthernet0/0/1]ip ad
[shutiao1-GigabitEthernet0/0/1]ip address 192.168.2.1 24
Dec 25 2024 19:59:02-08:00 shutiao1 %%01IFNET/4/LINK_STATE(l)[1]:The line protoc
ol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[shutiao1-GigabitEthernet0/0/1]q
不要忘记改名哦,养成一个好习惯
AR2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
<Huawei>sys shutiao2
[shutiao2]int g0/0/0
[shutiao2-GigabitEthernet0/0/0]ip ad
[shutiao2-GigabitEthernet0/0/0]ip address 192.168.2.2 24
Dec 25 2024 19:59:22-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[shutiao2-GigabitEthernet0/0/0]q
[shutiao2]int g0/0/1
[shutiao2-GigabitEthernet0/0/1]ip ad
[shutiao2-GigabitEthernet0/0/1]ip address 192.168.3.1 24
Dec 25 2024 19:59:37-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[shutiao2-GigabitEthernet0/0/1]q
2.RIP的基本配置
AR1
[shutiao1]ri
[shutiao1]rip 1
[shutiao1-rip-1]ver
[shutiao1-rip-1]version 2
[shutiao1-rip-1]ne
[shutiao1-rip-1]network 192.168.1.0
[shutiao1-rip-1]net
[shutiao1-rip-1]network 192.168.2.0
[shutiao1-rip-1]q
1.最好使用version2(2比1相对好一点)
2.相邻的直连网段都要宣告一遍
AR2
[shutiao2]rip
[shutiao2]rip 1
[shutiao2-rip-1]ver
[shutiao2-rip-1]version 2
[shutiao2-rip-1]net
[shutiao2-rip-1]network 192.168.2.0
[shutiao2-rip-1]net
[shutiao2-rip-1]network 192.168.3.0
[shutiao2-rip-1]q
也是与AR2直连的网段都要宣告
三.检验实验成果
AR1
[shutiao1]ping 192.168.2.2
PING 192.168.2.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.2.2: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 192.168.2.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.2.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 192.168.2.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.2.2: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 192.168.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/24/40 ms
[shutiao1]ping 192.168.3.1
PING 192.168.3.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.3.1: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 192.168.3.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.3.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 192.168.3.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.3.1: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 192.168.3.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/24/30 ms
AR2
[shutiao2]ping 192.168.1.1
PING 192.168.1.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=40 ms
--- 192.168.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/22/40 ms
[shutiao2]ping 192.168.2.1
PING 192.168.2.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.2.1: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 192.168.2.1: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 192.168.2.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 192.168.2.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.2.1: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 192.168.2.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/20/30 ms
PC1
PC>ping 192.168.3.10
Ping 192.168.3.10: 32 data bytes, Press Ctrl_C to break
From 192.168.3.10: bytes=32 seq=1 ttl=126 time=16 ms
From 192.168.3.10: bytes=32 seq=2 ttl=126 time=15 ms
From 192.168.3.10: bytes=32 seq=3 ttl=126 time=31 ms
From 192.168.3.10: bytes=32 seq=4 ttl=126 time=16 ms
From 192.168.3.10: bytes=32 seq=5 ttl=126 time=16 ms
--- 192.168.3.10 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/18/31 ms
PC2
PC>ping 192.168.1.10
Ping 192.168.1.10: 32 data bytes, Press Ctrl_C to break
From 192.168.1.10: bytes=32 seq=1 ttl=126 time=15 ms
From 192.168.1.10: bytes=32 seq=2 ttl=126 time=16 ms
From 192.168.1.10: bytes=32 seq=3 ttl=126 time=31 ms
From 192.168.1.10: bytes=32 seq=4 ttl=126 time=16 ms
From 192.168.1.10: bytes=32 seq=5 ttl=126 time=15 ms
--- 192.168.1.10 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/18/31 ms
到这里RIP的基本配置你就已经掌握啦!
学无止境!!!