About Lab

Cisco Generic Routing Encapsulation (GRE) is a tunneling protocol that provides a simple generic approach to transport packets of one protocol over another protocol by means of encapsulation. In this blog, I will demonstrate how to configure GRE tunnel using given topology and addressing scheme given below.

Network Topology

Addressing Scheme

DeviceInterfaceIP AddressSubnet MaskDefault Gateway
RA-SAGARG0/0192.168.1.1255.255.255.0N/A
S0/0/064.103.211.2255.255.255.252N/A
Tunnel 010.10.10.1255.255.255.252N/A
RB-SAGARG0/0192.168.2.1255.255.255.0N/A
S0/0/0209.165.122.2255.255.255.252N/A
Tunnel 010.10.10.2255.255.255.252N/A
RC-SAGARS0/0/064.103.211.1255.255.255.252N/A
S0/0/1209.165.122.1255.255.255.252N/A
SA-CHAMLINGVLAN 1192.168.1.2255.255.255.0192.168.1.1
SB-CHAMLINGVLAN 1192.168.2.2255.255.255.0192.168.2.1
PC-ANIC192.168.1.11255.255.255.0192.168.1.1
PC-CNIC192.168.2.22255.255.255.0192.168.2.1

Implementation

Required Resources

  • 2 Switches (Cisco 2960)
  • 3 Routers (Cisco 1941)
  • 2 PCs (Windows with Terminal Emulation Program)
  • Cables:
    • Console cables to configure the Cisco IOS devices through the console port
    • Ethernet cables as shown in the topology

Configuring Switches

Configuring with sets of commands in Switch SA

Switch> en
Switch# config t
Switch(config)# hostname SA-CHAMLING
SA-CHAMLING(config)# hostname SA-CHAMLING
SA-CHAMLING(config)# no ip domain-lookup
SA-CHAMLING(config)# banner motd #Unauthorized access is strictly prohibited.#
SA-CHAMLING(config)# int vlan 1
SA-CHAMLING(config-if)# ip address 192.168.1.2 255.255.255.0
SA-CHAMLING(config-if)# no shut
SA-CHAMLING(config-if)# exit
SA-CHAMLING(config)# ip default-gateway 192.168.1.1
SA-CHAMLING(config)# end
SA-CHAMLING#copy run start

Configuring with sets of commands in Switch SB

Switch> en
Switch# config t
Switch(config)# hostname SB-CHAMLING
SA-CHAMLING(config)# no ip domain-lookup
SA-CHAMLING(config)# banner motd #Unauthorized access is strictly prohibited.#
SA-CHAMLING(config)# int vlan 1
SA-CHAMLING(config-if)# ip address 192.168.2.2 255.255.255.0
SA-CHAMLING(config-if)# no shut
SA-CHAMLING(config-if)# exit
SA-CHAMLING(config)# ip default-gateway 192.168.2.1
SA-CHAMLING(config)# end
SA-CHAMLING# copy run start

Configuring Routers

Configuring with sets of commands in Router RA

en
config t
hostname RA-SAGAR
no ip domain-lookup
banner motd #Unauthorized access is strictly prohibited.#
interface g0/0
ip address 192.168.1.1 255.255.255.0
no shut
interface s0/0/0
ip address 64.103.211.2 255.255.255.252
no shut
end
copy run start

Configuring with sets of commands in Router RB

en
config t
hostname RB-SAGAR
no ip domain-lookup
banner motd #Unauthorized access is strictly prohibited.#
interface g0/0
ip address 192.168.2.1 255.255.255.0
no shut
interface s0/0/0
ip address 209.165.122.2 255.255.255.252
no shut
end
copy run start

Configuring with sets of commands in Router RC

en
config t
hostname RC-SAGAR
no ip domain-lookup
banner motd #Unauthorized access is strictly prohibited.#
interface s0/0/0
ip address 64.103.211.1 255.255.255.252
clock rate 2000000
no shut
interface s0/0/1
ip address 209.165.122.1 255.255.255.252
clock rate 2000000
no shut
end
copy run start

Configuring Static Route

Since, the routers (RA and RB) is connected with R3, it needs to know how to reach to the users connected to the other end router. So, we need to configure static route.

RA-SAGAR# config t
RA-SAGAR(config)# ip route 192.168.2.0 255.255.255.0 10.10.10.2
RB-SAGAR# config t
RB-SAGAR(config)# ip route 192.168.1.0 255.255.255.0 10.10.10.1

Configuring GRE Tunnel

Configuring tunnel mode gre in router RA

interface tunnel 0
ip address 10.10.10.1 255.255.255.252
tunnel source s0/0/0
tunnel destination 209.165.122.2
tunnel mode gre ip
no shutdown
end
copy run start

Configuring tunnel mode gre in router RB

interface tunnel 0
ip address 10.10.10.2 255.255.255.252
tunnel source s0/0/0
tunnel destination 64.103.211.2
tunnel mode gre ip
no shutdown
end
copy run start

Configuring PCs

Configuring PCA

Configuring PCB

Testing

Verifying tunnel interfaces in Router RA and RB.

Successful ping and tracert from PCA to PCB.

Successful ping and tracert from PCA to PCB

Download .PKT file