GRE Tunnels for Layer 3 VPNs | Junos OS (2024)

This example shows how to configure a generic routingencapsulation (GRE) tunnel interface between PE routers to provideVPN connectivity. You can use this configuration to tunnel VPN trafficacross a non-MPLS core network. The network topology used in thisexample is shown in Figure 3. The P routersshown in this illustration do not run MPLS.

Figure 3: PE Routers A and D Connected by aGRE Tunnel InterfaceGRE Tunnels for Layer 3 VPNs | Junos OS (1)

For configuration information, see the following sections:

  • Configuring the Routing Instance on Router A
  • Configuring the Routing Instance on Router D
  • Configuring MPLS, BGP, and OSPF on Router A
  • Configuring MPLS, BGP, and OSPF on Router D
  • Configuring the Tunnel Interface on Router A
  • Configuring the Tunnel Interface on Router D
  • Configuring the Routing Options on Router A
  • Configuring the Routing Options on Router D
  • Configuration Summary for Router A
  • Configuration Summary for Router D

Configuring the Routing Instance on Router A

Configure a routing instance on Router A:

Configuring the Routing Instance on Router D

Configure a routing instance on Router D:

Configuring MPLS, BGP, and OSPF on Router A

Although you do not need to configure MPLS on the P routersin this example, it is needed on the PE routers for the interfacebetween the PE and CE routers and on the GRE interface (gr-1/1/0.0) linking the PE routers (Router A and Router D). Configure MPLS,BGP, and OSPF on Router A:

Configuring MPLS, BGP, and OSPF on Router D

Although you do not need to configure MPLS on the P routersin this example, it is needed on the PE routers for the interfacebetween the PE and CE routers and on the GRE interface (gr-1/1/0.0) linking the PE routers (Router D and Router A). Configure MPLS,BGP, and OSPF on Router D:

Configuring the Tunnel Interface on Router A

Configure the tunnel interface on Router A (the tunnel is unnumbered):

Configuring the Tunnel Interface on Router D

Configure the tunnel interface on Router D (the tunnel is unnumbered):

Configuring the Routing Options on Router A

As part of the routing options configuration for Router A, youneed to configure routing table groups to enable VPN route resolutionin the inet.3 routing table.

Configure the routing options on Router A:

Configuring the Routing Options on Router D

As part of the routing options configuration for Router D, youneed to configure routing table groups to enable VPN route resolutionin the inet.3 routing table.

Configure the routing options on Router D:

Configuration Summary for Router A

Configure the Routing Instance

Configure MPLS

Configure BGP

Configure OSPF

Configure the Tunnel Interface

Configure Routing Options

Configuration Summary for Router D

Configure the Routing Instance

Configure MPLS

Configure BGP

Configure OSPF

Configure the Tunnel Interface

Configure the Routing Options

GRE Tunnels for Layer 3 VPNs | Junos OS (2024)

FAQs

Is GRE VPN a layer 3 VPN? ›

Junos OS allows you to configure a generic routing encapsulation (GRE) tunnel between the PE and CE routers for a Layer 3 VPN. The GRE tunnel can have one or more hops.

Which layer 3 protocol does GRE use? ›

GRE is an IP encapsulation protocol that is used to transport packets over a network. tunnels are in IPv4 Layer-3 mode. IPv6 encapsulated in IPv4 and IPv4 encapsulated in IPv6 are not supported.

What are the differences between a GRE tunnel and a site to site tunnel VPN? ›

Multicast traffic forwarding – GRE tunnels can be used to forward multicast traffic, whereas a VPN cannot. Because of this, multicast traffic such as advertisem*nts sent by routing protocols can be easily transferred between remote sites when using a GRE tunnel.

What is the maximum bandwidth of the GRE tunnel? ›

Zscaler supports a maximum bandwidth of 1 Gbps for each GRE tunnel if the internal tunnel endpoint IP addresses are not source network address translated (NATed). If the internal tunnel endpoint IP addresses are source NATed, then Zscaler can only support up to 250 Mbps of traffic for each tunnel.

Which are Layer 3 VPNs? ›

A Layer 3 VPN is composed of a set of customer sites that are connected over a service provider's existing public Internet backbone. A peer-to-peer model is used to connect to the customer sites, where the service providers learn the customer routes on peering with the customers.

Which of the following are layer 3 VPNs? ›

Layer 3 VPNs (L3VPNs) are also called VPRNs. The BGP/MPLS VPN, BGP/MPLS VPN with IPsec or GRE tunnels, IPsec VPN, and GRE VPN belong to L3VPNs.

What are the disadvantages of GRE tunnels? ›

One of the main risks of GRE tunnels is their lack of security and encryption. GRE tunnels do not provide any authentication, confidentiality, or integrity protection for the encapsulated traffic.

What are the disadvantages of GRE tunnel? ›

The chief disadvantage of GRE is that it is not considered a secure protocol because it doesn't use encryption like the IP Security (IPsec) Encapsulating Security Payload, defined by RFC 2406.

How do GRE tunnels work? ›

What does GRE tunneling mean? Encapsulating packets within other packets is called "tunneling." GRE tunnels are usually configured between two routers, with each router acting like one end of the tunnel. The routers are set up to send and receive GRE packets directly to each other.

Why use GRE instead of IPSec? ›

In short (), GRE over IPSec is most useful whenever you need to tunnel dynamic routing protocol traffic across an uncontrolled network securely to provide IP reachability between remote sites.

Why use GRE tunnel over IPSec? ›

IT teams should use IPsec when they require secure IP tunneling. They should use GRE when they require tunneling without privacy and when they need to tunnel multiple protocols or multicast. Teams can combine GRE on top of IPsec when they need GRE's multiprotocol functionality combined with IPsec's data protection.

What is the best VPN tunnel type? ›

OpenVPN is the most secure VPN protocol and the safest choice thanks to its near-unbreakable encryption, which keeps users' data private even when using public Wi-Fi. Because it's open source, users can check the source code for vulnerabilities and reassure themselves that there are no weaknesses in its security.

Is GRE port 47 TCP or UDP? ›

The network connection is done via the GRE protocol (IP protocol number 47. For more information, refer to Wikipedia: List of IP protocol numbers. Since GRE is an IP protocol, it is not based on either TCP or UDP and has no concept of ports. It is an IP protocol by itself.

When to use GRE tunnel? ›

Here are some of the reasons: You need to encrypt multicast traffic. GRE tunnels can carry multicast packets—just like real network interfaces—as opposed to using IPSec by itself, which can't encrypt multicast traffic. Some examples of multicast traffic are OSPF, EIGRP, and RIPV2.

Is the GRE tunnel encrypted? ›

GRE is best used over a trusted network path because the packets aren't encrypted, but it can be combined with an IPsec tunnel if encryption is required.

What type of VPN is IKEv2? ›

IKEv2 stands for Internet Key Exchange Version 2.

It is considered more lightweight and stable than OpenVPN while retaining some customizability. But it is only available over UDP, which is blocked by some firewalls. IKEv2 is one of the newest protocols and has significant strengths, particularly its speed.

Is VPN layer 2 or 3? ›

Generally speaking, layer 2 VPN bridging is best for extending a LAN across different locations or for applications that need layer 2 features. On the other hand, layer 3 VPN bridging is preferable for connecting networks with different protocols or addresses or for applications that need layer 3 features.

Is L2TP VPN a Layer 3 VPN? ›

L2TP carries OSI Layer 2 traffic across Layer 3 networks. It achieves this in a three-stage process. Firstly, L2TP must create a connection between the LAC and the LNS. The LNS and LAC serve as endpoints for the point-to-point tunnel, and they must negotiate the relationship between them before transmitting any data.

What is the difference between IPsec and GRE VPN? ›

GRE is a tunneling protocol which is used to transport multicast, broadcast and non-IP packets like IPX etc. IPSec is an encryption protocol. IPSec can only transport unicast packets not multicast & broadcast. Hence we wrap it GRE first and then into IPSec which is called as GRE over IPSec.

Top Articles
Latest Posts
Article information

Author: Van Hayes

Last Updated:

Views: 5836

Rating: 4.6 / 5 (46 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Van Hayes

Birthday: 1994-06-07

Address: 2004 Kling Rapid, New Destiny, MT 64658-2367

Phone: +512425013758

Job: National Farming Director

Hobby: Reading, Polo, Genealogy, amateur radio, Scouting, Stand-up comedy, Cryptography

Introduction: My name is Van Hayes, I am a thankful, friendly, smiling, calm, powerful, fine, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.