cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7009
Views
1
Helpful
5
Replies

about GRE

does GRE have a layer 4 header?

if yes which ports does it use?

5 Replies 5

Hi

 GRE does not have Layer 4 header.  GRE is a layer 3 protocol. Layer 4 header must be seing in TCP and UDP protocols.

 

gre-header-1.jpg

Jon Marshall
Hall of Fame
Hall of Fame

 

No it doesn't as GRE is at the IP layer. 

 

Jon

Dont have l4 port it have 

Ip protocl number which is 47 

access-list 100 permit gre host x.x.x.x host y.y.y.y <- and I assume since you ask about the L4 port number you want to allow it port, but IOS already have IP protocol keyword you can use it for GRE which is as show above.

Joseph W. Doherty
Hall of Fame
Hall of Fame

"does GRE have a layer 4 header?"

Hmm, that's an interesting question.

Like ICMP, IGMP, TCP, UDP and many others, GRE is a defined protocol for IP.  It like the others IP protocols, depends on IP, the L3 layer, to deliver the GRE packets.

Once a GRE packet is delivered, it's unwrapped to provide another IP packet.  I.e. it's a bit more/different stack processing from OSI L3 packet delivery, alone, across a routed network, yet less than some other IP protocols considered full L4 protocols, like TCP or UDP using/having "port numbers" (which GRE does not).

However, if you equate GRE's encapsulated IP addresses to UDP ports numbers (both accomplish similar goals), and/or consider GRE RFC 2890 header fields (key field, sequence field), it's getting somewhat like other IP L4 transport protocols (i.e. end-to-end considerations beyond just what L3 considers).

In my (not so humble [laugh]) opinion, I would classify GRE, in the OSI model, as either 3+ or something like 3.5.

BTW, the Wiki article for the OSI model has, within this section Wiki OSI model L4, this statement "While Generic Routing Encapsulation (GRE) might seem to be a network-layer protocol, if the encapsulation of the payload takes place only at the endpoint, GRE becomes closer to a transport protocol that uses IP headers but contains complete Layer 2 frames or Layer 3 packets to deliver to the endpoint. L2TP carries PPP frames inside transport segments."

Personally, I don't consider Wiki articles to be totally authoritative, but I do find it interesting that GRE has a special mention.  (NB: I checked Wiki after noting my thinking, above.)