今天来做MGRE的综合实验使用工具依旧为ensp,这次的配置主要是来说明如何解决多个不同的私有网络之间如何通讯的问题,以及其配置方法,下面来看一下实验要求:
一、实验要求分析
依据上图的说明来看第一点就是告诉我们R5为ISP设备只能配置公有IP地址,不能对他进行任何其他操作。第二点要求我们在R1-R5之间配置ppp的pap认证,且R5为主认证方;R2-R5之间配置ppp的chap认证,且R5为主认证方;R3-R5之间更改为以HDLC方式封装。第三点要求我们以R1为中心R2,R3为成员的基础上搭建一个MGRE环境且还要以R1,R4为基础搭建一个点到点的GRE环境。第四点要求配置rip实现pc间的通讯。最后要求所有的pc可以与R5的环回通讯,这就要求配置nat来完成要求。
二、IP地址的划分
5.5.5.0/27 | 用于主干 |
5.5.5.32/27 | 用于主干 |
5.5.5.64/27 | 用于主干 |
5.5.5.96/27 | 用于主干 |
5.5.5.128/27 | 用于用户 |
5.5.5.160/27 | 预留 |
5.5.5.192/27 | 预留 |
5.5.5.224/27 | 预留 |
该实验私网没有IP地址限制所以所有的cp端可随心意配置,如下配置可参考:
三、路由器配置
一号路由器:
[V200R003C00]
#
sysname R1
#
board add 0/2 2SA
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
acl number 2000
rule 5 permit source 192.168.0.0 0.0.255.255
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$.:'wY:<ok9Jd0^8uivhV,&`c%$%$
local-user admin service-type ppp
#
firewall zone Local
priority 15
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
#
interface Ethernet0/0/4
#
interface Ethernet0/0/5
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface Serial2/0/0
link-protocol ppp
ppp authentication-mode pap
remote address 5.5.5.34
ip address 5.5.5.34 255.255.255.224
nat outbound 2000
#
interface Serial2/0/1
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 192.168.1.10 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface NULL0
#
interface Tunnel0/0/0
ip address 192.168.5.1 255.255.255.0
tunnel-protocol gre
source 5.5.5.34
destination 5.5.5.98
#
interface Tunnel0/0/1
ip address 192.168.6.1 255.255.255.0
undo rip split-horizon
tunnel-protocol gre p2mp
source 5.5.5.34
nhrp entry multicast dynamic
nhrp network-id 100
#
rip 1
version 2
network 192.168.1.0
network 192.168.5.0
network 192.168.6.0
#
ip route-static 0.0.0.0 0.0.0.0 5.5.5.33
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
二号路由器:
[V200R003C00]
#
sysname R2
#
board add 0/2 2SA
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
acl number 2000
rule 5 permit source 192.168.0.0 0.0.255.255
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
local-user liming password cipher %$%$[hh`~H/G`E,DxIBLrP"Q,6^F%$%$
local-user liming service-type ppp
#
firewall zone Local
priority 15
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
#
interface Ethernet0/0/4
#
interface Ethernet0/0/5
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface Serial2/0/0
link-protocol ppp
#
interface Serial2/0/1
link-protocol ppp
ppp authentication-mode chap
remote address 5.5.5.2
ip address 5.5.5.2 255.255.255.224
nat outbound 2000
#
interface GigabitEthernet0/0/0
ip address 192.168.2.10 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface NULL0
#
interface Tunnel0/0/1
ip address 192.168.6.2 255.255.255.0
tunnel-protocol gre p2mp
source Serial2/0/1
nhrp network-id 100
nhrp entry 192.168.6.1 5.5.5.34 register
#
rip 1
version 2
network 192.168.6.0
network 192.168.2.0
#
ip route-static 0.0.0.0 0.0.0.0 5.5.5.1
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
三号路由器:
[V200R003C00]
#
sysname R3
#
board add 0/4 2SA
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
acl number 2000
rule 5 permit source 192.168.0.0 0.0.255.255
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface Serial4/0/0
link-protocol ppp
#
interface Serial4/0/1
link-protocol ppp
ip address 5.5.5.66 255.255.255.224
nat outbound 2000
#
interface GigabitEthernet0/0/0
ip address 192.168.3.10 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/1
ip address 192.168.6.3 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/1
nhrp network-id 100
nhrp entry 192.168.6.1 5.5.5.34 register
#
rip 1
version 2
network 192.168.6.0
network 192.168.3.0
#
ip route-static 0.0.0.0 0.0.0.0 5.5.5.65
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
四号路由器:
[V200R003C00]
#
sysname R4
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
vlan batch 22
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
acl number 2000
rule 5 permit source 192.168.0.0 0.0.255.255
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
#
interface Ethernet0/0/4
#
interface Ethernet0/0/5
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface GigabitEthernet0/0/0
ip address 5.5.5.98 255.255.255.224
nat outbound 2000
#
interface GigabitEthernet0/0/1
ip address 192.168.4.10 255.255.255.0
#
interface NULL0
#
interface Tunnel0/0/0
ip address 192.168.5.2 255.255.255.0
tunnel-protocol gre
source 5.5.5.98
destination 5.5.5.34
#
rip 1
version 2
network 192.168.1.0
network 192.168.5.0
network 192.168.4.0
#
ip route-static 0.0.0.0 0.0.0.0 5.5.5.97
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
五号路由器:
[V200R003C00]
#
sysname ISP
#
board add 0/1 2SA
board add 0/2 2SA
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
#
interface Ethernet0/0/4
#
interface Ethernet0/0/5
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface Serial1/0/0
link-protocol ppp
ppp chap user liming
ppp chap password cipher %$%$l,_d;\B0P$,2W8G!;^TS,%K5%$%$
ip address 5.5.5.1 255.255.255.224
#
interface Serial1/0/1
link-protocol ppp
ppp pap local-user admin password cipher %$%$|AjJ'}o:H+zd0{X8'cW*,#T@%$%$
ip address 5.5.5.33 255.255.255.224
#
interface Serial2/0/0
link-protocol ppp
#
interface Serial2/0/1
link-protocol ppp
ip address 5.5.5.65 255.255.255.224
#
interface GigabitEthernet0/0/0
ip address 5.5.5.97 255.255.255.224
#
interface GigabitEthernet0/0/1
#
interface NULL0
#
interface LoopBack0
ip address 5.5.5.129 255.255.255.224
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
四、实验结果展示
1.认证和封装
(1)PAP认证(这里的Serial2/0/0接口显示物理up和逻辑up状态时,就表示pap认证协议成功)
(2)CHAP认证(同PAP认证一致,但CHAP使用密文进行认证的)
(3)HDLC封装
2.MGER,DRE环境搭建
(1)DRE环境
(2)MDRE环境
3.基于RIP实现pc互联
4.所有的pc端可以访问R5环回
一号pc:
二号pc:
三号pc:
四号pc: