Monday, October 5, 2009

Generic Routing Encapsulation

GRE or Generic Routing Encapsulation - it 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.