一.实验拓扑如下
二.路由器配置
AR1
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname r1
[r1]int s4/0/0
[r1-Serial4/0/0]ip add 15.1.1.1 24
[r1-Serial4/0/0]int g0/0/0
[r1-GigabitEthernet0/0/0]ip ada 192.168.1.1 24
^
Error: Unrecognized command found at '^' position.
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
Jan 1 2023 18:34:29-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]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
<r1>sys
<r1>system-view
Enter system view, return user view with Ctrl+Z.
[r1]int s4/0/0
[r1-Serial4/0/0]lin
[r1-Serial4/0/0]link-protocol ppp
[r1-Serial4/0/0]ppp pap lo
[r1-Serial4/0/0]ppp pap local-user qu pa
[r1-Serial4/0/0]ppp pap local-user qu password huawei
^
Error: Unrecognized command found at '^' position.
[r1-Serial4/0/0]ppp pap local-user qu password ci
^
Error:Incomplete command found at '^' position.
[r1-Serial4/0/0]ppp pap local-user qu password huawei
^
Error: Unrecognized command found at '^' position.
[r1-Serial4/0/0]ppp pap local-user qu password huawei
^
Error: Unrecognized command found at '^' position.
[r1-Serial4/0/0]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
<r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]rip 1
[r1-rip-1]ver
[r1-rip-1]verify-source
[r1-rip-1]version 2
[r1-rip-1]undo
[r1-rip-1]undo su
[r1-rip-1]undo summary
[r1-rip-1]net
[r1-rip-1]network 10.0.0.0
[r1-rip-1]net
[r1-rip-1]network 192.168.1.0
[r1-rip-1]q
[r1]int s4/0/0
[r1-Serial4/0/0]nat a
[r1-Serial4/0/0]nat o
[r1-Serial4/0/0]nat outbound 2000
Error: The ACL does not exist.
[r1-Serial4/0/0]q
[r1]acl 2000
[r1-acl-basic-2000]rul
[r1-acl-basic-2000]rule 5 p
[r1-acl-basic-2000]rule 5 permit s
[r1-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[r1]int s4/0/0
[r1-Serial4/0/0]nat o
[r1-Serial4/0/0]nat outbound 2000
[r1-Serial4/0/0]dis
[r1-Serial4/0/0]dis th
[r1-Serial4/0/0]dis th
[V200R003C00]
#
interface Serial4/0/0
link-protocol ppp
ip address 15.1.1.1 255.255.255.0
nat outbound 2000
#
return
[r1-Serial4/0/0]
AR2
<Huawei>
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]int s4/0/0
[Huawei-Serial4/0/0]ip add15.1.1.2 24
^
Error: Unrecognized command found at '^' position.
[Huawei-Serial4/0/0]ip add 15.1.1.2 24
[Huawei-Serial4/0/0]
Jan 1 2023 19:05:27-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
PPP IPCP on the interface Serial4/0/0 has entered the UP state.
[Huawei-Serial4/0/0]int s4/0/1
[Huawei-Serial4/0/1]ip add 25.1.1.2 24
[Huawei-Serial4/0/1]
[Huawei-Serial4/0/1]int s3/0/0
[Huawei-Serial3/0/0]ip add link
[Huawei-Serial3/0/0]ip add link-p
[Huawei-Serial3/0/0]link-p
[Huawei-Serial3/0/0]link-protocol hd
[Huawei-Serial3/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Jan 1 2023 19:08:01-08:00 Huawei %%01IFNET/4/CHANGE_ENCAP(l)[1]:The user perfor
med the configuration that will change the encapsulation protocol of the link an
d then selected Y.
[Huawei-Serial3/0/0]
[Huawei-Serial3/0/0]
Jan 1 2023 19:08:01-08:00 Huawei %%01PPP/4/PHYSICALDOWN(l)[2]:On the interface
Serial3/0/0, PPP link was closed because the status of the physical layer was Do
wn.
[Huawei-Serial3/0/0]
Jan 1 2023 19:08:01-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[3]:The line protocol
PPP on the interface Serial3/0/0 has entered the DOWN state.
[Huawei-Serial3/0/0]
Jan 1 2023 19:08:01-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[4]:Interface Serial3/0
/0 has turned into DOWN state.
[Huawei-Serial3/0/0]
Jan 1 2023 19:08:01-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[5]:Interface Serial3/0
/0 has turned into UP state.
[Huawei-Serial3/0/0]
Jan 1 2023 19:08:01-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[6]:The line protocol
IP on the interface Serial3/0/0 has entered the UP state.
[Huawei-Serial3/0/0]a
^
Error:Incomplete command found at '^' position.
[Huawei-Serial3/0/0]ip add 35.1.1.2 24
[Huawei-Serial3/0/0]
Jan 1 2023 19:09:01-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[7]:The line protocol
IP on the interface Serial3/0/0 has entered the DOWN state.
[Huawei-Serial3/0/0]int lo0
[Huawei-LoopBack0]ip add 5.5.5.5 24
[Huawei-LoopBack0]q
[Huawei]aaa
[Huawei-aaa]loca
[Huawei-aaa]local-user qu pa
[Huawei-aaa]local-user qu password ci
[Huawei-aaa]local-user qu password cipher huawei
Info: Add a new user.
[Huawei-aaa]loc
[Huawei-aaa]local-user q p
[Huawei-aaa]local-user q password c
[Huawei-aaa]local-user q password cipher huawei
Info: Add a new user.
[Huawei-aaa]int s4/0/0
[Huawei-Serial4/0/0]ppp a
[Huawei-Serial4/0/0]ppp authentication-mode pap
[Huawei-Serial4/0/0]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int s4/0/0
[Huawei-Serial4/0/0]ping 15.1.1.2
PING 15.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 15.1.1.2: bytes=56 Sequence=1 ttl=255 time=10 ms
Reply from 15.1.1.2: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 15.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 15.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 15.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms
--- 15.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/2/10 ms
[Huawei-Serial4/0/0]q
[Huawei]int s4/0/1
[Huawei-Serial4/0/1]ppp au
[Huawei-Serial4/0/1]ppp authentication-mode chap
[Huawei-Serial4/0/1]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
AR3
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int s4/0/0
[Huawei-Serial4/0/0]ppp au
[Huawei-Serial4/0/0]ppp authentication-mode chap
[Huawei-Serial4/0/0]rip 1
[Huawei-rip-1]ve
[Huawei-rip-1]verify-source
[Huawei-rip-1]version 2
[Huawei-rip-1]undo su
[Huawei-rip-1]undo summary
[Huawei-rip-1]net
[Huawei-rip-1]network 10.0.0.0
[Huawei-rip-1]net
[Huawei-rip-1]network 192.168.2.0
[Huawei-rip-1]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
AR4
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]rip 1
[Huawei-rip-1]ver
[Huawei-rip-1]verify-source
[Huawei-rip-1]version 2
[Huawei-rip-1]undo su
[Huawei-rip-1]undo summary
[Huawei-rip-1]ne
[Huawei-rip-1]network 10.0.0.0
[Huawei-rip-1]net
[Huawei-rip-1]network 192.168.3.0
[Huawei-rip-1]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
三.进行测试
实验结束