【Cisco】GRETunnel隧道

说明:A公司的PC1所在网段192.168.1.0/24要和B公司PC2所在网段172.16.2.0/24建立GRE tunnel通信

站在用户的角度思考问题,与客户深入沟通,找到青川网站设计与青川网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:成都网站设计、成都做网站、企业官网、英文网站、手机端网站、网站推广、域名注册网站空间、企业邮箱。业务覆盖青川地区。

配置思路:
1、R1与R2要能通信--R1和R2分别配置默认路由到ISP
2、新建tunnel端口,设置IP,双方要在同一网段;配置source即公网出口IP和destination即对方公网出口ip
3、此时双方tunnel已经建立起来了,需要建立路由,PC1网段到PC2网段,PC2网段到PC1网段,下一跳地址为对端ip;此时配置结束。

拓扑图如下:

【Cisco】 GRE Tunnel隧道

 

 

配置信息:

R1:
config t
ip route 0.0.0.0 0.0.0.0 100.1.1.2
int g0/1
no sh
ip add 100.1.1.1 255.255.255.252
exit
int f0/1
no sh
ip add 192.168.1.1 255.255.255.0
exit
int tunnel 0
no sh
ip add 10.10.10.1 255.255.255.0
tunnel source 100.1.1.1
tunnel destination 200.2.2.2
tunnel mode gre ip
exit
ip route 172.16.2.0 255.255.255.0 10.10.10.2
exit

ISP:
config t
int g0/1
no sh
ip add 100.1.1.2 255.255.255.252
exit
int g0/2
no sh
ip add 200.2.2.1 255.255.255.252
exit

R3:
config t
ip route 0.0.0.0 0.0.0.0 200.2.2.1
int g0/2
no sh
ip add 200.2.2.2 255.255.255.252
exit
int f0/1
no sh
ip add 172.16.2.1 255.255.255.0
exit
int tunnel 0
no sh
ip add 10.10.10.2 255.255.255.0
tunnel source 200.2.2.2
tunnel destination 100.1.1.1
tunnel mode gre ip
exit
ip route 192.168.1.0 255.255.255.0 10.10.10.2
exit

需要查看ping的过程,可开启debug, debug ip packet


当前标题:【Cisco】GRETunnel隧道
网站URL:http://pwwzsj.com/article/pdeijh.html