Supported Platforms
Related Documentation
Configuring GRE Keepalive Time
You can configure the keepalives on a GRE tunnel interface by including both the keepalive-time statement and the hold-time statement at the [edit protocols 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 this statement, the interface is marked as down. |
To configure keepalive time for a GRE tunnel interface:
- At the [edit interfaces interface-name unit unit-number] hierarchy level, set
the family as inet.user@host# set interfaces interface-name unit unit-number family family-name
- Configure the Operation, Administration, and Maintenance
(OAM) protocol:[edit]user@host# edit protocols oam
- Configure the GRE tunnel interface:[edit protocols oam]user@host# edit gre-tunnel interface interface-name
- Configure the keepalive time:[edit protocols oam gre-tunnel interface interface-name]user@host# set keepalive-time seconds
- Configure the hold time, which must be at least twice
the keepalive time.[edit protocols oam gre-tunnel interface interface-name]user@host# set hold-time (OAM) seconds
When the keepalive hold time expires, the GRE tunnel will stay up even though the interface cannot send or receive traffic. To verify the GRE tunnel state, check the output for the following commands:
user@host> show interfaces gr-3/3/0.3 terse
Interface Admin Link Proto Local Remote gr-3/3/0.3 up up inet 200.1.3.1/24 mpls
user@host> show interfaces gr-3/3/0.3 extensive
Logical interface gr-3/3/0.3 (Index 73) (SNMP ifIndex 594) (Generation 900) Flags: Point-To-Point SNMP-Traps 0x4000 IP-Header 10.1.19.11:10.1.19.12:47:df:64:0000000000000000 Encapsulation: GRE-NULL Gre keepalives configured: On, Gre keepalives adjacency state: down ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Traffic statistics: Input bytes : 15629992 Output bytes : 15912273 Input packets: 243813 Output packets: 179476 Local statistics: Input bytes : 15322586 Output bytes : 15621359 Input packets: 238890 Output packets: 174767 Transit statistics: Input bytes : 307406 0 bps Output bytes : 290914 0 bps Input packets: 4923 0 pps Output packets: 4709 0 pps Protocol inet, MTU: 1476, Generation: 1564, Route table: 0 Flags: Sendbcast-pkt-to-re Addresses, Flags: Dest-route-down Is-Preferred Is-Primary ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Destination: 200.1.3/24, Local: 200.1.3.1, Broadcast: 200.1.3.255, Generation: 1366 Protocol mpls, MTU: 1464, Maximum labels: 3, Generation: 1565, Route table: 0
![]() | Note: When the keepalive hold time has expired, the Link status will be Up and the Gre keepalives adjacency state will be Down. |