Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configuring OSPF on a router 1

Status
Not open for further replies.

msr976

Technical User
Mar 20, 2006
19
US
I'm trying to figure out OSPF, which is quite different from rip or eigrp. I plan on taking my CCNA soon.

If you have a /30 subnet, the wild card mask would be 0.0.0.3. If you have a /28 subnet, the wild card mask would be 0.0.0.15. Is this correct?

If the /30 subnet is used. The wild card mask will use the first 4 bits which would be .0-.3. Each subnet would be 4 steps. So you could use .1-.2, .5-.6, .9-.10, which would be all of the usable hosts in each subnet.

If the /28 subnet is used. The wild card mask will use the first 16 bits which would be .0-.15. Each subnet would be 16 steps. So you could use .1-.14, .17-.30, .33-.46, which would be all of the usable hosts in each subnet.

If I had an ip address that fell into any of these subnets, the wildcard mask that I mentioned above would be used. Am I right on this?

msr976
 
Its kind of hard to answer quickly, but I'll do my best. I think you might be over thinking it. For an example, let's say you have a router with the following configuration:

FastEthernet0/1
ip address 10.0.0.1 255.255.255.0

FastEthernet0/2
ip address 10.1.0.1 255.255.255.252

Serial0/0
ip address 192.168.0.1 255.255.255.248

The network lines you add under the ospf config are to enable ospf on the interfaces on your router. So you could do something like this:

router ospf 100
network 10.0.0.0 0.255.255.255 area 0
network 192.168.0.0 0.0.0.255 area 0

And all of the interfaces would be participating in OSPF. From my experience in practice labs, it really makes a difference how the question reads. If you need to enable it on FastEthernet 0/0 but not 0/1 then the line might be something like:
network 10.0.0.1 0.0.0.0 area 0

The subnet mask doesn't really make any difference to the network statement that has to be added...it all depends on the interfaces on your router.

Another example, say in a frame-relay environment you have a bunch of sub-interfaces variably subnetted with /30 masks in the 192.168.1.0/24 network. You could enable ospf a couple of ways.
1. one network statement of "network 192.168.1.0 0.0.0.255"
2. Multiple network statements for each sub-interface with a 0.0.0.0 wildcardmask


 
I understand what your saying. I'm trying to figure out..

0 3 7 15 31 63 127 255

What if i did something like...

Fastethernet 0/0
ip address 192.168.1.129 255.255.255.192

Serial 0/0
ip address 192.168.1.1 255.255.255.252

router ospf 100
network 192.168.1.128 0.0.0.63
network 192.168.1.0 0.0.0.3

I know I could probably do something like...

router ospf 100
network 192.168.1.0 0.0.0.255

Which should take care of either interface.


 
A /28 is 255.255.255.240---take the whole thing and subtract it from 255.255.255.255---it's that simple. This will leave you 0.0.0.15---see? Take anything and subtract it from 255.255.255.255 to get the wildcard mask---like let's take 255.128.0.0---you get 0.127.255.255 when you subtract it from 255.255.255.255---see?

Burt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top