实验目标:运用动态路由协议(RIP),使AR1与AR4实现通信
AR1改名为PC1
AR4改名为PC2
其余两台路由器各改名为:R1、R2
直接实验:
配置:
PC1 :
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname PC1
[PC1]int g0/0/0
[PC1-GigabitEthernet0/0/0]ip add 192.168.10.1 24 #配置IP
[PC1]rip #启用RIP
[PC1-rip-1]vers
[PC1-rip-1]version 2 #配置RIP 版本2
[PC1-rip-1]net
[PC1-rip-1]network 192.168.10.0 #宣告网段
R1 :
<Huawei>SYS
Enter system view, return user view with Ctrl+Z.
[Huawei]SYS
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.10.2 24
Apr 22 2022 14:44:51-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.20.1 24
Apr 22 2022 14:45:16-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]q
[R1]rip
[R1-rip-1]ver
[R1-rip-1]versi
[R1-rip-1]version 2
[R1-rip-1]net
[R1-rip-1]network 192.168.10.0 #宣告网段
[R1-rip-1]net
[R1-rip-1]network 192.168.20.0
R2 :
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname
^
Error:Incomplete command found at '^' position.
[Huawei]sys
[Huawei]sysname R1
[R1]SYS
[R1]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.20.2 24
Apr 22 2022 14:46:27-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R2-GigabitEthernet0/0/0]q
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.30.1 24
Apr 22 2022 14:46:44-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R2-GigabitEthernet0/0/1]q
[R2]rip
[R2-rip-1]ver
[R2-rip-1]vers
[R2-rip-1]version 2
[R2-rip-1]net
[R2-rip-1]network 192.168.20.0 #宣告网段
[R2-rip-1]net
[R2-rip-1]network 192.168.30.0
PC2:
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname PC2
[PC2]int g0/0/0
[PC2-GigabitEthernet0/0/0]ip add 192.168.30.2 24
Apr 22 2022 14:47:47-08:00 PC2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[PC2-GigabitEthernet0/0/0]q
[PC2]rip
[PC2-rip-1]vers
[PC2-rip-1]version 2
[PC2-rip-1]net
[PC2-rip-1]network 192.168.30.0 #宣告网段
[PC2-rip-1]q
验证PC1与PC2 ping是否互通
PC2 PING PC1:
<PC2>ping 192.168.10.1
PING 192.168.10.1: 56 data bytes, press CTRL_C to break
Request time out #MAC地址请求丢包现象,正常
Request time out
Reply from 192.168.10.1: bytes=56 Sequence=3 ttl=253 time=40 ms
Reply from 192.168.10.1: bytes=56 Sequence=4 ttl=253 time=40 ms
Reply from 192.168.10.1: bytes=56 Sequence=5 ttl=253 time=30 ms
--- 192.168.10.1 ping statistics ---
5 packet(s) transmitted
3 packet(s) received
40.00% packet loss
round-trip min/avg/max = 30/36/40 ms
PC1再ping PC2:
<PC1>ping 192.0168.30.2
PING 192.0168.30.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.30.2: bytes=56 Sequence=1 ttl=253 time=40 ms
Reply from 192.168.30.2: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 192.168.30.2: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 192.168.30.2: bytes=56 Sequence=4 ttl=253 time=40 ms
Reply from 192.168.30.2: bytes=56 Sequence=5 ttl=253 time=30 ms
--- 192.0168.30.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/34/40 ms