Network statements OSPF

webspongewebsponge Member Posts: 119
Hi there,

Whilst going through some nuggets for OSPF, I got a little confused on some of the config..

in EIGRP you simply enter the networks you want to advertise, like 10.10.10.0 255.255.255.0, any interface that falls within that network range i.e 10.10.10.1 will start to send out eigrp hello`s

At first I thought this is what happened in OSPF, but in the samples they were using interface IP address`s to advertise the network,

i.e network 10.10.10.1 0.0.0.0 area 10

why is this? this is just advertising one address? surely it should be 10.10.10.0 0.0.0.255 area 10 ?
CCDP Next

Comments

  • networker050184networker050184 Mod Posts: 11,962 Mod
    You are confused on what the network statement does. Whether it is EIGRP or OSPF all it does is indicate which interface will participate in the routing process. What is advertised depends on the IP and mask configured on the interface.

    The network statement does NOT tell the router what network to advertise.

    For example 'network 0.0.0.0 255.255.255.255 area 0' puts every interface into the routing process. It does not advertise a default route.
    An expert is a man who has made all the mistakes which can be made.
  • atorvenatorven Member Posts: 319
    The 0.0.0.0 and 0.0.0.255 are wildcard masks not subnet masks. In Ospf, 0 = match and 255 = don't care/don't match.
    In your example network 10.10.10.1 0.0.0.0 area 10 means that look for the exact interface with the IP address 10.10.10.1 whereas 10.10.10.0 0.0.0.255 area 10 means looks for an interface with the IP address starting 10.10.10.X - the first 3 octets have to match and I don't care what is in the fourth octet.

    I know someone can put it more elegantly but I hope that helps.
  • webspongewebsponge Member Posts: 119
    Ok, I get that, thats what I thought,

    so this statement - network 10.10.10.1 0.0.0.0 area 10 is only advertising the one address though? right? as the mask is making it match all octets..
    CCDP Next
  • networker050184networker050184 Mod Posts: 11,962 Mod
    No, it's advertising whatever is configured on that interface.
    An expert is a man who has made all the mistakes which can be made.
  • webspongewebsponge Member Posts: 119
    No, it's advertising whatever is configured on that interface.

    Mmmm, but interfaces dont advertise, they just have an IP Address, if that interface`s ip address is 10.10.10.1 nothing is being advertised? I am looking at this all wrong I know... been reading too much EIGRP I think!

    if the interface is 10.10.10.1 /24 it will advertise the 10.10.10.0 network?
    CCDP Next
  • networker050184networker050184 Mod Posts: 11,962 Mod
    It works the same way in EIGRP or OSPF.

    For example if you have 'network 10.0.0.1 0.0.0.0 area 0' it will match this interface.

    GigbitEthernet0/0
    ip address 10.0.0.1 255.0.0.0

    What will be advertised is based off what is configured on the interface. So in this instance G0/0 will attempt to form neighbor relationships and an LSA will be generated and advertised for 10.0.0.0/8. If it were EIGRP the same thing. 10.0.0.0/8 would be advertised.
    An expert is a man who has made all the mistakes which can be made.
  • webspongewebsponge Member Posts: 119
    The penny drops! *sigh* sorry for being dull, Im tired.. I understand now!! Thanks all
    CCDP Next
  • iamme4evaiamme4eva Member Posts: 272
    I know you've got it, but I want to throw in my two p!

    Equally to what networker said, this interface:

    FastEthernet0/0
    ip address 192.168.0.1 255.255.255.0


    would be matched by this network statement:

    network 192.0.0.0 0.255.255.255 area 0

    The LSA would still be generated for 192.168.0.0/24 though, as that is the interface configuration. That fact that the network statement is a /8 is irrelevant, it's basically just a statement to match interfaces.

    It's no different to EIGRP, except you add the area <#> to the end.
    Current objective: CCNA Security
    My blog: mybraindump.co.uk
Sign In or Register to comment.