ifconfig alias creates bogus route

Bug #909190 reported by David Favor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
net-tools (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Routes begin looking like this:

root@net2:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 96.31.77.1 0.0.0.0 UG 100 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1

root@net2:~# ifconfig eth0:1 96.31.77.160 up

New ip can be pinged, but other off machine pings fail because
of munged routing, which now looks like this:

Destination Gateway Genmask Flags Metric Ref Use Iface
default 96.31.77.1 0.0.0.0 UG 100 0 0 eth0
96.0.0.0 * 255.0.0.0 U 0 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1

Problem is fixed by this:

root@net2:~# route del -net 96.0.0.0 netmask 255.0.0.0 dev eth0
root@net2:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 96.31.77.1 0.0.0.0 UG 100 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1

Questions include:

1) Where's this bogus route coming from?

2) How to issue ifconfig and suppress route creation?

/etc/network/interfaces contains:

# The primary network interface
auto eth0
iface eth0 inet static
        address 96.31.77.159
        netmask 255.255.255.0
        network 96.31.77.0
        broadcast 96.31.77.255
        gateway 96.31.77.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 66.96.80.43
        dns-search davidfavor.com

auto eth0:1
iface eth0:1 inet static
        address 96.31.77.160
        netmask 255.255.255.0

Revision history for this message
David Favor (davidfavor) wrote :

Hum... Using inotifywait on /etc and /run shows no file access.

So another question also:

3) From where does ifconfig get it's interface configuration information?

Revision history for this message
Andreas Henriksson (andreas-fatal) wrote :

Why are you filing a bug against iproute when you're clearly not using it?

Could you please explain to me how you expected ifconfig to work? (because what you demonstrated here is exactly what I expected and how it's been behaving since before CIDR was invented)...
If you expect networking tools that behaves more sanely and up to date with todays networking standard I'd suggest you to stop using net-tools which has been deprecated for about ten years and use iproute instead!

affects: iproute (Ubuntu) → net-tools (Ubuntu)
Changed in net-tools (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.