<Huawei>sys
[Huawei]sys r1
[r1]int LoopBack 0
[r1-LoopBack0]ip add 10.10.10.1 32 //设置虚拟接口IP
[r1-LoopBack0]q
[r1]int s0/0/0
[r1-Serial0/0/0]link-protocol hdlc //使用hdlc协议,默认ppp
Warning: The encapsulation protocol of the link will be changed.
Continue? [Y/N]:y
[r1-Serial0/0/0]ip add unnumbered interface LoopBack 0 //借用虚拟接口loopback 0 地址
[r1-Serial0/0/0]q
[r1]ip route-static 10.10.10.0 24 s0/0/0
<Huawei>sys
[Huawei]sys r2
[r2]int s0/0/0
[r2-Serial0/0/0]link-protocol hdlc //使用hdlc协议,默认ppp
Warning: The encapsulation protocol of the link will be changed.
Continue? [Y/N]:y
[r2-Serial0/0/0]ip address 10.10.10.2 24
[r2-Serial0/0/0]q
[r2]ping 10.10.10.1
PING 10.10.10.1: 56 data bytes, press CTRL_C to break
Reply from 10.10.10.1: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 10.10.10.1: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.10.10.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 10.10.10.1: bytes=56 Sequence=4 ttl=255 time=10 ms
Reply from 10.10.10.1: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 10.10.10.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/18/30 ms
ping通,hdlc接口地址借用成功。
关注点赞收藏,感谢大家。