Networkforyou
Welcome
To
Network for you
GRE
Email us: 1 of 4 WhatsApp Us : +918143809578
networkforyou4@[Link]
Networkforyou
Generic Routing Encapsulation:
• GRE stand for the Generic Routing Encapsulation.
• Generic Routing Encapsulation (GRE) is a tunneling protocol developed by Cisco Systems that can
encapsulate a wide variety of network layer protocols inside virtual point-to-point links or point-to-
multipoint links over an Internet Protocol network.
• GRE is the mechanism that encapsulate one protocol in another protocol.
• Tunneling is a concept where we put ‘packets into packets’ so that they can be transported over
certain networks. We also call this encapsulation.
• Tunneling is used to hide the packet and transported over certain networks. In GRE basically,
tunneling is a concept where to put packets into packets.
• GRE tunnels are used to create point-to-point connections between two networks.
• Generic Routing Encapsulation is a method to tunnel IP packets between two end points.
• Generic Routing Encapsulation supports encapsulating IPv4 broadcast & multicast traffic.
• GRE does not encrypt packets; it can be used along with IPsec to encrypt the packets.
GRE Configuration Steps:
Step 1:
Create tunnel interfaces on R1 and R2 using the interface tunnel number command.
Step 2:
Choose a subnet to be used on tunnel interfaces and assign an IP address from the subnet to both end points.
Step 3:
Configure the source IP address of the tunnel interface using the tunnel source interface or the tunnel source
ip-address command. The source interface or IP address must be the one that connects the router to the
public part of the network.
Step 4:
Configure the destination IP address of the tunnel interface using the tunnel destination ip-address
command. The destination IP address must be the remote one that connects the router to the public part of
the network.
Step 5:
Configure the routers to use the tunnel interfaces to reach remote subnets. Use either static routing or a
dynamic routing protocol to enable on tunnel interfaces to achieve that.
Email us: 2 of 4 WhatsApp Us : +918143809578
networkforyou4@[Link]
Networkforyou
Let do Lab for GRE:
!HQ Basic Configuration: !Branch-Office Basic Configuration:
en en
config t config t
hostname HQ hostname BO
interface FastEthernet0/0 interface FastEthernet0/0
ip address [Link] [Link] ip address [Link] [Link]
no shutdown no shutdown
! !
interface Loopback0 interface Loopback0
ip address [Link] [Link] ip address [Link] [Link]
!HQ GRE Configuration: !BO GRE Configuration:
config t config t
interface Tunnel1 interface Tunnel1
ip address [Link] [Link] ip address [Link] [Link]
tunnel source [Link] tunnel source [Link]
tunnel destination [Link] tunnel destination [Link]
! !
ip route [Link] [Link] [Link] ip route [Link] [Link] [Link]
router eigrp 1 router eigrp 1
no auto-summary no auto-summary
network [Link] network [Link]
network [Link] network [Link]
!Internet(ISP Router)Basic Configuration: Verification Commands
en HQ#traceroute [Link]
config t BO#traceroute [Link]
hostname ISP HQ#ping [Link] source loopback 0
interface FastEthernet0/0 BO#ping [Link] source loopback 0
ip address [Link] [Link] HQ#show ip eigrp neighbors
Email us: 3 of 4 WhatsApp Us : +918143809578
networkforyou4@[Link]
Networkforyou
no shutdown BO#show ip eigrp neighbors
!
interface FastEthernet1/0
ip address [Link] [Link]
no shutdown
IPec_Over_GRE:
!HQ Basic Configuration: !Branch-Office Basic Configuration:
crypto isakmp policy 1 crypto isakmp policy 1
encr 3des encr 3des
hash md5 hash md5
authentication pre-share authentication pre-share
group 2 group 2
lifetime 86400 lifetime 86400
exit exit
crypto isakmp key cisco address [Link] crypto isakmp key cisco address [Link]
crypto ipsec transform-set TS esp-3des esp-md5- crypto ipsec transform-set TS esp-3des esp-md5-
hmac hmac
mode transport mode transport
exit exit
crypto ipsec profile abc crypto ipsec profile abc
set security-association lifetime seconds 86400 set security-association lifetime seconds 86400
set transform-set TS set transform-set TS
exit exit
interface Tunnel 1 interface Tunnel 1
tunnel protection ipsec profile abc tunnel protection ipsec profile abc
Email us: 4 of 4 WhatsApp Us : +918143809578
networkforyou4@[Link]