2

I have 2 computers running Ubuntu 12.04 connected to a router on the 192.168.3 subnet. This router is connected to another router via the first router's modem port, so the 192.168.3 router has access to the 192.168.2 subnet. The .2 router is connected to the internet. I will call the 2 computers A and B. Computer A can ping itself, computer B, the .3 and .2 routers, and www.google.com. Computer B can ping itself, computer A, the .3 and .2 routers, but CAN NOT ping www.google.com. I essentially have no internet on computer B.

~$ ping www.google.com
ping: unknown host www.google.com

Output from ifconfig: Computer A

eth0      Link encap:Ethernet  HWaddr 00:05:b7:dd:87:63  
      inet addr:192.168.3.135  Bcast:192.168.3.255  Mask:255.255.255.0
      inet6 addr: fe80::205:b7ff:fedd:8763/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:3940 errors:0 dropped:0 overruns:0 frame:0
      TX packets:2216 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:3365434 (3.3 MB)  TX bytes:262362 (262.3 KB)
      Interrupt:20 Memory:f7c00000-f7c20000 

eth1      Link encap:Ethernet  HWaddr 00:05:b7:dd:87:64  
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
      Interrupt:17 Memory:f7940000-f7960000 

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:426 errors:0 dropped:0 overruns:0 frame:0
      TX packets:426 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:35063 (35.0 KB)  TX bytes:35063 (35.0 KB)

Output from ifconfig: Computer B

eth0      Link encap:Ethernet  HWaddr 00:05:b7:dd:87:43  
      inet addr:192.168.3.136  Bcast:192.168.3.255  Mask:255.255.255.0
      inet6 addr: fe80::205:b7ff:fedd:8743/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:737 errors:0 dropped:0 overruns:0 frame:0
      TX packets:551 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:73299 (73.2 KB)  TX bytes:97661 (97.6 KB)
      Interrupt:20 Memory:f7e00000-f7e20000 

eth1      Link encap:Ethernet  HWaddr 00:05:b7:dd:87:44  
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
      Interrupt:17 Memory:f7d40000-f7d60000 

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:65536  Metric:1
      RX packets:336 errors:0 dropped:0 overruns:0 frame:0
      TX packets:336 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:20796 (20.7 KB)  TX bytes:20796 (20.7 KB)

Output from route: Computer A

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.3.1     0.0.0.0         UG    0      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
192.168.3.0     *               255.255.255.0   U     1      0        0 eth0

Output from route: Computer B

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.3.1     0.0.0.0         UG    0      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
192.168.3.0     *               255.255.255.0   U     1      0        0 eth0

The only difference I can find is in the resolv.conf file

Resolv.conf for Computer A

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search ampedwireless

ampedwireless is the domain name for the DHCP server on the .2 router.

Resolv.conf for Computer B

# Generated by NetworkManager
nameserver 127.0.0.1

I believe computer B's resolv.conf used to b an exact copy of computer A's EXCEPT for the last line (search ampedwireless), but I tried to apply someone's recommended fix as follows:

sudo apt-get remove --purge resolvconf
sudo /etc/init.d/networking restart

and this fix I believe removed the comment, but not my problem. When I try to manually add "search ampedwireless" to computer B's resolv.conf, it gets overwritten.

I've tried to search google, but unfortunately everything I've seen has a slightly different problem and the fix doesn't help. I think trying to follow that one page's advice has actually set me backwards by removing resolvconf, which I can no longer install because I don't have internet access. Please let me know if any additional information will help. Thanks in advance.

Edit to add info requested by Mark: nm-tool on Computer A

~$ nm-tool

** (process:3218): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: Rejected send message, 2 matched rules; type="method_call", sender=":1.45" (uid=1000 pid=3218 comm="nm-tool ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 pid=912 comm="NetworkManager ")

NetworkManager Tool

State: unknown


** (process:3218): WARNING **: error: could not connect to NetworkManager

nm-tool on Computer B (they look the same to me):

~$ nm-tool

** (process:1965): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: Rejected send message, 2 matched rules; type="method_call", sender=":1.40" (uid=1000 pid=1965 comm="nm-tool ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 pid=909 comm="NetworkManager ")

NetworkManager Tool

State: unknown


** (process:1965): WARNING **: error: could not connect to NetworkManager

dig on Computer A:

~$ dig @8.8.8.8 google.com

; <<>> DiG 9.8.1-P1 <<>> @8.8.8.8 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46307
;; flags: qr rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com.            IN  A

;; ANSWER SECTION:
google.com.     299 IN  A   173.194.46.66
google.com.     299 IN  A   173.194.46.69
google.com.     299 IN  A   173.194.46.70
google.com.     299 IN  A   173.194.46.68
google.com.     299 IN  A   173.194.46.64
google.com.     299 IN  A   173.194.46.65
google.com.     299 IN  A   173.194.46.78
google.com.     299 IN  A   173.194.46.73
google.com.     299 IN  A   173.194.46.72
google.com.     299 IN  A   173.194.46.71
google.com.     299 IN  A   173.194.46.67

;; Query time: 40 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu May 22 12:00:58 2014
;; MSG SIZE  rcvd: 204

dig on Computer B:

~$ dig @8.8.8.8 google.com

; <<>> DiG 9.8.1-P1 <<>> @8.8.8.8 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16939
;; flags: qr rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com.            IN  A

;; ANSWER SECTION:
google.com.     41  IN  A   74.125.225.110
google.com.     41  IN  A   74.125.225.102
google.com.     41  IN  A   74.125.225.96
google.com.     41  IN  A   74.125.225.99
google.com.     41  IN  A   74.125.225.104
google.com.     41  IN  A   74.125.225.98
google.com.     41  IN  A   74.125.225.101
google.com.     41  IN  A   74.125.225.105
google.com.     41  IN  A   74.125.225.100
google.com.     41  IN  A   74.125.225.103
google.com.     41  IN  A   74.125.225.97

;; Query time: 39 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu May 22 12:00:37 2014
;; MSG SIZE  rcvd: 204
2
  • I've not used NM is quite some time, but unless you are running a DNS server locally, your resolv.conf should not point to 127.0.0.1. May 22, 2014 at 16:16
  • Usually that's because dnsmasq is running locally, listening on the loopback.
    – Mark
    May 22, 2014 at 20:48

2 Answers 2

6

What's the output for DNS servers when you run nm-tool from a terminal? That'll display the DNS servers that NetworkManager has configured for the computer. It appears computer A might be configured with your ISP's DNS servers whereas computer B has no DNS servers configured. You might try setting the DNS servers on computer B to something like Google's DNS (8.8.8.8, 8.8.4.4). It's most likely that dnsmasq (a DNS resolver) is running locally to handle your system's DNS, but computer B has no DNS configured. Does running dig @8.8.8.8 google.com work?

To be honest, I only ever use NetworkManager for my laptops, and just configure network interfaces the "Debian way", with /etc/network/interfaces and editing resolv.conf.

1
  • I updated the original question with outputs from nm-tool and dig for both Computer A and B. Thanks for you help so far!
    – Andrew Capodieci
    May 22, 2014 at 16:08
2

Well it turned out to be a very simple fix. I had been ssh'ing into these machines, so I decided to walk over to the actual machine. It turns out for some reason it decided to connect using an old network connection that had been configured with a static IP and no DNS. It has been choosing to use the default wire connection 1 for at least 6 months. I'm not sure what caused a change in behavior, but the fix was as simple as switching the network connection to the default Wired connection 1 and deleting the connection that had been configured with a static IP and no DNS.

2
  • 1
    "and no DNS" there is your problem.
    – arielnmz
    May 22, 2014 at 17:43
  • 1
    This is why you don't use networkmanager on boxes that don't require dynamic network updates (switching on and off of interfaces quickly, or multiple connection profiles, etc). Especially on headless boxes. May 22, 2014 at 19:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .