HCIP-MGRE实验

实验拓扑图在这里插入图片描述

需求

1 R5为ISP ,只能进行IP地址配置;其所有地址均配为公有IP地址
2 R1和R5间使用PPP的PAP认证,R5为主认证方;
R2于R5之间使用ppp的chap认证,R5为主认证方;
R3于R5之间使用HDLC封装。
3 R1/R2/R3构建一个MGRE环境,R1为中心站点;R1、R4间为点到点的GRE。
4 整个私有网络基于 == 静态路由 == 全网可达
5 所有pc设置私有IP为源IP,可以访问R5环回。

ip规划
在这里插入图片描述
实验代码

R1


[V200R003C00]
#
 sysname R1
#
 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 flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 set cpu-usage threshold 80 restore 75
#
dhcp enable
#
undo dhcp server bootp
#
acl number 2000  
 rule 5 permit source 192.168.1.0 0.0.0.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
 ppp pap local-user huawei1 password cipher %$%$9Q>KPI={@N]W$Q;7iR4~,.{1%$%$
 ip address 15.0.0.2 255.255.255.0 
 nat outbound 2000
#
interface Serial4/0/1
 link-protocol ppp
#
interface GigabitEthernet0/0/0
 ip address 192.168.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/0
 ip address 192.168.5.1 255.255.255.0 
 tunnel-protocol gre p2mp
 source 15.0.0.2
 nhrp redirect
#
interface Tunnel0/0/1
 ip address 192.168.6.1 255.255.255.0 
 tunnel-protocol gre
 source 15.0.0.2
 destination 45.0.0.2
#
ip route-static 0.0.0.0 0.0.0.0 15.0.0.1
ip route-static 192.168.2.0 255.255.255.0 192.168.5.2
ip route-static 192.168.3.0 255.255.255.0 192.168.5.3
ip route-static 192.168.4.0 255.255.255.0 192.168.6.2
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R2


[V200R003C00]
#
 sysname R2
#
 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 flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 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 Serial4/0/0
 link-protocol ppp
 ppp chap user huawei2
 ppp chap password cipher %$%$c[||/_N)^:UJTrQz)4S-,"go%$%$
 ip address 25.0.0.2 255.255.255.0 
#
interface Serial4/0/1
 link-protocol ppp
#
interface GigabitEthernet0/0/0
 ip address 192.168.2.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/0
 ip address 192.168.5.2 255.255.255.0 
 tunnel-protocol gre p2mp
 source Serial4/0/0
 nhrp shortcut
 nhrp entry 192.168.5.1 15.0.0.2 register
#
ip route-static 0.0.0.0 0.0.0.0 25.0.0.1
ip route-static 192.168.1.0 255.255.255.0 192.168.5.1
ip route-static 192.168.3.0 255.255.255.0 192.168.5.1
ip route-static 192.168.4.0 255.255.255.0 25.0.0.1
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R3


[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 flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 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 Serial4/0/0
 link-protocol hdlc
 ip address 35.0.0.2 255.255.255.0 
#
interface Serial4/0/1
 link-protocol ppp
#
interface GigabitEthernet0/0/0
 ip address 192.168.3.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/0
 ip address 192.168.5.3 255.255.255.0 
 tunnel-protocol gre p2mp
 source Serial4/0/0
 nhrp shortcut
 nhrp entry 192.168.5.1 15.0.0.2 register
#
ip route-static 0.0.0.0 0.0.0.0 35.0.0.1
ip route-static 35.0.0.0 255.255.255.0 Serial4/0/0
ip route-static 192.168.1.0 255.255.255.0 192.168.5.1
ip route-static 192.168.2.0 255.255.255.0 192.168.5.1
ip route-static 192.168.4.0 255.255.255.0 35.0.0.1
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R4


[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
#
 wlan ac-global carrier id other ac id 0
#
 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 GigabitEthernet0/0/0
 ip address 45.0.0.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.4.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/0
#
interface Tunnel0/0/1
 ip address 192.168.6.2 255.255.255.0 
 tunnel-protocol gre
 source 45.0.0.2
 destination 15.0.0.2
#
ip route-static 0.0.0.0 0.0.0.0 45.0.0.1
ip route-static 192.168.1.0 255.255.255.0 192.168.6.1
ip route-static 192.168.2.0 255.255.255.0 45.0.0.1
ip route-static 192.168.3.0 255.255.255.0 45.0.0.11
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

ISP


[V200R003C00]
#
 sysname isp
#
 board add 0/3 2SA 
 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 flash:/portalpage.zip
#
 drop illegal-mac alarm
#
 wlan ac-global carrier id other ac id 0
#
 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
 local-user huawei1 password cipher %$%$#iaO#)'z6-7ElqT(af+Yn3<r%$%$
 local-user huawei1 service-type ppp
 local-user huawei2 password cipher %$%$tcV=!%M[3C;(527z,6mFn9L\%$%$
 local-user huawei2 service-type ppp
#
firewall zone Local
 priority 15
#
interface Serial3/0/0
 link-protocol ppp
 ppp authentication-mode pap 
 ip address 15.0.0.1 255.255.255.0 
#
interface Serial3/0/1
 link-protocol ppp
 ppp authentication-mode chap 
 ip address 25.0.0.1 255.255.255.0 
#
interface Serial4/0/0
 link-protocol hdlc
 ip address 35.0.0.1 255.255.255.0 
#
interface Serial4/0/1
 link-protocol ppp
#
interface GigabitEthernet0/0/0
 ip address 45.0.0.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.0 
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

CyberSecure

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值