配置GRE tunnel隧道.docx_第1页
配置GRE tunnel隧道.docx_第2页
配置GRE tunnel隧道.docx_第3页
配置GRE tunnel隧道.docx_第4页
配置GRE tunnel隧道.docx_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

实验拓扑:预备知识: 通用路由封装(GenericRoutingEncapsulation,简称GRE)隧道 按照通过IPv4网络传输数据的定义,GRE通过将需要传输的数据包封装在GRE数据包内,从而使一个网络协议能够通过另一个网络协议进行传输。GRE是通过隧道传输IPv6业务负载的一个理想机制。实验说明: 路由器ISP模拟运营商,分部R1要和总部R2通信,但是不想让Internet上的路由器学到其内网网络,所以在R1和R2之间做条隧道,总部和分部之间启用EIGRP路由协议。实验过程:第一步:配置R1,ISP,R2的接口地址R1enR1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#no ip domai looR1(config)#line con 0R1(config-line)#no exec-tR1(config-line)#lo00:01:24: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to downgg synR1(config-line)#exiR1(config)#int s 1/1R1(config-if)#ip add 131.1.1.1 255.255.255.252R1(config-if)#no shR1(config-if)#int loo 0R1(config-if)#ip add 192.168.0.1 255.255.255.0R1(config-if)#endR1#sh ip i00:01:57: %SYS-5-CONFIG_I: Configured from console by consoleR1#sh ip int bInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 unassigned YES unset administratively down downSerial1/0 unassigned YES unset administratively down downSerial1/1 131.1.1.1 YES manual up downSerial1/2 unassigned YES unset administratively down downSerial1/3 unassigned YES unset administratively down downSerial2/0 unassigned YES unset administratively down downSerial2/1 unassigned YES unset administratively down downSerial2/2 unassigned YES unset administratively down downSerial2/3 unassigned YES unset administratively down downLoopback0 192.168.0.1 YES manual up upR1#ISPenISP#conf tEnter configuration commands, one per line. End with CNTL/Z.ISP(config)#no ip domain looISP(config)#line con 0ISP(config-line)#no exec-tISP(config-line)#logg synISP(config-line)#exiISP(config)#int s 1/0ISP(config-if)#ip add 131.1.1.2 255.255.255.252ISP(config-if)#no shISP(config-if)#int s 1/1ISP(config-if)#i00:02:55: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up00:02:56: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to upISP(config-if)#ip add 131.1.1.5 255.255.255.252ISP(config-if)#no shISP(config-if)#endISP#sh ip in00:03:09: %SYS-5-CONFIG_I: Configured from console by consoleISP#sh ip int bInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 unassigned YES unset administratively down downSerial1/0 131.1.1.2 YES manual up upSerial1/1 131.1.1.5 YES manual up upSerial1/2 unassigned YES unset administratively down downSerial1/3 unassigned YES unset administratively down downSerial2/0 unassigned YES unset administratively down downSerial2/1 unassigned YES unset administratively down downSerial2/2 unassigned YES unset administratively down downSerial2/3 unassigned YES unset administratively down downISP#R2enR2#conf tEnter configuration commands, one per line. End with CNTL/Z.R2(config)#no ip doma looR2(config)#line con 0R2(config-line)#no exec-tR2(config-line)#logg synR2(config-line)#exiR2(config)#int s 1/0R2(config-if)#ip add 131.1.1.6 255.255.255.252R2(config-if)#no shR2(config-if)#int loo 0R2(config-if)#ip add00:04:14: %LINK-3-UPDOWN: Interface Serial1/0, changed state to upR2(config-if)#ip add00:04:15: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to upR2(config-if)#ip add 192.168.1.1 255.255.255.0R2(config-if)#endR2#sh ip int00:04:24: %SYS-5-CONFIG_I: Configured from console by consolebR2#sh ip int bInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 unassigned YES unset administratively down downSerial1/0 131.1.1.6 YES manual up upSerial1/1 unassigned YES unset administratively down downSerial1/2 unassigned YES unset administratively down downSerial1/3 unassigned YES unset administratively down downSerial2/0 unassigned YES unset administratively down downSerial2/1 unassigned YES unset administratively down downSerial2/2 unassigned YES unset administratively down downSerial2/3 unassigned YES unset administratively down downLoopback0 192.168.1.1 YES manual up upR2#第二步:测试直连连通性ISP#sh cdp neiCapability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - RepeaterDevice ID Local Intrfce Holdtme Capability Platform Port IDR2 Ser 1/1 155 R 7206VXR Ser 1/0R1 Ser 1/0 153 R 7206VXR Ser 1/1ISP#/邻居建立直连连通性正常第三步:配置GRE隧道R1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#ip route 0.0.0.0 0.0.0.0 s 1/1/默认路由出接口应该指向物理接口R1(config)#int tuR1(config)#int tunnel 0R1(config-if)#ip add00:07:42: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to downR1(config-if)#ip add 172.16.0.1 255.255.255.0R1(config-if)#tuR1(config-if)#tunnel sour s 1/1R1(config-if)#tunR1(config-if)#tunnel desR1(config-if)#tunnel destination 131.1.1.6R1(config-if)#no shR1(config-if)#00:08:04: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to upR1(config-if)#endR1#sh run int tunnel 0Building configuration.Current configuration : 117 bytes!interface Tunnel0ip address 172.16.0.1 255.255.255.0tunnel source Serial1/1tunnel destination 131.1.1.6end/分部R1上的tunnel配置完成R2#conf tEnter configuration commands, one per line. End with CNTL/Z.R2(config)#ip route 0.0.0.0 0.0.0.0 s 1/0R2(config)#int tuR2(config)#int tunnel 0R2(config-if)#ip add 172.16.00:12:07: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to downR2(config-if)#ip add 172.16.0.2 255.255.255.0R2(config-if)#tunR2(config-if)#tunnel sou s1/0R2(config-if)#tunR2(config-if)#tunnel des 131.1.1.1R2(config-if)#no shR2(config-if)#00:12:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to upR2(config-if)#endR2#sh run int tunnel 0Building configuration.Current configuration : 117 bytes!interface Tunnel0ip address 172.16.0.2 255.255.255.0tunnel source Serial1/0tunnel destination 131.1.1.1endR1#sh ip rouCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is 0.0.0.0 to network 0.0.0.0 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.0.0 is directly connected, Tunnel0 131.1.0.0/30 is subnetted, 1 subnetsC 131.1.1.0 is directly connected, Serial1/1C 192.168.0.0/24 is directly connected, Loopback0S* 0.0.0.0/0 is directly connected, Serial1/1R1#ping 172.16.0.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.0.2, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 20/31/40 msR1#/隧道直连连通性正常第四步:在R1和R2上启用路由协议R1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#router eig 90R1(config-router)#no auR1(config-router)#net 192.168.0.0R1(config-router)#net 172.16.0.0R1(config-router)#endR1#R2#conf tEnter configuration commands, one per line. End with CNTL/Z.R2(config)#router eig 90R2(config-router)#no auR2(config-router)#net 172.16.0.0R2(config-router)#net 192.168.1.00:19:58: %DUAL-5-NBRCHANGE: IP-EIGRP 90: Neighbor 172.16.0.1 (Tunnel0) is up: new adjacencyR2(config-router)#net 192.168.1.1R2(config-router)#endR2#R1#sh ip rouCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is 0.0.0.0 to network 0.0.0.0 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.0.0 is directly connected, Tunnel0 131.1.0.0/30 is subnetted, 1 subnetsC 131.1.1.0 is directly connected, Serial1/1C 192.168.0.0/24 is directly connected, Loopback0D 192.168.1.0/24 90/297372416 via 172.16.0.2, 00:00:21, Tunnel0/eigrp通过Tunnle口学到到总部的路由S* 0.0.0.0/0 is directly connected, Serial1/1R1#sh ip eig neiIP-EIGRP neighbors for process 90H Address Interface Hold Uptime SRTT RTO Q Seq Type (sec) (ms) Cnt Num0172.16.0.2Tu0 12 00:01:39 44 5000 0 3/EIGRP邻居建立ISP#sh ip rouCodes: C - connected

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论