Basic Router Setup

Previously I have written about the router that I have selected for my home lab / home network and how I flashed it to use DD-WRT. Having done that successfully I need to perform some basic (and intermediate) configuration to get it ready for use.

Basic Setup

Unless you have a completely plug and play broadband router you will have seen most of these settings before. They just look a little different here and I’m including them for context also.

I won’t bother dealing with my broadband account details. First up then we look at the router’s basic network setup and DHCP options.

screenshot13

Relatively straightforward but the important options are ticked by default: “Use DNSMasq for DHCP” and “Use DNSMasq for DNS”.

Dynamic DNS

If you don’t have a static broadband IP Address then setting this up could be useful. Configuration is fairly straightforward so I’m not going to add any detail.

Wireless

I’m not going to go into any detail here. There’s plenty of documentation around for those that want to look it up. It is sufficient for me to say that I did it.

DHCP / DNS

This is the interesting bit. Did you think we’d done DHCP earlier on? Well I hadn’t quite finished. And I have some DNS configuration that I want to do too.

On the “Services” tab of the interface there is a text box for DNSMasq Options. In that I popped the following text in:

[text]domain-needed
bogus-priv
server=/www.vspecialist.co.uk/208.67.222.222
server=/vspecialist.co.uk/192.168.5.6
dhcp-option=option:domain-search,vspecialist.co.uk[/text]

screenshot16

(The “No DNS Rebind” option must be disabled for this to work.)

Update: 05/07/2011 – If the version of DD-WRT being used is older it may not have the option in the GUI. Instead, the following commands can be placed in the startup script to achieve the same thing (and make it persistent across router reboots):

[text]
sed -i ‘s/stop-dns-rebind//g’ /tmp/dnsmasq.conf
killall dnsmasq
dnsmasq –conf-file=/tmp/dnsmasq.conf[/text]

DNSMasq is a lightweight DNS forwarder and DHCP server. The options above will do the following:

  • Line 1: Doesn’t forward names without a dot in them. Public DNS servers can’t resolve these anyway but we’re just being considerate here.
  • Line 2: Doesn’t forward addresses in non-routed address spaces. Again for consideration.
  • Line 3: This tells DNSMasq to send DNS requests for “www.vspecialist.co.uk” to 208.67.222.222 which is an OpenDNS server. This means that I can work on my blog as normal.
  • Line 4: This tells DNSMasq to direct DNS queries for “*.vspecialist.co.uk” to 192.168.5.6, my internal AD server.
  • Line 5: This DHCP option adds the domain “vspecialist.co.uk” to the default domain search order for DHCP clients that support the option (not all do).

There are many other DNSMasq options that I will look into at some point but these important few will allow me to access my blog on the internet but have every other DNS request for the vspecialist.co.uk domain answered by the AD server in my lab.

The Result

Once everything was plugged in, I had a fully functional broadband and home lab router. Everything on the 192.168.5.0/24 network was talking to everything else. And do you recall the DNS configuration that I made above? Here it is in action with no changes made to the network configuration of my laptop:

screenshot18

The next stage is to configure VLANs on the router. That is a more advanced process for another time.

Add Comment

Required fields are marked *. Your email address will not be published.