background image
376 Chapter 6: Routing
The router matches interfaces with the network command by asking this simple question:
Which of my interfaces have IP addresses in the same network number referenced in this
network subcommand?
For any interfaces that have IP addresses in the same network number referenced in this
network subcommand, routing updates are broadcast and listened for, and the connected
subnet is advertised. For instance, in the first of the two highlighted network commands of
Example 6-1, network 10.0.0.0 is configured. Interfaces Ethernet0 and tokenring 0 will be
matched. A single network command probably will match more than one interface because the
parameter to the network command is always a Class A, B, or C network number, not a subnet
number or IP address. Furthermore, most routers will be attached to multiple subnets of that
same Class A, B, or C network. In many smaller networks, subnets of only a single network are
used, so a single network command could match all interfaces.
In Example 6-1, RIP broadcasts are sent out serial 0, ethernet 0, and tokenring 0. Likewise, RIP
updates entering those three interfaces alone are processed. Finally, each RIP update created by
this router advertises only directly connected subnets 10.1.2.0, 199.1.1.0, and 10.1.3.0, in
addition to any routes learned from other routers using RIP.
A common oversight is to forget to configure a network command to match interfaces serial 1
and ethernet 1. Seemingly, if no other routers are attached to that same Ethernet interface, then
there is no need to broadcast RIP/IGRP or listen for RIP/IGRP on the interface. However, three
functions are enabled by matching an interface with the network command, as discussed
earlier. With the current configuration in Example 6-1, because no network command matches
the ethernet 1 and serial 1 interfaces, none of the RIP/IGRP updates from this router will
advertise about subnet 172.16.1.0 or network 199.1.2.0.
Example 6-1
Sample Router Configuration with RIP Partially Enabled
interface ethernet 0
ip address 10.1.2.3 255.255.255.0
interface ethernet 1
ip address 172.16.1.1 255.255.255.0
interface tokenring 0
ip address 10.1.3.3 255.255.255.0
interface serial 0
ip address 199.1.1.1 255.255.255.0
interface serial 1
ip address 199.1.2.1 255.255.255.0
!
router rip
network 10.0.0.0
network 199.1.1.0
ch06.fm Page 376 Monday, March 20, 2000 5:11 PM