***--第一篇(GRE-×××)
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://liningxiao.blog.51cto.com/925890/236411
|
最近一直在看***! 先写一下非常简单的GRE-×××
注:只写一些常用的!
先传个图!!
实验步骤:
Site1:hostname Site1
! ! ! interface Tunnel0 ip address 1.1.1.1 255.255.255.0 tunnel source FastEthernet0/1 tunnel destination 172.30.2.2 ! ! interface FastEthernet0/0 ip address 10.0.1.254 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 172.30.1.2 255.255.255.252 duplex auto speed auto ! interface Vlan1 no ip address shutdown ! ip classless ip route 0.0.0.0 0.0.0.0 172.30.1.1 ip route 10.0.2.0 255.255.255.0 1.1.1.2 ......注意下一跳一定是隧道对端的地址。也可以直接写Tunnel0.
中间ISP的配置(充当网云).......不做任何配置除了接口地址!
hostname ISP
! ! ! interface FastEthernet0/0 ip address 172.30.1.1 255.255.255.252 duplex auto speed auto ! interface FastEthernet0/1 ip address 172.30.2.1 255.255.255.252 duplex auto speed auto
Site2配置
hostname Site2
! ! ip name-server 0.0.0.0 ! ! ! ! interface Tunnel0 ip address 1.1.1.2 255.255.255.0 tunnel source FastEthernet0/1 tunnel destination 172.30.1.2 ! ! interface FastEthernet0/0 ip address 10.0.2.254 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 172.30.2.2 255.255.255.252 duplex auto speed auto ! interface FastEthernet0/0/0 switchport mode access ! interface FastEthernet0/0/1 switchport mode access ! interface FastEthernet0/0/2 switchport mode access ! interface FastEthernet0/0/3 switchport mode access ! interface Vlan1 no ip address shutdown ! ip classless ip route 0.0.0.0 0.0.0.0 172.30.2.1 ip route 10.0.1.0 255.255.255.0 1.1.1.1 ......如上!
测试:主机ping服务器,能通!
消息格式如下!
总体上我们把GRE的配置分为三步:
1、创建隧道口。
2、配置隧道参数。
3、使用隧道路由。
注:通过以上配置我们实现了广域网的连接,当然Internet是没有私网路由的。如果我们用NAT一样可以实现。
先到这,未完!
本文出自 “
liningxiao'blog” 博客,请务必保留此出处
http://liningxiao.blog.51cto.com/925890/236411
本文出自 51CTO.COM技术博客
|
转载于:https://blog.51cto.com/wirless/273432