Configuring GRE Tunnel Interfaces | Junos OS (2024)

Understanding Generic Routing Encapsulation

Generic routing encapsulation (GRE) provides a private,secure path for transporting packets through an otherwise public networkby encapsulating (or tunneling) the packets.

This topic describes:

  • Overview of GRE
  • GRE Tunneling
  • Configuration Limitations

Overview of GRE

GRE encapsulates data packets and redirects them to a devicethat de-encapsulates them and routes them to their final destination.This allows the source and destination routers to operate as if theyhave a virtual point-to-point connection with each other (becausethe outer header applied by GRE is transparent to the encapsulatedpayload packet). For example, GRE tunnels allow routing protocolssuch as RIP and OSPF to forward data packets from one router to anotherrouter across the Internet. In addition, GRE tunnels can encapsulatemulticast data streams for transmission over the Internet.

GRE is described in RFC2784 (obsoletes earlier RFCs1701and 1702). The routers support RFC2784, but not completely.(For a list of limitations, see Configuration Limitations.)

As a tunnel source router, the router encapsulatesa payload packet for transport through the tunnel to a destinationnetwork. The payload packet is first encapsulated in a GRE packet,and then the GRE packet is encapsulated in a delivery protocol. Therouter performing the role of a tunnel remote router extracts the tunneled packet and forwards the packet to its destination.

Note:

Service chaining for GRE, NAT, and IPSec services on ACX1100-ACand ACX500 routers is not supported.

Note:

Layer 2 over GRE is not supported in ACX2200 router.

ACX routers support OSPF routing protocol when a GRE tunnel is configured on a WAN interface.

GRE Tunneling

Datais routed by the system to the GRE endpoint over routes establishedin the route table. (These routes can be statically configured ordynamically learned by routing protocols such as RIP or OSPF.) Whena data packet is received by the GRE endpoint, it is de-encapsulatedand routed again to its destination address.

GRE tunnels are stateless-–that is,the endpoint of the tunnel contains no information about the stateor availability of the remote tunnel endpoint. Therefore, the routeroperating as a tunnel source router cannot change the state of theGRE tunnel interface to down if the remote endpoint is unreachable.

For details about GRE tunneling, see:

  • Encapsulation and De-Encapsulation on the Router
  • Number of Source and Destination Tunnels Allowed on a Router

Encapsulation and De-Encapsulation on the Router

Encapsulation—A router operating as a tunnel source routerencapsulates and forwards GRE packets as follows:

  1. When a router receives a data packet (payload) to be tunneled,it sends the packet to the tunnel interface.

  2. The tunnel interface encapsulates the data in a GRE packetand adds an outer IP header.

  3. The IP packet is forwarded on the basis of the destinationaddress in the outer IP header.

De-encapsulation—A router operating as a tunnel remoterouter handles GRE packets as follows:

  1. When the destination router receives the IP packet fromthe tunnel interface, the outer IP header and GRE header are removed.

  2. The packet is routed based on the inner IP header.

Number of Source and Destination Tunnels Allowed on a Router

ACX routers support as many as 64GRE tunnels between routerstransmitting IPv4 or IPv6 payload packets over GRE.

Configuration Limitations

Some GRE tunneling features are not currently available on ACXSeries routers. Be aware of the following limitations when you areconfiguring GRE on an ACX router:

  • Unsupported features—GRE on the ACX routers does not support the following features:

  • Routing Protocol—ACX routers do not support routingprotocols on GRE interfaces. You need to disable routing on GRE interfacesunder the [edit protocols] hierarchy. For example,

    Note:

    This limitation is applicable for all routing protocols (suchas OSPF, ISIS).

See Also

  • Configuring Unicast Tunnels

Configuring Generic Routing Encapsulation Tunneling

Tunneling provides a private, secure path for transportingpackets through an otherwise public network by encapsulating packetsinside a transport protocol known as an IP encapsulationprotocol. Generic routing encapsulation (GRE) is an IPencapsulation protocol that is used to transport packets over a network.Information is sent from one network to the other through a GRE tunnel.

GRE tunneling is accomplished through routable tunnel endpointsthat operate on top of existing physical and other logical endpoints.GRE tunnels connect one endpoint to another and provide a clear datapath between them.

This topic describes:

  • Configuring a GRE Tunnel Port
  • Configuring Tunnels to Use Generic Routing Encapsulation

Configuring a GRE Tunnel Port

To configure GRE tunnels on a router, you convert a networkport or uplink port on the router to a GRE tunnel port for tunnelservices. Each physical tunnel port, named gr-fpc/pic/port, can have oneor more logical interfaces, each of which is a GRE tunnel.

After conversion to a GRE tunnel port, the physical port cannotbe used for network traffic.

To configure a GRE tunnel port on an router, you need to create logical tunnel interfaces and the bandwidth in gigabits per second to reserve for tunnel services. Include the tunnel-services bandwidth (1g | 10g) statement at the [edit chassis fpc slot-number pic number] hierarchy level.

To configure a GRE tunnel port , use any unused physical port on the router to create a logical tunnel interface as shown below:

This also creates a gr- interface.

Configuring Tunnels to Use Generic Routing Encapsulation

Normally, a GRE tunnel port comes up as soon as it is configuredand stays up as long as a valid tunnel source address exists or aninterface is operational. Each logical interface you configure onthe port can be configured as the source or as the endpoint of a GREtunnel.

To configure a tunnel port to use GRE:

  1. Configure a physical GRE port with a logical interfacename and address:
    • For IPv4 over GRE, specify the protocol family inet:

    • For IPv6 over GRE, specify the protocol family inet6:

  2. Specify the tunnel source address for the logical interface:
  3. Specify the destination address:

See Also

  • Configuring Unicast Tunnels

GRE Keepalive Time Overview

Generic routing encapsulation (GRE) tunnel interfacesdo not have a built-in mechanism for detecting when a tunnel is down.You can enable keepalive messages to serve as the detection mechanism.

When you enable a GRE tunnel interface for keepalive messages,the interface sends out keepalive request packets to the remote endpointat regular intervals. If the data path forwarding for the GRE tunnelworks correctly at all points, keepalive response packets are returnedto the originator. These keepalive messages are processed by the RoutingEngine.

You can configure keepalive messages on the physical or logicalGRE tunnel interface. If configured on the physical interface, keepalivemessages are sent on all logical interfaces that are part of thephysical interface. If configured on an individual logical interface,keepalives are sent only on that logical interface.

You configure how often keepalive messages are sent and thelength of time that the interface waits for a keepalive response beforemarking the tunnel as operationally down.

The keepalive request packet is shown in Figure 1.

Figure 1: Keepalive Request PacketConfiguring GRE Tunnel Interfaces | Junos OS (1)

The keepalive payload includes information to ensure the keepaliveresponse is correctly delivered to the application responsible forthe GRE keepalive process.

The outer GRE header includes:

  • Source IP Address—IP address of the endpoint thatinitiates the keepalive request

  • Destination IP Address—IP address of the endpointthat receives the keepalive request

  • GRE Protocol ID—IP

The inner GRE header includes:

  • Source IP Address—IP address of the endpoint thatreceives the keepalive request

  • Destination IP Address—IP address of the endpointthat initiates the keepalive request

  • GRE Protocol ID—A value that the packet forwardingengine recognizes as a GRE keepalive packet

Note:

Starting in Junos OS Release 17.3R1, you can configureIPv6 generic routing encapsulation (GRE) tunnel interfaces on MXSeries routers. This lets you run a GRE tunnel over an IPv6 network.Packet payload families that can be encapsulated within the IPv6GRE tunnels include IPv4, IPv6, MPLS, and ISO. Fragmentation andreassembly of the IPv6 delivery packets is not supported.

To configure an IPv6 GRE tunnel interface, specify IPv6 addressesfor source and destination at the [interfacesgr-0/0/0 unit 0 tunnel] hierarchy level.

Keepalive is not supported for GRE IPv6.

See Also

  • keepalive-time

  • hold-time

Configuring GRE Keepalive Time

  • Configuring Keepalive Time and Hold time for a GRE Tunnel Interface
  • Display GRE Keepalive Time Configuration
  • Display Keepalive Time Information on a GRE Tunnel Interface

Configuring Keepalive Time and Hold time for a GRE Tunnel Interface

You can configure the keepalives on a generic routingencapsulation (GRE) tunnel interface by including both the keepalive-time statement and the hold-time statement at the [editprotocols oam gre-tunnel interface interface-name] hierarchy level.

Note:

For proper operation of keepalives on a GRE interface,you must also include the family inet statement at the [edit interfaces interface-name unit unit] hierarchy level. If you do not include thisstatement, the interface is marked as down.

To configure a GRE tunnel interface:

  1. Configure the GRE tunnel interface at [edit interfaces interface-name unit unit-number] hierarchy level, where the interface name is gr-x/y/z, and the familyis set as inet.
  2. Configure the rest of the GRE tunnel interface optionsas explained in Configuring a GRE Tunnel Interface Between a PEand CE Router or Configuring a GRE Tunnel Interface Between PE Routers based on requirement.

To configure keepalive time for a GRE tunnel interface:

  1. Configure the Operation, Administration, and Maintenance(OAM) protocol at the [edit protocols] hierarchy levelfor the GRE tunnel interface.

  2. Configure the GRE tunnel interface option for OAM protocol.

  3. Configure the keepalive time from 1 through 50 secondsfor the GRE tunnel interface.

  4. Configure the hold time from 5 through 250 seconds. Notethat the hold time must be at least twice the keepalive time.

Display GRE Keepalive Time Configuration

  • Purpose
  • Action

Purpose

Display the configured keepalive time value as 10 andhold time value as 30 on a GRE tunnel interface (for example, gr-1/1/10.1).

Action

To display the configured values on the GRE tunnel interface,run the show oam gre-tunnel command at the [edit protocols] hierarchy level:

Display Keepalive Time Information on a GRE Tunnel Interface

  • Purpose
  • Action
  • Meaning

Purpose

Display the current status information of a GRE tunnelinterface when keepalive time and hold time parameters are configuredon it and when the hold time expires.

Action

To verify the current status information on a GRE tunnelinterface (for example, gr-3/3/0.3), run the show interfacesgr-3/3/0.3 terse and show interfaces gr-3/3/0.3 extensive operational commands.

show interfaces gr-3/3/0.3 terse

show interfaces gr-3/3/0.3 extensive

Note:

When the hold time expires:

  • The GRE tunnel will stay up even though the interfacecannot send or receive traffic.

  • The Link status will be Up and the Gre keepalives adjacency state will be Down.

Meaning

The current status information of a GRE tunnel interfacewith keepalive time and hold time parameters is displayed as expectedwhen the hold time expires.

See Also

  • keepalive-time

  • hold-time

Enabling Fragmentation on GRE Tunnels

To enable fragmentation of IPv4 packets in generic routing encapsulation (GRE) tunnels, include the clear-dont-fragment-bit statement and a maximum transmission unit (MTU) setting for the tunnel as part of an existing GRE configuration at the [edit interfaces] hierarchy level:

This statement clears the Don’t Fragment (DF) bit in the packet header, regardless of the packet size. If the packet size exceeds the tunnel MTU value, the packet is fragmented before encapsulation. The maximum MTU size configurable on the AS or Multiservices PIC is 9192bytes.

Note:

The clear-dont-fragment-bit statement is supported only on MX Series routers and all M Series routers except the M320 router.

Note:

On SRX platforms the clearing of the DF bit on a GRE tunnel is supported only when the device is in packet or selective packet mode; This feature is not supported in flow mode. As a result, when in flow mode, a packet that exceeds the MTU of the GRE interface with the DF bit set is dropped, despite having the clear-dont-fragment-bit configured on the GRE interface.

Fragmentation is enabled only on IPv4 packets being encapsulated in IPv4-based GRE tunnels.

Note:

This configuration is supported only on GRE tunnels on AS or Multiservices interfaces. If you commit gre-fragmentation as the encapsulation type on a standard Tunnel PIC interface, the following console log message appears when the PIC comes online:

The Packet Forwarding Engine updates the IP identification field in the outer IP header of GRE-encapsulated packets, so that reassembly of the packets is possible after fragmentation. The previous CLI constraint check that required you to configure either the clear-dont-fragment-bit statement or a tunnel key with the allow-fragmentation statement is no longer enforced.

When you configure the clear-dont-fragment-bit statement on an interface with the MPLS protocol family enabled, you must specify an MTU value. This MTU value must not be greater than maximum supported value (9192).

See Also

  • Configuring Unicast Tunnels

Configuring GRE Tunnel Interfaces | Junos OS (2024)
Top Articles
I’ve heard about this thing called the 3-day rule with men, and I’m curious about what it means. Does it have to do with waiting three days before calling or texting after a date, or is it something else entirely? I’d love to get some insight into how thi
Blizzak Tires | Winter, Snow & Ice Driving | Bridgestone
Lighthouse Diner Taylorsville Menu
Ds Cuts Saugus
Www.metaquest/Device Code
Overnight Cleaner Jobs
Devotion Showtimes Near Mjr Universal Grand Cinema 16
Craigslist In Fredericksburg
Displays settings on Mac
Weather In Moon Township 10 Days
414-290-5379
Thayer Rasmussen Cause Of Death
New Mexico Craigslist Cars And Trucks - By Owner
Cpt 90677 Reimbursem*nt 2023
Driving Directions To Bed Bath & Beyond
Jellyfin Ps5
Cta Bus Tracker 77
Hermitcraft Texture Pack
Tinker Repo
Clare Briggs Guzman
Exl8000 Generator Battery
Best Sports Bars In Schaumburg Il
Directions To Nearest T Mobile Store
4 Times Rihanna Showed Solidarity for Social Movements Around the World
Divide Fusion Stretch Hoodie Daunenjacke für Herren | oliv
Gen 50 Kjv
Neteller Kasiinod
Noaa Marine Forecast Florida By Zone
Account Now Login In
Life Insurance Policies | New York Life
Rund um die SIM-Karte | ALDI TALK
Strange World Showtimes Near Atlas Cinemas Great Lakes Stadium 16
Darrell Waltrip Off Road Center
Clark County Ky Busted Newspaper
2024 Ford Bronco Sport for sale - McDonough, GA - craigslist
Domina Scarlett Ct
2700 Yen To Usd
Verizon Outage Cuyahoga Falls Ohio
Directions To The Closest Auto Parts Store
Who Is Responsible for Writing Obituaries After Death? | Pottstown Funeral Home & Crematory
Courses In Touch
Wilson Tire And Auto Service Gambrills Photos
Mybiglots Net Associates
Craigslist Woodward
Pixel Gun 3D Unblocked Games
Oakley Rae (Social Media Star) – Bio, Net Worth, Career, Age, Height, And More
Mountainstar Mychart Login
Every Type of Sentinel in the Marvel Universe
Quest Diagnostics Mt Morris Appointment
Sleep Outfitters Springhurst
Cool Math Games Bucketball
Southern Blotting: Principle, Steps, Applications | Microbe Online
Latest Posts
Article information

Author: Prof. An Powlowski

Last Updated:

Views: 6012

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Prof. An Powlowski

Birthday: 1992-09-29

Address: Apt. 994 8891 Orval Hill, Brittnyburgh, AZ 41023-0398

Phone: +26417467956738

Job: District Marketing Strategist

Hobby: Embroidery, Bodybuilding, Motor sports, Amateur radio, Wood carving, Whittling, Air sports

Introduction: My name is Prof. An Powlowski, I am a charming, helpful, attractive, good, graceful, thoughtful, vast person who loves writing and wants to share my knowledge and understanding with you.