ArticleslgStudy

biology

Generic routing encapsulation

Generic routing encapsulation is a biology topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Generic routing encapsulation rather than just read about it. In short: 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. Example uses In conjunction with PPTP to create VPNs.

Key takeaways

  • Generic routing encapsulation belongs to biology; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Generic routing encapsulation to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Generic routing encapsulation from memory before moving on to harder problems.

Reference excerpt

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.

Example uses In conjunction with PPTP to create VPNs. In conjunction with IPsec VPNs to allow passing of routing information between connected networks. In mobility management protocols. In A8/A10 interfaces to encapsulate IP data to/from Packet Control Function (PCF). Linux and BSD can establish ad-hoc IP over GRE tunnels which are interoperable with Cisco equipment. Distributed denial of service (DDoS) protected appliance to an unprotected endpoint.

Example protocol stack

Based on the principles of protocol layering in OSI, protocol encapsulation, not specifically GRE, breaks the layering order. It may be viewed as a separator between two different protocol stacks, one acting as a carrier for another.

Delivery protocols GRE packets that are encapsulated within IP directly, use IP protocol type 47 in the IPv4 header's Protocol field or the IPv6 header's Next Header field. For performance reasons, GRE can also be encapsulated in UDP packets. Better throughput may be achieved by using Equal-cost multi-path routing.

Packet header

Extended GRE packet header (RFC 2890) The extended version of the GRE packet header is represented below:

C (1 bit) Checksum bit. Set to 1 if a checksum is present. K (1 bit) Key bit. Set to 1 if a key is present. S (1 bit) Sequence number bit. Set to 1 if a sequence number is present. Reserved 0 (9 bits) Reserved bits; set to 0. Version (3 bits) GRE Version number; set to 0. Protocol Type (16 bits) Indicates the ether protocol type of the encapsulated payload. (For IPv4, this would be hex 0800.) Checksum (16 bits) Present if the C bit is set; contains the checksum for the GRE header and payload. Reserved 1 (16 bits) Present if the C bit is set; is set to 0. Key (32 bits) Present if the K bit is set; contains an application-specific key value. Sequence Number (32 bits) Present if the S bit is set; contains a sequence number for the GRE packet.

Standard GRE packet header (RFC 2784) A standard GRE packet header structure is represented in the diagram below.

C (1 bit) Checksum bit. Set to 1 if a checksum is present. Reserved 0 (12 bits) Reserved bits; set to 0. Version (3 bits) GRE Version number; set to 0. Protocol Type (16 bits) Indicates the ether protocol type of the encapsulated payload. (For IPv4, this would be hexadecimal 0x0800; for IPv6, it would be 0x86DD.) Checksum (16 bits) Present if the C bit is set; contains the checksum for the GRE header and payload. Reserved 1 (16 bits) Present if the C bit is set; its contents is set to 0.

Original GRE packet header (RFC 1701) The newer structure superseded the original structure:

The original GRE RFC defined further fields in the packet header which became obsolete in the current standard:

C (1 bit) Checksum bit. Set to 1 if a checksum is present. R (1 bit) Routing Bit. Set to 1 if Routing and Offset information are present. K (1 bit) Key bit. Set to 1 if a key is present. S (1 bit) Sequence number bit. Set to 1 if a sequence number is present. s (1 bit) Strict source route bit. Recur (3 bits) Recursion control bits. Flags (5 bits) Reserved for future use, set to 0. Version (3 bits) Set to 0. Protocol Type (16 bits) Indicates the ether protocol type of the encapsulated payload. Checksum (16 bits) Present if the C bit is set; contains the checksum for the GRE header and payload. Offset (16 bits) Present if R bit or C bit is set; contains valid information, only if R bit is set. An offset field indicating the offset within the Routing field to the active source route entry. Key (32 bits) Present if the K bit is set; contains an application-specific key value. Sequence Number (32 bits) Present if the S bit is set; contains a sequence number for the GRE packet. Routing (variable) Present if R bit is set; contains a list of source route entries, therefore is of variable length.

PPTP GRE packet header The Point-to-Point Tunneling Protocol (PPTP) uses a variant GRE packet header structure, represented below. PPTP creates a GRE tunnel through which the PPTP GRE packets are sent.

C (1 bit) Checksum bit. For PPTP GRE packets, this is set to 0. R (1 bit) Routing bit. For PPTP GRE packets, this is set to 0. K (1 bit) Key bit. For PPTP GRE packets, this is set to 1. (All PPTP GRE packets carry a key.) S (1 bit) Sequence number bit. Set to 1 if a sequence number is supplied, indicating a PPTP GRE data packet. s (1 bit) Strict source route bit. For PPTP GRE packets, this is set to 0. Recur (3 bits) Recursion control bits. For PPTP GRE packets, these are set to 0. A (1 bit) Acknowledgment number present. Set to 1 if an acknowledgment number is supplied, indicating a PPTP GRE acknowledgment packet. Flags (4 bits) Flag bits. For PPTP GRE packets, these are set to 0. Version (3 bits) GRE Version number. For PPTP GRE packets, this is set to 1. Protocol Type (16 bits) For PPTP GRE packets, this is set to hex 880B. Key Payload Length (16 bits) Contains the size of the payload, not including the GRE header. Key Call ID (16 bits) Contains the Peer's Call ID for the session to which the packet belongs. Sequence Number (32 bits) Present if the S bit is set; contains the GRE payload sequence number. Acknowledgement Number (32 bits) Present if the A bit is set; contains the sequence number of the highest GRE payload packet received by the sender.

Standards RFC 1701: Generic Routing Encapsulation (GRE) (informational) RFC 1702: Generic Routing Encapsulation over IPv4 networks (informational) RFC 2637: Point to Point Tunneling Protocol (informational) RFC 2784: Generic Routing Encapsulation (GRE) (proposed standard, updated by RFC 2890) RFC 2890: Key and Sequence Number Extensions to GRE (proposed standard) RFC 8086: GRE-in-UDP Encapsulation (proposed standard)

See also Network Virtualization using Generic Routing Encapsulation - carries L2 packets over GRE GPRS Tunnelling Protocol - GTP-U is similar to GRE and used in cellular networks

References

External links

Generic Routing Encapsulation, Subprotocol homepage at Cisco Generic Routing Encapsulation Archived 2018-12-29 at the Wayback Machine, Entry in Cisco DocWiki (formerly known as the "Internetworking Technology Handbook")

Worked examples

Example 1 — a first encounter with Generic routing encapsulation

Start with the simplest possible case. Write down what Generic routing encapsulation claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In biology, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Generic routing encapsulation before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Generic routing encapsulation ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Generic routing encapsulation

In research
Generic routing encapsulation appears in biology research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Generic routing encapsulation in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Generic routing encapsulation is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cisco Systems, Tunneling protocols, so understanding it makes those chapters shorter.
In everyday life
Look for Generic routing encapsulation outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Generic routing encapsulation” →

How to study Generic routing encapsulation in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Generic routing encapsulation means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Generic routing encapsulation out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Generic routing encapsulation in simple terms?

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. Example uses In conjunction with PPTP to create V…

Why does Generic routing encapsulation matter?

Because it connects several biology ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Generic routing encapsulation?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Generic routing encapsulation.

Tags

  • Cisco Systems
  • Tunneling protocols

Keep exploring