GRE Fundamentals

What is GRE?

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 over an Internet Protocol network. Essentially, GRE creates a private pathway for data packets to travel between two points across an IP network, as if they were directly connected.

The primary function of GRE is to encapsulate a payload, which is an original packet with its own protocol (like IPv4, IPv6, AppleTalk, etc.), inside a new IP packet. This new IP packet uses GRE protocol for its payload and has its own IP header (the "outer" IP header) that routes it through the transit IP network to the tunnel endpoint. At the destination, the outer header and GRE header are removed, and the original packet is forwarded to its final destination.

Key Characteristic: GRE is defined by RFC 2784 and RFC 2890. It is considered a stateless protocol, meaning it doesn't maintain information about the state of the connection or flow control, relying on the encapsulated protocols for such mechanisms.

GRE itself does not provide any encryption or strong security mechanisms. While it has a basic mechanism for keying, the key is part of the GRE header and offers minimal protection. Therefore, if security is a concern, GRE is typically used in conjunction with other security protocols like IPSec.

GRE Use Cases

GRE tunnels are versatile and employed in various networking scenarios:

Understanding these use cases is vital for the PCNSE exam, as questions may revolve around choosing the appropriate tunneling technology for a given scenario.

GRE Packet Structure & Overhead

A GRE-encapsulated packet consists of the original packet (payload) wrapped by a GRE header and then a new IP header (outer IP header).

GRE Packet Encapsulation.

The components are:

Total GRE Overhead: For a basic GRE tunnel (without optional GRE header fields), the overhead added to the original packet is typically:
24 bytes = 4 bytes (GRE header) + 20 bytes (New Outer IP header).

This overhead is crucial when considering MTU (Maximum Transmission Unit) adjustments, which will be discussed later.

GRE over IPSec

Introduction to GRE over IPSec

While GRE provides excellent flexibility for tunneling various protocols and multicast traffic, it lacks inherent security features like encryption and robust authentication. This makes plain GRE unsuitable for transmitting sensitive data over untrusted networks like the internet.

To address this, GRE can be combined with IPSec. In a GRE over IPSec configuration, the GRE encapsulated packet (which contains the original data) is itself encapsulated and protected by IPSec. This leverages the flexibility of GRE with the strong security (confidentiality, integrity, and authentication) provided by IPSec.

The process involves two main layers of encapsulation:

  1. GRE Encapsulation: The original packet is first encapsulated by GRE, adding a GRE header and a new IP header (the "GRE IP header" or "inner IP header" from IPSec's perspective).
  2. IPSec Encapsulation: The resulting GRE packet is then treated as the payload for an IPSec tunnel. IPSec encrypts and/or authenticates this GRE packet, adding its own IPSec headers (e.g., ESP header) and another IP header (the "outer IP header").

Benefit: This combination allows secure transport of traffic that IPSec alone might not support (like multicast or certain routing protocols) or simplifies configurations for complex multi-protocol environments while ensuring data protection.

Use Cases for GRE over IPSec

Combining GRE with IPSec is particularly beneficial in scenarios where both the flexibility of GRE and the security of IPSec are required:

Scenario: Secure Branch Connectivity with Dynamic Routing

A company wants to connect its branch offices to its headquarters. They need to run OSPF between the sites for dynamic route exchange and also ensure all traffic, including sensitive internal application data, is encrypted.
Solution: GRE over IPSec. GRE tunnels are established between the Palo Alto Networks firewalls at each site. OSPF adjacencies are formed over these GRE tunnels. The GRE tunnels are then secured by underlying IPSec tunnels, encrypting all OSPF updates and user data.

IPSec Fundamentals: IKE Phase 1

Internet Key Exchange (IKE) is the protocol used to negotiate, establish, and manage Security Associations (SAs) for IPSec. It operates in two distinct phases.

IKE Phase 1 (Main Mode or Aggressive Mode)

The primary purpose of IKE Phase 1 is to authenticate the IPSec peers and establish a secure, authenticated channel between them. This secure channel, often called the IKE SA or ISAKMP SA, is then used to protect the negotiations for IKE Phase 2.

Key objectives and parameters negotiated in IKE Phase 1 include:

Palo Alto Networks firewalls configure these parameters within an IKE Crypto Profile and an IKE Gateway object.

Simplified IKE Phase 1 (Main Mode) Negotiation.

For PCNSE, it's critical to know that ALL IKE Phase 1 parameters must identically match (or be compatible where one side proposes and the other accepts from a list) on both peers for the Phase 1 tunnel to establish successfully. Mismatched PSKs, DH groups, or encryption/hash algorithms are common reasons for Phase 1 failures.

IPSec Fundamentals: IKE Phase 2

Once IKE Phase 1 has successfully established a secure IKE SA (ISAKMP SA), IKE Phase 2 (often referred to as Quick Mode in IKEv1) begins. The negotiations in Phase 2 occur within the protection of the IKE Phase 1 tunnel.

The primary purpose of IKE Phase 2 is to negotiate the actual IPSec SAs (also known as Child SAs) that will be used to protect user data traffic. Multiple Phase 2 SAs can be established under a single Phase 1 SA.

Key parameters negotiated in IKE Phase 2 include:

On Palo Alto Networks firewalls, Phase 2 parameters are configured in an IPSec Crypto Profile , and the Proxy IDs are configured within the IPSec Tunnel configuration.

Simplified IKE Phase 2 (Quick Mode) Negotiation.

Similar to Phase 1, ALL IKE Phase 2 parameters (ESP/AH, encryption, authentication algorithms, lifetimes) must identically match or be compatible between peers. Proxy IDs must be configured as a mirror image (local on one side is remote on the other, and vice-versa). Mismatched Proxy IDs are a very common cause of Phase 2 failures or traffic not passing even if the tunnel appears "up".

IPSec Fundamentals: AH vs ESP

IPSec provides two primary security protocols to protect data: Authentication Header (AH) and Encapsulating Security Payload (ESP).

Authentication Header (AH)

AH, defined in RFC 4302, provides the following services:

AH does NOT provide confidentiality (encryption). The data remains in clear text.

AH authenticates the entire IP packet, including parts of the IP header that might change in transit (like TTL, TOS, Fragment Offset, Flags, Header Checksum if they are mutable). To handle this, AH treats these mutable fields as zero for checksum calculation. AH is IP protocol number 51.

Use Cases for AH:

AH is less commonly used today primarily because ESP can also provide authentication and integrity, along with the crucial addition of encryption.

Encapsulating Security Payload (ESP)

ESP, defined in RFC 4303, can provide a broader range of security services:

When ESP provides both encryption and authentication, it encrypts the IP payload first and then appends an integrity check value (ICV) for the encrypted payload and ESP header/trailer. ESP does not authenticate the outer IP header. ESP is IP protocol number 50.

Use Cases for ESP:

For the PCNSE exam, understand the distinct services offered by AH and ESP. ESP is the predominant choice due to its encryption capabilities. Know that ESP can provide authentication and integrity, making AH redundant in many cases. If both are used, it adds complexity and overhead.

Simplified comparison of AH and ESP packet structures in Transport and Tunnel modes.

GRE over IPSec Packet Flow

Understanding the encapsulation order in GRE over IPSec is crucial. Here's how an original data packet is transformed:

  1. Original Packet:
    [Original IP Header | Original TCP/UDP Header | Data]
  2. After GRE Encapsulation: The original packet becomes the payload for GRE.
    [New IP Header (GRE Endpoints, Proto 47) | GRE Header | [Original IP Header | Original TCP/UDP Header | Data]]
  3. After IPSec Encapsulation (using ESP in Tunnel Mode): The entire GRE packet becomes the payload for IPSec.
    [Outer IP Header (IPSec Endpoints, Proto 50) | ESP Header | [Encrypted: [New IP Header (GRE Endpoints) | GRE Header | [Original IP Header | Original TCP/UDP Header | Data]]] | ESP Trailer | ESP Auth (ICV)]

GRE over IPSec Encapsulation Flow.

The Outer IP Header (IPSec Endpoints) is what routers on the public internet see and use for routing the encrypted packet between the IPSec gateways (e.g., Palo Alto Networks firewalls).

The New IP Header (GRE Endpoints) within the encrypted payload is used by the GRE protocol itself to identify the logical source and destination of the GRE tunnel. These are typically the same as the IPSec endpoint IPs if the "Add GRE Encapsulation" option is used on the IPSec tunnel in PAN-OS, or they can be different if separate tunnel interfaces are used for GRE and IPSec.

Configuration & Best Practices

Palo Alto Networks GRE Configuration

Configuring a basic GRE tunnel on a Palo Alto Networks firewall involves several steps, primarily through the WebUI. PAN-OS version 9.0 and later support GRE tunnels.

1. Configure Tunnel Interface

A logical tunnel interface is required for the GRE tunnel.

2. Configure GRE Tunnel Object

Define the GRE tunnel parameters.

Settings on Both Sides:
  • The Local IP Address on one side must correspond to the Peer IP Address on the other side.
  • The IP addresses assigned to the tunnel interfaces (e.g., tunnel.1 ) on both ends must be in the same subnet. For example, if PA-A tunnel.1 is 10.0.0.1/30, PA-B tunnel.1 could be 10.0.0.2/30.
  • Keep-alive parameters, if enabled, should generally match or be compatible.

3. Configure Routing

You need to route traffic destined for the remote network(s) through the GRE tunnel.

4. Configure Security Policies

Security policies are required to allow traffic to flow between zones and through the tunnel.

The security policy for allowing incoming GRE (protocol 47) is a common point of failure and a likely exam topic. Remember that GRE is IP protocol 47.

Palo Alto Networks GRE over IPSec Configuration

Configuring GRE over IPSec involves setting up both the GRE components (as described previously) and the IPSec components. Palo Alto Networks provides a streamlined way to do this, especially when the GRE tunnel endpoints are the same as the IPSec tunnel endpoints.

Scenario 1: GRE and IPSec Share Same Endpoints (Recommended Approach)

In this common scenario, the source and destination IP addresses for both the GRE tunnel and the IPSec tunnel are the same (i.e., the public IPs of the firewalls). PAN-OS allows you to associate GRE encapsulation directly with an IPSec tunnel.

  1. Configure Tunnel Interface:
    • Create one tunnel interface (e.g., tunnel.1 ).
    • Assign it to a Virtual Router and Security Zone.
    • Assign an IP address (e.g., 10.0.0.1/30 ). This IP is for the logical GRE link.
  2. Configure IKE Crypto Profile (Phase 1):
    • Navigate to Network > Network Profiles > IKE Crypto . Click Add .
    • Define DH Group, Encryption, Authentication, and Key Lifetime. These must match the peer.
  3. Configure IKE Gateway (Phase 1):
    • Navigate to Network > Network Profiles > IKE Gateways . Click Add .
    • Name: Descriptive name.
    • Version: IKEv1 or IKEv2 (IKEv2 recommended).
    • Interface: Your external-facing physical interface.
    • Local IP Address: Your firewall's public IP.
    • Peer IP Address: The remote firewall's public IP.
    • Authentication: Pre-Shared Key or Certificate.
      • If PSK, enter and confirm the key.
    • Local Identification & Peer Identification: (Optional but good practice) Specify FQDN, IP address, etc. These must match what the peer expects.
    • Advanced Options Tab: Select the IKE Crypto Profile created above.
  4. Configure IPSec Crypto Profile (Phase 2):
    • Navigate to Network > Network Profiles > IPSec Crypto . Click Add .
    • Name: Descriptive name.
    • IPSec Protocol: ESP (recommended).
    • Define Encryption, Authentication, DH Group (for PFS if used), and Lifetime. These must match the peer.
  5. Configure IPSec Tunnel (Phase 2 & GRE Integration):
    • Navigate to Network > IPSec Tunnels . Click Add .
    • Name: Descriptive name.
    • Tunnel Interface: Select the tunnel interface created in step 1 (e.g., tunnel.1 ). This interface will now serve both GRE and IPSec.
    • Type: Auto Key.
    • IKE Gateway: Select the IKE Gateway created above.
    • IPSec Crypto Profile: Select the IPSec Crypto Profile created above.
    • Show Advanced Options > GRE Encapsulation: Check the "Add GRE Encapsulation" box. This is the key step that tells PAN-OS to expect GRE traffic (protocol 47) to be encapsulated by this IPSec tunnel.
    • Proxy IDs Tab (Traffic Selectors):
      • Click Add .
      • Proxy ID Name: Descriptive.
      • Local: The local firewall's public IP address (the GRE tunnel source).
      • Remote: The remote firewall's public IP address (the GRE tunnel destination).
      • Protocol: Select GRE (value 47) .
      • Alternatively, some configurations might use 0.0.0.0/0 for Local/Remote and Any for Protocol if the tunnel is purely route-based and dynamic routing handles specificity. However, specifying protocol 47 and the tunnel endpoints is more precise and secure for GRE over IPSec.
      • Ensure the Proxy IDs are a mirror image of the configuration on the peer device.
    • Tunnel Monitor: (Optional) Configure to monitor the tunnel's health, typically by pinging the remote tunnel interface IP.
  6. Configure Routing: Use static routes or dynamic routing protocols pointing to the tunnel interface ( tunnel.1 ) as before. The routing is for the inner, original traffic.
  7. Configure Security Policies:
    • Allow application traffic between your internal zones and the tunnel's zone.
    • You typically do NOT need a separate policy to allow "gre" application or IP protocol 47 from Untrust for this scenario because the IPSec tunnel itself handles the decapsulation of the outer IP (protocol 50 for ESP) and then the "Add GRE Encapsulation" feature handles the GRE decapsulation. The traffic presented to the policy engine will be the inner IP packet.
The "Add GRE Encapsulation" option in the IPSec Tunnel configuration simplifies GRE over IPSec. Crucially, the Proxy IDs for the IPSec tunnel must be set to allow GRE protocol (47) between the public IP addresses of the tunnel endpoints. If these Proxy IDs are incorrect (e.g., trying to match internal LAN subnets), the GRE packets will not be encrypted by IPSec, and Phase 2 may fail or the tunnel won't pass GRE traffic.
A common pitfall: If you try to configure a separate GRE Tunnel object (under Network > GRE Tunnels ) AND an IPSec Tunnel both assigned to the *same* tunnel interface when using the "Add GRE Encapsulation" checkbox, the commit will fail. The checkbox method handles the GRE aspect implicitly within the IPSec tunnel configuration.

Scenario 2: GRE and IPSec Use Different Endpoints/Interfaces

This is a less common and more complex setup where, for example, an IPSec tunnel terminates on one pair of interfaces, and then a GRE tunnel is built "over" that established secure path using different logical interfaces or IP addresses.

In this case:

  1. You would configure a standard IPSec tunnel between two firewalls using a dedicated tunnel interface (e.g., tunnel.10 for IPSec). The Proxy IDs for this IPSec tunnel would cover the traffic that the GRE tunnel itself will generate (i.e., the IP addresses you'll use for the GRE tunnel endpoints over the secure path).
  2. Then, you would configure a separate GRE tunnel ( Network > GRE Tunnels ) using another tunnel interface (e.g., tunnel.20 for GRE). The "Local Interface" for this GRE tunnel would be the IPSec tunnel interface ( tunnel.10 ), and the Local/Peer IP addresses for the GRE tunnel would be routable via the IPSec tunnel.
  3. This essentially creates a GRE tunnel that believes its underlying transport network is the secure path established by the IPSec tunnel.

This method requires careful routing to ensure GRE packets are directed into the IPSec tunnel and then correctly routed after decapsulation. It involves two distinct tunnel interfaces on the Palo Alto Networks firewall.

Dynamic Routing over GRE / GRE over IPSec

One of the primary advantages of using GRE tunnels (including GRE over IPSec) is their ability to transport multicast and broadcast traffic, which allows dynamic routing protocols like OSPF, EIGRP, BGP, and RIP to operate across the tunnel. This enables networks to exchange routing information dynamically, providing resilience and simplifying route management in complex topologies.

Configuration Steps (General):

  1. Establish the Tunnel:
    • Configure the GRE or GRE over IPSec tunnel as previously described.
    • Ensure the tunnel interface (e.g., tunnel.1 ) has an IP address. Both ends of the tunnel must have IP addresses in the same subnet (e.g., PA-A: 10.0.0.1/30 , PA-B: 10.0.0.2/30 ).
    • Verify basic IP connectivity across the tunnel interface IPs (e.g., ping the remote tunnel interface IP from the local firewall CLI sourced from the local tunnel interface IP).
  2. Configure the Routing Protocol on Palo Alto Networks Firewall:
    • Navigate to Network > Virtual Routers and select your virtual router.
    • Go to the specific routing protocol section (e.g., OSPF , BGP ).
    • Enable the protocol.
    • Set a Router ID .
    • For OSPF:
      • Define an Area (e.g., 0.0.0.0 for backbone).
      • Under the Area configuration, add the GRE tunnel interface (e.g., tunnel.1 ).
        • Set the Link Type (e.g., p2p for point-to-point).
        • Configure timers, authentication, etc., as needed, ensuring they match the peer.
      • Add other local interfaces/networks to OSPF that you want to advertise to the remote side.
      • Consider OSPF network types. Some types use multicast for neighbor discovery which GRE supports. If running OSPF directly over an IPSec tunnel (without GRE), multicast might not work, requiring specific configurations or unicast neighbor statements.
    • For BGP:
      • Configure BGP settings (Local AS, Router ID).
      • Define a Peer Group.
      • Add a Peer to the group:
        • Peer Address: The IP address of the remote GRE tunnel interface.
        • Remote AS: The AS number of the remote BGP peer.
      • Configure address families (e.g., IPv4) and network advertisements/redistribution.
    • Ensure any necessary redistribution profiles are configured if you're redistributing routes from other protocols or static routes into the dynamic routing protocol.
  3. Configure the Routing Protocol on the Peer Device:
    • Configure the corresponding routing protocol (OSPF, BGP, etc.) on the remote router/firewall.
    • Ensure parameters like AS numbers (for BGP), OSPF area IDs, authentication keys, and timers match or are compatible with the Palo Alto Networks firewall configuration.
  4. Verify Adjacency/Peering:
    • Use CLI commands on both devices to check if the routing protocol adjacency or BGP peering has been established.
      • Palo Alto Networks CLI: show routing protocol ospf neighbor , show routing protocol bgp peer .
  5. Verify Route Propagation:
    • Check the routing tables on both devices to ensure routes are being learned dynamically over the tunnel.
      • Palo Alto Networks CLI: show routing route .
  6. Security Policies:
    • Ensure security policies allow the routing protocol traffic between the firewalls over the tunnel interface. For OSPF, this is IP protocol 89. For BGP, this is TCP port 179. The "application" for these protocols should be allowed between the zone containing the tunnel interface and itself (if peers are in the same zone via tunnel) or between relevant zones.

Dynamic Routing over a GRE/IPSec Tunnel.

Understanding how to enable and verify dynamic routing protocols over tunnels is crucial. Pay attention to the tunnel interface IP addressing, routing protocol specific configurations (like OSPF areas or BGP ASNs), and necessary security policies to permit the routing protocol traffic itself.

MTU Considerations for Routing Protocols: Routing protocol packets (like OSPF Hellos or BGP Updates) must also fit within the tunnel's effective MTU. Large numbers of LSAs in OSPF or many prefixes in BGP can lead to larger packets. While fragmentation can occur, ensuring sufficient MTU or adjusting protocol parameters (like OSPF MTU ignore options, though use with caution) might be necessary in some cases. Mismatched MTU can sometimes prevent adjacencies from forming.

MTU and TCP MSS Adjustments

When implementing GRE or GRE over IPSec tunnels, it's critical to correctly adjust the Maximum Transmission Unit (MTU) and TCP Maximum Segment Size (MSS) values. Failure to do so can lead to packet fragmentation or drops, severely degrading performance or causing connectivity failures.

Understanding Overhead

For GRE over IPSec (ESP Tunnel Mode) , the total overhead on the original packet is the sum of GRE overhead and then the additional IPSec ESP overhead applied to the GRE packet.
Example Total Overhead = Original IP -> GRE (24 bytes) -> IPSec ESP (adds ~52 bytes for its own headers, IV, ICV, new outer IP) = ~76 bytes (if GRE's outer IP is replaced by IPSec's outer IP).
More simply: Path MTU - GRE (24 bytes) - IPSec ESP additions (e.g., 52 bytes excluding the GRE outer IP but including a new IPSec outer IP) gives the effective MTU for the original packet.
A common calculation:
Path MTU (e.g., 1500)
- GRE specific addition (4 bytes)
- IPSec ESP additions (e.g., ~52 bytes including a new outer IP header, ESP headers, IV, ICV but not counting the GRE packet's own outer header which is now inside)
This can be complex. A simpler way is to subtract known fixed overheads sequentially.

MTU Calculation Example

Assume a standard internet path MTU of 1500 bytes.
  1. Path MTU: 1500 bytes
  2. GRE Encapsulation:
    • GRE Header: 4 bytes
    • New Outer IP Header for GRE: 20 bytes
    • MTU for packet entering GRE tunnel = 1500 - 24 = 1476 bytes .
  3. GRE over IPSec (ESP Tunnel Mode) Encapsulation: The GRE packet (now 1476 bytes max) is further encapsulated by IPSec.
    • Assume IPSec ESP overhead (including its own new outer IP header, ESP header, IV, trailer, ICV) is roughly ~50-70 bytes . Let's use ~56 bytes as an example (this value can vary significantly based on encryption/authentication algorithms and padding). This 56 bytes includes the new IPsec outer header (20 bytes). The calculation for the *tunnel interface MTU* on the Palo Alto Networks firewall, which represents the size of the IP packet *before* IPSec encryption but *after* GRE encapsulation (if GRE is handled by the same logical interface that IPSec uses) should be: Physical MTU (1500) - IPSec Overhead (e.g. 56 bytes) = 1444 bytes. If GRE is applied first, the original packet becomes [GRE headers + Original Packet]. This whole GRE unit is then passed to IPSec. So, for the original packet: Path MTU = 1500 bytes Subtract IPSec Overhead (e.g., 56 bytes for ESP with new IP header): 1500 - 56 = 1444 bytes (this is the MTU the IPSec tunnel interface can handle for its payload) Subtract GRE Overhead (24 bytes, consisting of its IP header and GRE header which are *inside* the IPSec payload): 1444 - 24 = 1420 bytes . This is the effective MTU for the original data packet. The Palo Alto Networks tunnel interface MTU should be set to accommodate the largest packet *before* the final layer of encryption. If the same tunnel interface handles GRE-over-IPSec via the "Add GRE Encapsulation" checkbox, then its MTU should be set considering the IPSec overhead. Effective Tunnel MTU = Physical Interface MTU - IPSec Overhead E.g., 1500 - (approx. 56 to 72 bytes for ESP) = ~1428 to ~1444 bytes. Then, applications sending data that will be GRE encapsulated *before* hitting this IPSec tunnel must consider the additional 24-byte GRE overhead. A common rule of thumb for combined GRE over IPSec is to reduce the MTU on the tunnel interface to around 1400 bytes to be safe, but calculation is better. If the tunnel interface MTU on the firewall is set to (Path MTU - IPSec overhead), e.g., 1440. And then GRE adds 24 bytes. Original packet MTU = 1440 - 24 = 1416.
On Palo Alto Networks firewalls, you set the MTU on the tunnel interface ( Network > Interfaces > Tunnel > Advanced ). For GRE over IPSec where "Add GRE Encapsulation" is used, this tunnel interface MTU should be the physical MTU minus the IPSec overhead. The firewall then accounts for the GRE encapsulation internally.

TCP MSS (Maximum Segment Size) Adjustment

TCP MSS is the maximum amount of actual data that can be in a single TCP segment. It is calculated as MTU - IP Header (20 bytes) - TCP Header (20 bytes).

If the MTU is reduced due to tunnel overhead, the MSS must also be reduced to prevent TCP packets from becoming too large and requiring fragmentation *after* TCP segmentation but *before* or *during* encapsulation.

Palo Alto Networks firewalls can automatically adjust the MSS value in TCP SYN packets that pass through an interface or zone.

Incorrect MTU/MSS settings are a very frequent cause of performance issues or complete failure of applications over tunnels. Be prepared to explain how to calculate these values and where to configure them on a Palo Alto Networks firewall. Path MTU Discovery (PMTUD) can help, but MSS clamping is a more reliable way to prevent issues with TCP.
When "Adjust TCP MSS" is enabled on a Palo Alto Networks firewall for an IPSec tunnel, it typically subtracts a fixed overhead (e.g., 60 bytes) from the interface MTU to derive the MSS. If your actual IPSec overhead is significantly different, or if you have additional layers like GRE, you might need to set a custom MSS value or further reduce the tunnel interface MTU to ensure correct MSS calculation.

Troubleshooting GRE & GRE over IPSec Tunnels

Troubleshooting tunnel issues involves a layered approach, checking connectivity, configuration, and logs.

Common Issues:

Palo Alto Networks Troubleshooting Tools & Commands (CLI):

Key things to look for in logs:
  • IKE Phase 1: "Phase 1 proposal mismatch", "Pre-shared key mismatch", "No proposal chosen".
  • IKE Phase 2: "Phase 2 proposal mismatch", "Proxy ID mismatch", "No proposal chosen", "TS_UNACCEPTABLE".
  • GRE: "GRE tunnel status changed to Up/Down".
  • Traffic logs showing denies for expected traffic or for protocol 47/50/500/4500.

PCNSE Insights

Key Exam Topics for GRE & GRE over IPSec

For the Palo Alto Networks Certified Network Security Engineer (PCNSE) exam, a solid understanding of GRE and GRE over IPSec is essential. Focus on the following areas:

Conceptual Understanding:

Configuration on Palo Alto Networks Firewalls:

Troubleshooting:

Common Pitfalls & Caveats (PCNSE Focus)

Be aware of these common mistakes and important details for the exam and real-world deployments:

Many exam questions will test your understanding of these pitfalls, often by presenting a scenario where a tunnel is not working and asking you to identify the misconfiguration.

GRE & GRE over IPSec Quiz

Test your knowledge on Palo Alto Networks GRE and GRE over IPSec.

1. What is the primary reason for using GRE over IPSec instead of just IPSec?

2. What is the typical IP protocol number for GRE?

3. When configuring GRE over IPSec on a Palo Alto Networks firewall using the "Add GRE Encapsulation" option in the IPSec tunnel, what should the Proxy ID typically specify for Protocol?

4. What is the standard overhead added by basic GRE encapsulation (GRE header + new IP header)?

5. Which of the following is NOT typically negotiated during IKE Phase 1?

6. A plain GRE tunnel is configured between two Palo Alto Networks firewalls. The physical interfaces are in the 'Untrust' zone, and the tunnel.1 interface is in the 'GRE-Zone'. Users report they cannot access resources across the tunnel. What is a likely policy misconfiguration?

7. If the physical interface MTU is 1500 bytes, and you are configuring a GRE tunnel, what should the MTU of the GRE tunnel interface ideally be set to, to avoid fragmentation of GRE-encapsulated packets before any further IPSec encapsulation?

8. What is the primary function of "Adjust TCP MSS" on a Palo Alto Networks firewall in the context of tunnels?

9. Which statement is TRUE regarding dynamic routing protocols over GRE tunnels on Palo Alto Networks firewalls?

10. When troubleshooting an IKE Phase 1 failure, which of these is LEAST likely to be the direct cause?

11. You are configuring GRE over IPSec using the "Add GRE Encapsulation" method. The local firewall's public IP is 1.1.1.1 and the remote is 2.2.2.2. Which Proxy ID configuration is correct for the IPSec tunnel?

12. What is a key difference between IPSec Tunnel Mode and Transport Mode?

13. If a GRE tunnel is flapping, and you suspect keep-alives, what is a valid troubleshooting step on the Palo Alto Networks firewall?

14. Which Palo Alto Networks CLI command is used to view the status of established IKE Phase 2 Security Associations?

15. An administrator has configured GRE over IPSec. The IPSec tunnel (Phase 1 and Phase 2) shows as 'up' and established. However, OSPF adjacencies are not forming over the tunnel. What should be checked NEXT?

16. What is the purpose of Perfect Forward Secrecy (PFS) in IKE Phase 2?

17. If an Ethernet interface has an MTU of 1500 bytes, and a TCP MSS value of 1436 bytes is desired for traffic traversing a GRE tunnel originating from this firewall, what should the GRE tunnel's effective MTU (for packets before IP/TCP headers) be set to or calculated as?

18. Which IPSec protocol provides confidentiality for the data payload?

19. When configuring a GRE tunnel on a Palo Alto Networks firewall, where do you specify the local physical interface and IP address that will be the source of the GRE packets?

20. A commit fails with an error indicating a tunnel interface cannot be associated with two different encapsulations. What is the most likely cause related to GRE over IPSec?