Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Route Redistribution Between RIP Instances

date_range 18-Feb-21

Understanding Route Redistribution Among RIP Instances

You can redistribute routes among RIP processes. Another way to say this is to export RIP routes from one RIP instance to other RIP instances.

In Junos OS, route redistribution among routing instances is accomplished by using routing table groups, also called RIB groups. Routing table groups allow you to import and export routes from a protocol within one routing table into another routing table. Note that the functionality of redistributing routes among RIP instances described in this topic is not supported in Junos OS Releases 15.1X49, 15.1X49-D30, or 15.1X49-D40.

Note:

In contrast, the policy-based import and export functions allow you import and export routes between different protocols within the same routing table.

Consider the following partial example:

content_copy zoom_out_map
protocols {
    rip {
        rib-group inet-to-voice;
    }
}
routing-instances {
    voice {
        protocols {
            rip {
                rib-group voice-to-inet;
            }
        }
    }
}
routing-options {
    rib-groups {
        inet-to-voice {
            import-rib [ inet.0 voice.inet.0 ];
        }
        voice-to-inet {
            import-rib [ voice.inet.0 inet.0 ];
        }
    }
}

The way to read the import-rib statement is as follows. Take the routes from the protocol (RIP, in this case), and import them into the primary (or local) routing table and also into any other routing tables listed after this. The primary routing table is the routing table where the routing table group is being used. That would be either inet.0 if used in the main routing instance or voice.inet.0 if used within the routing instance. In the inet-to-voice routing table group, inet.0 is listed first because this routing table group is used in the main routing instance. In the voice-to-inet routing table group, voice.inet.0 is listed first because this routing table group is used in the voice routing instance.

Example: Redistributing Routes Between Two RIP Instances

This example shows how to configure a RIP routing instance and control the redistribution of RIP routes between the routing instance and the primary instance.

Requirements

No special configuration beyond device initialization is required before configuring this example.

Overview

When you create a routing instance called voice, Junos OS creates a routing table called voice.inet.0. The example shows how to install routes learned through the primary RIP instance into the voice.inet.0 routing table. The example also shows how to install routes learned through the voice routing instance into inet.0. This is done by configuring routing table groups. RIP routes are installed into each routing table that belongs to a routing table group.

Figure 1 shows the topology used in this example.

Figure 1: Redistributing Routes Between RIP Instances Network TopologyRedistributing Routes Between RIP Instances Network Topology

CLI Quick Configuration shows the configuration for all of the devices in Figure 1. The section #d59e63__d59e212 describes the steps on Device R2.

Topology

Configuration

Procedure

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

Device R1

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.1/30
set interfaces lo0 unit 1 family inet address 172.16.0.1/32
set interfaces lo0 unit 1 family inet address 192.168.1.1/32
set protocols rip group to-R2 export advertise-routes-through-rip
set protocols rip group to-R2 neighbor fe-1/2/0.1
set policy-options policy-statement advertise-routes-through-rip term 1 from protocol direct
set policy-options policy-statement advertise-routes-through-rip term 1 from protocol rip
set policy-options policy-statement advertise-routes-through-rip term 1 then accept

Device R2

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 2 family inet address 10.0.0.2/30
set interfaces fe-1/2/1 unit 5 family inet address 10.0.0.5/30
set interfaces lo0 unit 2 family inet address 192.168.2.2/32
set interfaces lo0 unit 2 family inet address 172.16.2.2/32
set protocols rip rib-group inet-to-voice
set protocols rip group to-R3 export advertise-routes-through-rip
set protocols rip group to-R3 neighbor fe-1/2/1.5
set policy-options policy-statement advertise-routes-through-rip term 1 from protocol direct
set policy-options policy-statement advertise-routes-through-rip term 1 from protocol rip
set policy-options policy-statement advertise-routes-through-rip term 1 then accept
set routing-instances voice protocols rip group to-R1 export advertise-routes-through-rip
set routing-instances voice interface fe-1/2/0.2
set routing-instances voice protocols rip rib-group voice-to-inet
set routing-instances voice protocols rip group to-R1 neighbor fe-1/2/0.2
set routing-options rib-groups inet-to-voice import-rib inet.0
set routing-options rib-groups inet-to-voice import-rib voice.inet.0
set routing-options rib-groups voice-to-inet import-rib voice.inet.0
set routing-options rib-groups voice-to-inet import-rib inet.0

Device R3

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 6 family inet address 10.0.0.6/30
set interfaces lo0 unit 3 family inet address 192.168.3.3/32
set interfaces lo0 unit 3 family inet address 172.16.3.3/32
set protocols rip group to-R2 export advertise-routes-through-rip
set protocols rip group to-R2 neighbor fe-1/2/0.6
set policy-options policy-statement advertise-routes-through-rip term 1 from protocol direct
set policy-options policy-statement advertise-routes-through-rip term 1 from protocol rip
set policy-options policy-statement advertise-routes-through-rip term 1 then accept
Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To redistribute RIP routes between routing instances:

  1. Configure the network interfaces.

    content_copy zoom_out_map
    [edit interfaces]
    user@R2# set fe-1/2/0 unit 2 family inet address 10.0.0.2/30
    user@R2# set fe-1/2/1 unit 5 family inet address 10.0.0.5/30
    user@R2# set lo0 unit 2 family inet address 192.168.2.2/32
    user@R2# set lo0 unit 2 family inet address 172.16.2.2/32
    
  2. Create the routing instance, and add one or more interfaces to the routing instance.

    content_copy zoom_out_map
    [edit routing-instances voice]
    user@R2# set interface fe-1/2/0.2
    
  3. Create the RIP groups and add the interfaces.

    content_copy zoom_out_map
    [edit protocols rip group to-R3]
    user@R2# set neighbor fe-1/2/1.5
    [edit routing-instances voice protocols rip group to-R1]
    user@R2# set neighbor fe-1/2/0.2
    
  4. Create the routing table groups.

    content_copy zoom_out_map
    [edit routing-options rib-groups]
    user@R2# set inet-to-voice import-rib inet.0
    user@R2# set inet-to-voice import-rib voice.inet.0
    user@R2# set voice-to-inet import-rib voice.inet.0
    user@R2# set voice-to-inet import-rib inet.0
    
  5. Apply the routing table groups.

    content_copy zoom_out_map
    [edit protocols rip]
    user@R2# set rib-group inet-to-voice
    [edit routing-instances voice protocols rip]
    user@R2# set rib-group voice-to-inet
    
  6. Create the routing policy to advertise both direct and RIP-learned routes.

    content_copy zoom_out_map
    [edit policy-options policy-statement advertise-routes-through-rip term 1]
    user@R2# set from protocol direct
    user@R2# set from protocol rip
    user@R2# set then accept
    
  7. Apply the routing policy.

    In Junos OS, you can only apply RIP export policies at the group level.

    content_copy zoom_out_map
    [edit protocols rip group to-R3]
    user@R2# set export advertise-routes-through-rip
    [edit routing-instances voice protocols rip group to-R1]
    user@R2# set export advertise-routes-through-rip
    
Results

From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, show routing-instances, and show routing-options commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

content_copy zoom_out_map
user@R2# show interfaces
fe-1/2/0 {
    unit 2 {
        family inet {
            address 10.0.0.2/30;
        }
    }
}
fe-1/2/1 {
    unit 5 {
        family inet {
            address 10.0.0.5/30;
        }
    }
}
lo0 {
    unit 2 {
        family inet {
            address 192.168.2.2/32;
            address 172.16.2.2/32;
        }
    }
}
content_copy zoom_out_map
user@R2# show protocols
rip {
    rib-group inet-to-voice;
    group to-R3 {
        export advertise-routes-through-rip;
        neighbor fe-1/2/1.5;
    }
}
content_copy zoom_out_map
user@R2# show policy-options
policy-statement advertise-routes-through-rip {
    term 1 {
        from protocol [ direct rip ];
        then accept;
    }
}
content_copy zoom_out_map
user@R2# show routing-instances
voice {
    interface fe-1/2/0.2;
    protocols {
        rip {
            rib-group voice-to-inet;
            group to-R1 {
                export advertise-routes-through-rip;
                neighbor fe-1/2/0.2;
            }
        }
    }
}
content_copy zoom_out_map
user@R2# show routing-options
rib-groups {
    inet-to-voice {
        import-rib [ inet.0 voice.inet.0 ];
    }
    voice-to-inet {
        import-rib [ voice.inet.0 inet.0 ];
    }
}

If you are done configuring the device, enter commit from configuration mode.

Verification

Confirm that the configuration is working properly.

Checking the Routing Tables

Purpose

Make sure that the routing tables contain the expected routes.

Action

From operational mode, enter the show route protocol rip command.

content_copy zoom_out_map
user@R2> show route protocol rip
inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.16.0.1/32      *[RIP/100] 01:58:14, metric 2, tag 0
                    > to 10.0.0.1 via fe-1/2/0.2
172.16.3.3/32      *[RIP/100] 02:06:03, metric 2, tag 0
                    > to 10.0.0.6 via fe-1/2/0.5
192.168.1.1/32     *[RIP/100] 01:58:14, metric 2, tag 0
                    > to 10.0.0.1 via fe-1/2/0.2
192.168.3.3/32     *[RIP/100] 02:06:03, metric 2, tag 0
                    > to 10.0.0.6 via fe-1/2/0.5
224.0.0.9/32       *[RIP/100] 01:44:13, metric 1
                         MultiRecv

voice.inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.16.0.1/32      *[RIP/100] 02:06:03, metric 2, tag 0
                    > to 10.0.0.1 via fe-1/2/0.2
172.16.3.3/32      *[RIP/100] 01:58:14, metric 2, tag 0
                    > to 10.0.0.6 via fe-1/2/0.5
192.168.1.1/32     *[RIP/100] 02:06:03, metric 2, tag 0
                    > to 10.0.0.1 via fe-1/2/0.2
192.168.3.3/32     *[RIP/100] 01:58:14, metric 2, tag 0
                    > to 10.0.0.6 via fe-1/2/0.5
224.0.0.9/32       *[RIP/100] 01:44:13, metric 1
                         MultiRecv
Meaning

The output shows that both routing tables contain all of the RIP routes.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
15.1X49
Note that the functionality of redistributing routes among RIP instances described in this topic is not supported in Junos OS Releases 15.1X49, 15.1X49-D30, or 15.1X49-D40.
footer-navigation