Supported Platforms
Related Documentation
Configuring Generic Routing Encapsulation Tunneling (CLI Procedure)
Tunneling provides a private, secure path for transporting packets through an otherwise public network by encapsulating packets inside a transport protocol known as an IP encapsulation protocol. Generic routing encapsulation (GRE) is an IP encapsulation 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 endpoints that operate on top of existing physical and other logical endpoints. GRE tunnels connect one endpoint to another and provide a clear data path between them.
This topic describes:
Configuring a GRE Tunnel Port
To configure GRE tunnels on a switch, you convert a network port or uplink port on the switch or on a line card to a GRE tunnel port for tunnel services. Each physical tunnel port, named gr-fpc/pic/port, can have one or more logical interfaces, each of which is a GRE tunnel.
After conversion to a GRE tunnel port, the physical port cannot be used for network traffic.
To configure a GRE tunnel port on a switch:
- Determine the network port or uplink port on your switch to convert to a GRE tunnel port.
- Configure the port as a tunnel port for GRE tunnel services:
[edit chassis]
user@switch# set fpc slot pic pic-number tunnel-port port-number tunnel-servicesNote: On EX3200 switches and standalone EX4200 switches, the FPC number is 0 because it refers to the switch itself. On EX4200 Virtual Chassis, the FPC number is the member ID of the Virtual Chassis member on which is the port that you are configuring. On EX8200 switches, the FPC number is the number of the slot containing the line card on which is the port that you are configuring.
For built-in ports on EX3200 and EX4200 switches and on EX8200 switches, the PIC number is 0. For uplink ports on EX3200 and EX4200 switches, the PIC number is 1.
Configuring Tunnels to Use Generic Routing Encapsulation
Normally, a GRE tunnel port comes up as soon as it is configured and stays up as long as a valid tunnel source address exists or an interface is operational. Each logical interface you configure on the port can be configured as the source or as the endpoint of a GRE tunnel.
To configure a tunnel port to use GRE:
- Configure a physical GRE port with a logical interface
name and address:
- For IPv4 over GRE, specify the protocol family inet:[edit interfaces]user@switch# set gr-fpc/pic/port unit number family inet address
- For IPv6 over GRE, specify the protocol family inet6:[edit interfaces]user@switch# set gr-fpc/pic/port unit number family inet6 address
- For IPv4 over GRE, specify the protocol family inet:
- Specify the tunnel source address for the logical interface:
- Specify the destination address:[edit interfaces]user@switch# set gr-fpc/pic/port unit number tunnel destination destination-address