EIGRP design

by karan on June 15, 2010

which one is correct?

whats diffrence?

router eigrp 100             network 10.0.0.0

router eigrp 100

network 10.1.1.0 0.0.0.255

{ 5 comments… read them below or add one }

Kumar June 15, 2010 at 5:38 am

thank you for answer,
I use 10.1.1.0 NW and subnetting it and use them all interfaces on router, which means all interfaces are enabled by second one. however, almost cisco document using first one, even though second one is OK to use. it seems like they prefere second one. is there any particulat reason?

arul June 15, 2010 at 5:39 am

Most of the cisco docs on CCO are older than the ability to use wildcard bits in the network statement, or they prefer the simplicity of sample configurations without the wildcard bits. There’s no “preferred” way, it just depends on what interfaces you are trying to run EIGRP on. Note that:
network 0.0.0.0 0.0.0.0
Will run EIGRP on all local interfaces.
:-)

arul June 15, 2010 at 5:41 am

Thanks Russ.W
Router A:
interface s0
ip address 10.1.1.1 255.255.255.0
interface s1
ip address 10.1.2.1 255.255.255.0
router eigrp 100
network 10.0.0.0
Router B:
interface s0
ip address 10.1.1.2 255.255.255.0
interface s1
ip address 10.1.2.2 255.255.255.0
router eigrp 100
network 10.1.1.0 255.255.255.0
network 10.1.2.0 255.255.255.0
no auto summary
I thinks both make same result, A is more simple and easy, why using B? any technical issue?

Kumar June 15, 2010 at 5:44 am

Re: EIGRP design
First, this config:
router eigrp 100
network 10.1.1.0 255.255.255.0
network 10.1.2.0 255.255.255.0
no auto summary
would actually show up as:
router eigrp 100
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
no auto-summary
When you do a show run. When I coded this, I made it so it would reverse the mask if the first bit is a 1. Either way works, but the final result will always be wildcard bits, rather than a mask. :-)
The second config could be:
router eigrp 100
network 10.1.0.0 0.0.3.255
And it would cover both of the interfaces. The main point behind the wildcard bits is really to include some interfaces in a single major network while not including others. For instance, if you have:
int s0
ip address 10.1.1.0 255.255.255.254
int s1
ip address 10.1.1.2 255.255.255.254
int s2
ip address 10.1.1.4 255.255.255.254
int lo0
ip address 10.1.1.6 255.255.255.255
How would you put just s0 and lo0 into EIGRP, while not putting s1 and s2? If you didn’t have the wildcard bits, then you would have to use:
router eigrp 100
network 10.0.0.0
distribute-list 10 out
passive-interface s1
passive-interface s2
access-list 10 permit 10.1.1.0 0.0.0.254
access-list 10 permit host 10.1.1.6
With the new method, you can just use:
router eigrp 100
network 10.1.1.0 0.0.0.0
network 10.1.1.6 0.0.0.0
(Just host bits works in the wildcard bits to allow the interface with just that address to run EIGRP, and not any others–the entire address space on the interface doesn’t need to be “covered” by the network command, just the interface address)
In the same way, before the wildcard bits, you had to include one statement for each major net configured on the box. After, you can do this:
router eigrp 100
network 0.0.0.0 0.0.0.0
And _all_ interfaces on the box now run EIGRP. You can then actually turn the entire thing around, and do this:
router eigrp 100
network 0.0.0.0 0.0.0.0
passive-interface default
no passive-interface s0
….
This allows you to advertise all the connected interfaces as internals, by default, without having to worry about updating your network commands when you add interfaces, or change addresses, while at the same time controlling where you’ll form EIGRP neighbor adjacencies.

Kumar June 15, 2010 at 5:44 am

Russ.W
one more thing…

this “network” tips works for OSPF as well?

Previous post:

Next post: