LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2012, 02:51 PM   #1
nops
LQ Newbie
 
Registered: Feb 2012
Distribution: OpenBSD, Arch, Mint
Posts: 4

Rep: Reputation: Disabled
Unable to contact gateway


I'm running Mint x86_64 in VirtualBox. I installed a few Python libraries for a project I'm starting, when my networking broke. I rebooted the machine and was unable to ping anywhere but localhost. I've even tried manually setting a static IP to no avail.

I checked my routes and noticed the 169.254.0.0 route in place; after some research, it looks like a fallback local network if DHCP can't be reached. Could that be an issue? Here's some relevant information:

Code:
user@VirtualBox ~ $ ifconfig
eth1      Link encap:Ethernet  HWaddr aa:00:04:00:0a:04  
          inet addr:192.168.1.78  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a800:4ff:fe00:a04/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:905 errors:0 dropped:0 overruns:0 frame:0
          TX packets:906 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:126863 (126.8 KB)  TX bytes:63928 (63.9 KB)

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:124 errors:0 dropped:0 overruns:0 frame:0
          TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:12518 (12.5 KB)  TX bytes:12518 (12.5 KB)
Code:
user@VirtualBox ~ $ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp
Code:
user@VirtualBox ~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth1
0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 eth1
Code:
user@VirtualBox ~ $ ip addr 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether aa:00:04:00:0a:04 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.78/24 brd 192.168.1.255 scope global eth1
    inet6 fe80::a800:4ff:fe00:a04/64 scope link 
       valid_lft forever preferred_lft forever
    dnet 1.10/16 scope global eth1
Code:
user@VirtualBox ~ $ ping -c 1 localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.027 ms

--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.027/0.027/0.027/0.000 ms

user@VirtualBox ~ $ ping -c 1 -W 1 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.

--- 192.168.1.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
Code:
user@VirtualBox ~ # dmesg | grep "eth1"
[   13.422927] <30>udev[399]: renamed network interface eth0 to eth1
[   13.712916] e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   13.718393] ADDRCONF(NETDEV_UP): eth1: link is not ready
[   13.719113] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   24.174060] eth1: no IPv6 routers present
I know that it's not my local network because my other VM's and systems work fine, and I don't have any static IPs setup on my gateway either. tcpdump shows a very low amount of i/o network traffic, most of it ipv6 or ARP requests (which it's not responding to). It might also be worth noting that prior to this incident my interface was eth0, but changed to eth1.

Any help on this is appreciated.
 
Old 02-19-2012, 03:11 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi nops,

Welcome to LQ!!!

I am also running Ubuntu under VM and it works great with a bridged connection. Looking at your config file here are the changes that you can make.

Edit /etc/network/interfaces and comment out the lines as follows (I do not have eth entry even in this file using NetworkManager instead):

Code:
auto lo
iface lo inet loopback

#auto eth1
#iface eth1 inet dhcp
Save the file and exit.

Now, navigate to System --> Preferences --> Network Connections.

In Network Connections under wired tab you will find your ethernet card listed. Click on Edit. Make sure "Automatically Connect" checkbox is ticked. Next, navigate to IPv4 tab and see it is set to DHCP and at the bottom available to all users is ticked. If you are not using IPv6 (which I don't think you are) then under IPv6 tab select Ignore under method. Click on apply and reboot the system. See if that resolves your issue.

Make sure that you take a backup of /etc/network/interfaces before editing. Just incase we need that later
 
1 members found this post helpful.
Old 02-19-2012, 03:51 PM   #3
nops
LQ Newbie
 
Registered: Feb 2012
Distribution: OpenBSD, Arch, Mint
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hey T3RM1NVT0R, thanks for the response.


Strangely I had all the settings already configured that you'd suggested. I commented out the eth1 lines in interfaces and rebooted. I took down my interfaces, and saw this:

Code:
user@VirtualBox ~ # /etc/init.d/networking restart
 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
 * Reconfiguring network interfaces...    Ignoring unknown interface eth0=eth0.
                                                                                        [ OK ]
I went to open up my connections tab again, and eth0 automatically reconnected, and I was finally able to connect and successfully ping. I'm not sure what was causing the strange clash, but it seems to be fixed now!

Thanks for the help!


[edit]: It looks as though eth0 disappeared again after reboot. /etc/init.d/networking restart and ifconfig eth0 up won't bring the interface up. Any other suggestions?

[edit]: further reboot and it's back. There's definitely a clashing of interfaces somewhere; rebooting alternates whether it comes up or not. Sometimes it's eth1, sometimes it's eth0.

[edit 3]: Here's the connection information of my current connection (which does not work):

http://i.imgur.com/Cy3rP.jpg
I should also mention that, yes, the e1000 module is being loaded.
Code:
user@VirtualBox ~ # lsmod | grep e1000
e1000                 111862  0

Last edited by nops; 02-19-2012 at 04:19 PM.
 
Old 02-19-2012, 05:49 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Alright.

I would suggest you to either use files or NetworkManager to manage the network. Check the following location for any traces of eth1:

Code:
/etc/NetworkManager/system-connections
If you find anything related to eth0 and eth1 then rename the eth1 file and keep eth0 file. Make sure you either reboot the system or restart the network using NetworkManager.

Last edited by T3RM1NVT0R; 02-19-2012 at 05:51 PM.
 
Old 02-19-2012, 07:56 PM   #5
nops
LQ Newbie
 
Registered: Feb 2012
Distribution: OpenBSD, Arch, Mint
Posts: 4

Original Poster
Rep: Reputation: Disabled
T3RM1NVT0R:

There was two eth0 files in there; an Auto eth0 and an eth0. I removed the Auto eth0 and rebooted. eth1 came up (even though I can't find eth1 anywhere...). I took it down, then NetworkManager brought up eth0 and now I'm connected. BUT - ifconfig shows that it's actually eth1 up! Is there somewhere else that eth1 could be set?

If I try and bring up eth0 (ifconfig eth0 up) it tells me that no device exists.

[edit]: Nothing a reboot can't fix. eth1 no longer shows up, but eth0 shows the same symptoms. /etc/init.d/networking restart gives me the 'Ignoring unknown interface eth0=eth0"

[edit]: Spoke too soon! eth1 is back. There has to be something else conflicting with my drivers.

Last edited by nops; 02-19-2012 at 08:06 PM.
 
Old 02-20-2012, 02:37 AM   #6
omgs
Member
 
Registered: Dec 2010
Posts: 64

Rep: Reputation: 6
Check in /etc/udev.d/rules/70-persistent-net.rules there is a line with the corresponding mac and that is pointing to the right ethX. If you change the file and need to check it, you have to stop the network and rmmod the module and load it again, or reboot.
 
Old 02-20-2012, 06:14 PM   #7
nops
LQ Newbie
 
Registered: Feb 2012
Distribution: OpenBSD, Arch, Mint
Posts: 4

Original Poster
Rep: Reputation: Disabled
omgs:

There was in fact an entry for eth1 in there; I removed it, rmmod'd and rebooted, and the entry was brought back. I don't have a 75-persistent-net-generator.rules anywhere on my machine (find / -iname "75-persistent-net-generator.rules"). What else could be generating that entry?

I seem to be getting 2 different IP addresses depending on which interface is brought up, where one works and the other doesn't.

Code:
user@user ~ $ cat /etc/udev/rules.d/70-persistent-net.rules 
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:34:d6:95", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:32:c7:2a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Last edited by nops; 02-20-2012 at 06:15 PM.
 
Old 02-21-2012, 04:49 PM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Here is what you can do:

Code:
sudo vi /etc/udev/rules.d/70-persistent-net.rules
and then comment out the ethernet which does not work for you. For example if eth1 does not work for you then edit it as follows:
Code:
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:34:d6:95", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


# PCI device 0x8086:0x100e (e1000)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:32:c7:2a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
Reboot the system and see if you get the correct configuration.

It will be good if you make a backup of this file before editing just in case you need it later for your reference / safety if something goes wrong.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error unable to contact time server treborblack Fedora 4 02-13-2010 05:26 AM
samba unable to contact ldap server vishesh Linux - Server 3 10-26-2009 09:25 AM
PHP apps unable to contact non-local database? jnojr Linux - Server 4 07-13-2009 06:06 PM
Cannot contact external hosts, route resets after setting gateway pyrosim Linux - Networking 13 06-27-2006 01:34 AM
hplip - Exception: 96 (Unable to contact service) deleted/ Linux - Newbie 2 01-17-2006 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration