* * * * *

                           Network anomalies solved

The issues I was having with DHCP (Dynamic Host Configuration Protocol) [1]
were getting to me.

I decided that since I was having problems with janet serving up DHCP for the
wireless network, that I would have the WAP (Wireless Access Point) do that
for me, since it had the functionality. Might as well use it.

Funny thing about the WAP though; being too friendly it's actually hostile to
how I run the network here in the Facility in the Middle of Nowhere.

I enabled the DHCP server, and while I was able to have it assign my laptop
an IP address, the WAP wasn't forwarding packets to janet so I couldn't see
the Internet.

If I assigned a static IP (Internet Protocol) address (and assigned the IP
route) on the laptop, I could get out on the Internet.

It seems that the WAP wanted to route all the traffic out its WAN (Wide Area
Network) port, which in this case, is the port you would normally plug your
DSL (Digital Subscriber Line) or cable modem into. But since I already have a
machine acting as a firewall/NAT (Network Address Translation), this port on
the WAP is empty.

Although if I change the configuration of the WAP from a “gateway” to a
“router” the DHCP assigned IP address is routed correctly, but then the DHCP
server on the WAP mysteriously stops working.

So … I can have the WAP serve up DHCP, but those addresses aren't routable,
or I can have the addresses routable but can't assign them via DHCP. I just
love how this stuff works so flawlessly.

So then I'm back to figuring out why DHCP on janet isn't working. Putting the
DHCP server into debug mode, I see that it can see the request, but for some
strange reason it can't send the response, saying that the network is
unreachable. Which is odd, because the network is reachable.

DHCP works fine on linus, my development machine. And the only difference
between the two is the number of NIC (Network Interface Card)s—one in linus,
three in janet. Suspecting that there might be a problem with the Linux 2.0
networking stack, I disable the other two NICs in janet and suddenly, the
DHCP server works! And with the WAP in “router” mode, janet sees the DHCP
requests from the wireless side of the network.

Now, since I have RedHat 5.2 installed on these systems, and I still have the
installation CD (Compact Disc)s, I pulls the source code (one of the wonders
of open source) for the DHCP server and start poking around.

> LINUX
>
> There are three big LINUX issues: the all-ones broadcast address, Linux 2.1
> ip_bootp_agent enabling, and operations with more than one network
> interface.
>
> BROADCAST
>
> In order for dhcpd to work correctly with picky DHCP clients (e.g., Windows
> 95), it must be able to send packets with an IP destination address of
> 255.255.255.255. Unfortunately, Linux insists on changing 255.255.255.255
> into the local subnet broadcast address (here, that's 192.5.5.223). This
> results in a DHCP protocol violation, and while many DHCP clients don't
> notice the problem, some (e.g., all Microsoft DHCP clients) do. Clients
> that have this problem will appear not to see DHCPOFFER messages from the
> server.
>
> It is possible to work around this problem on some versions of Linux by
> creating a host route from your network interface address to
> 255.255.255.255. The command you need to use to do this on Linux varies
> from version to version. The easiest version is:
>
> route add -host 255.255.255.255 dev eth0
>
> MULTIPLE INTERFACES
>
> Most older versions of the Linux kernel do not provide a networking API
> (Application Program Interface) that allows dhcpd to operate correctly if
> the system has more than one broadcast network interface. However, Linux
> 2.0 kernels with version numbers greater than or equal to 2.0.31 add an API
> feature: the SO_BINDTODEVICE socket option. If SO_BINDTODEVICE is present,
> it is possible for dhcpd to operate on Linux with more than one network
> interface. In order to take advantage of this, you must be running a 2.0.31
> or greater kernel, and you must have 2.0.31 system headers installed before
> you build dhcpd.
>

“README for dhcp-2.0b1pl6”

Fortunately, since RedHat 5.2 came bundled with Linux 2.0.36, dhcpd was
compiled to handle multiple interfaces. All I had to do was add the
appropriate route commands to have it work; I can now have DHCP serve up
addresses for both the LAN (Local Area Network) and wireless network.

Gregory (who came over tonight) also realized that his wireless card in his
laptop just doesn't work with my WAP—he was able access the WAP using my
wireless network card.

Gotta love i14y (Interoperability).

[1] gopher://gopher.conman.org/0Phlog:2003/04/17.1

Email author at [email protected]