Re: Duplicate routes

Keith Owens (kaos@ocs.com.au)
Fri, 19 Feb 1999 22:11:33 +1200


On Fri, 19 Feb 1999 10:09:02 -0000 (GMT),
Simon Kenyon <simon@koala.ie> wrote:
>why are these routes being created automatically
>can they not be created manually?
>is this automatic creation considered a feature (a good? feature)
>what is the rationale?

They are *not* duplicate routes, even though they look like it.
Compare the output below from route -n and iproute list. The entries
marked (*) and (+) appear to be duplicates in route -n but iproute
shows much more detail, they are really different entries. The problem
is that route does not report the full kernel details, time to move
away from route and ifconfig to iproute and ipaddr. BTW, if I try

iproute add 230.43.79.0/24 dev eth0 proto kernel scope link src 230.43.79.2

it says "RTNETLINK error: File exists" so you cannot create true
duplicates.

Automatic creation of routes is something you can argue about, it comes
down to personal preference in the end. I would argue that automatic
creation with sensible defaults is better for beginners and desktops.

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
133.32.99.2 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
230.43.79.3 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1
* 239.1.49.65 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1
* 239.1.49.65 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1
+ 230.43.79.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
+ 230.43.79.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
133.32.0.0 133.32.99.2 255.255.0.0 UG 0 0 0 ppp0
192.168.0.0 230.43.79.9 255.255.0.0 UG 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 239.1.49.65 0.0.0.0 UG 0 0 0 ppp1

iproute list
133.32.99.2 dev ppp0 proto kernel scope link src 133.32.99.101
230.43.79.3 dev ppp1 scope link
* 239.1.49.65 dev ppp1 scope link
* 239.1.49.65 dev ppp1 proto kernel scope link src 230.43.79.3
+ 230.43.79.0/24 dev eth0 scope link
+ 230.43.79.0/24 dev eth0 proto kernel scope link src 230.43.79.2
133.32.0.0/16 via 133.32.99.2 dev ppp0
192.168.0.0/16 via 230.43.79.9 dev eth0
127.0.0.0/8 dev lo scope link
default via 239.1.49.65 dev ppp1

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/