Networking advice & connecting to 2 Lans

Soldato
Joined
13 Dec 2002
Posts
7,991
Location
Newcastle upon Tyne
I have 2 pcs at work. My main one is connected to the work Domain. I use this pc daily but also use it to convert and encode large amounts of video footage which we have to upload to a clients server.

Now to stop me hogging the entire companies broadband I have the second pc which is connected to a seperate ADSL line.

Currently once i have converted the data i have to transfer it from my main pc to the second pc and upload it from there, this can be a little tiresome at times

What I would like to be able to do is just have the main pc (which is the more powerfull one) and be able to connect to the Domain but to have my internet access purely on the seperate line.

Other than buying a second lan card how difficult would this be to do if at all possible?
 
Dont set a default gateway on the card which is currently connected to the 'Domain'.

Install second LAN card and assign ip address (make sure its a different network/subnet from the 'domain' network) which is within the range of seperate adsl lines address. Set new LAN cards GW to seperate adsl lines LAN address.

i.e

NIC1 (connected to the original network)
- ip address 192.168.0.2
- GW 192.168.0.1
- Subnet mask 255.255.255.0

NIC2 (connected to the internet through seperate adsl)
- ip address 192.168.1.2
- GW 192.168.1.1
- Subnet 255.255.255.0


This should work, I have a similar set up but for a different reason than to connecting to the internet!

NIC
 
Disable DHCP service on your ADSL router and it an unused IP address in the main 'domain network' subnet that isn't part of the DHCP pool.

Then open up a command window on your PC and add a static route to send all traffic destined for the clients server IP out through your dedicated adsl line. it's quite simple and will look something like this
Code:
route -p add <clients ip> 255.255.255.255 <2nd adsl router ip>

This is the cleanest solution as it means your uploads won't interfere with your internet browsing, or anyone elses. You can also easily add routes in from other computers if more people need access to the "bulk upload" adsl line.


Ideally of course your techies would have a proper firewall/loadbalancing/QOS system that would let the company make better use of both lines.
 
Last edited:
You don’t need to have to have two networks to achieve what you want.

If you connect both routers to the same network using different IPs (say 192.168.1.1 and 192.168.1.254), this will then give any machine connected to the network two possible gateways to aim at. By default all the machines will continue to use the default gateway they’re told to via DCHP, and the second gateway will be ignored.

For your machine that needs to use the alternative gateway you just need override its gateway address. It will then use the alternative gateway for all external traffic.

As mentioned above it should also be possible to use a static route to just send the traffic intended for the external client via the alternative gateway.

The best approach would depend on detailed information about the existing network structure and the companies usage policies.
 
Last edited:
Dont set a default gateway on the card which is currently connected to the 'Domain'.

Install second LAN card and assign ip address (make sure its a different network/subnet from the 'domain' network) which is within the range of seperate adsl lines address. Set new LAN cards GW to seperate adsl lines LAN address.

i.e

NIC1 (connected to the original network)
- ip address 192.168.0.2
- GW 192.168.0.1
- Subnet mask 255.255.255.0

NIC2 (connected to the internet through seperate adsl)
- ip address 192.168.1.2
- GW 192.168.1.1
- Subnet 255.255.255.0


This should work, I have a similar set up but for a different reason than to connecting to the internet!

NIC

You need to be careful about doing this, I doubt the domain controllers or other systems are on the same subnet as his PC. Removing the current default root could prevent him being able to route to alternative subnet within the office network (thinking printers, different departments, file servers etc...)

If you know the network and subnets involved you can do as Gaz1988 says, but you will need to add persistent routes back in to other subnets your machine accesses via the old gateway.


Code:
route add -p 172.16.3.0 mask 255.255.255.0 192.168.0.1

You may also want to consider the companies IT policy on bridging networks, if I did what you say I'd be shot (connecting dirty adsl to clean office network) and rightly so...
 
How could i connect to 2 with only one nic :D


Exactly as Zarf said, and whilst what Eckmen said is a good point but I'm guessing if the IT depts solution to to your particular issue was "second PC and second internet connection" I'm guessing
that they are either really tight (hence wanting complete separate machines and connections so they will hit the roof) or really not (and only saw the extra PC and extra connection as the only way out so wont exactly care)
 
Last edited:
Back
Top Bottom