A quick overview of my environment:

Network A:

  • One gateway/DHCP server connected to multiple ISPs and connected to the switch
  • One Netgear GS748T 48 port switch (and a few trunked switches for the same subnet)
  • 192.168.10.x

Network B:

  • No gateway right now (don't have any spare devices with more than one NIC)
  • one DHCP server
  • One netgear GS748T
  • 192.168.11.x

Network B is a testing environment. There is nothing connecting the two networks right now. I still need internet connectivity so I wanted to just connect network A to B somehow and have no conflicts between the two with DHCP. I know how to do this by setting up a gateway on network B and using it's second interface to connect to the gateway on network A, but I don't have any devices with two NICs to allow that. I was hoping I could just drop a line between the two and do some settings that would keep their clients from getting confused as to which subnet their in. Any guidance on how to get internet to network B without any conflicts? I assume it's easy, I know protocols pretty well, I'm weak on networking hardware as I'm a programmer.

Update: Forgot to emphasize that these networks should be completely separated. The connection between the two only provides internet access to network B.


You didn't mention the subnet on your networks, so I'm assuming you have it set to a basic /24 or

If you want to join the two:

  • Set your lease times REALLY short on your 192.168.11/24 DHCP server for the length of your current leases.
  • Set your Netmask to or /23 on your 192.168.10 network
  • Leave your Gateway what is, probably
  • Set your Broadcast to to account for the new Netmask.
  • Expand your assignment range to include the new 192.168.11 IPs that are available
  • Turn off your 192.168.11/24 DHCP server
  • Then connect the two switches.
  • How will the DHCP know that only devices on the second switch get .10 addresses? I'm really trying to keep these networks separate anyway. I am thinking it may only work through multiple interfaces on the gateway, but just wanted to see if theres a way on the switch. – justausr Jul 27 '12 at 17:11
  • Once you set the subnet to /23 and broadcast to and connect the switches, what IPs are on what switch won't even matter. – Magellan Jul 27 '12 at 17:19
  • 1
    Ah. If you're wanting them seperate, you're going to have to set up VLANs and trunking on your switches if they support that. You really should have put that requirement in the original question as that's a rather important limitation on proposed solutions. – Magellan Jul 27 '12 at 17:21
  • Sorry about that, I thought I pointed it out, but just hinted towards that. My switch supports two types of VLANs, port based and 802.1Q. Since the port based can only separate it into two halves, I'll have to go with the IP based I think. So I think I would just set it to have a VLAN for the IP of switch 2 and that IP would just be, then not change anything on network B. Does that sound right? I just read a bunch of stuff on VLAN protocols so not sure if I understand completely. – justausr Jul 27 '12 at 17:30

Assuming nic 0 (eth0) is connected to the internet.

Add a nic to your gateway/dhcp/dns server. Plug nic 1 (eth1) into switch 1, Plug nic 2 (eth2) into switch 2, Add two masquerading rules, one for eth1-> eth0 and one for eth2->eth0. Either bind two dhcp services to each respective ips or get a dhcp service that can handle multi-ip servicing. Have them both on a /24( subnet and enable forwarding.

Should be a 5 minute job with an ubuntu box.

  • Don't have a device with three nics that isn't in use. I have one with four but it connects three ISPs to network A. I can definitely do it if I had one, I was asking how to do it just with the switches I have – justausr Jul 27 '12 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.