Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Servers on different subnets

Status
Not open for further replies.

linuxpyro

Technical User
Feb 11, 2003
38
US
Hello, I have a Linksys WRT54G wireless/wired router to share my cable modem. I have two subnets, 192.168.1.*, and 192.168.2.*. I have the routing tables set up correctly, and there is no problem whatsoever with traffic between the two subnets, with a Linux box working as a second router.

I have a subnet sitting on the subnet 192.168.1.*, which does mail and web serving. However I want to set up another web server (different port) on the subnet 192.168.2.* and have that forwarded to the router's external IP. However, when I try to do this on the Port Forwarding page of the router's control site, there is only space for one subnet. In other words, it assumes all servers to be on the subnet 192.168.1.*, and the last number (represented by * in the example) is the only one it lets me change. Is there any way I can forward to the different subnet with this router? Is there any way I can tweak this?

Thanks.

Ben
 
Forward to the 192.168.1.x interface of the linux box, let it do the rest.

MCSE CCNA CCDA
 
I'd do that, but I'd prefer not to use NAT on the Linux router. Is this something I can do by using a different subnet mask? Right now I just use 255.255.255.0.
 
Well, you could do 'variable subnetting'. It's tricky.

Basically, you create 2 subnets: 192.168.1.0/25 & 192.168.1.128/25

The trick is that you leave a 24-bit subnet mask on the Linksys router so that it thinks everything's one subnet.

MCSE CCNA CCDA
 
Couldn't I just set the net mask for each subnet to 255.255.0.0? I've tried to play around with the net masks a bit, but I'm not that familiar with them.
 
That won't work if there's a router between the subnets. You'll have routing issues.

MCSE CCNA CCDA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top