Redistributing Static Routes into OSPF

Table of contents:

Problem

You have a single, low-speed link to a small-size customer and, instead of having the customer run OSPF (or even RIP), you want to set up a static route to the customer.

Solution

Create a routing policy to redistribute static routes into OSPF:

	[edit policy-options]
	aviva@RouterG# set policy-statement export-statics term 1 from protocol static
	aviva@RouterG# set policy-statement export-statics term 1 then accept
	aviva@RouterG# show
	policy-statement export-statics {
	 term 1 {
	 from protocol static;
	 then accept;
	 }
	}

Then apply the policy to OSPF:

	[edit protocols ospf]
	aviva@RouterG# set export export-statics

Discussion

If you have small-size customers who don need to run a dynamic routing protocol, such as OSPF or RIP, and only need to connect to you using a static route, you create a routing policy to get their routes into your OSPF network.

As an ISP, you might use static routes to represent your customer links and networks, especially for small-size customers that you connect to with just a single link or a low-speed link. In these cases, you want to redistribute these static links into your OSPF network. Create a simple routing policy that accepts all static routes and then apply it as an export policy to OSPF. This adds Type 7 (AS External) routes to the link-state database:

	aviva@RouterG> show ospf database
	 OSPF link state database, area 0.0.0.0
	 Type ID Adv Rtr Seq Age Opt Cksum Len
	Router 192.168.17.1 192.168.17.1 0x800001c6 1633 0x2 0x13b3 60
	Router 192.168.18.1 192.168.18.1 0x8000015f 384 0x2 0xf833 60
	Router *192.168.19.1 192.168.19.1 0x800000f3 11 0x2 0x180b 48
	Network 10.0.0.2 192.168.17.1 0x80000004 1633 0x2 0xbf17 32
	Network 10.0.1.1 192.168.18.1 0x80000004 84 0x2 0xc014 32
	Network 10.0.2.1 192.168.18.1 0x800000b4 684 0x2 0x3aea 32
	 OSPF AS SCOPE link state database
	 Type ID Adv Rtr Seq Age Opt Cksum Len
	Extern *0.0.0.0 192.168.19.1 0x80000001 11 0x2 0x4b0a 36
	Extern *192.168.42.1 192.168.19.1 0x80000001 11 0x2 0xbf01 36

The only drawback is that if the link between the customer and the ISP goes down, the network still appears to be reachable to the world, and you would need to stop advertising it if this occurred. However, short links between a customer and an ISP should rarely or never fail.


Router Configuration and File Management

Basic Router Security and Access Control

IPSec

SNMP

Logging

NTP

Router Interfaces

IP Routing

Routing Policy and Firewall Filters

RIP

IS-IS

OSPF

BGP

MPLS

VPNs

IP Multicast



JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net