• 搭建虚拟通道


    目录

     一.首先给各个网段划分IP​编辑

     二.在ISP上给每个接口都配上IP

    三.R1、R3之间为点到点的GRE

    四.整个私有网络基于RIP全网可达

     五.使用PC访问R5环回


     一.首先给各个网段划分IP

     二.在ISP上给每个接口都配上IP

    1. [ISP]display ip interface brief
    2. *down: administratively down
    3. ^down: standby
    4. (l): loopback
    5. (s): spoofing
    6. The number of interface that is UP in Physical is 6
    7. The number of interface that is DOWN in Physical is 3
    8. The number of interface that is UP in Protocol is 6
    9. The number of interface that is DOWN in Protocol is 3
    10. Interface IP Address/Mask Physical Protocol
    11. GigabitEthernet0/0/0 3.3.3.2/24 up up
    12. GigabitEthernet0/0/1 unassigned down down
    13. GigabitEthernet0/0/2 unassigned down down
    14. LoopBack0 5.5.5.1/24 up up(s)
    15. NULL0 unassigned up up(s)
    16. Serial3/0/0 2.2.2.2/24 up up
    17. Serial3/0/1 unassigned down down
    18. Serial4/0/0 1.1.1.2/24 up up
    19. Serial4/0/1 4.4.4.2/24 up up

     1.R1和R5之间使用ppp的pap认证,R5为主认证方

    1. [R1]aaa
    2. [R1-aaa]local-user admin password cipher 123456
    3. [R1-aaa]local-user admin service-type ppp
    4. [R1-aaa]q
    5. [R1]interface Serial 4/0/0
    6. [R1-Serial4/0/0]ppp authentication-mode pap
    1. [ISP]int s4/0/0
    2. [ISP-Serial4/0/0]ppp pap local-user admin password cipher 123456
    3. ###PPP会话是一次性会话,会话一旦建立,再配置认证将不生效,再下次会话建立时
    4. 才生效,所以下方重启接口了
    5. [ISP-Serial4/0/0]shutdown
    6. [ISP-Serial4/0/0]undo shutdown
    7. [ISP-Serial4/0/0]display this
    8. [V200R003C00]
    9. #
    10. interface Serial4/0/0
    11. link-protocol ppp
    12. ppp pap local-user admin password cipher %$%$::i-%`5&4%z^qW-Se5^4,+\*%$%$
    13. ip address 1.1.1.2 255.255.255.0
    14. #
    15. return

    2.R4和R5之间使用ppp的chap认证,R5为主认证方

    1. [R4-Serial4/0/0]ppp chap user admin
    2. [R4-Serial4/0/0]ppp chap password cipher 123456
    1. [ISP]int s4/0/1
    2. [ISP-Serial4/0/1]ppp authentication-mode chap
    1. [ISP-Serial4/0/1]shutdown
    2. [ISP-Serial4/0/1]undo shutdown
    3. [R4-Serial4/0/0]display this
    4. [V200R003C00]
    5. #
    6. interface Serial4/0/0
    7. link-protocol ppp
    8. ppp chap user admin
    9. ppp chap password cipher %$%$Pu^NH.P<BV]0NmQLHzKS,+e~%$%$
    10. ip address 4.4.4.1 255.255.255.0
    11. #
    12. return

    3.R2和R5使用HDLC封装

    1. [R2]int s4/0/0
    2. [R2-Serial4/0/0]link-protocol hdlc
    3. Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
    4. :y
    5. Sep 17 2022 19:10:50-08:00 R2 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed
    6. the configuration that will change the encapsulation protocol of the link and th
    7. en selected Y.
    1. [ISP-Serial3/0/0]link-protocol hdlc
    2. Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
    3. :y
    4. Sep 17 2022 19:12:22-08:00 ISP %%01IFNET/4/CHANGE_ENCAP(l)[8]:The user performed
    5. the configuration that will change the encapsulation protocol of the link and t
    6. hen selected Y.
    1. [ISP-Serial3/0/0]display this
    2. [V200R003C00]
    3. #
    4. interface Serial3/0/0
    5. link-protocol hdlc
    6. ip address 2.2.2.2 255.255.255.0
    7. #
    8. return

    三.R1、R3之间为点到点的GRE

    1. [R1]interface Tunnel 0/0/0
    2. [R1-Tunnel0/0/0]ip add 192.168.5.1 24
    3. [R1-Tunnel0/0/0]tunnel-protocol gre
    4. [R1-Tunnel0/0/0]source 1.1.1.1
    5. [R1-Tunnel0/0/0]destination 3.3.3.1
    6. Sep 17 2022 19:21:40-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
    7. on the interface Tunnel0/0/0 has entered the UP state.
    1. [R3]interface Tunnel 0/0/0
    2. [R3-Tunnel0/0/0]ip add 192.168.5.2 24
    3. [R3-Tunnel0/0/0]tunnel-protocol gre
    4. [R3-Tunnel0/0/0]source 3.3.3.1
    5. [R3-Tunnel0/0/0]destination 1.1.1.1

      2.R1/R2/R4构建一个MGRE环境,R1为中心站点

    1. [R1]int Tunnel 0/0/1
    2. [R1-Tunnel0/0/1]ip add 192.168.6.1 24
    3. [R1-Tunnel0/0/1]tunnel-protocol gre p2mp
    4. [R1-Tunnel0/0/1]source 1.1.1.1
    5. Sep 17 2022 19:39:34-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
    6. on the interface Tunnel0/0/1 has entered the UP state.
    7. [R1-Tunnel0/0/1]nhrp network-id 100
    1. [R4]int Tunnel 0/0/1
    2. [R4-Tunnel0/0/1]ip add 192.168.6.3 24
    3. [R4-Tunnel0/0/1]tunnel-protocol gre p2mp
    4. [R4-Tunnel0/0/1]source Serial 4/0/0
    5. [R4-Tunnel0/0/1]nhrp network-id 100
    6. [R4-Tunnel0/0/1]nhrp entry 192.168.6.1 1.1.1.1 register
    1. [R2]int Tunnel 0/0/1
    2. [R2-Tunnel0/0/1]ip add 192.168.6.2 24
    3. [R2-Tunnel0/0/1]tunnel-protocol gre p2mp
    4. [R2-Tunnel0/0/1]source Serial 4/0/0
    5. [R2-Tunnel0/0/1]nhrp network-id 100
    6. [R2-Tunnel0/0/1]nhrp entry 192.168.6.1 1.1.1.1 register

    四.整个私有网络基于RIP全网可达

     五.使用PC访问R5环回

  • 相关阅读:
    23、短信登录(基于redis实现共享session登录)
    CodeMirror 创建标签计算编辑器
    【Linux】--make/makefile--gcc/g++/gdb
    关于如何找环形链表的入环点
    【Apollo自动驾驶源码解读】车道线的感知和高精地图融合
    HTML静态网页成品作业(HTML+CSS)——图书出版社介绍设计制作(6个页面)
    Java学习笔记(二十)
    微信小程序——如何获取到输入框的值
    【c++百日刷题计划】 ———— DAY20,刷题百天,养成刷题好习惯
    嵌入式实时操作系统的设计与开发(任意大小的内存管理)
  • 原文地址:https://blog.csdn.net/weixin_64051859/article/details/126908831