First off, let me say that you should never use this variant of the network command in real life. It's a theoretical byproduct that shows you how the syntax works, and may possibly be OK if your own labbing, but never in a million years should you use this in production. It's sloppy, and may have unintended results.
The command I'm speaking of is the network command that includes all networks. For OSFP it is:
network 0.0.0.0 255.255.255.255 area 0
Or for EIGRP it would be:
network 0.0.0.0 255.255.255.255
If you've never used them they basically activate the routing process on every configured interface on the entire router in one shot. It uses the same logic the quad zero default route uses (except the network command uses a wildcard mask and not a subnet mask so it's inverted).
So if one was to follow this logic to the other end of the spectrum you could enter in a command that includes none of the configured interfaces. For OSPF and EIGRP respectively you'd have:
network 0.0.0.0 0.0.0.0 area 0
network 0.0.0.0 0.0.0.0
Since these commands are going to effectively do nothing they are not really very useful. But is that really the case? No. IOS assumes you're experiencing a brain fart and changes the command after you hit enter.
Router1#sh run | s ospf
ip ospf network broadcast
Router1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#router ospf 69
Router1(config-router)#network 0.0.0.0 0.0.0.0 area 0
Router1(config-router)#end
Router1#sh run | s ospf
ip ospf network broadcast
router ospf 69
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
ip ospf network broadcast
Router1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#router ospf 69
Router1(config-router)#network 0.0.0.0 0.0.0.0 area 0
Router1(config-router)#end
Router1#sh run | s ospf
ip ospf network broadcast
router ospf 69
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
Router1#sh ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Gi0/0 69 0 172.16.0.1/24 1 DR 0/0
Router1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#router eigrp 69
Router1(config-router)#network 0.0.0.0 0.0.0.0
Router1(config-router)#end
Router1#sh run | s eigrp
router eigrp 69
network 0.0.0.0
auto-summary
Router1#sh ip eigrp interfaces
IP-EIGRP interfaces for process 69
Xmit Queue Mean Pacing Time Multicast Pending
Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes
Gi0/0 0 0/0 0 0/1 0 0
Router1#
Hi Jason
ReplyDeleteIf Im not wrong, this was the way on how to define all interfaces in the old way (0.0.0.0 0.0.0.0) at least for OSPF. Cisco did some when change it to 0.0.0.0 255.255.255.255 hence it is converting it to 0.0.0.0 255.255.255.255 nowadays.
regards
Michel
Hi Michel,
ReplyDeleteI seem to remember at one point using a subnet mask to configure OSPF and not a wildcard mask... But I've never been able to prove it. I did just go back in time on the DocCD and as far back as IOS 12.0 the configuration guides state that it is a wildcard mask. Still, you may be right and that would certainly explain the behavior.
Jason