2

On both wired and wireless connections, I can only access one of 192.168.1.1 (the router web portal) and the general Internet. Which "mode" my devices are in is seemingly random. This has persisted so far for 5 days (since I began using this network).

When connected to the Internet, I can go to 192.168.102.1 and I see a landing page for "mikrotik routeros", but I cannot go to 192.168.1.1. When connected to the router but not the Internet, 192.168.1.1 yields the router web portal, and 192.168.102.1 is inaccessible.

Attempted solutions

  • Upgrading router firmware
  • Resetting router to factory settings
  • Rebooting devices
  • Fiddling with router settings (changing wireless security modes, removing wireless security, etc)
  • Upgrading wireless drivers on computers

Some data

  • Affects BlackBerry, Windows, Android and Ubuntu devices
  • All devices work properly on other networks
  • Devices may switch modes if they have been offline for a long time (eg: overnight), but restarting a device has no effect
  • Router is TP-Link TL-WR740N v4
  • Router firmware DD-WRT v24-sp2 (04/18/14) std - build 23919
  • Both wired and wireless connections are affected, but not necessarily simultaneously

I don't know anything about networking, but here's some info that seems helpful taken from my Ubuntu laptop.

With internet access (wired in this case, but it varies):

~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.102.1   0.0.0.0         UG    0      0        0 eth0
192.168.102.0   0.0.0.0         255.255.254.0   U     1      0        0 eth0

~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 54:ee:75:0c:02:80  
          inet addr:192.168.103.232  Bcast:192.168.103.255  Mask:255.255.254.0
          inet6 addr: fe80::56ee:75ff:fe0c:280/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3273 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3035 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2276482 (2.2 MB)  TX bytes:517732 (517.7 KB)
          Interrupt:20 Memory:f0500000-f0520000 

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

With "router access" (wireless in this case, but it varies):

~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0

~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 54:ee:75:0c:02:80  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:9422 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7545 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6216683 (6.2 MB)  TX bytes:1399280 (1.3 MB)
          Interrupt:20 Memory:f0500000-f0520000 

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

wlan0     Link encap:Ethernet  HWaddr e8:2a:ea:60:31:4b  
          inet addr:192.168.1.105  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ea2a:eaff:fe60:314b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:77013 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49506 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:25275438 (25.2 MB)  TX bytes:30355132 (30.3 MB)

With both (wired with wireless turned on):

~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.102.1   0.0.0.0         UG    0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0
192.168.102.0   0.0.0.0         255.255.254.0   U     1      0        0 eth0
2

The fact that your are getting assigned IPs on two different subnets implies you have two DHCP servers on the directly attached network.

Usually, I'd recommend using something like dhcp_probe -f eth0 or roguechecker to find out which IPs on your network are serving DHCP but you already know which they are. Namely, 192.168.1.1 and 192.168.102.1.

You have two options to get internet connectivity AND be able to connect to the 192.168.1.0 network at the same time. Both will require disabling or removing the DHCP server on 192.168.1.1 and letting 192.168.102.1 assign you an IP for internet access.

Methods follow:

1) Add a static routing entry to the linux box that tells it that 192.168.1.0 is directly attached.

route add -net 192.168.1.0/24 wlan0 should work for this.

2) Add a static routing entry to the router that tells it 192.168.1.0 is directly attached.

This would be specific to your router/firmware, but since you're running DD-WRT you can easily find the information on adding a static route. As a note, your gateway should be 0.0.0.0 for directly connected nets.

  • Thank you. I have found the correct page on the router's web portal but I don't exactly understand what to put there. There is destination IP, subnet mask and gateway. From your answer, gateway should be 0.0.0.0. But what about destination / subnet mask? Is it 192.168.1.0 and subnet mask of 255.255.255.0? Normally I would experiment, but this is my only Internet access :) – William Sep 12 '14 at 2:12
  • Those values for network and subnet mask should be correct. It should essentially then execute the same command as the manual route add above and then ensure the route is re-added on reboots and such. – ssnobody Sep 12 '14 at 2:52
  • Neither approach actually worked. – William Sep 12 '14 at 2:55
  • Prompted by your answer, I disabled the router's DHCP server in its settings. I can't access the router anymore, but at least I have Internet access. I would like to solve this properly though, if you have any other ideas. – William Sep 12 '14 at 2:57
  • I would investigate why option 1) didn't work first. What does your routing table look like after performing the route add? Are you sure there is only one bridged wireless network on which both nets are directly connected and that you are using that as interface wlan0? Specifically, if you ignore dhcp and manually set up a 192.168.1.0 IP and 192.168.102.0 IP without disconnecting and reconnecting to the AP, are you able to ping each of the .1s? – ssnobody Sep 15 '14 at 18:48
0

Sounds like there's competing DHCP servers on your network.

A few questions for you:

  • What model router do you have?
  • And have you turned on DHCP services on any computers on your network?
  • How many computers do you have on your network? Can you turn them all off and turn them on 1 at a time until the problem shows up?
  • Thank you, I will look into this possibility. On the router is says that there are two DHCP clients: an iPhone and my Ubuntu laptop. There are 6 listed in the LAN area though. Router model is tplink tl-wr740N. I do not know of DHCP services but its possible - I'll look into it soon. – William Sep 11 '14 at 20:10
0

Router needs to have WAN Connection Type as DHCP and also needed static DNS set up (I used 8.8.8.8 and 8.8.4.4). Router should have its own DHCP server turned on.

Network is apparently connected like this: There is a central router, with a cable to my unit's local router.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.