I have a quick question regarding GRE encapsulation. Does GRE encapsulate the whole packet or just the IP header? The below seems to be a bit confusing for me?
"GRE encapsulates a payload, that is, an inner packet that needs to be delivered to a destination network inside an outer IP packet. GRE tunnel endpoints send payloads through GRE tunnels by routing encapsulated packets through intervening IP networks. Other IP routers along the way do not parse the payload (the inner packet); they only parse the outer IP packet as they forward it towards the GRE tunnel endpoint. Upon reaching the tunnel endpoint, GRE encapsulation is removed and the payload is forwarded to it’s ultimate destination."
Any input from you would be greatly appreciated.
Thanks for the prompt response. Understood now, make sense.
hello dears,I have a doubt, on the JNCIS-SP guide (Junos Intermediate Routing) it says: "As a packet enters an IP tunnel, the tunneling protocol encapsulates the entire packet, including the header."It is on the chapter 5: IP Tunneling and is at begining the chapterThen, GRE encapsulates whole packet, isn't it?
Both your books excerpt and @Kingman reply confirm that the entire IP packet (header + payload) are encapsulated:
Payload|ip header| Gre header| outer IP header|
Maybe looking at a PCAP might help: