拓扑和IP配置
另外:AR2有一个回环:50.0.1.1 24
基础配置-ip和nat
AR1
sys
int s 4/0/0
ip add 10.0.0.2 16
int g 0/0/0
ip add 192.168.1.1 24
q
ip route-static 0.0.0.0 0 10.0.0.1
acl 2000
rule permit source 192.168.1.0 0.0.0.255
INT S 4/0/0
nat outbound 2000
AR2(ISP)
sys
int s 4/0/0
ip add 10.0.0.1 16
int s 4/0/1
ip add 20.0.0.1 16
int s 3/0/0
ip add 30.0.0.1 16
interface LoopBack 1
ip a 50.0.1.1 24
AR3
sys
int s 4/0/0
ip add 20.0.0.2 16
int g 0/0/0
ip add 192.168.2.1 24
q
ip route-static 0.0.0.0 0 20.0.0.1
acl 2000
rule permit source 192.168.2.0 0.0.0.255
INT S 4/0/0
nat outbound 2000
AR4
sys
int s 4/0/0
ip add 30.0.0.2 16
int g 0/0/0
ip add 192.168.3.1 24
ip route-static 0.0.0.0 0 30.0.0.1
acl 2000
rule permit source 192.168.3.0 0.0.0.255
INT S 4/0/0
nat outbound 2000
HDCL封装
AR1
int s 4/0/0
link-protocol hdlc
#需要y
AR2
int s 4/0/0
link-protocol hdlc
#需要y
测试
PPP-pap认证
R2
aaa
local-user huawei password cipher 123456
local-user huawei service-type ppp
int s 4/0/1
link-protocol ppp
ppp authentication-mode pap
AR3
interface Serial 4/0/0
link-protocol ppp
ppp pap local-user huawei password cipher 123456
测试
ppp-CHAP认证
AR2
interface Serial 3/0/0
link-protocol ppp
ppp authentication-mode chap
AR4
interface Serial 4/0/0
ppp chap user huawei
ppp chap password cipher 123456
测试
MGRE
AR1
int t 0/0/0
ip add 192.168.4.1 24
tunnel-protocol gre p2mp
source 10.0.0.2
nhrp entry multicast dynamic
nhrp network-id 100
AR3
int t 0/0/0
ip add 192.168.4.2 24
tunnel-protocol gre p2mp
source Serial 4/0/0
nhrp entry 192.168.4.1 10.0.0.2 register
nhrp network-id 100
AR4
int t 0/0/0
ip add 192.168.4.3 24
tunnel-protocol gre p2mp
source s 4/0/0
nhrp entry 192.168.4.1 10.0.0.2 register
nhrp network-id 100
PIR
AR1
version 2
network 192.168.1.0
network 192.168.4.0
# 关闭水平分割
int t 0/0/0
undo rip split-horizon
AR3
rip 1
version 2
network 192.168.2.0
network 192.168.4.0
AR4
rip 1
version 2
network 192.168.3.0
network 192.168.4.0
测试
测试回环
测试远端pc