Select Page

routing instances

CONFIGURATION

R1 is main router, create logical routing instances R10, R20

 

[email protected]> show configuration |display set 

set version 14.1R4.8

set system host-name Main-Lab-RTR

 

—— Created sub-interfaces ———— 

set interfaces ge-0/0/0 vlan-tagging

set interfaces ge-0/0/0 unit 10 vlan-id 10

set interfaces ge-0/0/0 unit 10 family inet address 10.0.0.1/24

 

set interfaces ge-0/0/1 vlan-tagging

set interfaces ge-0/0/1 unit 20 vlan-id 20

set interfaces ge-0/0/1 unit 20 family inet address 20.0.0.1/24

 

—— Created Routing-instances & assigned Interface ————

set routing-instances R10 instance-type virtual-router

set routing-instances R10 interface ge-0/0/0.10

 

set routing-instances R20 instance-type virtual-router

set routing-instances R20 interface ge-0/0/1.20

 

—— Created Prefix-list ————

set policy-options prefix-list R10 10.0.0.0/24

set policy-options prefix-list R20 20.0.0.0/24

 

—— Created routing policy & called Prefix-list only, everything else reject ——

set policy-options policy-statement R10_routes term t1 from instance R10

set policy-options policy-statement R10_routes term t1 from prefix-list R10

set policy-options policy-statement R10_routes term t1 then accept

set policy-options policy-statement R10_routes term t2 then reject

 

set policy-options policy-statement R20_routes term t1 from instance R20

set policy-options policy-statement R20_routes term t1 from prefix-list R20

set policy-options policy-statement R20_routes term t1 then accept

set policy-options policy-statement R20_routes term t2 then reject

 

 

—— Import R20 routes into R10 table; and vice versa ————

set routing-instances R10 routing-options instance-import R20_routes

set routing-instances R20 routing-options instance-import R10_routes

 

 

— Instead of using policy, if you try with next-table static route;

[email protected]# show |compare 

[edit routing-instances R10]

    routing-options {

        instance-import R20_routes;

    }

[edit routing-instances R20]

    routing-options {

        instance-import R10_routes;

    }

 

 

set routing-instances R20 routing-options static route 20.0.0.0/24 next-table R10.inet.0

set routing-instances R20 routing-options static route 10.0.0.0/24 next-table R10.inet.0

[email protected]# commit 

error: [rib R10.inet.0 routing-options static]

    next-table may loop

error: configuration check-out failed

 

The use of next-table from one routing instance (R10) to another routing instance (R20) is allowed only in “one direction”, not in  both directions. This to prevent any route lookup loops. 

The network subnets do not need to be the same.

———————————————————————

The Juniper All-Access | Reading List

Leave a reply

Your email address will not be published. Required fields are marked *

Share on print
Print
Share on google
Google+
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

ADENTECH guides

We love to help.

Get our newsletter, join the community: