O'Reilly logo

Cisco IOS Cookbook, 2nd Edition by Ian Brown, Kevin Dooley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing the Network Type on an Interface

Problem

You want to change the default OSPF network type on an interface.

Solution

OSPF supports several different types of logical networks on interfaces. The default values are often exactly what you want, but it is sometimes useful to change them:

Router9#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router9(config)#interface FastEthernet0/0
Router9(config-if)#ip ospf network ?
  broadcast            Specify OSPF broadcast multi-access network
  non-broadcast        Specify OSPF NBMA network
  point-to-multipoint  Specify OSPF point-to-multipoint network
  point-to-point       Specify OSPF point-to-point network

Router9(config-if)#

Discussion

Before altering the OSPF network type on an interface, it is useful to understand the differences between the different network types and what the defaults are. Table 8-3 shows the default OSPF network types for a variety of common media.

Table 8-3. OSPF default network types for several common media

Media typeType or layer 2 encapsulationDefault OSPF network
Serial, ISDN, Async, DialerHDLCPoint-to-point
 PPPPoint-to-point
 LAPBPoint-to-point
 Frame RelayNonbroadcast
 ATM-DXINonbroadcast
 X.25Nonbroadcast
 SMDSNonbroadcast
ATMN/ANonbroadcast
Point-to-point subinterfaceFrame Relay, ATM, etc.Point-to-point
Multipoint subinterfaceFrame Relay, ATM, etc.Nonbroadcast
Ethernet, FastEthernet, GigabitEthernetN/ABroadcast
Ethernet VLAN, SubinterfaceISL, dot1QBroadcast
LoopbackN/ALoopback
TunnelN/APoint-to-point

The configuration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required