今天做了一下 GRE ×××的实验,分享一下。

 

实验:GRE ×××_GREVPN 实验 配置 

R1配置:

R1#show run
Building configuration...

version 12.4
hostname R1
!
interface Loopback0
 ip address 172.16.1.1 255.255.255.0
!
interface Tunnel0
 ip address 172.16.10.1 255.255.255.0
 tunnel source Serial0/0
 tunnel destination 210.1.2.1
!
interface Serial0/0
 ip address 210.1.1.1 255.255.255.0
 serial restart-delay 0
!       
router rip
 version 2
 network 172.16.0.0
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 Serial0/0
!
end

ISP配置就简单了,只要配置IP地址就可以了

ISP#show run
Building configuration...

version 12.4
!
hostname ISP
!
interface Serial0/0
 ip address 210.1.1.2 255.255.255.0
 serial restart-delay 0
!
interface Serial0/1
 ip address 210.1.2.2 255.255.255.0
 serial restart-delay 0
end

R2配置:

R2#show run
version 12.4
hostname R2
!
interface Loopback0
 ip address 172.16.4.1 255.255.255.0
!
interface Tunnel0
 ip address 172.16.10.2 255.255.255.0
 tunnel source Serial0/0
 tunnel destination 210.1.1.1
!
interface Serial0/0
 ip address 210.1.2.1 255.255.255.0
 serial restart-delay 0

router rip
 version 2
 network 172.16.0.0
 no auto-summary
!
ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 Serial0/0
end

这个实验tunnel网段也是172.16内的,所以做RIP的时候只需要声明172.16.0.0网段的就可以了。但是如果tunnel和内网地址不在一类地址内,那么要记得做RIP的时候要记得生命tunnel端口地址的网段。其实就相当于虚拟出一个端口来,将两端路由连接起来一样。

如果做静态路由

R1 : ip route 172.16.4.0 255.255.255.0 tunnel 0
R2 :ip route 172.16.1.0 255.255.255.0 172.16.10.1