Problem
A network card with a subnetted class C netmask ends up with duplicate routes in the routing table. The first route is created by ifconfig during the initialization of the network card. The second route is being added by the routed daemon using an incorrect netmask of 255.255.255.0.
During the configuration of the Network Interface Card (nic) 'ifconfig' adds the following netmasks in the routing table.
#ifconfig -a
net1: flags=4043<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
net 132.147.132.22 netmask ffffff00 broadcast 132.147.132.255
perf. params: recv size: 24576; send size: 24576; full-size frames: 1
ether 00:a0:c9:0c:41:cdnet0: flags=4043<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask ffffffe0 broadcast 192.168.1.255
perf. params: recv size: 4096; send size: 8192; full-size frames: 1
ether 00:60:97:2d:9b:26lo0: flags=4049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
inet 127.0.0.1 netmask ff000000
perf. params: recv size: 57344; send size: 57344; full-size frames: 1atl0: flags=404a<BROADCAST,LOOPBACK,RUNNING,MULTICAST> mtu 8232
inet 0.0.0.0 netmask ff000000
perf. params: recv size: 4096; send size: 8192; full-size frames: 1where net0 has a subnetted class C netmask of 255.255.255.224 (ffffffe0) and net1 has a subnetted class C netmask of 255.255.255.0 (ffffff00).
In the routing table, this is presented as follows:
#netstat -rn
Routing tables
Destination Gateway Flags Refs Use Interface
default 132.147.132.1 UGS 2 93 net1
127.0.0.1 127.0.0.1 UH 3 2 lo0
132.147.132 132.147.132.22 UC 1 0 net1
132.147.132.22 127.0.0.1 UGHS 4 63 lo0
-> 192.168.1 192.168.1.2 UC 1 0 net0
-> 192.168.1 192.168.1.2 UC 0 0 net0
192.168.1.2 127.0.0.1 UGHS 0 1 lo0
224 132.147.132.22 UCS 0 0 net1where 192.168.1.2 has a netmask of 255.255.255.224 (added by
ifconfig) and 192.168.1.2 has a netmask of 255.255.255.0 (added
incorrectly by routed).This can also be determined by using the command 'netstat -rAn'.
#netstat -rAn
Routing tables
Address Destination Gateway Flags Refs Use Interface
Netmasks:
f0886f8c (root node)
f0886700 default
f0886880 240
f0886c00 255
f0886c80 255.255
f0886900 255.255.255
f0886a00 255.255.255.224
f0886fc4 (root node)
...... (stuff deleted)......
f0ef6a1c (56) f0957e1c : f0ef6a00 mk = f0954df0 {(56), 255.255.255 }
f0957e1c (62) f0813200 : f0957e00 mk = f0954010
{(59),255.255.255.224}
-> f0813200 192.168.1 192.168.1.2 UCP 1 net0 =>
mask 255.255.255.224 mk = f0954010 {(59), 255.255.255.224 }
-> f0ef6b00 192.168.1 192.168.1.2 UCP 0 0 net0
mask 255.255.255 mk = f0954df0 {(56), 255.255.255 }
f0957e00 192.168.1.2 127.0.0.1 UGHSP 0 1 lo0
f0ef6a00 192.168.1.255 (incomplete) UHL 1 0 net0
f0ef1c00 198.175.99 132.147.132.1 UGP 0 0 net1
mask 255.255.255
f0957f1c (35) f0957f00 : f0886044
f0957f00 224 132.147.132.22 UCSP 0 0 net1
mask 240
f0886044 (root node) Solution
This problem has been reported to SCO Engineering.
The workaround is to use gated daemon instead of routed. To enable gated, do the following:
1. cp /etc/gated.rip /etc/gated.conf2. To start the gated daemon manually, type the following at the command line prompt:
/etc/gatedShutting down the system will restart the gated daemon.
See also
Manual pages: routed(ADMN), gated(ADMN), netstat(TC)