Subject: bin/36737: routed from cli assumes `-s' but rc.d does not?
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <charlie@rubberduck.com>
List: netbsd-bugs
Date: 08/06/2007 00:40:01
	Note: There was a bad value `' for the field `Priority'.
	It was set to the default value of `medium'.

>Number:         36737
>Category:       bin
>Synopsis:       routed from cli assumes `-s' but rc.d does not?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 06 00:40:01 +0000 2007
>Originator:     Charlie Allom
>Release:        NetBSD 4.0_BETA2
>Organization:
	
>Environment:
	
	
System: NetBSD hadrian.playlouder.com 4.0_BETA2 NetBSD 4.0_BETA2 (FW $Revision: 1.2 $) #4: Mon Jul 9 22:03:42 BST 2007 root@trajan.playlouder.com:/usr/src/netbsd-4/sys/arch/i386/compile/FW i386
Architecture: i386
Machine: i386
>Description:
	
    when I invoke routed from rc.d, it starts up as if I called `-q' on the
    cli. when I start it with `-d' from the cli, `-s' is assumed (the
    default action if some things are met..

on server:
17:08 hadrian:/etc# /sbin/routed -d      
routed: wm0 (10.0.1.27/24) is duplicated by passive(10.0.1.254) (10.0.1.254/24)
routed: wm2 (193.34.28.2/23) is duplicated by remote(89.200.217.10) (89.200.217.10/23)
routed: possible netmask problem between wm4:193.34.28.8/29 and remote(89.200.217.10):193.34.28.0/23
routed: carp0 (193.34.28.1/23) is duplicated by remote(89.200.217.10) (89.200.217.10/23)
routed: carp1 (89.200.217.1/27) is duplicated by wm3 (89.200.217.2/27)
routed: possible netmask problem between carp2:193.34.29.0/24 and remote(89.200.217.10):193.34.28.0/23
routed: unreachable gateway 10.0.1.254 in /etc/gateways
routed: wm0 (10.0.1.27/24) is duplicated by passive(10.0.1.254) (10.0.1.254/24)
routed: wm2 (193.34.28.2/23) is duplicated by remote(89.200.217.10) (89.200.217.10/23)
routed: carp0 (193.34.28.1/23) is duplicated by remote(89.200.217.10) (89.200.217.10/23)
routed: carp1 (89.200.217.1/27) is duplicated by wm3 (89.200.217.2/27)

on cisco:
ug  5 16:09:24.025 GMT: RIP: received v2 update from 193.34.28.11 on FastEthern
et0/0.259
Aug  5 16:09:24.025 GMT:      10.0.0.0/24 via 0.0.0.0 in 16 hops  (inaccessible)
Aug  5 16:09:24.025 GMT:      193.34.28.8/29 via 0.0.0.0 in 16 hops  (inaccessib
le)
Aug  5 16:09:24.025 GMT:      89.200.217.0/27 via 0.0.0.0 in 16 hops  (inaccessi
ble)
Aug  5 16:09:24.025 GMT:      146.101.14.0/25 via 0.0.0.0 in 16 hops  (inaccessi
ble)
Aug  5 16:09:24.025 GMT:      193.34.29.0/24 via 0.0.0.0 in 16 hops  (inaccessib
le)
Aug  5 16:09:24.025 GMT:      193.34.28.0/24 via 0.0.0.0 in 16 hops  (inaccessib
le)

and when rc.d invoked:

17:09 hadrian:/etc# /etc/rc.d/routed start  
Starting routed.
17:09 hadrian:/etc# routed: wm0 (10.0.1.27/24) is duplicated by passive(10.0.1.254) (10.0.1.254/24)
routed: wm2 (193.34.28.2/23) is duplicated by remote(89.200.217.10) (89.200.217.10/23)
routed: possible netmask problem between wm4:193.34.28.8/29 and remote(89.200.217.10):193.34.28.0/23
routed: carp0 (193.34.28.1/23) is duplicated by remote(89.200.217.10) (89.200.217.10/23)
routed: carp1 (89.200.217.1/27) is duplicated by wm3 (89.200.217.2/27)
routed: possible netmask problem between carp2:193.34.29.0/24 and remote(89.200.217.10):193.34.28.0/23
routed: unreachable gateway 10.0.1.254 in /etc/gateways

on cisco (nothing ever gets sent to it)...

for reference from manpage:
     -s      force routed to supply routing information.  This is the default
             if multiple network interfaces are present on which RIP or Router
             Discovery have not been disabled, and if the sysctl
             net.inet.ip.forwarding=1.

     -q      is the opposite of the -s option.  This is the default when only
             one interface is present.  With this explicit option, the daemon
             is always in "quiet-mode" for RIP and does not supply routing
             information to other computers.

     -d      do not run in the background.  This option is meant for interac-
             tive use.

and my setup of course:

netstat -nr:

Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use    Mtu  Interface
default            89.200.217.10      UGS         2 22602676      -  wm3
10.0.0/24          link#2             UC          0        0      -  wm1
10.0.1/24          link#1             UC          1        0      -  wm0
10.0.1.26          00:30:48:8c:23:f9  UHLc        1     9576      -  wm0
89.200.217.0/27    link#4             UC          3        0      -  wm3
89.200.217.10      00:00:0c:07:ac:fb  UHLc        2        0      -  wm3
89.200.217.11      00:15:2b:97:f3:b1  UHLc        0      312      -  wm3
89.200.217.12      00:15:2b:97:99:c9  UHLc        0      280      -  wm3
127/8              127.0.0.1          UGRS        0        0  33192  lo0
127.0.0.1          127.0.0.1          UH          1        0  33192  lo0
146.101/16         193.34.28.9        UG          0  5585250      -  wm4
146.101.14.0/25    193.34.28.9        UG          0        0      -  wm4
193.34.28/24       89.200.217.10      UG          1 246834121      -  wm3 =>
193.34.28/23       link#3             UC         20        0      -  wm2
193.34.28.3        00:15:17:14:ec:9c  UHLc        1     8282      -  wm2
193.34.28.5        00:16:3e:55:2e:44  UHLc        0   235709      -  wm2
193.34.28.6        00:16:3e:0b:c5:44  UHLc        0    30270      -  wm2
193.34.28.8/29     link#5             UC          0        0      -  wm4
193.34.28.9        00:0d:bc:5b:bf:30  UHLc        2       12      -  wm2
193.34.28.20       00:0c:6e:d2:5e:aa  UHLc        0    92167      -  wm2
193.34.28.21       00:0f:1f:68:8a:2f  UHLc        0   682938      -  wm2
193.34.28.22       00:30:48:56:52:aa  UHLc        0   551577      -  wm2
193.34.28.23       00:30:48:56:52:a6  UHLc        0  6429148      -  wm2
193.34.28.24       00:30:48:56:52:ce  UHLc        0  5734797      -  wm2
193.34.28.25       00:30:48:8c:23:f8  UHLc        0     1232      -  wm2
193.34.28.28       00:16:3e:25:c8:25  UHLc        0     9165      -  wm2
193.34.28.29       00:16:3e:40:b9:8b  UHLc        0      853      -  wm2
193.34.28.30       00:16:3e:26:aa:cc  UHLc        0  2563614      -  wm2
193.34.28.51       00:16:3e:51:e3:53  UHLc        0    83715      -  wm2
193.34.28.101      00:30:48:56:52:aa  UHLc        0   194709      -  wm2
193.34.28.102      00:30:48:56:52:a6  UHLc        0   153533      -  wm2
193.34.28.103      00:30:48:56:52:ce  UHLc        0   147831      -  wm2
193.34.28.198      00:16:3e:12:10:82  UHLc        0    73011      -  wm2
193.34.28.199      00:16:3e:74:ee:47  UHLc        0   468148      -  wm2
193.34.28.201      00:15:c5:fc:8f:d3  UHLc        0   259075      -  wm2
193.34.29/24       link#11            UC         59        0      -  carp2
193.34.29.3        00:30:48:80:b3:da  UHLc        0   249626      -  carp2
193.34.29.4        00:30:48:83:1d:d8  UHLc        0   247393      -  carp2
193.34.29.5        00:30:48:84:5c:62  UHLc        0   250020      -  carp2
193.34.29.6        00:30:48:84:65:62  UHLc        0   249340      -  carp2
193.34.29.8        00:e0:81:32:f0:f6  UHLc        0  3825848      -  carp2
193.34.29.11       00:30:48:57:1b:58  UHLc        0   485345      -  carp2
193.34.29.12       00:30:48:59:e6:9a  UHLc        0   495326      -  carp2
193.34.29.13       00:30:48:8a:0c:c2  UHLc        0   246702      -  carp2
193.34.29.14       00:e0:81:46:3e:96  UHLc        0   244388      -  carp2
193.34.29.15       00:e0:81:44:ea:ac  UHLc        0   248078      -  carp2
193.34.29.17       00:e0:81:46:3e:9a  UHLc        0   250346      -  carp2
193.34.29.18       00:30:48:31:65:96  UHLc        0   247278      -  carp2
193.34.29.19       00:e0:81:44:ea:aa  UHLc        0   245378      -  carp2
193.34.29.23       00:e0:81:46:60:85  UHLc        0   247744      -  carp2
193.34.29.24       00:e0:81:45:87:02  UHLc        0   253545      -  carp2
193.34.29.25       00:e0:81:45:87:00  UHLc        0   245135      -  carp2
193.34.29.26       00:e0:81:45:5b:88  UHLc        0   246589      -  carp2
193.34.29.27       00:30:48:80:b5:ea  UHLc        0   244533      -  carp2
193.34.29.29       00:30:48:8b:df:40  UHLc        0   246547      -  carp2
193.34.29.30       00:e0:81:46:3a:64  UHLc        0   245690      -  carp2
193.34.29.32       00:e0:81:46:0d:cc  UHLc        0   246156      -  carp2
193.34.29.33       00:0c:29:73:07:cf  UHLc        0     2945      -  carp2
193.34.29.34       00:30:48:8d:a1:52  UHLc        0   246771      -  carp2
193.34.29.35       00:0c:29:75:3d:3c  UHLc        0     2950      -  carp2
193.34.29.36       00:0c:29:9a:34:48  UHLc        0     3036      -  carp2
193.34.29.37       00:30:48:8a:0f:db  UHLc        0   244826      -  carp2
193.34.29.38       00:e0:81:49:84:a8  UHLc        0   244757      -  carp2
193.34.29.39       00:e0:81:47:04:24  UHLc        0   244098      -  carp2
193.34.29.40       00:0c:29:8a:34:02  UHLc        0        1      -  carp2
193.34.29.41       00:0c:29:83:0c:03  UHLc        0     2986      -  carp2
193.34.29.42       00:0c:29:31:ac:14  UHLc        0     2967      -  carp2
193.34.29.43       00:0c:29:a9:d4:d1  UHLc        0     2994      -  carp2
193.34.29.44       00:0c:29:ac:00:00  UHLc        0    10228      -  carp2
193.34.29.45       00:0c:29:7b:af:13  UHLc        0   928627      -  carp2
193.34.29.47       00:0c:29:be:d8:49  UHLc        0  1012928      -  carp2
193.34.29.48       00:50:56:00:c1:12  UHLc        0   805642      -  carp2
193.34.29.49       00:50:56:00:c1:13  UHLc        0  1291341      -  carp2
193.34.29.50       00:50:56:00:c1:22  UHLc        0     8193      -  carp2
193.34.29.51       00:50:56:00:c1:26  UHLc        0  1010261      -  carp2
193.34.29.52       00:50:56:00:c1:27  UHLc        0   714655      -  carp2
193.34.29.53       00:50:56:00:c1:17  UHLc        0   253628      -  carp2
193.34.29.54       00:50:56:00:c1:18  UHLc        0    11272      -  carp2
193.34.29.55       00:50:56:00:c1:17  UHLc        0     7616      -  carp2
193.34.29.56       00:50:56:00:c1:1a  UHLc        0     9730      -  carp2
193.34.29.57       00:50:56:00:c1:19  UHLc        0     9810      -  carp2
193.34.29.59       00:50:56:00:c1:1d  UHLc        0   942900      -  carp2
193.34.29.66       00:30:48:8c:88:24  UHLc        0    37011      -  carp2
193.34.29.67       00:30:48:8c:88:26  UHLc        0     1003      -  carp2
193.34.29.68       00:30:48:58:27:b6  UHLc        0        2      -  carp2
193.34.29.121      00:14:6c:c5:0b:f0  UHLc        0     2622      -  carp2
193.34.29.122      00:18:4d:6d:50:a5  UHLc        0     1461      -  carp2
193.34.29.123      00:18:4d:6d:50:c5  UHLc        0     2618      -  carp2
193.34.29.124      00:c0:b7:2e:84:30  UHLc        0        1      -  carp2
193.34.29.125      00:c0:b7:2e:81:cd  UHLc        0        2      -  carp2
193.34.29.200      00:15:c5:f1:7c:b7  UHLc        0   145479      -  carp2
193.34.29.202      00:15:c5:f1:7c:b7  UHLc        0     2264      -  carp2
193.34.29.203      00:15:c5:f1:7e:9c  UHLc        0     1357      -  carp2
193.34.29.204      00:15:c5:f1:80:e0  UHLc        0    15754      -  carp2
193.34.29.205      00:15:c5:f1:80:45  UHLc        0     8584      -  carp2

Protocol Family 7:
Destination        Gateway            Flags    Refs      Use    Mtu  Interface

Internet6:
Destination                        Gateway                        Flags    Refs      Use    Mtu  Interface
::/104                             ::1                            UGRS        0        0      -  lo0 =>
::/96                              ::1                            UGRS        0        0      -  lo0
::1                                ::1                            UH         12        0  33192  lo0
::127.0.0.0/104                    ::1                            UGRS        0        0      -  lo0
::224.0.0.0/100                    ::1                            UGRS        0        0      -  lo0
::255.0.0.0/104                    ::1                            UGRS        0        0      -  lo0
::ffff:0.0.0.0/96                  ::1                            UGRS        0        0      -  lo0
2001:db8::/32                      ::1                            UGRS        0        0      -  lo0
2002::/24                          ::1                            UGRS        0        0      -  lo0
2002:7f00::/24                     ::1                            UGRS        0        0      -  lo0
2002:e000::/20                     ::1                            UGRS        0        0      -  lo0
2002:ff00::/24                     ::1                            UGRS        0        0      -  lo0
fe80::/10                          ::1                            UGRS        0        0      -  lo0
fe80::%wm0/64                      link#1             UC          0        0      -  wm0
fe80::230:48ff:fe33:52d0%wm0       00:30:48:33:52:d0  UHL         0        0      -  lo0
fe80::%wm1/64                      link#2             UC          0        0      -  wm1
fe80::230:48ff:fe33:52d1%wm1       00:30:48:33:52:d1  UHL         0        0      -  lo0
fe80::%wm2/64                      link#3             UC          0        0      -  wm2
fe80::215:17ff:fe14:ee18%wm2       00:15:17:14:ee:18  UHL         0        0      -  lo0
fe80::%wm3/64                      link#4             UC          0        0      -  wm3
fe80::215:17ff:fe14:ee19%wm3       00:15:17:14:ee:19  UHL         0        0      -  lo0
fe80::%wm4/64                      link#5             UC          0        0      -  wm4
fe80::215:17ff:fe14:ee1a%wm4       00:15:17:14:ee:1a  UHL         0        0      -  lo0
fe80::%lo0/64                      fe80::1%lo0                    U           0        0      -  lo0
fe80::1%lo0                        link#7             UHL         0        0      -  lo0
ff01:1::/32                        link#1             UC          0        0      -  wm0
ff01:2::/32                        link#2             UC          0        0      -  wm1
ff01:3::/32                        link#3             UC          0        0      -  wm2
ff01:4::/32                        link#4             UC          0        0      -  wm3
ff01:5::/32                        link#5             UC          0        0      -  wm4
ff01:7::/32                        ::1                            UC          0        0      -  lo0
ff02::%wm0/32                      link#1             UC          0        0      -  wm0
ff02::%wm1/32                      link#2             UC          0        0      -  wm1
ff02::%wm2/32                      link#3             UC          0        0      -  wm2
ff02::%wm3/32                      link#4             UC          0        0      -  wm3
ff02::%wm4/32                      link#5             UC          0        0      -  wm4
ff02::%lo0/32                      ::1                            UC          0        0      -  lo0

    
>How-To-Repeat:
	

----8<----8<---- /etc/gateways
#     net Nname[/mask] gateway Gname metric value <passive | active | extern>
net 10.0.1.0/24 gateway 10.0.1.254 metric 1 passive
net 146.101.14.0/25 gateway 193.34.28.9 metric 1 active
net 193.34.28.0/23 gateway 89.200.217.10 metric 1 active
ripv2
rdisc_interval=45
----8<----8<---- /etc/gateways

/sbin/routed -d
*changes propogate*

/etc/rc.d/routed start
*doesnt annouce anything*
>Fix:
	

>Unformatted: