Options

GRE protocol stack location

WastedHatWastedHat Member Posts: 132 ■■■□□□□□□□
From Odoms ICND2 material on GRE -

"The routers encapsulate the original packet inside a tunnel header, which takes the place of the serial link’s HDLC header."

Later in the chapter he says..

"GRE is not a TCP or UDP application. Instead, GRE acts like another transport protocol in that the GRE header follows the IPv4 header, like TCP and UDP"

The first paragraph suggests that the GRE happens lower in the stack from Layer 3 and the second says its higher. I had a look at the Wikipedia page for GRE which shows the protocol stack with GRE included and it has UDP at the transport layer so I'm not sure what to believe now. Can anyone make more sense of this?

Comments

  • Options
    hodgey87hodgey87 Member Posts: 232
    As far as I can remember its neither TCP or UDP, think its IP protocol number is 47 ....

    Might be worth having a look through the RFC:

    RFC 2784 - Generic Routing Encapsulation (GRE) (RFC2784)
  • Options
    BlackBeretBlackBeret Member Posts: 683 ■■■■■□□□□□
    Never trust Wikipedia (when did this become the norm?). It's not a primary source, it's openly editable. If you look at the placement, it has GRE listed in the position of the transport layer, it just didn't name it that, then felt the need to throw a transport layer on top of it.
  • Options
    pevangelpevangel Member Posts: 342
    The example protocol stack in Wikipedia is pretty accurate.

    The GRE tunnel itself sits above layer 3. You use the tunnel to transport packets which are layer 3 and up.

    That's just the nature of tunnels in general. I don't have a GRE lab but I do have one for pseudowire (L2 tunnel using MPLS) and here's what a packet capture looks like:

    23kwu4h.png

    Notice how there's two sets of Ethernet MAC addresses. The first one (on top) is the layer 2 information used to create the tunnel. The second one is the layer 2 information of the payload being transported through the tunnel.
  • Options
    WastedHatWastedHat Member Posts: 132 ■■■□□□□□□□
    Thanks for the replies. I did try to make my own packet capture in GNS3 without any success. I just downloaded a pre-made capture and it makes more sense now. It is pretty much the same as the Wikipedia stack with multiple layer 3/4 headers, I just got confused by Odom's wording.
Sign In or Register to comment.