I have nic1 which is on a local subnet 192.168.48.x with connectivity to the outside world, and nic2 which is on a subnet 192.168.1.x without connectivity to external networks. Both networks are dhcp, with the dhcp box on each being address *1 (everything is netmask)


  • just nic1 is up --> everything works fine (browse www in firefox, nslookup, etc). However
  • when i plugin (or ifup) nic2 --> both routing and dns** fails, despite nic1 still being up/valid.

This seems wrong to begin with, although perhaps the routing failure is explainable by the default gw route installed on nic2. I tried manually deleting the routes added by nic2 initialization, which allows me a route to the outside world (ping but name lookup still fails.

  • Due to's configuration, I believe it's advertising as a default-gw, and I presume nameservers as well (see note at end of this page for why my setup is like this). I have a feeling that the root of the problem may be related to this, but it appears the in current ubuntu all the nameserver resolution is internal to dnsmasq ...

I've exhausted my understanding of route/dnsmasq/etc, as well as google search. Please help enlighten me! Below are the outputs of the diagnostic I'm familiar with.

**Note: as I'm sure someone more knowledgeable than I will immediately see, there is a discrepancy on which ip is servicing my dns queries.

  • When first trying to understand/fix this several hours ago, (eg, dnsmask) appeared to handled all queries (nslookup always showed After plugging in nic2, nslookup would go from succeeding to failing (after a 5-15ish second delay while the system initialized nic2), reporting the REFUSED from Of course firefox and the rest of the system also fail to lookup names after initialing nic2
  • however after playing with this numerous times, now nslookup shows (and thus, succeeds). However Firefox still can't can't lookup names with nic2 initialized, and if i force dnsmasq with nslookup google.com I get REFUSED
    • from reading online, i'm assuming this is somehow related to the failover / "unreliable server" logic in dnsmasq; but i wasn't able to figure out how to triage that. I don't have an /etc/dnsmasq.conf and other similar answers went nowhere for me.
    • does this mean dnsmasq learned despite advertising dns servers via dhcp, those servers never return any valid results? If that is true, why does this only affect nslookup (firefox www, etc can't lookup names)

After a fresh boot, with just nic1 plugged in:

#> ifconfig
enp0s25  ...  inet addr: ...
lo       ...

#>route -n
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    101    0        0 enp0s25   U     100    0        0 enp0s25

#>nslookup www.google.com
   ... looks good

#>ping www.google.com
   ... received response

then, after plugging in nic2

#> ifconfig
enp0s25 -->
enx0... -->
lo ....

#> route -n
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    100    0        0 enx00e112002767 # so my "no outside world" claims there is a default-gw, which is probably bogus?         UG    101    0        0 enp0s25     U     1000   0        0 enx00e112002767  # unrelated (??) note: I don't know why this addr is here; is there something bogus in my openwrt?   U     100    0        0 enx00e112002767   U     100    0        0 enp0s25

#> nslookup  www.google.com
  # this is the **Note above; a number of ifup/ifdown iterations ago this just returned REFUSED from; now it returns:
  ... valid response

#> nslookup  www.google.com
   # for the first N times i had plugged/unpluged nic2, serviced the request by default (no extra server-ip param needed)

#> ping www.google.com 
  ... _does_ get a valid IP;  I think this tracks the **Note behavior above
 ... but all packets time out

#> ping
  ... times out

#> sudo route delete default
#> sudo route delete default # there are two default routes
#> sudo route add default gw

#> ping
  ... SUCCESS ...

#> nslookup www.google.com
  ... still REFUSED ...

so it appears to me my problem is nameserver related. What am i doing wrong?

Note2: although is returning some bogus information; I think this should be OK, and there is a reason/background to this:

  • I have several local lans/wifis; my main PC is on one (via nic1), and I'm plugging in a usb-nic (nic2) to be able to re-configure a wireless router box ( on it's LAN side)
  • normally sits in separate network, with that network being normally connected to the net via's WAN
    • so is configured to serve dhcp, and at least when it's in it's "normal in-situ" should be providing valid nameservers and a default-gw in the dhcp (which it was doing successfully this AM before i pulled it out to re-configure it on my main pc, over nic2
  • if it's helpful, the box is running openwrt, and it's entirely possible i have it mis-configured somehow leading to it still advertising default-gw and nameservers even though it has been power-cycled with nothing on it's WAN port.

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.