Technical article 110909

'routed' adds duplicate entries into the routing table for a subnetted class C netmask.

OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

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:cd
net0: 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:26
lo0:  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: 1
atl0: 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: 1

where 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     net1
where 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.conf

2. To start the gated daemon manually, type the following at the command line prompt:

/etc/gated

Shutting down the system will restart the gated daemon.

See also

Manual pages: routed(ADMN), gated(ADMN), netstat(TC)

From the Xinuos technical article database, record 110909. Reproduced with permission. The original is at www.sco.com/ta/110909, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.