On this post, I will be exploring a concept called GRE Tunneling…GRE tunneling is a tunneling mechanism which uses IP as the transport protocol that carries several passenger protocols. In the nutshell, in order to formed GRE tunnels, a virtual point-to-point links with two endpoints known as Tunnel source and Tunnel destinations should be set up.

The best analogy for GRE tunneling will be a bus with passengers traveling in a highway…The bus passengers or people inside the bus is similar to a passenger protocol, e.g. TCP or UDP while the bus is called the transport protocol, e.g. IP.

Below will be my laboratory topology to show how GRE is configured…





    EBGP Configurations:

 R1#sh run  | sec bgp
      router bgp 1000
      bgp log-neighbor-changes
      network 1.1.1.0 mask 255.255.255.0
      neighbor 172.16.12.2 remote-as 65512


   EBGP and IBGP Configurations:

 R2#sh run | sec bgp
    router bgp 65512
    bgp log-neighbor-changes
    neighbor 172.16.12.1 remote-as 1000
    neighbor 172.16.23.3 remote-as 65512


    IBGP Configurations:

 R3#sh run | sec bgp
      router bgp 65512
      bgp log-neighbor-changes
      neighbor 172.16.23.2 remote-as 65512
      neighbor 172.16.34.4 remote-as 65512



   EBGP and IBGP Configurations:

 R4#sh run | sec bgp
     router bgp 65512
     bgp log-neighbor-changes
     neighbor 172.16.34.3 remote-as 65512
     neighbor 172.16.45.5 remote-as 5000


  EBGP Configuration:

 R5#sh run | sec bgp
      router bgp 5000
      bgp log-neighbor-changes
      network 5.5.5.0 mask 255.255.255.0
      neighbor 172.16.45.4 remote-as 65512


   Let’s check the BGP Neighbors:

 R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 1000
BGP table version is 3, main routing table version 3
2 network entries using 288 bytes of memory
2 path entries using 160 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 744 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.12.2     4        65512      52      51        3    0    0 00:42:51        1
R1#


R2#sh ip  bgp summary
BGP router identifier 2.2.2.2, local AS number 65512
BGP table version is 3, main routing table version 3
2 network entries using 288 bytes of memory
2 path entries using 160 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 768 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.12.1     4         1000      51      52        3    0    0 00:43:54        1
172.16.23.3     4        65512     128     130        3    0    0 01:54:51        0
R2#


R3#sh ip bgp summary
BGP router identifier 3.3.3.3, local AS number 65512
BGP table version is 1, main routing table version 1
2 network entries using 288 bytes of memory
2 path entries using 160 bytes of memory
2/0 BGP path/bestpath attribute entries using 272 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 768 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.23.2     4        65512     130     128        1    0    0 01:55:41        1
172.16.34.4     4        65512     125     124        1    0    0 01:52:05        1
R3#


R4#sh ip bgp summary
BGP router identifier 4.4.4.4, local AS number 65512
BGP table version is 3, main routing table version 3
2 network entries using 288 bytes of memory
2 path entries using 160 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 768 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.34.3     4        65512     124     126        3    0    0 01:51:08        0
172.16.45.5     4         5000      53      54        3    0    0 00:45:20        1
R4#


R5#sh ip bgp summary
BGP router identifier 5.5.5.5, local AS number 5000
BGP table version is 3, main routing table version 3
2 network entries using 288 bytes of memory
2 path entries using 160 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 744 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.45.4     4        65512      54      53        3    0    0 00:44:44        1
R5#





  Since BGP Neighbors were formed, we can start creating the GRE Tunnel between R2 and R4…


 R2#sh run int tunnel 0
Building configuration…

Current configuration : 114 bytes
!
interface Tunnel0
 ip address 172.16.24.2 255.255.255.0
 tunnel source 2.2.2.2
 tunnel destination 4.4.4.4


R4#sh run int Tunnel 0
Building configuration…

Current configuration : 114 bytes
!
interface Tunnel0
 ip address 172.16.24.4 255.255.255.0
 tunnel source 4.4.4.4
 tunnel destination 2.2.2.2
end


  Let’s check the tunnel interface…

R2#show ip int brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        unassigned      YES unset  administratively down down
FastEthernet1/0        unassigned      YES unset  administratively down down
FastEthernet1/1        unassigned      YES unset  administratively down down
Serial2/0              172.16.12.2     YES manual up                    up
Serial2/1              172.16.23.2     YES manual up                    up
Serial2/2              unassigned      YES unset  administratively down down
Serial2/3              unassigned      YES unset  administratively down down
Loopback2              2.2.2.2         YES manual up                    up
Tunnel0                172.16.24.2     YES manual up                    up

R4#sh ip int brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        unassigned      YES unset  administratively down down
FastEthernet1/0        unassigned      YES unset  administratively down down
FastEthernet1/1        unassigned      YES unset  administratively down down
Serial2/0              172.16.45.4     YES manual up                    up
Serial2/1              unassigned      YES unset  administratively down down
Serial2/2              172.16.34.4     YES manual up                    up
Serial2/3              unassigned      YES unset  administratively down down
Loopback4              4.4.4.4         YES manual up                    up
Tunnel0                172.16.24.4     YES manual up                    up
R4#

  To test the tunnel interface, I can traceroutes towards R5 loopback address from R1…As seen
  below, the traffic did not go through R3 instead it does pass through the R2–>R4—> R5…

 R1#traceroute 5.5.5.5 source 1.1.1.1
Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
  1 172.16.12.2 60 msec 80 msec 60 msec
  2 172.16.24.4 100 msec 116 msec 100 msec
  3 172.16.45.5 156 msec 128 msec 108 msec
R1#

   Pinging R5 loopback sourcing R1 loopback address is also successful..

 R1#ping 5.5.5.5 source 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 148/174/200 ms
R1#

**********************************END OF LAB************************************

Leave a comment

Quote of the week

"People ask me what I do in the winter when there's no baseball. I'll tell you what I do. I stare out the window and wait for spring."

~ Rogers Hornsby