HC网络学院路由交换第四卷试验参考指导书.doc

上传人:re****.1 文档编号:553745058 上传时间:2023-01-23 格式:DOC 页数:149 大小:1,000.04KB
返回 下载 相关 举报
HC网络学院路由交换第四卷试验参考指导书.doc_第1页
第1页 / 共149页
HC网络学院路由交换第四卷试验参考指导书.doc_第2页
第2页 / 共149页
HC网络学院路由交换第四卷试验参考指导书.doc_第3页
第3页 / 共149页
HC网络学院路由交换第四卷试验参考指导书.doc_第4页
第4页 / 共149页
HC网络学院路由交换第四卷试验参考指导书.doc_第5页
第5页 / 共149页
点击查看更多>>
资源描述

《HC网络学院路由交换第四卷试验参考指导书.doc》由会员分享,可在线阅读,更多相关《HC网络学院路由交换第四卷试验参考指导书.doc(149页珍藏版)》请在金锄头文库上搜索。

1、实验1 配置GRE VPN实验任务一: GRE VPN基础配置步骤一: 搭建试验环境在SWA上配置VLAN2,将接口E1/0/2加入VLAN2:SWAvlan 2SWA-vlan2port Ethernet 1/0/2步骤二: 检测公网连通性查看SWA路由表和端口状态,确定其工作正常。SWAdisplay ip interface brief*down: administratively down(s): spoofingInterface Physical Protocol IP Address DescriptionVlan-interface1 up up 1.1.1.2 Vlan-in

2、te.Vlan-interface2 up up 2.2.2.2 Vlan-inte.SWAdisplay ip routing-tableRouting Tables: Public Destinations : 6 Routes : 6Destination/Mask Proto Pre Cost NextHop Interface1.1.1.0/24 Direct 0 0 1.1.1.2 Vlan11.1.1.2/32 Direct 0 0 127.0.0.1 InLoop02.2.2.0/24 Direct 0 0 2.2.2.2 Vlan22.2.2.2/32 Direct 0 0

3、127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0也能够使用display interface命令。在RTA和RTB上配置公网接口互通所需静态路由。RTAinterface GigabitEthernet0/0RTA-GigabitEthernet0/0ip address 192.168.1.1 255.255.255.0RTA-GigabitEthernet0/0interface GigabitEthernet0/1RTA-GigabitEth

4、ernet0/1ip address 1.1.1.1 255.255.255.0RTA-GigabitEthernet0/1ip route-static 2.2.2.0 255.255.255.0 1.1.1.2RTBinterface GigabitEthernet0/0RTB-GigabitEthernet0/0ip address 192.168.2.1 255.255.255.0RTB-GigabitEthernet0/0interface GigabitEthernet0/1RTB-GigabitEthernet0/1ip address 2.2.2.1 255.255.255.0

5、RTB-GigabitEthernet0/1ip route-static 1.1.1.0 255.255.255.0 2.2.2.2步骤三: 配置GRE隧道接口RTA interface Tunnel0RTA-Tunnel0 ip address 192.168.3.1 255.255.255.252RTA-Tunnel0 source 1.1.1.1RTA-Tunnel0 destination 2.2.2.1RTB interface Tunnel0RTB-Tunnel0 ip address 192.168.3.2 255.255.255.252RTB-Tunnel0 source 2

6、.2.2.1RTB-Tunnel0 destination 1.1.1.1步骤四: 为私网配置静态路由RTA ip route-static 192.168.2.0 255.255.255.0 Tunnel0RTB ip route-static 192.168.1.0 255.255.255.0 Tunnel0配置时也能够用下一跳地址。步骤五: 检验隧道工作情况查看RTA和RTB路由表,可见公网、私网路由均存在于路由表中: RTBdisplay ip routing-tableRouting Tables: Public Destinations : 10 Routes : 10Destin

7、ation/Mask Proto Pre Cost NextHop Interface1.1.1.0/24 Static 60 0 2.2.2.2 GE0/12.2.2.0/24 Direct 0 0 2.2.2.1 GE0/12.2.2.1/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.0/24 Static 60 0 192.168.3.2 Tun0192.168.2.0/24 Direct 0

8、 0 192.168.2.1 GE0/0192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.3.0/30 Direct 0 0 192.168.3.2 Tun0192.168.3.2/32 Direct 0 0 127.0.0.1 InLoop0查看RTA和RTB隧道接口状态,可见其使用GRE封装,状态为UP:RTBdisplay interface Tunnel 0Tunnel0 current state: UPLine protocol current state: UPDescription: Tunnel0 InterfaceThe

9、Maximum Transmit Unit is 1476Internet Address is 192.168.3.2/30 PrimaryEncapsulation is TUNNEL, service-loopback-group ID not set.Tunnel source 2.2.2.1, destination 1.1.1.1Tunnel keepalive disableTunnel protocol/transport GRE/IP GRE key disabled Checksumming of GRE packets disabledOutput queue : (Ur

10、gent queuing : Size/Length/Discards) 0/100/0Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0 Last 300 seconds input: 15 bytes/sec, 0 packets/sec Last 300 seconds output: 21 bytes/sec, 0 packets/sec 133 packets input, 5701 byt

11、es 0 input error 124 packets output, 7469 bytes 0 output error在RTA上打开GRE协议调试开关用debugging命令检验路由器实际收发报文,说明其地址已经改变。terminal monitorterminal debuggingdebugging gre packet在PCA上对RTB运行ping命令,但只发送一个ICMP包:C:Documents and SettingsUserping -n 1 192.168.2.1Pinging 192.168.2.1 with 32 bytes of data:Reply from 19

12、2.168.2.1: bytes=32 time1ms TTL=254Ping statistics for 192.168.2.1: Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms观察RTA上输出信息:*Jun 26 16:15:30:443 RTA GRE/7/debug: Tunnel0 packet:After encapsulation, Outgo

13、ing packet header 1.1.1.1-2.2.2.1(length = 84)*Jun 26 16:15:30:443 RTA GRE/7/debug:Output: Gre packet has been fast-switched successfully, interface index is 0x2f0000.可见RTA从Tunnel0接口发出了一个包,源地址为1.1.1.1,目标地址为2.2.2.1。因为发送包已经被GRE封装后在公网发送了。步骤六: 清除静态路由用undo ip route-static命令。步骤七: 为公网配置动态路由RTAospf 1RTA-ospf-1area 0.0.0.0RTA-ospf-1-area-0.0.0.0network 1.0.0.0 0.255.255.255RTBospf 1RTB-ospf-1area 0.0.0.0RTB-ospf-1

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号