Configure a Unicast Tunnel
To configure a unicast tunnel, you configure the
grinterface (to use GRE encapsulation) or theipinterface (to use IP-IP encapsulation) and include thetunnelstatement:[edit interfaces]gr-fpc/pic/portorip-fpc/pic/port{unitlogical-unit-number{tunnel {sourceaddress;destinationaddress;routing-instance {destinationrouting-instance-name;}ttlnumber;}familyfamily{addressaddress{destinationaddress;}}}}You can configure multiple logical units for each GRE or IP-IP interface, and you can configure only one tunnel per unit.
Each tunnel interface must be a point-to-point interface. Point to point is the default
interface connection type, so you do not need to include thepoint-to-pointstatement at the[edit interfacesinterface-nameunitlogical-unit-number]hierarchy level.You must specify the tunnel's destination and source addresses. The remaining statements are optional.
To set the TTL field that is included in the encapsulating header, include the
ttlstatement.
If you explicitly configure a TTL value for the tunnel, you must configure it to be one larger than the number of hops in the tunnel. For example, if the tunnel has seven hops, you must configure a TTL value of 8.You must configure at least one family on the logical interface. To enable MPLS over GRE tunnel interfaces, you must include the
family mplsstatement in the GRE interface configuration. In addition, you must configure theprotocolsstatements to enable RSVP, MPLS, and LSPs over GRE tunnels; for more information, see Example 1: Configure Unicast Tunnels and the JUNOS Internet Software Configuration Guide: MPLS Applications.Unicast tunnels are bidirectional.
A configured tunnel cannot go through Network Address Translation (NAT) at any point along the way to the destination.