基于RIP的GRE和MGRE实验

目录

一、实验拓扑

二、实验需求

三、实验步骤

1、配置PC端IP地址

2、配置路由器IP地址和R5环回

R1:

R2:

R3:

R4:

R5:

3、公网通(静态缺省路由)

4、PPP认证

(1)R1-R5PPP的PAP认证:

R5为主认证方:

R1被认证方:

(2)R2和R5PPP的CHAP认证

R5为主认证方:

R2被认证方:

5、R3和R5之间HDLC封装

6、R1、R2、R3构建MGRE隧道,R1为中心站点

R1:

R2:

R3:

7、R1-R4GRE隧道

R1:

R4:

8、rip动态路由(全网通)

R1:

R2:

R3:

R4:

9、NAT(easy ip)

R1:

R2:

R3:

R4:

一、实验拓扑

二、实验需求

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、整个私有网络基于RIP全网可达;

5、所有PC设置私有IP为源IP,可以访问R5环回,达到全网通。

三、实验步骤

1、配置PC端IP地址

2、配置路由器IP地址和R5环回

R1:

[R1-GigabitEthernet0/0/0]ip address 192.168.1.254 24

[R1-Serial4/0/0]ip address 15.1.1.1 24

R2:

[R2-GigabitEthernet0/0/0]ip address 192.168.2.254 24

[R2-Serial4/0/0]ip address 25.1.1.1 24

R3:

[R3-GigabitEthernet0/0/0]ip address 192.168.3.254 24

[R3-Serial4/0/0]ip address 35.1.1.1 24

R4:

[R4-GigabitEthernet0/0/0]ip address 192.168.4.254 24

[R4-Serial4/0/0]ip address 45.1.1.1 24

R5:

[ISP-Serial4/0/0]ip address 25.1.1.2 24

[ISP-Serial4/0/1]ip address 15.1.1.2 24

[ISP-Serial3/0/0]ip address 35.1.1.2 24

[ISP-Serial3/0/1]ip address 45.1.1.2 24

[ISP-LoopBack0]ip address 5.5.5.1 24

3、公网通(静态缺省路由)

[R1]ip route-static 0.0.0.0 0 15.1.1.2

[R2]ip route-static 0.0.0.0 0 25.1.1.2

[R3]ip route-static 0.0.0.0 0 35.1.1.2

[R4]ip route-static 0.0.0.0 0 45.1.1.2

4、PPP认证

(1)R1-R5PPP的PAP认证:

R5为主认证方:

[ISP]aaa

[ISP-aaa]local-user huang password cipher 123

[ISP-aaa]local-user huang service-type ppp

[ISP-Serial4/0/1]ppp authentication-mode pap

R1被认证方:

[R1-Serial4/0/0]ppp pap local-user huang password cipher 123

(2)R2和R5PPP的CHAP认证

R5为主认证方:

[ISP]aaa

[ISP-aaa]local-user xie password cipher 123

[ISP-aaa]local-user xie service-type ppp

[ISP-Serial4/0/0]ppp authentication-mode chap

R2被认证方:

[R2-Serial4/0/0]ppp chap password cipher 123

[R2-Serial4/0/0]ppp chap user xie

5、R3和R5之间HDLC封装

[ISP-Serial3/0/0]link-protocol hdlc

[R3-Serial4/0/0]link-protocol hdlc

6、R1、R2、R3构建MGRE隧道,R1为中心站点

R1:

[R1]interface Tunnel 0/0/0

[R1-Tunnel0/0/0]ip address 10.1.2.1 24

[R1-Tunnel0/0/0]tunnel-protocol gre p2mp

[R1-Tunnel0/0/0]source Serial 4/0/0

[R1-Tunnel0/0/0]nhrp network-id 100

R2:

[R2]interface Tunnel 0/0/0

[R2-Tunnel0/0/0]ip address 10.1.2.2 24

[R2-Tunnel0/0/0]tunnel-protocol gre p2mp

[R2-Tunnel0/0/0]source 25.1.1.1

[R2-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register

R3:

[R3]interface Tunnel 0/0/0

[R3-Tunnel0/0/0]ip address 10.1.2.3 24

[R3-Tunnel0/0/0]tunnel-protocol gre p2mp

[R3-Tunnel0/0/0]source 35.1.1.1

[R3-Tunnel0/0/0]nhrp network-id 100

[R3-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register

7、R1-R4GRE隧道

R1:

[R1]interface Tunnel 0/0/1

[R1-Tunnel0/0/1]ip address 10.1.1.1 24

[R1-Tunnel0/0/1]tunnel-protocol gre

[R1-Tunnel0/0/1]source 15.1.1.1

[R1-Tunnel0/0/1]destination 45.1.1.1

R4:

[R4]interface Tunnel 0/0/1

[R4-Tunnel0/0/1]ip address 10.1.1.4 24

[R4-Tunnel0/0/1]tunnel-protocol gre

[R4-Tunnel0/0/1]source 45.1.1.1

[R4-Tunnel0/0/1]destination 15.1.1.1

8、rip动态路由(全网通)

R1:

[R1]rip 1

[R1-rip-1]v 2

[R1-rip-1]undo summary

[R1-rip-1]network 192.168.1.0

[R1-rip-1]network 10.0.0.0

R1开启伪广播:[R1-Tunnel0/0/0]nhrp entry multicast dynamic  

R2:

[R2]rip 1

[R2-rip-1]v 2

[R2-rip-1]undo summary

[R2-rip-1]network 192.168.2.0

[R2-rip-1]network 10.0.0.0

[R2-Tunnel0/0/0]undo rip split-horizon

R3:

[R3]rip 1

[R3-rip-1]v 2

[R3-rip-1]undo summary

[R3-rip-1]network 192.168.3.0

[R3-rip-1]network 10.0.0.0

[R3-Tunnel0/0/0]undo rip split-horizon

R4:

[R4]rip 1

[R4-rip-1]v 2

[R4-rip-1]undo summary

[R4-rip-1]network 192.168.4.0

[R4-rip-1]network 10.0.0.0

9、NAT(easy ip)

R1:

[R1]acl 2000

[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255

[R1-Serial4/0/0]nat outbound 2000

R2:

[R2]acl 2000

[R2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255

[R2-Serial4/0/0]nat outbound 2000

R3:

[R3]acl 2000

[R3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255

[R3-Serial4/0/0]nat outbound 2000

R4:

[R4]acl 2000

[R4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255

[R4-Serial4/0/0]nat outbound 2000

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-30 13:50:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-30 13:50:04       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-30 13:50:04       82 阅读
  4. Python语言-面向对象

    2024-03-30 13:50:04       91 阅读

热门阅读

  1. 2024年道路运输安全员考试真题题库

    2024-03-30 13:50:04       33 阅读
  2. 怎么在循环List的时候删除List的元素

    2024-03-30 13:50:04       36 阅读
  3. 类模板分文件编写

    2024-03-30 13:50:04       46 阅读
  4. [C++提高编程](三):STL-string容器

    2024-03-30 13:50:04       47 阅读
  5. 高等代数复习:矩阵秩的基本公式

    2024-03-30 13:50:04       36 阅读
  6. Manticore Search 中文分词搜索入门

    2024-03-30 13:50:04       34 阅读