Support Support Downloads Knowledge Base Apex Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[MX] Example Configuration - GRE tunnels over Routing Instances

0

0

Article ID: KB32683 KB Last Updated: 26 Oct 2020Version: 2.0
Summary:

This article provide the steps to configure a GRE tunnel over a Routing Instance.

Solution:
 
                                                                                  

Router 1

  1. Enable 'tunnel-services':

    set chassis fpc 0 pic 0 tunnel-services
  2. Configure physical interface:

    set interfaces ge-0/0/0 unit 0 family inet address 172.16.0.2/30
  3. Configure the loopback interface:

    set interfaces lo0 unit 0 family inet address 192.168.100.1/32
  4. Configure the 'gr-tunnel' and add the statement: 'routing-instance destination'

    set interfaces gr-0/0/0 unit 0 tunnel source 192.168.100.1
    set interfaces gr-0/0/0 unit 0 tunnel destination 192.168.200.1/32
    set interfaces gr-0/0/0 unit 0 tunnel routing-instance destination INST2
    set interfaces gr-0/0/0 unit 0 family inet address 10.10.10.1/30
  5. Create the routing-instance, invoke the interfaces and configure routing-options:

    set routing-options static route A.B.C.D/E next-hop gr-0/0/0.0
    set routing-options static route 192.168.200.1/32 next-hop 172.16.0.1
    set routing-instances INST1 instance-type virtual-router
    set routing-instances INST1 interface ge-0/0/0.0
    set routing-instances INST1 interface gr-0/0/0.0
    set routing-instances INST1 interface lo0.0
    set routing-instances INST1 routing-options static route 192.168.200.1/32 next-hop 172.16.0.1
    
    [edit]
    username@Router1# run show interfaces terse | match gr
    gr-0/0/0                up    up
    gr-0/0/0.0              up    up   inet     10.10.10.1/30
    gre                     up    up

Router 3:

  1. Enable 'tunnel-services':

    set chassis fpc 0 pic 0 tunnel-services
  2. Configure physical interface:

    set interfaces ge-0/0/0 unit 0 family inet address 172.16.1.2/30
  3. Configure the loopback interface:

    set interfaces lo0 unit 0 family inet address 192.168.200.1/32
  4. Configure the 'gr-tunnel' and add the statement: 'routing-instance destination'

    set interfaces gr-0/0/0 unit 0 tunnel source 192.168.200.1
    set interfaces gr-0/0/0 unit 0 tunnel destination 192.168.100.1/32
    set interfaces gr-0/0/0 unit 0 tunnel routing-instance destination INST1
    set interfaces gr-0/0/0 unit 0 family inet address 10.10.10.2/30
  5. Create the routing-instance, invoke the interfaces and configure routing-options:

    set routing-options static route A.B.C.D/E next-hop gr-0/0/0.0
    set routing-options static route 192.168.200.1/32 next-hop 172.16.0.1
    set routing-instances INST2 instance-type virtual-router
    set routing-instances INST2 interface gr-0/0/0.0
    set routing-instances INST2 interface ge-0/0/1.0
    set routing-instances INST2 interface lo0.0
    set routing-instances INST2 routing-options static route 192.168.100.1/32 next-hop 172.18.2.1
    
    username@vMX3# run show interfaces terse | match gr
    gr-0/0/0                up    up
    gr-0/0/0.0              up    up   inet     10.10.10.2/30
    gre                     up    up
    
    
    Ping;
    
    username@Router1# run ping source 10.10.10.1 10.10.10.2 routing-instance INST1
    PING 10.10.10.2 (10.10.10.2): 56 data bytes
    64 bytes from 10.10.10.2: icmp_seq=0 ttl=64 time=2.233 ms
    64 bytes from 10.10.10.2: icmp_seq=1 ttl=64 time=4.021 ms
    64 bytes from 10.10.10.2: icmp_seq=2 ttl=64 time=2.394 ms
Modification History:
2020-10-23: Modified username to be generic
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search