LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Need Some Guidance on Where Default Route Is Configured (https://www.linuxquestions.org/questions/linux-networking-3/need-some-guidance-on-where-default-route-is-configured-928574/)

Peatmoss 02-09-2012 08:57 PM

Need Some Guidance on Where Default Route Is Configured
 
Hi Everyone,

I've got a pair of wireless radio modules which I'm connecting to Ubuntu. When the network connection comes up, they appear as network interfaces on usb0. One of the modules works just fine; when the connection comes up I can surf around, etc no problem at all. But when the other one comes up (100% reproducible) I can't do anything with the network connection.

I've compared the DHCP ACK packet for both modules using Wireshark and they look identical except for IP addresses - the modules for different wireless technologies, so no surprise there. I'm sure the bug is in the module and not Linux but aside from the DHCP traffic I haven't a clue where else to look.

The only way I can make the broken module work is to type:

sudo route add default dev usb0

I'd like to know what part of the system normally handles this automatically and what might be broken that I have to fix it manually.

Any suggestions gratefully accepted.

Cheers,

Peat

NEQTAN 02-10-2012 08:46 PM

Hey Peat

I could be wrong, but going off what seems to be typical. The usb your detecting is a built in express card adapter for wireless usb capability. Hence external wireless adapters plugged in to the usb port.

I think this will help: Its a tutorial basing its example on one chipset:

http://www.cyberciti.biz/tips/linux-...s-adapter.html

This is good to:

http://kernelnewbies.org/Linux_2_6_2...ae40e4c6ec2cc1

When all else fails:

http://www.brunolinux.com/08+-WiFi/C...eless_USB.html

Here are some links for learning more about this part of your system:

http://linux-ip.net/html/

http://www.linux-usb.org/gadget/

http://linuxwireless.org/en/users/Devices/USB

Hope this was helpful.

Neq

Peatmoss 02-14-2012 02:30 PM

Figured it Out
 
Hi Neq,

Thanks for those links! The one that help most of all was:

http://linux-ip.net/html/

Although I didn't actually figure out exactly where in the DHCP process the default route is configured, I figured out why my specific setup was failing. The wireless module contains its own DHCP server. That server was incorrectly reporting the "Router" IP address as A.B.0.0. I noticed when everything was working fine, the Router address and the network interface IP address matched. Looks like there's a bug in the wireless module which is clearing the least significant 2 octets of the Router IP address.

BTW - this module is a cellular modem, not a WiFi card, so there's really no LAN at all, even though it looks like a Network Interface to the Linux host. Since there's no LAN, there's also no router, so I guess that's why the DHCP server makes the router address the same as the leased IP address.

It took some reading and thinking - thanks again for passing those links.

Cheers,

Peat

NEQTAN 02-14-2012 03:32 PM

Dhcp+route
 
Hey Peatmoss,

Glad I could help in some way.

In continuation to your request for, where in the DHCP process is the default route configured?

Hopefully I can be of some assistance.

According to this link:

https://help.ubuntu.com/10.04/server...iguration.html

Light explanation of the above link:

If you refer to this file path= /etc/network/interfaces. You will find the network configuration.

There are some commands that can give you better insight on the topic of DHCP. The ifconfig command can be usefull. If you use the help function along with the command "ifconfig -h" or "ifconfig --help" you will get some insight on how to use the command to your needs. In the help topic the term "dhclient" was brought up. The dhclient uses dhclient.conf (dhclient config) and the dhclient-script to obtain the configuration information it needs. The file dhclient.conf should be located by this path in the file system= /etc/dhcp3/dhclient.conf . The dhclient-script file should be located by this path in the file system= /sbin/dhclient-script . The dhclient is I feel what your looking for.

Dhclient references:

dhclient= http://manpages.ubuntu.com/manpages/...hclient.8.html
dhclient.conf= http://manpages.ubuntu.com/manpages/...nt.conf.5.html
dhclient-script= http://manpages.ubuntu.com/manpages/...-script.8.html

I hope this helps get you what you need.

Neq


All times are GMT -5. The time now is 07:32 AM.