Are you looking for my non-technical blog?

This is now my technical-only blog, my non-technical blog is here.

12 October 2005

GRE Tutorial

GRE or Generic Routing Encapsulation - it has nothing to do with the Graduate Record Examination - is a tunneling protocol that was originally developed by Cisco for encapsulation of arbitrary kinds of network layer packets inside arbitrary kinds of network layer packets. This is brief tutorial on creating a GRE tunnel between two Cisco routes. Suppose that we have two sites; SiteA and SiteB. SiteA's router has interface Eth0 with the following IP address 10.0.1.1/24 and secondary IP address 1.0.1.1/24. Where the users (LAN) are connected to 10.0.1.0/24 subnet. The router has serial interface connected to the Internet (ISP). Same for SiteB, it has Eth0 with IP address 10.0.2.1/24 and secondary IP 1.0.2.1/24 where the users (LAN) are connected to 10.0.1.0/24 subnet. The router has serial interface connected to the Internet (ISP). Now we want to create a GRE tunnel in order for 10.0.1.0/24 and 10.0.2.0/24 subnets to communicate with each other.
Eth0--[RouterA]--S0{Internet}S0--[RouterB]--Etho
RouterA-Eth0: 10.0.1.1/24 & 1.0.1.1/24 RouterB-Eth0:10.0.2.1/24 & 1.0.2.1/24 RouterA-S0: Any IP given by the ISP RouterB-S0: Any IP given by the ISP
Configure the following on SiteA's Router
# interface Tunnel0 # ip address 192.168.1.1 255.255.255.0 # tunnel source Ethernet0 # tunnel destination 1.0.2.1 # ip route 10.0.2.0 255.255.255.0 Tunnel0
Configure the following on SiteB's Router
# interface Tunnel0 # ip address 192.168.1.2 255.255.255.0 # tunnel source Ethernet0 # tunnel destination 1.0.1.1 # ip route 10.0.1.0 255.255.255.0 Tunnel0
For more info see the following links: Tags: , , ,

3 comments:

  1. Same for SiteB, it has Eth0 with IP address 10.0.2.1/24 and secondary IP 1.0.2.1/24 where the users (LAN) are connected to 10.0.1.0/24 subnet.

    ==> shouldn't that be:
    where the users (LAN) are connected to 10.0.2.0/24 subnet ?

    ReplyDelete
  2. I am happy to visited your site and find such a nice tutorial on the GRE so keep writing like this.

    ReplyDelete