• 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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
  • 相关阅读:
    如何使用Puppeteer进行新闻网站数据抓取和聚合
    flask中使用redis做缓存
    动手学深度学习(Pytorch版)代码实践 -计算机视觉-38实战Kaggle比赛:图像分类 (CIFAR-10)
    python接口自动化之ConfigParser配置文件的使用
    Go 接口-契约介绍
    RNN/LSTM (二) 实践案例
    [杂货铺系列]SpringBoot集成ElasticJob遇到的版本不兼容问题
    基于小波变换的分形信号r指数求解算法matlab仿真
    Vue3配置router路由步骤
    【Postman】postman生成测试报告完整步骤(包含命令与newman安装教程链接)
  • 原文地址:https://blog.csdn.net/m0_61802503/article/details/133954222