Skip to content

Network Ninja

The Long Road to Cisco

  • Home
  • About
  • Legal Disclaimer
  • Archives

« Open Shortest Path First – OSPF Fundamentals – Multiple Areas
Open Shortest Path First – OSPF Fundamentals – Configuring Options On an Internal Router »

Open Shortest Path First – OSPF Fundamentals – Configuring OSPF in a Single Area

Published
by
Deon Botha
on April 9, 2009
in BSCI, BSCI Notes, Certification, Cisco Systems, Concepts and Constructs and OSPF
. 5 Comments Tags: B, BSCI, C, Certification, Cisco, Command, Config, configuration, DR, Exam, OSPF, Router, Routing, SE, SONA, Support, Theory, training.

The command requirements for configuring OSPF in a single area is relatively (compared to say other routing protocols) few in number and simple; the implications of the commands are somewhat complicated but need to be understood.

Required Commands for Configuring OSPF WITHIN a Single Area

We are going to configure an OSPF internal router. An Internal router being one with all interfaces that lie within a single area. The sole OSPF function on an internal router is to route within an area.

The Router needs to understand how to participate in the OSPF network:

  • OSPF Process – Declare an OSPF process.
  • Participating interfaces – Identify the interfaces to be used by OSPF.
  • Area – Definitions are done per interface. This discussion assumes that all active interfaces are in the same area.
  • Router ID – A unique 32-bit ID, usually drawn from an interface IP Address.

Enabling the OSPF Routing Protocol

Router(config)#router ospf process-number

In the above the process-number is not globally significant.  It is possible to have more than one process running on a router (although that would be an unusual configuration, but not unheard of) and two OSPF processes could route for different parts of the network. The process number does not have to be the same on every router in the area.

The OSPF Network Command

Once OSPF is turned on (the above command), you must define the interfaces that are to participate in OSPF and the area that they reside in:

Router(config-router)#network network-number wilcard-mask area area-number

NB.Take note of the above command. Many errors occur in configuration with this command, normally due to misapplication of the wildcard-mask parameter, either including too many or too few interfaces in a particular OSPF area.

Similar to other routing protocols like RIP, the network command identifies the interface on which the OSPF process is to be active. Unlike RIP however this command has a wilcard mask that allows it to be very specific. All interfaces that match the network wildcard mask will be active within the given area.

One can apply the network command in different ways, each method will yield different yet similar results.

  • FE 0/0 : 192.168.0.1 / 24
  • FE 0/1 : 192.168.1.1 / 24
  • FE 0/2 : 192.168.2.1 / 24
  • FE 0/3 : 192.168.3.1 / 24
  • S o/1 : 10.10.1.1 / 30
  • s 1/1 : 10.10.2.1 / 30

We can enable OSPF area 0 (zero) on all interfaces with the following command:

Router(config-router)#network 0.0.0.0 255.255.255.255 area 0

When using this approach you may include interfaces inadvertently that you may not want to include (as this is a sweeping statement config line).

The second method would be to break the network into the 10 network and the 192 network, as follows:

Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router(config-router)#network 192.168.0.0 0.0.3.255 area 0

This approach gives a little more control over the two different networks (192.x.x.x and 10.x.x.x) splitting them into two config lines.

Another method would be to separately enable OSPF on each interface;

Router(config-router)#network 192.168.0.1 0.0.0.0 area 0
Router(config-router)#network 192.168.1.1 0.0.0.0 area 0
Router(config-router)#network 192.168.2.1 0.0.0.0 area 0
Router(config-router)#network 192.168.3.1 0.0.0.0 area 0
Router(config-router)#network 10.10.1.1 0.0.0.0 area 0
Router(config-router)#network 10.10.2.1 0.0.0.0 area 0

This option is more time consuming to deploy but gives much more control over what interface specifically is included and not included in area 0 (zero) which will enable much more control over the routing process.

All the above achieve the same thing (six interfaces places in area 0 (zero) begin to process OSPF traffic).

The technique that is used should be functional, effective and efficient given the topology and application on the network while still maintaining the ability to be documented thoroughly (Keep It Simple Stupid KISS or as simple as possible, because you might not be the one to always maintain the network).

NB.Be intimately familiar (CCNA) with wildcard masks and the network command to enable OSPF on router interfaces

The area parameter puts the designated interface into an area. A router can have different interfaces in different areas (as mentioned earlier thus making the router an Area Border Routers (ABR)). The area-number is a 32-bit field and format can either be a simple decimal (0, 1, 2, 3, 4) or dotted decimal( 0.0.0.1, 0.0.0.2, 0.0.03, 0.0.0.4). Some implementations of OSPF might only understand one of the formats (keep in mind that some vendors throw the dotted decimal around 0.0.0.1 will become 1.0.0.0), Cisco understands both formats.

After identifying the interfaces on the router that are participating in the OSPF domain, hellos are exchanged, LSAs are sent, and the router inserts itself into the network.

NB.If there are stub networks connected to a OSPF router, it is useful to issue the command redistribute connected subnets. This command includes the connected subnets in OSPF advertisements without actually running OSPF on these routers. A route-map is often used with this command to exclude interfaces that are explicitly configured with OSPF

Next up Internal Router Config in more detail….

Notes and Notices: This is a part of my personal BSCI notes and research to assist myself in learning and understanding the concepts and theory for the BSCI exam. I learn by making notes reading and writing things down and wish to file them where I cannot lose them. These notes are not to be seen, judged or mistaken for replacements to Cisco recognized and authorized training which I personally support and attend and suggest you undertake if you are going for the BSCI Certification.

« Open Shortest Path First – OSPF Fundamentals – Multiple Areas
Open Shortest Path First – OSPF Fundamentals – Configuring Options On an Internal Router »

Consider leaving a comment, suggestion, question or trackback. Its all about Networking innit.

5 Responses to “Open Shortest Path First – OSPF Fundamentals – Configuring OSPF in a Single Area”

Feed for this Entry Trackback Address

  1. 1 Hristo Iliev
    April 10, 2009 at 9:30 am

    Router(config-router)#network 192.168.0.1 0.0.0.0 area 0

    Since wildcard mask is required this is a host address. I think the proper way would be:
    Router(config-router)#network 192.168.0.0 0.0.0.255 area 0
    because you have /24 network on the interface

    By the way I don’t think it’s a good idea to put it like the first approach you are mentioning:
    Router(config-router)#network 0.0.0.0 255.255.255.255 area 0
    because this way you are putting into the OSPF every new interface you are creating, which is undesireable in most of the cases.

    Nice article though, gives a good review of the basic OSPF features. This is one of the best written OSPF Fundamentals articles I’ve seen.

    Reply

  2. Deon Botha Reply:
    April 10, 2009 at 3:01 pm

    Hi Hristro,

    Sorry looking over things I edited this one.

    You are absolutely right. As it stands one would only allow the single IP of the interface on the router which was the intention at the time (I am doubting myself now a bit). Thanks for pointing it out though.

    What I have now is the following:

    Router(config-router)#network 192.168.0.1 0.0.0.0 area 0
    Router(config-router)#network 192.168.1.1 0.0.0.0 area 0
    Router(config-router)#network 192.168.2.1 0.0.0.0 area 0
    Router(config-router)#network 192.168.3.1 0.0.0.0 area 0
    Router(config-router)#network 10.10.1.1 0.0.0.0 area 0
    Router(config-router)#network 10.10.2.1 0.0.0.0 area 0

    What one could put up is the following

    Router(config-router)#network 192.168.0.1 0.0.0.255 area 0
    Router(config-router)#network 192.168.1.1 0.0.0.255 area 0
    Router(config-router)#network 192.168.2.1 0.0.0.255 area 0
    Router(config-router)#network 192.168.3.1 0.0.0.255 area 0
    Router(config-router)#network 10.10.1.1 0.0.0.3 area 0
    Router(config-router)#network 10.10.2.1 0.0.0.3 area 0

    I will have to run both scenarios through a Router/Sim and see whether one or the other is the more proper / correct way of doing it.

    I will patch up the notes as soon as I get some time because this is making me scratch me head. I was more focused on my grammar and diction than on actually making sure examples used were “totally” correct :-( I do apologize.

    And I agree with you on the first example, I used Router(config-router)#network 0.0.0.0 255.255.255.255 area 0 because it would work and its the easiest and most basic example available (eg all networks, all interfaces), this config is very broad and doesn’t allow any control, manageability or thought to use. As you mention any new interface will automatically become part of area 0. In most cases having a managed network infrastructure one would want control and a management ability rather than just wild packets going all over the place because its the easiest, dirtiest and fastest config method was used.

    Thanks for the compliment hope to hear more from you in the future!

    Deon

    Reply

  3. Deon Botha Reply:
    June 2, 2009 at 8:44 pm

    To Reply to this whole story,

    I’ve checked and both the initial

    Router(config-router)#network 192.168.0.1 0.0.0.0 area 0
    Router(config-router)#network 192.168.1.1 0.0.0.0 area 0
    Router(config-router)#network 192.168.2.1 0.0.0.0 area 0
    Router(config-router)#network 192.168.3.1 0.0.0.0 area 0
    Router(config-router)#network 10.10.1.1 0.0.0.0 area 0
    Router(config-router)#network 10.10.2.1 0.0.0.0 area 0

    and the proposed solution will work

    Router(config-router)#network 192.168.0.1 0.0.0.255 area 0
    Router(config-router)#network 192.168.1.1 0.0.0.255 area 0
    Router(config-router)#network 192.168.2.1 0.0.0.255 area 0
    Router(config-router)#network 192.168.3.1 0.0.0.255 area 0
    Router(config-router)#network 10.10.1.1 0.0.0.3 area 0
    Router(config-router)#network 10.10.2.1 0.0.0.3 area 0

    work fine, as long as the IP address is “mentioned” in the network command all is well.

    The difference being in the Subnet mask portion. My confusion on the situation came in whether the OSPF required downstream IP addresses (interface addresses) included in the “network” command (i.e. subnet mask portion or not). This seems not to be the case.

    What I have found is that the Network command deals only with the local Cisco Router OSPF process and interfaces, ergo OSPF running on interface A (192.168.1.0) you can enable 0.0.0.255 (all subsequent ip addresses in the range allowed) or lock it down 0.0.0.0 (to only that IP). Downstream Routers can still see through the upstream router to other routers “show ip route” as long as the connected interface they connect through is an OSPF speaker.

    I suppose this would depend on how much you want to configure and how tight you want the configuration. The closer you get to the edge you may want to terminate into a single allowed IP while Core you can have a fairly large “allowed” range so that fiddling with network x.x.x.x x.x.x.x.x area 0 commands don’t waste time. Maybe I just like things “neat”.

    *shrug*

    Reply

  4. SRIDHAR V Reply:
    September 4, 2009 at 1:00 pm

    tHE EXAMPLE YOU HAVE GIVEN US HELP IN CLEARING DOUBTS AND MAKE PRACTICALLY GOOD WORKING. BUT MY VIEW IS IS THE INTERFACE IS 192.168.0.1 WITH SN 255.255.255.0 THEN THE OSPF NETWORK MUST BE 192.168.0.0 0.0.0.255 AREA 0. THIS IS NOT CONFUSING IN CONFIGURATION.

  5. Deon Botha Reply:
    September 17, 2009 at 10:31 pm

    Hi Sridhar,

    There are many options open to you when configuring your Cisco which is why many people love and also hate a Cisco. The method that you suggest could work. But I dont agree with them and here is why:

    The example lists the follow interfaces
    * FE 0/0 : 192.168.0.1 / 24
    * FE 0/1 : 192.168.1.1 / 24
    * FE 0/2 : 192.168.2.1 / 24
    * FE 0/3 : 192.168.3.1 / 24
    * S o/1 : 10.10.1.1 / 30
    * S 1/1 : 10.10.2.1 / 30

    Using your config option Router(config-router)#network 192.168.0.0 0.0.0.255 AREA 0

    You would allow all and any interface in the 192.168.0.0-255 network access to participate in Area 0, which if you are okay with the lack of control and security is great.

    My first example allows that in a single line which is also much less confusing: Router(config-router)#network 0.0.0.0 255.255.255.255 area 0

    How you configure and choose to manage your network is totally up to you.

Leave a Reply

CommentLuv Enabledshow more

Click to cancel reply

Search



Styled with Sawchuk

Powered by WordPressabc and K21.0-RC7

Entries Feed and Comments Feed

36 queries. 0.8070 seconds.