no default route is set

no default route is set

Postby jiml8 » Jan 15th, '15, 23:52

I've loaded 32 bit Mageia 4.1 on an old Acer computer so that I can use it as a tftp client for some testing. I have configured it to use network manager. It is connected to one of these devices: http://simplewan.com which I am developing.

The simplewan device is essentially a router with some particular features (and VOIP optimizations), and I am presently developing a tftp proxy which I am embedding in the firewall module in the kernel. This device is running a highly customized FreeBSD 6.4 kernel. The device is running dhcpd on the LAN port and dhclient on the WAN port. Because of the developmental nature of the Simplewan device, I cannot rule out that it may have a role in my problem, hence here is some information regarding the network.

Here is the basic topology:

Acer <--------->Simplewan <----------->My Workstation<------>Netlink Router<------->Netlink Switch<------->my NAS (tftp server)


Given the developmental nature of the Simplewan, it is up and down a lot and the kernel is undergoing substantial changes. However, when it is up and configured, it is passing data from anywhere to anywhere, according to its firewall rules.

When I recycle the Simplewan device, I find I have to make the Acer disconnect/reconnect the network connection (it might eventually do it by itself, but I don't wait; I just click the "connect" in the Network Center from MCC). The Acer properly gets its IP address and DNS information from the Simplewan.

The Acer then reports the network is up...but the Acer does not configure a default route and hence cannot connect to any device other than whatever else is connected on the LAN side of the Simplewan device. I always have to manually assign the default route.

I would expect the Acer to set the default route. Why is it not doing this? Is there a possibility of a missing option in the Simplewan dhcpd that causes this behavior?
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: no default route is set

Postby doktor5000 » Jan 16th, '15, 08:03

Do you use net_applet or networkmanager on the acer, or maybe something else?

Did you have a look in the received and the generated lease files on the acer?
At least when using networkmanager that's an easy way to look if you receive the proper options and if it's networkmanager's or dhcpcd's fault to mangle those options into the resulting dhcp client options.
I had to do that when fixing the dhcp search suffix list at work, will have to dig in my notes and check back.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: no default route is set

Postby jiml8 » Jan 17th, '15, 02:58

I am using networkmanager. I did look at the leases, but nothing jumped out at me; it all looks perfectly normal. Do you have any suggestions about what in the leases might cause this?
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: no default route is set

Postby doktor5000 » Jan 17th, '15, 09:50

Looking again at the topic, dumb question from me: Do you mean the default route or the default router/gateway?

And for the lease, is the default router set for a specific range/subnet or globally? When you search around for dhcpd default route there are numerous topics where it doesn't work.

For comparison, here's what my lease looks like:

Code: Select all
┌─[doktor5000@Mageia5]─[08:39:50]─[~]
└──╼ ls -t /var/lib/NetworkManager/*lease
/var/lib/NetworkManager/dhclient-057dcf81-d330-4db4-b169-374f24000a70-wlp5s0.lease
┌─[doktor5000@Mageia5]─[08:39:59]─[~]
└──╼ cat /var/lib/NetworkManager/dhclient-057dcf81-d330-4db4-b169-374f24000a70-wlp5s0.lease
lease {
  interface "wlp5s0";
  fixed-address 192.168.178.20;
  option subnet-mask 255.255.255.0;
  option dhcp-lease-time 864000;
  option routers 192.168.178.1;
  option dhcp-message-type 5;
  option dhcp-server-identifier 192.168.178.1;
  option domain-name-servers 192.168.178.1;
  option dhcp-renewal-time 432000;
  option dhcp-rebinding-time 756000;
  option broadcast-address 192.168.178.255;
  option ntp-servers 192.168.178.1;
  option domain-name "fritz.box";
  renew 5 2015/01/16 01:54:57;
  rebind 2 2015/01/20 15:24:43;
  expire 3 2015/01/21 21:24:43;
}
lease {
  interface "wlp5s0";
  fixed-address 192.168.178.20;
  option subnet-mask 255.255.255.0;
  option routers 192.168.178.1;
  option dhcp-lease-time 864000;
  option dhcp-message-type 5;
  option domain-name-servers 192.168.178.1;
  option dhcp-server-identifier 192.168.178.1;
  option dhcp-renewal-time 432000;
  option ntp-servers 192.168.178.1;
  option broadcast-address 192.168.178.255;
  option dhcp-rebinding-time 756000;
  option domain-name "fritz.box";
  renew 6 2015/01/17 15:42:42;
  rebind 4 2015/01/22 15:08:54;
  expire 5 2015/01/23 21:08:54;
}


Here's what my routing table looks like, nothing fancy:

Code: Select all
┌─[doktor5000@Mageia5]─[08:45:07]─[~]
└──╼ sudo LC_ALL=C route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.178.1   0.0.0.0         UG    1024   0        0 wlp5s0
192.168.178.0   0.0.0.0         255.255.255.0   U     0      0        0 wlp5s0


And the related /etc/sysconfig/network-scripts/ifcfg file:

Code: Select all
┌─[doktor5000@Mageia5]─[08:49:18]─[~]
└──╼ cat /etc/sysconfig/network-scripts/ifcfg-WLAN
ESSID="WLAN"
MODE=Managed
KEY_MGMT=WPA-PSK
TYPE=Wireless
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=WLAN
UUID=057dcf81-d330-4db4-b169-374f24000a70
ONBOOT=yes
HWADDR=54:27:1E:F7:5A:F2
BSSID=9C:C7:A6:44:29:BB
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no
USERS=doktor5000
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: no default route is set

Postby jiml8 » Jan 21st, '15, 18:51

I meant default route, meaning that I have to enter the line: "route add default gw 192.168.3.1" every time I cycle the simplewan device.

I guess this would actually be easy enough to test: all I have to do is plug the cable from the Acer directly into my router. But, in the simple but stupid problems department, the cable I am using won't reach and it is not as easy as it might be to shove things around to put the Acer close enough to the router.

As much as anything, I was just wondering if you (or anyone else) knew the answer offhand.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: no default route is set

Postby doktor5000 » Jan 22nd, '15, 00:23

jiml8 wrote:As much as anything, I was just wondering if you (or anyone else) knew the answer offhand.

Not seen something like that yet, sorry.

Sounds either like a dhcp client or dhcp server bug, or maybe networkmanager doesn't detect the link change.
No further clue, you probably have to debug that further. You might want to switch networkmanager to show debug information by adding

Code: Select all
[logging]
level=DEBUG

to /etc/NetworkManager/NetworkManager.conf - that's what I did when I had some wireless reconnect issues.

For more information check:
man NetworkManager.conf
https://wiki.gnome.org/Projects/Network ... /Debugging
https://wiki.ubuntu.com/DebuggingNetworkManager
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest