GRE 三层隧道封装配置

实验拓扑图
1.实验说明:路由器site1和site2分别模拟公司的两个站点,1.1.1.0/24和2.2.2.0/24分别模拟两个站点的内部网络;路由器ISP模拟服务商路由器。
     通过GER技术在site1和site2之间建立一个点对点的GRE隧道,并在GRE隧道口上运行OSPF,以学习彼此的内部网络路由。

2.基本网络配置
  Site1:
interface FastEthernet0/0
 ip address 172.16.12.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 1.1.1.254 255.255.255.0
 duplex auto
 speed auto
!
ip route 0.0.0.0 0.0.0.0 172.16.12.2 

 ISP:
interface FastEthernet0/0
 ip address 172.16.12.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 172.16.23.2 255.255.255.0
 duplex auto
 speed auto
  Site2:
interface FastEthernet0/0
 ip address 172.16.23.3 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 2.2.2.254 255.255.255.0
 duplex auto
 speed auto
!
ip route 0.0.0.0 0.0.0.0 172.16.23.2 
3.GRE和OSPF配置
  Site1:
interface Tunnel0
 ip address 192.168.1.1 255.255.255.0
 tunnel source FastEthernet0/0
 tunnel destination 172.16.23.3
!
router ospf 10
 log-adjacency-changes
 network 1.1.1.254 0.0.0.0 area 0
 network 192.168.1.1 0.0.0.0 area 0
  Site2:
interface Tunnel0
 ip address 192.168.1.2 255.255.255.0
 tunnel source FastEthernet0/0
 tunnel destination 172.16.12.1
!
router ospf 10
 log-adjacency-changes
 network 2.2.2.0 0.0.0.255 area 0
 network 192.168.1.2 0.0.0.0 area 0
4.查看状态与测试
  Site1:
  ISP:
  Site2:
  
  测试site1与site2之间的连通性

你可能感兴趣的:(gre, ,三层封装)