GRE 隧道配置案例(静态、动态路由) |
您所在的位置:网站首页 › loopback配置gre › GRE 隧道配置案例(静态、动态路由) |
网络攻城狮在家的学习状态就是这样的! 把键盘上的H&M扣下来扔了。也算是抵制了吧? 青海分部IP地址、DHCP、NAT、路由 sys sys QH dhcp enable acl 2000 rule permit so 192.168.10.0 0.0.0.255 int g0/0/0 ip add 192.168.10.254 24 dhcp sel int int g0/0/1 ip add 12.0.0.1 24 nat outbound 2000 ip route-s 0.0.0.0 0 12.0.0.2上海总部IP地址、DHCP、NAT、路由 sys sys SH dhcp enable acl 2000 rule permit so 192.168.20.0 0.0.0.255 int g0/0/1 ip add 192.168.20.254 24 dhcp sel int int g0/0/0 ip add 23.0.0.3 24 nat outbound 2000 ip route-s 0.0.0.0 0 23.0.0.2ISP公网 sys sys ISP int g0/0/0 ip add 12.0.0.2 24 int g0/0/1 ip add 23.0.0.2 24 int lo 2 ip add 2.2.2.2 32PC1 PC2 青海分部 interface Tunnel0/0/1 tunnel-protocol gre source 12.0.0.1 destination 23.0.0.3上海总部 interface Tunnel0/0/1 #创建隧道口 tunnel-protocol gre #指定协议 source 23.0.0.3 #指定隧道源 destination 12.0.0.1 #指定隧道目标配置完GRE隧道发现PC1和PC2还ping 不通,因为没有路由。 配置路由静态路由 青海分部 ip route-static 192.168.20.0 255.255.255.0 Tunnel0/0/1 ip route-static 192.168.20.0 255.255.255.0 192.168.13.3上海总部 ip route-static 192.168.10.0 255.255.255.0 Tunnel0/0/1 ip route-static 192.168.10.0 255.255.255.0 192.168.13.1
上海总部 ospf 1 router-id 3.3.3.3 area 0 net 192.168.20.0 0.0.0.255 net 192.168.13.0 0.0.0.255
GRE 隧道路由宣告注意事项:使用动态路由协议宣告接口时千万不能宣告公网接口。 测试 OSPF进程中宣告公网接口 ospf 1 router-id 1.1.1.1 area 0 net 12.0.0.1 0.0.0.0
验证隧道、路由表 青海分部
GRE:Generic Routing Encapsulation,通用路由封装 一种三层VPN封装技术在任意一种网络协议上传送任意一种其它网络协议的封装方法解决了跨越异种网络的报文传输问题,异种报文传输的通道称为Tunnel(隧道) GRE核心功能:建立隧道,打通私网
GRE VPN隧道口虚假状态问题:只要有到达隧道目标的路由,隧道口即可激活 解决方法:开启GRE的Keeplive,用于检测隧道对端是否可达。
在R1上配置Keeplive,检测到了R3路由器上的Tunnel口down了。 GRE隧道恢复正常!!! 欢迎关注微信公众号:新网工李白 “免费获取华为认证学习资料培训机构视频、软考学习资料和求职简历模板。”
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |