Friday, January 1, 2010

Sharing ADSL using RRAS

Lately, I found that my router keep dropping packages because the session table running out pretty fast, makes the internet almost unusable. So that I decided to configure a machine to do the job. Plus, this "super" router will provide me the functionalities that only available on high-end routers.

The goad is simple: sharing the ADSL connection with LAN devices. These are related devices I used:

  • ADSL modem of course;
  • A machine with two NICs and Routing and Remote Access (RRAS) enabled, also act as DHCP and DNS server;
  • Switch connecting LAN devices.

The IP address of ADSL modem is set to 192.168.1.1, so NIC 1 on the server, which connecting to the modem, is configured as:
IP address: An IP in the same subnet with modem, in my case 192.168.1.18
Subnet mask: 255.255.255.0
DNS server: Any DNS server IP, blank as I am using the same machine
NIC configuration

NIC 2 is connected to the Switch and here is how it configured:
IP address: An IP in LAN subnet, in my case 192.168.0.18
Subnet mask: 255.255.255.0
DNS server: Any DNS server IP, blank as I am using the same machine

Make sure DNS service is enabled and proper configured. Currently, I am simply forwarding any DNS requests to Google Public DNS.
DNS Forwarding

Next, is to setup DHCP. The progress is straightforward. Just make sure Router and DNS Servers are proper configured in Scope Options. Another thing I would like to mention is the IP reservation function. It is pretty cool if some of your devices will be used in different LANs (most likely mobile devices). It allows your devices configured to get IP from DHCP but still having a static IP in your own LAN. Unfortunately, this function is not widely available in budgeted routers.
IP Reservation

Now, enable RRAS and follow the wizard.
RRAS Wizard

Select NAT.
Configurate RRAS as NAT

Here, make sure the second option "Create a new demand-dial interface to the Internet" is selected.
Create a new demand-dial interface to the Internet

Select the NIC that connected to switch.
LAN NIC

Choose PPPoE for the ADSL connection.
RRAS Wizard

Fill in account information.
RRAS Wizard

After the wizard ended. Go to Newwork Interfaces, verify the properties of the connection. You may want to set it as persistent connection and adjust the dialing policy.
RRAS Wizard

If you encounter error "Access was denied because the username and/or password was invalid on the domain.", try different security setting. For my ISP, I will have to set it as "Allow unsecured password".

Now, the setup has been done. But make sure the "Router" has proper security mechanisms, since it is exposed to Internet.

Have fun!

1 comments:

Tangil Smith said...

Hi Eddie,

Please contact me! http://tangilsmith.blogspot.com

Post a Comment