在配置路由器的时候,大家能经常的发现一些相关的tunnel接口,大家可能多这些不太了解,下面就简要的说明下。
目的:
- 使用一个隧道在一种协议上封装或者传输另一种协议
- 一个隧道是一个点对点链路,必须在两端进行配置
- 隧道断电定义隧道床书的源地址和目的地址,可以给隧道接口分配另一个地址用于被传输的或者承载通信信道
- 隧道技术在隧道两端封装和解封通信量会给CPU带来开销并引入更长的延迟
配置如下
1 在每一段的路由器上创建一个隧道接口interface tunnel number
2 配置隧道的源地址tunnel source ip add|type number
3 配置隧道的目的地址tunnel destination hostnamd||ip-address
4 可选 配置隧道模式tunnel mode gre ip 等
5 配置丢弃失序的分组tunnel sequence-datagrams
6 配置端到段的验证tunnel checksum
比如
interface fa2/1
ip add 10.1.1.1 255.255.0.0
description link to enterprise
no sht
interface serial 0
ip add 17.8.4.92 255.255.255.0
description link to ISP
interface tunnel 1
tunnel source serial 0
tunnel destination 17.8.4.92
tunnel mode gre ip
ip add 10.2.1.1 255.255.0.0
router eigrp 101
network 10.0.0.0
network 17.8.4.0
passive-interface serial 0