2

I am unable to connect to the internet from within Ubuntu (version 14.04.01 LTS). I've tried solutions in related forum posts, but none of them have worked so far. Any help to resolve this would be really appreciated.

I can open firefox and use the internet from there, but an example of the output from ping is:

ping: unknown host www.google.com

The output of ifconfig is:

eth0      Link encap:Ethernet  HWaddr 00:25:90:58:f7:74  
          inet addr:172.21.3.42  Bcast:172.21.255.255  Mask:255.255.0.0
          inet6 addr: fe80::225:90ff:fe58:f774/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:78128 errors:0 dropped:35 overruns:0 frame:0
          TX packets:16658 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9206366 (9.2 MB)  TX bytes:2853288 (2.8 MB)
          Memory:f0000000-f0020000

eth1      Link encap:Ethernet  HWaddr 00:25:90:58:f7:75  
          inet addr:172.21.10.67  Bcast:172.21.255.255  Mask:255.255.0.0
          inet6 addr: fe80::225:90ff:fe58:f775/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:61518 errors:0 dropped:30 overruns:0 frame:0
          TX packets:1359 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7464478 (7.4 MB)  TX bytes:146052 (146.0 KB)
          Memory:f0040000-f0060000

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:84984 errors:0 dropped:0 overruns:0 frame:0
          TX packets:84984 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:9607658 (9.6 MB)  TX bytes:9607658 (9.6 MB)

The output from netstat -r -n is:

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.21.0.1      0.0.0.0         UG        0 0          0 eth1
172.21.0.0      0.0.0.0         255.255.0.0     U         0 0          0 eth0
172.21.0.0      0.0.0.0         255.255.0.0     U         0 0          0 eth1

The interfaces file has the following lines:

/etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
#auto lo eth0
#iface lo inet loopback
auto lo
iface lo inet loopback
iface eth0 inet static
address 172.21.3.42
netmask 255.255.0.0
gateway 172.21.0.1
#       dns-search www.google.com
dns-nameservers 172.21.3.1

The output from nm-tool is:

nm-tool

NetworkManager Tool

State: connected (global)

- Device: eth1  [E2] -----------------------------------------------------------
  Type:              Wired
  Driver:            igb
  State:             connected
  Default:           yes
  HW Address:        00:25:90:58:F7:75

  Capabilities:
    Carrier Detect:  yes
    Speed:           1000 Mb/s

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         172.21.10.67
    Prefix:          16 (255.255.0.0)
    Gateway:         172.21.0.1

    DNS:             172.21.3.103
    DNS:             172.21.3.1


- Device: eth0 -----------------------------------------------------------------
  Type:              Wired
  Driver:            igb
  State:             unmanaged
  Default:           no
  HW Address:        00:25:90:58:F7:74

  Capabilities:
    Carrier Detect:  yes
    Speed:           1000 Mb/s

  Wired Properties
    Carrier:         on
25
  • So to clarify, Firefox works fine but ping doesn't?
    – Mark Smith
    Aug 3, 2015 at 21:09
  • which is the response of dig www.google.com
    – acoto
    Aug 3, 2015 at 21:10
  • There are two interfaces with same IP.
    – Pilot6
    Aug 3, 2015 at 21:11
  • Auto configuration failed 139638191867776:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/usr/lib/ssl/openssl.cnf','rb') 139638191867776:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174: 139638191867776:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199:
    – SGeo
    Aug 3, 2015 at 21:13
  • @MarkSmith Firefox works fine from my user account, but not from my colleagues or when using superuser
    – SGeo
    Aug 3, 2015 at 21:14

1 Answer 1

0

Using

route -n

and also nm-tool:

I could see that eth1 had become set as the default, and was pointing to the gateway address. Our setup required eth0 to be the default. This was resolved using:

sudo ip route change to default dev eth0 via 172.21.0.1

where 172.21.0.1 is the gateway address.

You must log in to answer this question.

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