LAN Configuration — lan_support.conf

Caution:

If you are using subnet_athena.conf or have that file in your Athena package, skip this. This file is only useful to those who are using older versions of Athena.

Update 17 March 2006

This file has been replaced by subnet_athena.conf from SVN-55xx. There isn't anything new except that additional configuration may be added with the new file. Information found on this page, except where specific to lan_support.conf and its examples, is therefore still valid. The subnet quartet had be deprecated by further update to subnet_athena.conf.

Why is it important?

There are only four settings in lan_support.conf, but this is also where many errors originate. It is really not a surprise. There are many guides on certain sites advocating the use of gateway IP as the subnet and hardly any guide on how to deal with odd-ball situations like gateway IP of 192.168.1.254. The rule of thumb is to assign the host an IP within the range of the DHCP server residing on the router and if that is not possible, as in the case of 192.168.1.254, to reconfigure the router to use the lowest possible IP, such as 192.168.1.1.

Here are some possible situations:

For 192.168.x.y:

The theoretical subnetmask is 255.255.0.0
Suggested configuration is for a 24-bit subnet
lan_char_ip: 192.168.x.y
lan_map_ip: 192.168.x.y
subnet: 192.168.x.0
subnetmask: 255.255.255.0

For 10.x.y.z:

The theoretical subnetmask is 255.0.0.0
Suggested configuration is for a 24-bit subnet
lan_char_ip: 10.x.y.z
lan_map_ip: 10.x.y.z
subnet: 10.x.y.0
subnetmask: 255.255.255.0

For public IPs:

For multiple IPs, change subnet to a.b.c.d1 (d1 is the lowest member of the IP range less 1) and subnetmask to 255.255.255.0
lan_char_ip: a.b.c.d
lan_map_ip: a.b.c.d
subnet: a.b.c.d
subnetmask: 255.255.255.255




Q&A

Why is the subnetmask different from theoretical one?
Submask (subnetmask) should mask the net [bits] to let network devices know the size of the net. For example, the information "subnet 192.168.0.0, submask 255.255.0.0" tells other net devices that it is a 16 bit net and has 256x256 IP addresses, whereas "subnet 192.168.0.0, submask 255.255.255.0" indicates a 24 bit net with 256 IP addresses. The latter obviously reduces the net search time.
Why does the subnet end in zero?

A subnet defaults to the IP of zero and has assignable IP range of 1 to 255. The last IP is also known as the broadcast address. For example, subnet 192.168.1.0 means the net starts at 192.168.1.1 and ends at 192.168.1.255.

Why does lan_support work with gateway IP as its subnet?

The subnet starts at the gateway IP but could be interpreted to mean a single IP net, as in the case of subnet 192.168.1.1, submask 255.255.255.255. The danger is illustrated in this example: in subnet 192.168.1.100, submask 255.255.255.0, a host with IP of 192.168.1.2 will fail. A host configured to be in a single IP net will fail if it is connected to a local net with a router. The internet connection is a typical single IP net, e.g. IP 123.456.789..012, gateway 123.456.789..012, submask 255.255.255.255.

Why does lan_support work with public IP?

The situation is similar to using 127.0.0.1 as the host IP. The host will ignore private IPs except 0.0.0.0 and 127.0.0.1, and act like a standalone internet host (single IP net).

Why is router IP so important?

The router IP is needed to determine the subnet. For example, the router IP of 192.168.1.1 tells us to set the subnet to 192.168.1.0 which is the first 3 octets of the router IP and zero (default net) as the last octet.

How do I get the router IP?

Issue the ifconfig command as root. You will see the gateway IP. That is the router IP.

What is the safe IP to assign to a host if DHCP is not used?

A safe IP will be the router IP plus one, e.g. 192.168.1.2, which will make sure that it is within the range of the DHCP server. It also means that a sage IP will be one which is within the range of the DHCP server. You can get the range from the router manual.

Why should I use the DHCP range if I am using static IP?

The best practice is to reserve the static IPs which you want to assign within the DHCP range. The reason is that other local net stations can still use the DHCP service without collision of IP.

What should I do about router with IP 192.168.1.254?

You should log in to your router and change its IP to 192.168.1.1. If that is not possible, the lowest IP you can get in that subnet, say 192.168.1.100.

But I can't change the router's IP of 192.168.1.254...

You should still use the subnet of 192.168.1.0 but assign the host an IP within the range of its DHCP server, and if the range is not available, an IP of no more than 25 downwards from 254, i.e. 200 to 253, since most router will support 25 clients.

I don't have a router...

You should invest in one. That is about the easiest way to get your server on air.