Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   Baffling network (http://www.linux-archive.org/ubuntu-user/637918-baffling-network.html)

"Kevin O'Gorman" 02-27-2012 01:11 AM

Baffling network
 
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? 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
- /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
- 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.
Interfaces eth1 and eth2 do not appear at all. Note how radically
this differs from the reports below.

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
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)
Interrupt:77 Base address:0x4000

eth3 Link encap:Ethernet HWaddr 00:50:ba:5e:d1:1c
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!!!


--
Kevin O'Gorman, PhD

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Marius Gedminas 02-27-2012 09:48 AM

Baffling network
 
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
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

"compdoc" 02-27-2012 02:04 PM

Baffling network
 
If you were to look at the file: /etc/udev/rules.d/70-persistent-net.rules
you might find that the list of adaptors in the file is messed up. It's a
problem I've seen several times when I add or remove adaptors a few times.

All you need to do is delete the list of nics from this file and reboot, and
Ubuntu will recreate the list. Of course, afterwards, you should have eth0
and eth1 back, so you might need to tweak your network settings in
/etc/network/interfaces if you use static settings.




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

"Kevin O'Gorman" 02-27-2012 07:51 PM

Baffling network
 
On Mon, Feb 27, 2012 at 7:04 AM, compdoc <compdoc@hotrodpc.com> wrote:
> If you were to look at the file: * /etc/udev/rules.d/70-persistent-net.rules
> you might find that the list of adaptors in the file is messed up. It's a
> problem I've seen several times when I add or remove adaptors a few times.
>
> All you need to do is delete the list of nics from this file and reboot, and
> Ubuntu will recreate the list. Of course, afterwards, you should have eth0
> and eth1 back, so you might need to tweak your network settings in
> /etc/network/interfaces * * if you use static settings.

Thanks for replies. This is helpful. To answer some questions
-- yes, I have two interfaces, one onboard. Onboard is connected to
my wireless router, which is connected to the cable modem. The other
is directly connected to DSL.

-- Looking at the kernel logs, I see that the kernel renames eth0 and
eth1. Apparently incompletely. I'll try removing the file mentioned
in replies and see if this clears up.

I probably won't pursue this thread any more. Just after posting the
question, I disconnected DSL and reconfigured "Network Connections"
for the cable modem, and the system is working with the internet okay.
I'm gonna ditch the 10/100 daughter card and go with onboard gigabit
e-net, dropping the DSL, landline and all. Bye-bye ATT and a big
phone bill.

I'm now just getting my router to work with dynamic DNS, so I can have
incoming connections to apache. It appears my router has builtin
support for dyndns.org (and no other) so I'll have to pay for it. I
have to have a router because there are other machines in this
connection, and the host with apache is not always available to do
that job. I'll be asking about this in a separate thread.

Once again, thanks for the replies.

--
Kevin O'Gorman, PhD

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 08:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.