CCNP(ISCW)实验:配置GRE隧道(2.0)

跟風遠走 提交于 2021-01-12 07:47:10

CCNP(ISCW)实验:配置GRE隧道(2.0)
这个实验在ISP上没有运行协议,只有直连的路由

实验过程:

第一步:各路由器上的配置
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#int s2/1
R1(config-if)#ip add 192.168.0.1 255.255.255.0



R2(config)#int s2/1
R2(config-if)#ip add 192.168.0.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s2/2
R2(config-if)#ip add 172.16.0.2 255.255.255.0



R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#int s2/1
R3(config-if)#ip add 172.16.0.3 255.255.255.0
R3(config-if)#no sh



第二步:配置路由协议使它们能上网,R2模拟互联网上的设备
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.0.2

R3(config)#ip route 0.0.0.0 0.0.0.0 172.16.0.2

第三步:在R1、R3上创建GRE隧道
R1(config)#int tunnel ?
<0-2147483647> Tunnel interface number

R1(config)#int tunnel 0
R1(config-if)#tunnel source s2/1
//源地址可以为接口,也可以为源接口的地址。
R1(config-if)#tunnel destination 172.16.0.3
//目标只能为ip地址。
R1(config-if)#ip add 10.0.0.1 255.255.255.0
R1(config-if)#no sh





R3(config)#int tunn 0
R3(config-if)#tun sou s2/1
//定义源地址
R3(config-if)#tun des 192.168.0.1
//定义目标地址。
R3(config-if)#ip add 10.0.0.3 255.255.255.0
//定义隧道的ip地址。
R3(config-if)#no sh
R3(config-if)#







第四步:测试
R1#ping 3.3.3.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
R1#ping 10.0.0.3



Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/82/100 ms


第四步:配置协议通过 tunnel 建立邻接关系
R1(config)#router ei 11
R1(config-router)#no au
R1(config-router)#net 10.0.0.0
R1(config-router)#net 1.1.1.1



R3(config)#router ei 11
R3(config-router)#no au
R3(config-router)#net 10.0.0.0
R3(config-router)#net 3.3.3.3


第五步:测试
R1#ping 3.3.3.3 so 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/88/124 ms



R1#sh ip ei nei 11
IP-EIGRP neighbors for process 11
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 10.0.0.3 Tu0 14 00:01:32 100 5000 0 3



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!