HCIP-MGRE实验

实验拓扑图HCIP-MGRE实验_第1张图片

需求

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规划
HCIP-MGRE实验_第2张图片
实验代码

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
 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

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