前言
网络类型实验
拓扑图
![在这里插入图片描述](https://ucc.alicdn.com/images/user-upload-01/3d2d7f1eb29e494eaaf47bf21f36f29e.png
实验要求
1.R2为ISP,其上只能配置IP地址
2.R1-R2之间为HDLC封装,
3.R2-R3之间为ppp封装,pap认证,R2为主认证方
4.R2-R4之间为PPp封装,chap认证,R2为主认证方
5.R1、R2、R3构建MGRE环境,仅R1P地址固定
<r1>display nhrp peer all ------------------------------------------------------------------------------- Protocol-addr Mask NBMA-addr NextHop-addr Type Flag ------------------------------------------------------------------------------- 192.168.2.4 32 34.1.1.2 192.168.2.4 dynamic route tunnel ------------------------------------------------------------------------------- Tunnel interface: Tunnel0/0/0 Created time : 00:18:09 Expire time : 01:41:51 ------------------------------------------------------------------------------- Protocol-addr Mask NBMA-addr NextHop-addr Type Flag ------------------------------------------------------------------------------- 192.168.2.3 32 24.1.1.2 192.168.2.3 dynamic route tunnel ------------------------------------------------------------------------------- Tunnel interface: Tunnel0/0/0 Created time : 00:16:53 Expire time : 01:43:07 Number of nhrp peers: 2
<r4>display nhrp peer all ------------------------------------------------------------------------------- Protocol-addr Mask NBMA-addr NextHop-addr Type Flag ------------------------------------------------------------------------------- 192.168.2.1 32 14.1.1.1 192.168.2.1 static hub ------------------------------------------------------------------------------- Tunnel interface: Tunnel0/0/0 Created time : 00:18:59 Expire time : -- ------------------------------------------------------------------------------- Protocol-addr Mask NBMA-addr NextHop-addr Type Flag ------------------------------------------------------------------------------- 192.168.2.3 32 24.1.1.2 192.168.2.3 dynamic route tunnel ------------------------------------------------------------------------------- Tunnel interface: Tunnel0/0/0 Created time : 00:17:04 Expire time : 01:42:56 ------------------------------------------------------------------------------- Protocol-addr Mask NBMA-addr NextHop-addr Type Flag ------------------------------------------------------------------------------- 192.168.2.4 32 34.1.1.2 192.168.2.4 dynamic local ------------------------------------------------------------------------------- Tunnel interface: Tunnel0/0/0 Created time : 00:17:04 Expire time : 01:42:56 Number of nhrp peers: 3
<r3>display nhrp peer all ------------------------------------------------------------------------------- Protocol-addr Mask NBMA-addr NextHop-addr Type Flag ------------------------------------------------------------------------------- 192.168.2.1 32 14.1.1.1 192.168.2.1 static hub ------------------------------------------------------------------------------- Tunnel interface: Tunnel0/0/0 Created time : 00:18:20 Expire time : -- ------------------------------------------------------------------------------- Protocol-addr Mask NBMA-addr NextHop-addr Type Flag ------------------------------------------------------------------------------- 192.168.2.4 32 34.1.1.2 192.168.2.4 dynamic route tunnel ------------------------------------------------------------------------------- Tunnel interface: Tunnel0/0/0 Created time : 00:17:41 Expire time : 01:42:19 ------------------------------------------------------------------------------- Protocol-addr Mask NBMA-addr NextHop-addr Type Flag ------------------------------------------------------------------------------- 192.168.2.3 32 24.1.1.2 192.168.2.3 dynamic local ------------------------------------------------------------------------------- Tunnel interface: Tunnel0/0/0 Created time : 00:17:41 Expire time : 01:42:19 Number of nhrp peers: 3
6.内网使用RIP获取路由,所有pc可以互相访问,并且可访问r2的环回。
PC访问R2的环回是要使用NAT
PC>ping 192.168.3.2 Ping 192.168.3.2: 32 data bytes, Press Ctrl_C to break From 192.168.3.2: bytes=32 seq=1 ttl=126 time=16 ms From 192.168.3.2: bytes=32 seq=2 ttl=126 time=31 ms From 192.168.3.2: bytes=32 seq=3 ttl=126 time=15 ms From 192.168.3.2: bytes=32 seq=4 ttl=126 time=32 ms From 192.168.3.2: bytes=32 seq=5 ttl=126 time=31 ms --- 192.168.3.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 15/25/32 ms PC>ping 192.168.4.2 Ping 192.168.4.2: 32 data bytes, Press Ctrl_C to break From 192.168.4.2: bytes=32 seq=1 ttl=126 time=16 ms From 192.168.4.2: bytes=32 seq=2 ttl=126 time=31 ms From 192.168.4.2: bytes=32 seq=3 ttl=126 time=16 ms From 192.168.4.2: bytes=32 seq=4 ttl=126 time=15 ms From 192.168.4.2: bytes=32 seq=5 ttl=126 time=31 ms --- 192.168.4.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 15/21/31 ms PC>ping 2.2.2.2 Ping 2.2.2.2: 32 data bytes, Press Ctrl_C to break From 2.2.2.2: bytes=32 seq=1 ttl=254 time<1 ms From 2.2.2.2: bytes=32 seq=2 ttl=254 time=32 ms From 2.2.2.2: bytes=32 seq=3 ttl=254 time=15 ms From 2.2.2.2: bytes=32 seq=4 ttl=254 time=16 ms From 2.2.2.2: bytes=32 seq=5 ttl=254 time=16 ms --- 2.2.2.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 0/15/32 ms