Disabling OSPF on an Interface

Table of contents:

Problem

You want to temporarily turn off OSPF on an interface.

Solution

Disable OSPF on the interface:

	[edit protocols ospf]
	aviva@RouterG# set area 0.0.0.0 interface fe-0/0/1.0 disable

To start OSPF again, remove the disable statement from the configuration:

	[edit protocols ospf]
	aviva@RouterG# delete area 0.0.0.0 interface fe-0/0/1.0 disable
	aviva@RouterG# commit

Discussion

To remove an interface from the OSPF network, you can disable it. Because you are removing the interface only temporarily, you don want to remove the configuration statements entirely. You see that the adjacency to that interfaces neighbor is no longer listed:

	aviva@RouterG> show ospf neighbor
	Address Interface State ID Pri Dead
	10.0.0.2 fe-1/0/1.0 Full 192.168.17.1 128 32

Also, the metric to that neighbor has increased from 1 to 2 because the neighbor is no longer directly connected, and that traffic is being directed out the routers only active OSPF interface, fe-1/0/1:

	aviva@RouterG> show route table inet.0 show route table inet.0 192.168.18.1
	192.168.18.1/32 *[OSPF/10] 00:00:45, metric 2
	 > to 10.0.0.2 via fe-1/0/1.0

Another way to disable OSPF on an interface is with the deactivate command:

	[edit protocols ospf]
	aviva@RouterG# deactivate area 0.0.0.0 interface fe-0/0/1.0
	aviva@RouterG# commit
	aviva@RouterG# show
	area 0.0.0.0 {
	 inactive: interface fe-0/0/1.0;
	 interface fe-1/0/1.0;
	}

To start OSPF again on the interface, reactivate it:

	[edit protocols 
ospf]
	aviva@RouterG# activate area 0.0.0.0 interface fe-0/0/1.0
	aviva@RouterG# commit

You can also temporarily disable OSPF on the router:

	[edit protocols ospf]
	aviva@RouterG# set disable
	aviva@RouterG# commit and-quit
	aviva@RouterG> show ospf neighbor
	OSPF instance is not running


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

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