Saturday, September 15, 2012

GRE Tunnel


Below is the configuration on how to configure a GRE tunnel between R3 and R4. R5 is considered a ISP router or transit routers. Its job is to get you from R3 to R4 and you don't care how just that it gets you from point a to point b.







R3: CONIFG
interface Tunnel0
 ip address 10.0.0.1 255.255.255.252
 tunnel source 172.16.0.1
 tunnel destination 172.16.0.6
!
interface FastEthernet0/0
 ip address 172.16.0.1 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
ip route 9.9.9.9 255.255.255.255 Tunnel0
ip route 172.16.0.6 255.255.255.255 FastEthernet0/0
!










R5: CONFIG
interface FastEthernet0/0
 ip address 172.16.0.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 172.16.0.5 255.255.255.252
 duplex auto
 speed auto

R4:CONFIG

interface Loopback9
 ip address 9.9.9.9 255.255.255.255
!
interface Tunnel0
 ip address 10.0.0.2 255.255.255.252
 tunnel source 172.16.0.6
 tunnel destination 172.16.0.1
!
interface FastEthernet0/0
 ip address 172.16.0.6 255.255.255.252
 duplex auto
 speed auto
!
ip route 172.16.0.1 255.255.255.255 FastEthernet0/0



Capture: When you ping 9.9.9.9 from R3. You see there are two sources and destinations listed. One is the tunnel interface source/destination and the other is the tunnel ip address and remote destination address. R5 will process this as if it came from 172.16.0.1 to 172.16.0.6 and it does not care about the second source listed. R4 will care.

No comments:

Post a Comment