HCNA练习图串行链路pap认证GRE隧道-广域网

话不多说直接上图

实验拓扑图

HCNA练习图串行链路pap认证GRE隧道-广域网_第1张图片

拓扑需求

3台PC、两台交换机、三台路由、一台DNS服务器

实验要求

1.A公司介入串行链路通过pap认证才能访问互联网
2.A与B之间建立GRE隧道,并运行OSPF单区域路由协议
3.A和B都做NAT,实现局域网内主机都可访问互联网
4.做标准ACL使得A公司PC1可以访问B公司PC,PC2不可以访问B公司PC

各个设备之间的配置

R2路由器(串行链路pap认证)

<Huawei>sys	
[Huawei]sysname R2
[R2]int Serial 1/0/0
[R2-Serial1/0/0]ip address 61.128.1.1 30
[R2-Serial1/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 202.100.1.1 30
[R2-GigabitEthernet0/0/1]qu
[R2]aaa
[R2-aaa]local-user hcia password cipher huawei
[R2-aaa]local-user hcia service-type ppp
[R2-aaa]qu
[R2]int Serial 1/0/0
[R2-Serial1/0/0]link-protocol ppp
[R2-Serial1/0/0]ppp authentication-mode pap
[R2-Serial1/0/0]qu
[R2]int lo0
[R2-LoopBack0]ip add 8.8.8.8 32

R1路由器

<Huawei>sys
[Huawei]sysname R1
[R1]interface Serial 1/0/0
[R1-Serial1/0/0]ip address 61.128.1.2 30
[R1-Serial1/0/0]ppp pap local-user hcia password cipher huawei
[R1-Serial1/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.254 24
[R1-GigabitEthernet0/0/1]qu
[R1]ip route-static 0.0.0.0 0 61.128.1.1

R3路由器

<Huawei>sys
[Huawei]sysname R3
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 202.100.1.2 30
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 172.16.1.254 24
[R3-GigabitEthernet0/0/2]qu
[R3]ip route-static 0.0.0.0 0 202.100.1.1

R1路由器(gre隧道)

[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]tunnel-protocol gre 
[R1-Tunnel0/0/0]ip add 10.1.1.1 30
[R1-Tunnel0/0/0]source 61.128.1.2
[R1-Tunnel0/0/0]destination 202.100.1.2

R3路由器

[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]tunnel-protocol gre 
[R3-Tunnel0/0/0]ip add 10.1.1.2 30
[R3-Tunnel0/0/0]source  202.100.1.2
[R3-Tunnel0/0/0]destination 61.128.1.2

R1路由器(ospf单区域)

[R1]ospf router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]qu
[R1-ospf-1]qu
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ospf enable 1 area 0
[R1-Tunnel0/0/0]qu
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ospf enable 1 area 0
[R1-GigabitEthernet0/0/1]qu

R3路由器

[R3]ospf router-id 3.3.3.3
[R3-ospf-1]a 0
[R3-ospf-1-area-0.0.0.0]qu
[R3-ospf-1]qu
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ospf enable 1 area 0
[R3-Tunnel0/0/0]int g0/0/2
[R3-GigabitEthernet0/0/2]ospf enable 1 area 0
[R3-GigabitEthernet0/0/2]qu

R1路由器(nat访问外网)

[R1]acl number 2000
[R1-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]qu
[R1]interface Serial 1/0/0
[R1-Serial1/0/0]nat outbound 2000
[R1-Serial1/0/0]qu

R3路由器(标准控制访问列表)

[R3]acl number 2000
[R3-acl-basic-2000]rule 5 permit source 172.16.1.0 0.0.0.255
[R3-acl-basic-2000]int g 0/0/1
[R3-GigabitEthernet0/0/1]nat outbound 2000
[R3-GigabitEthernet0/0/1]qu
[R3]acl number 2001
[R3-acl-basic-2001]rule 5 deny source 192.168.1.2 0
[R3-acl-basic-2001]rule 10 permit source any 
[R3-acl-basic-2001]int g0/0/2
[R3-GigabitEthernet0/0/2]traffic-filter outbound acl 2001

实验结语

实验完成后PC2不能PING到B公司就做好了标准的acl访问控制列表,在此也可以做扩展访问控制列表,扩展访问控制列表靠近源端,标准访问控制列表靠近目的端。

你可能感兴趣的:(网络)