Thursday, February 5, 2009

Win 2k3 Routing...

I wanted to do some simple routing from subnet A to subnet B. For some reason I got real confused to why it wasn't working... until I realised I have 'foolishly' missed the obvious and set up the incorrect default gateway on subnet A.

This was because I was setting this subnet up on a network where I already had a default gateway to my router to the internet... let me explain.

I had a gateway router out to the net - 192.168.1.1
So i had subnet A 192.168.1.0, then I thought I would use a win2k3 box to practise a bit of RRAS routing. So I set up my Windows Home Server testbox on to IP 202.202.202.202, and then set up my router box with IPs 192.168.1.254 and 202.202.202.1.
I set up the WinHomeserver as follows:

IP 202.202.202.202
Subnet mask 255.255.255.0
Default gateway 202.202.202.1
DNS 192.168.1.254

(the router box has DNS installed on it - really a caching DNS server, as it forwards all unresolved requests to 192.168.1.1)

I then set the router box IPs as follows

IP 202.202.202.1
SM 255.255.255.0
DG 202.202.202.1

IP 192.168.1.254
SM 255.255.255.0
DG 192.168.1.1

OK, so then I tried to PING ips from the winhomeserver box. After sufficient firewall admendments, I could ping the box itself, and both IPs (202 and 192) on the RRAS box. But I couldnt PING the 192.168.1.1 router....

It was because I was thinking about it all wrong. What i needed here was a NAT box so allow requests from subnet B to subnet a. as soon as i configured the NAT on the RRAS box everything was fine. But why wasnt the LAN only routing working?

It was because i was thinking about it wrong. The RRAS box IPs didnt need default gateways for what i was doing, but what should be set up was this:

Subnet B 202.202.202.0, have default gateway of 202.202.202.1 (The RRAS box)
Subnet A 192.168.1.0, ahve the default gateway of 192.168.1.254 (The RRAS box) - this is what i didnt have, as I didnt want the rest of the 192.168.1.0 network to route back to subnet B, but to go out on the net through my main router.

SO, i guess the thrust of this rambling post is that I should have drawn out what i was trying to do before I went setting things up the way I did.

Such fun ;)