实现步骤如下,仅供参考学习:
实现了R1与R5之间的PPP pap认证
[r1]int serial 0/0/0
[r1-Serial0/0/0]ip add 15.1.1.1 24
[r1-Serial0/0/0]ppp pap local-user panxi password cipher 123456
[Huawei]sysname isp
[isp]int loopback 0
[isp-LoopBack0]ip add 5.5.5.5 24
[isp-LoopBack0]q
[isp]aaa
[isp-aaa]local-user panxi password cipher 123456
[isp-aaa]int serial 0/0/0
[isp-Serial0/0/0]ip add 15.1.1.2 24
[isp-Serial0/0/0]ppp authentication-mode pap
---------------------
实现了R2与R5之间的PPP chap认证
[isp]int serial 0/0/1
[isp-Serial0/0/1]ip add 25.1.1.1 24
[isp-Serial0/0/1]ppp authentication-mode chap
[r2]interface Serial0/0/0
[r2-Serial0/0/0] ppp chap user panxi
[r2-Serial0/0/0] ppp chap password cipher 123456
[r2-Serial0/0/0]ip add 25.1.1.2 24
---------------------
R5与R3 HDLC连接
[isp]int serial 0/0/2
[isp-Serial0/0/2]ip add 35.1.1.1 24
[isp-Serial0/0/2]link-protocol hdlc
[r3]int serial 0/0/0
[r3-Serial0/0/0]ip add 35.1.1.2 24
[r3-Serial0/0/0]link-protocol hdlc
-----------------------
R5与R4 以太网连接
[isp-GigabitEthernet0/0/0]ip add 45.1.1.2 24
[r4-GigabitEthernet0/0/0]ip add 45.1.1.1 24
------
配置静态路由
[r1]ip route-static 0.0.0.0 0 15.1.1.2
[r2]ip route-static 0.0.0.0 0 25.1.1.1
[r3]ip route-static 0.0.0.0 0 35.1.1.1
[r4]ip route-static 0.0.0.0 0 45.1.1.2
------------------------------
实现R1\R2\R3 mgre
[r1]int tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 10.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 15.1.1.1
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nhrp network-id 100
[r2]int tunnel 0/0/0
[r2-Tunnel0/0/0]ip add 10.1.1.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source serial 0/0/0
[r2-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
[r2-Tunnel0/0/0]nhrp network-id 100
[r3]int tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 10.1.1.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source serial 0/0/0
[r3-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
[r3-Tunnel0/0/0]nhrp network-id 100
-----------------------------------
实现R1\R4 gre
[r1]int tunnel 0/0/1
[r1-Tunnel0/0/1]ip add 10.1.2.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]destination 45.1.1.1
[r1-Tunnel0/0/1]source 15.1.1.1
[r4]interface Tunnel0/0/1
[r4] ip address 10.1.2.1 255.255.255.0
[r4]tunnel-protocol gre
[r4]source 45.1.1.1
[r4]destination 15.1.1.1
-----------------
[r1-Ethernet0/0/0]ip add 192.168.1.1 24
[r2-Ethernet0/0/0]ip add 192.168.2.1 24
[r3-Ethernet0/0/0]ip add 192.168.3.1 24
[r4-Ethernet0/0/0]ip add 192.168.4.1 24
---------------------
4、私有网络基于RIP全网可达
[r1]rip 1
[r1-rip-1]verify-source
[r1-rip-1]version 2
[r1-rip-1]un summary
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 10.0.0.0
[r2]rip 1
[r2-rip-1]verify-source
[r2-rip-1]version 2
[r2-rip-1]un summary
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 10.0.0.0
[r3]rip 1
[r3-rip-1]verify-source
[r3-rip-1]version 2
[r3-rip-1]un summary
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 10.0.0.0
[r4]rip 1
[r4-rip-1]verify-source
[r4-rip-1]version 2
[r4-rip-1]un summary
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 10.0.0.0
[r1]int tunnel 0/0/0
[r1-Tunnel0/0/0]undo rip split-horizon
---------------------------------
5、所有的客户端通过R5上网,acl用法。
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]int s0/0/0
[r1-Serial0/0/0]nat outbound 2000
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r2-acl-basic-2000]int serial 0/0/0
[r2-Serial0/0/0]nat outbound 2000
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]int serial 0/0/0
[r3-Serial0/0/0]nat outbound 2000
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r4-acl-basic-2000]int g0/0/0
[r4-GigabitEthernet0/0/0]nat outbound 2000
----------------------仅供参考学习--------------------
2020-09-26