SOURCECODEBD.NET

Live Experience

Juniper Redistributing BGP Routes into IS-IS
 
You have a single, low-speed link to a small customer and instead, of having the customer run IS-IS (or even bgp), you want to set up a bgp route to the customer.
Create a routing policy to redistribute bgp routes into IS-IS:
 
[edit policy-options]
source@RouterA# set policy-statement export-bgp term 1 from protocol bgp
source@RouterA# set policy-statement export-bgp term 1 then accept
source@RouterA# show
policy-statement export-bgp {
    term 1 {
         from protocol bgp;
         then accept;
}
}
 
Then apply the policy to IS-IS:
 
[edit protocols isis]
source@RouterA# set export export-bgp
 
Monitor the status
 
source@RouterA> show route protocol bgp table inet.0
 
When the bgp route is redistributed into IS-IS, it is incorporated into the IS-IS link-state database and is marked as being an external prefix:
 
source@RouterA> show isis database extensive
 
The show isis database extensive command output shows that the metric for the bgp route redistributed into IS-IS is 0. To lower the preference for the route, change the metric in the routing policy to increase the cost. Here, we increase the metric to 500:
 
[edit policy-options]
source@RouterA# set policy-statement export-bgp term 1 then metric 500
 
The policy now looks like this:
 
source@RouterA# show
policy-statement export-bgp {
     term 1 {
          from protocol bgp;
     then {
         metric 500;
         accept;
     }
        }
}
 
Looking in the IS-IS link-state database shows that the metric value has changed from 0:
 
source@RouterA> show isis database extensive
IS-IS level 1 link-state database:
RouterA.00-00 Sequence: 0xe5, Checksum: 0x912c, Lifetime: 492 secs
   IP prefix: 10.0.1.0/24                     Metric:       10 Internal Up
   IP prefix: 10.0.16.0/24                    Metric:       10 Internal Up
   IP prefix: 192.168.12.1/32                 Metric:       63 External Up
   IP prefix: 192.168.19.1/32                 Metric:        0 Internal Up
 
It's true that the metric has changed, but instead of being 500, it's 63. Looking in the routing table on the neighboring router shows that it has learned the bgp route:
 
source@RouterA> show route
inet.0: 6 destinations, 7 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.12.1/32     *[IS-IS/160] 00:14:56, metric 73
                    > via se-0/0/3.0
 
source@RouterA> show isis database extensive
IS-IS level 1 link-state database:
RouterA.00-00 Sequence: 0xe5, Checksum: 0x912c, Lifetime: 492 secs
   IP prefix: 10.0.1.0/24 Metric: 10 Internal Up
   IP prefix: 10.0.16.0/24 Metric: 10 Internal Up
   IP prefix: 192.168.12.1/32 Metric: 500 External Up
   IP prefix: 192.168.19.1/32 Metric: 0 Internal Up
TLVs:
    IP external prefix: 192.168.12.1/32, Internal, Metric: 500, Up
 
The neighbor's routing table also reflects the change:
 
source@RouterA> show route
inet.0: 6 destinations, 7  
routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.12.1/32     *[IS-IS/160] 00:14:56, metric 500
                    > via se-0/0/3.0
 
You are here: Home / IS-IS / Juniper Redistributing BGP Routes into IS-IS