From: Brian Hescock (bhescock@xxxxxxxxx)
Date: Wed Nov 07 2001 - 21:35:07 GMT-3
The wildcard bits in the ospf network statement only cause ospf to be turned on
any interface that falls within that range. So if I have:
router ospf 1
network 10.1.1.0 0.0.0.255
does this mean I'm going to advertise a /24 network, absolutely not. Here's
what the key is:
interface ethernet0
ip address 10.1.1.1 255.255.255.252
What would be advertised using the two items above is 10.1.1.0 /30. The
OSPF network statement merely indicates which interfaces are included in the
ospf process. The network mask on the INTERFACE is what determines what mask
is advertised (with the exceptions of loopbacks by default). So what's the
difference in these scenarios as to what is advertised:
interface ethernet 0
ip add 10.1.1.1 255.255.255.0
interface ethernet 1
ip add 10.2.2.1 255.255.255.0
router ospf 1
network 10.1.1.1 0.0.0.0 area 0
network 10.2.2.1 0.0.0.0 are a0
or
router ospf 1
network 10.1.1.0 0.0.0.3 area 0
network 10.2.2.0 0.0.0.127 area 0
or
router ospf 1
network 10.1.1.0 0.0.0.255 area 0
network 10.2.2.0 0.0.0.31 area 0
or
router ospf 1
network 10.0.0.0 0.255.255.255 area 0
or
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
Absolutely no difference (unless I made a typo somewhere). In each situation
I've included the ip addresses of the interface in an ospf network statement,
which includes that interface in ospf , and ospf advertises the network mask
*as configured on the interface*, NOT the network statement under router
ospf.
Brian
"Ben-Shalom, Omer" wrote:
> Do I understand from this that the way you set up the OSPF network statement
> makes a difference to the OSPF database and through that to the advertised
> routes ?
>
> Never saw any reference to this but if this is the case it is a very
> interesting (and important) issue, might have an affect on DDR with OSPF on
> demand circuits as well, I'll see if I can get some results on this in the
> lab.
>
> Omer.
>
> -----Original Message-----
> From: Jason Gardiner [mailto:gardiner@sprint.net]
> Sent: Wed, November 07, 2001 11:36 PM
> To: Larson, Chris (Contractor)
> Cc: 'Ben-Shalom, Omer'; lgao; Courtney Foster; Dennis #6; CCIE
> Groupstudy
> Subject: Re: CCBootCamp 5 OSPF over frame question
>
> OK, I tried to put this to the test. When I configured networks with a
> host mask, they show up in the remote routing table as /32s. In order
> for the whole network to show up, I had to redist connected subnets.
> There's to many variables in this setup. I prefer using the network
> statement with the mask of the interface to be injected. It just works
> better for me.
>
> "Larson, Chris (Contractor)" wrote:
> >
> > Good point. I never really thought about it that way, but your right of
> > course. The network statement simply identifies (in the case of OSPF)
> which
> > interfaces to advertise out of and therefore a host route would work.
> >
> > Thinking about it like that, I cannot really think of any instances where
> > you would not want to , or could not simply use a host route. Would
> everyone
> > agree with that????
> >
> > Are there instances where you could not?
> >
> > -----Original Message-----
> > From: Ben-Shalom, Omer [mailto:omer.ben-shalom@intel.com]
> > Sent: Wednesday, November 07, 2001 3:00 PM
> > To: lgao; Courtney Foster
> > Cc: Dennis #6; CCIE Groupstudy
> > Subject: RE: CCBootCamp 5 OSPF over frame question
> >
> > The OSPF network statement really has nothing to do with networks it is an
> > access list (and that is why it uses the mask the way it does) to filter
> the
> > interfaces to take part in OSPF, you COULD use the right network mask for
> > the interfaces or not, that is really a style issue.
> > A while back I asked the same thing stating that I personally prefer the
> > network mask to a host mask but later was convinced by a number of good
> > people that unless you have a big router with many interfaces using the
> host
> > mask is cleaner and less prone to mistakes and surprises so I am now using
> a
> > host mask.
> >
> > Again - both will work and this is really a style issue nothing more.
> >
> > Omer.
> >
> > -----Original Message-----
> > From: lgao [mailto:lgao@cisco.com]
> > Sent: Wed, November 07, 2001 7:57 PM
> > To: Courtney Foster
> > Cc: Dennis #6; CCIE Groupstudy
> > Subject: Re: CCBootCamp 5 OSPF over frame question
> >
> > I don't think it is the best practice to advertise a host mask, it looks
> > like a lazy thing that dont' want to figure out what the true mask is.
> >
> > Courtney Foster wrote:
> >
> > > It is a host specific mask....because you don't have broadcast...you are
> > > telling OSPF that this host is Area 10...At least that's what I think
> > >
> > > -----Original Message-----
> > > From: Dennis #6 [mailto:vacant@home.com]
> > > Sent: Wednesday, November 07, 2001 12:04 PM
> > > To: CCIE Groupstudy
> > > Subject: CCBootCamp 5 OSPF over frame question
> > >
> > > I noticed on the CCBootCamp lab 5 solution that the wildcard mask on
> > > each router for the point-to-multipoint frame connections is 0.0.0.0
> > > (see below). Is there a good reason for using this mask as opposed to
> > > 0.0.0.255 (it's a /24 subnet)? When is it best to use 0.0.0.0 versus
> > > 0.0.0.255. I thought it was normal to use the inverse mask that
> > > corresponds to the subnet mask on that interface. What am I missing?
> > >
> > > router ospf 1
> > > redistribute igrp 1 metric 20 metric-type 1 subnets
> > > network 172.168.100.5 0.0.0.0 area 10 !point to multipoint frame
> > > connection network 137.20.20.0 0.0.0.255 area 0 area 10 virtual-link
> > > 172.168.30.97 area 10 virtual-link 172.168.100.6
> > >
> > > Thanks,
> > >
> > > Dennis #6
> --
> Thanks,
>
> Jason Gardiner
> Supervisor, Engineering Services
> Sprint <Insert Division Name>
>
> "You can swim all day in the Sea of Knowledge and
> still come out completely dry. Most people do."
>
> - Norton Juster
This archive was generated by hypermail 2.1.4 : Fri Jun 21 2002 - 06:45:08 GMT-3