Configuring a wireless router for LAN
In the past I considered the configuration of a wireless router to be a cumbersome and complicated task. I recently discovered that it is not that complicated when you get down to actually doing it. Here are things I need to remember if I ever have to do it again.
A wireless router would be simple if it is true to what is says – ‘Wireless’. Most wireless routers have a few ethernet ports to which computers can connect directly. The ethernet ports on the router are of two types – WAN and LAN. There will be just one WAN port and a few (4 usually) LAN ports. The WAN port is to connect the router to an existing network. The LAN ports create a new virtual network. Clients cannow connect to the ‘outside’ network through the router by directly connecting to the LAN port via cable (in this case the router functions as a regular ethernet switch) or though a wireless connection. All traffic from the new network that are bound to nodes outside this network will be routed through the WAN port.
Usually when we configure an ethernet interface, we need to provide IP address details like IP address, subnet mask, default gateway and DNS. The typical wireless router has two ethernet interfaces – the WAN and the LAN and hence we must provide details for both. The addressing scheme for the WAN interface will depend on the adressing scheme used by the network to which the wireless router is connecting. The addressing scheme of the LAN interface usually begins with 192.168 as it is a private network and the IP addresses must fall within the non-public IP range recommended by ICANN. The LAN interface can also be configured to issue IP addresses to clients connecting via the LAN interface or via wireless though DHCP. All traffic from the private network will be routed as traffic orginating from the ethernet address of the WAN port. This is called NAT or network address translation. Similarly all traffic bound for a particular node on the private network from outside the network will first arrive at the WAN port and will be routed to the correct node by the router. NAT is at workagain. Lets look at an example.
You want to connect to an existing network and use a wireless router to extend the connection. You need IP details for the WAN. Lets say the IP address is 10.0.1.23, subnet mask is 255.255.255.0 and gateway is 10.0.1.1. The DNS addresses can be obtained from the service provider in the case of internet connections. So in effect, you are going to connect a number of clients to the network using a single IP – 10.0.1.23. However, each of the clients need an individual address to make them unique on the network. This is the purpose of NAT and the LAN interface. You can configure the LAN interface with a private address range. In this case we choose 192.168.10.1. If you use static routing you need to set the IP address details on each client. The IP address will be anything between 192.168.10.2 to 192.168.10.254 and the default gateway will be 192.168.10.1
Depending on the scenario, the installation can be a bit more complex. In the case of ISPs, you may need to add PPPOe dialers etc.. Will write about it in another post.