1

Is there any command to assign all interfaces in router (CISCO 2691) to OSPF backbone area? I was using this command for each interface.

network address wildcard-mask area area-id

Where wildcard mask is the one that complements a subnet mask.

Is it possible to replace assigning all the addresses with a single command?

1

Yes, of course. The OSPF network statement with the address and wildcard mask that can encompass all interfaces is:

 network 0.0.0.0 255.255.255.255 area <area>

That will put all the interfaces in the same area, so it doesn't work on ABRs.

You can then use the passive-interface <interface> command to prevent OSPF hellos on certain interfaces, which would be what you want for interfaces that do not connect to neighbor routers. If most of the interfaces do not connect to neigbor routers, the use the passive-interface default and individual no passive-interface <interface> commands for the interfaces with neighbor routers.


The above only works for IPv4 and OSPFv2. With IPv6 and/or OSPFv3, the commands are placed on the individual interface configurations, not under the router ospf configuration.

1

You can also use interface range command and then put all the interfaces in the area 0 which is the backbone area.

R1(config)#int range fa0/0-10
R1(config-if-range)#ip ospf 1 area 0

But you can also use the network statement to put all interfaces in the backbone area. It depends on you which method you would want to use.

You can issue the following command to verify if your interfaces are in the desired ospf area.

R1#show ip protocols 
*** IP Routing is NSF aware ***

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 10.0.0.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
  Routing on Interfaces Configured Explicitly (Area 0):
    FastEthernet0/5
    FastEthernet0/4
    FastEthernet0/3
    FastEthernet0/2    
    FastEthernet0/1
    FastEthernet0/0
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: (default is 110)

R1#

or

R1#show ip ospf interface brief 
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Fa0/1        1     0               172.16.1.1/24      1     DR    0/0
Fa0/0        1     0               192.168.1.1/24     1     DR    0/0
R1#

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.