实验四十、×××(GRE)的配置
一、 实验目的
1. 掌握GRE (通用路由封装)的配置
2. 隧道接口的作用
二、 应用环境
GRE 主要用与在Internet 网络上以IP 封装IP 或IPX 报文
三、 实验设备
1. DCR-1751 两台
2. PC 机 两台
四、 实验拓扑
五、 实验要求
配置表
Router-A Router-B
F0/0 192.168.0.1/24 F0/0 192.168.2.1/24
S1/1 (DCE) 192.168.1.1/24 S1/0 192.168.1.2/24
PC SERVER
IP 192.168.0.10/24 192.168.2.2/24
网关 192.168.0.1 192.168.2.1
结果:
在路由器A 与B 之间建立×××,保护从PC 到SERVER 的数据六、 实验步骤
第一步:参照实验三和上表配置接口地址并测试连通性
第二步:路由器A 的配置
Router-A#conf
Router-A_config#ip route 192.168.2.0 255.255.255.0 192.168.1.2 !配置静态路由
Router-A_config#interface Tunnel0 !配置TUNNEL 接口
Router-A_config#ip address 172.16.1.1 255.255.255.0 !配置IP 地址
Router-A_config# tunnel source Serial1/1 !设定物理源接口
Router-A_config# tunnel destination 192.168.1.2 !设定目的地址
Router-A_config# tunnel key 4 !设定**
第三步:查看配置
Router-A#sh int tunnel 0 !查看TUNNEL 接口
Tunnel0 is up, line protocol is up
Hardware is Tunnel
Interface address is 172.16.1.1/24
MTU 1472 bytes, BW 9 kbit, DLY 50000 usec
Encapsulation TUNNEL, loopback not set
Keepalive(period:0/5 s, retry:0/5)
TUNNEL source 192.168.1.1(Serial1/1), destination 192.168.1.2
TUNNEL protocol/transport GRE/IP, key enabled, sequencing disabled
Checksumming of packets disabled, fast tunneling enabled
60 second input rate 0 bits/sec, 0 packets/sec!
60 second output rate 0 bits/sec, 0 packets/sec!
60 packets input, 2760 bytes input, 0 error, 0 discard
60 packets output, 3960 bytes output, 68 discard
第四步:路由器B 的配置
Router-B#conf
Router-B_config#ip route 192.168.0.0 255.255.255.0 192.168.1.1
Router-B_config#interface Tunnel0
Router-B_config#ip address 172.16.1.2 255.255.255.0
Router-B_config#tunnel source Serial1/0
Router-B_config# tunnel destination 192.168.1.1
Router-B_config# tunnel key 4
Router-B_config_s1/0#^Z
第五步:查看配置
Router-B#sh int tunnel 0
Tunnel0 is up, line protocol is up
Hardware is Tunnel
Interface address is 172.16.1.2/24
MTU 1472 bytes, BW 9 kbit, DLY 50000 usec Encapsulation TUNNEL, loopback not set
Keepalive(period:0/5 s, retry:0/5)
TUNNEL source 192.168.1.2(Serial1/0), destination 192.168.1.1
TUNNEL protocol/transport GRE/IP, key enabled, sequencing disabled
Checksumming of packets disabled, fast tunneling enabled
60 second input rate 0 bits/sec, 0 packets/sec!
60 second output rate 0 bits/sec, 0 packets/sec!
60 packets input, 2760 bytes input, 0 error, 0 discard
60 packets output, 3960 bytes output, 0 discard
第六步:测试
转载于:https://blog.51cto.com/lorna8023/406513