Baffling network

Marius Gedminas marius at pov.lt
Mon Feb 27 10:48:39 UTC 2012


On Sun, Feb 26, 2012 at 06:11:01PM -0800, Kevin O'Gorman wrote:
> I tried to ask this before, got no answer, and got busy on other
> things; now I'm trying again.  So this time, I'd appreciate even
> pointers to another place where it might be better to ask this.
> 
> My question first: how do I turn off the system's normal network
> management and use ifconfig and route directly?

"Normal network management" in Ubuntu consists of two parts: Debian's
standard /etc/network/interfaces and (on desktops) network-manager.

If network-manager is installed, read this file to see how to make it ignore
your network interface: /usr/share/doc/network-manager/README.Debian

As for /etc/network/interfaces -- comment out the configuration you
don't want.  Just leave loopback configuration in place; a Linux system
is Not Happy when it doesn't have loopback.

> The rest of this
> email is intended to show why I want to do that, and boils down to the
> fact that the current situation is inconsistent and incomprehensible,
> and I'm about to change some stuff and want to be able to tell what's
> going on.
> 
> I'm running 11.04, fully updated, and pretty much nothing else except
> some GDB database programs I wrote in python.  Part of this is
> connected to my web server.
> 
> I'm trying to switch from DSL with static IPs to cable with DHCP.
> I took a look, and don't even understand how the current setup is
> working at all;
>   - /sbin/route and /sbin/ifconfig show two working interfaces with
> the same IP number.  One is connected to my DHCP router on cable.
>   - the one "Network Connections" says is carrying traffic (eth0) is
> not listed in the output of /sbin/ifconfig or /sbin/route

Do an ifconfig -a to see them all.

>   - /sbin/ifconfig traffic counts show traffic on both interfaces,
> with the same IP numbers and different MAC addresses.
>   - one of the connections I *did* configure is not actually running,
> if you believe ifconfig.
>   - attempts to override this with /sbin/route and /sbin/ifconfig get
> reverted to this crazy setup in a few minutes

DSL sometimes uses PPPoE.  Is pppd running?  Maybe it is reconfiguring
something periodically?  But then I'd expect to see a network interface
named ppp0...

>   - I have no idea why these inconsistencies occur.
> 
> Running system->Preferences->Network Connections
> shows two wired interfaces (and no other kind), eth0 and eth3.  It
> says eth0 is being used now, and eth3 was last used 14 days ago.

Maybe it's confused about the names?

> Interfaces eth1 and eth2 do not appear at all.

So far there's no indication that you even have an eth1.

Ubuntu tries hard to keep the same ethX name for the same network card
(identified by its MAC address).  It maintains a list of all seen
network cards in a file (/etc/udev/rules.d/70-persistent-net.rules).  If
you replace network cards (or, e.g. move the hard disk into a different
PC) you usually end up without eth0/eth1, because those names are now
reserved for hardware addresses you no longer have.

> Note how radically
> this differs from the reports below.

Trust ifconfig and route, if in doubt.

> All of this is constant; it does not change on reboot.
> 
> ============================================================
> The output of /sbin/route
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 64.166.164.48   *               255.255.255.248 U     1      0        0 eth2
> 64.166.164.48   *               255.255.255.248 U     1      0        0 eth3
> link-local      *               255.255.0.0     U     1000   0        0 eth3
> default         router          0.0.0.0         UG    0      0        0 eth3
> 
> 
> ============================================================
> The output of /sbin/ifconfig follows.  Note identical IPV4
> settings.for two different HWaddrs
> eth2      Link encap:Ethernet  HWaddr 8c:89:a5:31:4f:bd

(8c:89:a5 is the vendor prefix for MicroStar, which is a motherboard
vendor AFAIR)

>           inet addr:64.166.164.49  Bcast:64.166.164.55  Mask:255.255.255.248
>           inet6 addr: fe80::8e89:a5ff:fe31:4fbd/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:415453 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:224185 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:28762157 (28.7 MB)  TX bytes:9491096 (9.4 MB)

Note how little traffic there is on eth2, compared to eth3.

>           Interrupt:77 Base address:0x4000
> 
> eth3      Link encap:Ethernet  HWaddr 00:50:ba:5e:d1:1c

(00:50:ba is D-Link)

>           inet addr:64.166.164.49  Bcast:64.166.164.55  Mask:255.255.255.248
>           inet6 addr: fe80::250:baff:fe5e:d11c/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:758687 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:531099 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:406463015 (406.4 MB)  TX bytes:137469860 (137.4 MB)
>           Interrupt:21 Base address:0xd000
> 
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:78201 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:78201 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:17244199 (17.2 MB)  TX bytes:17244199 (17.2 MB)
> 
> 
> HELP!!!

So far it looks as if you've two network cards (one integrated, one
discrete), both configured the same way (static IP), and one of them is
being actively used while the other one is not.

Are they both connected to the same router/switch?

Marius Gedminas
-- 
A secret: don't tell DARPA I'm not building the sun destroying weapon they
think I am.
        -- Michael Salib, the author of Starkiller
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20120227/afd06d62/attachment.sig>


More information about the ubuntu-users mailing list