在配置路由器的时候,大家能经常的发现一些相关的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/1ip add 10.1.1.1 255.255.0.0description link to enterpriseno shtinterface serial 0ip add 17.8.4.92 255.255.255.0description link to ISPinterface tunnel 1tunnel source serial 0tunnel destination 17.8.4.92tunnel mode gre ipip add 10.2.1.1 255.255.0.0router eigrp 101network 10.0.0.0network 17.8.4.0passive-interface serial 0
