View Full Version : 2 internet connections, 2 LAN ports
[H8]Techno-P
27th October 2007, 10:14
Hi hi!
I work, funnily enough as a 1st line support guy for a business ISP, so laugh at me when i ask this!:
I have an existing virgin broadband service, which i pay for, and it comes in, and goes to router, which then connects to my PC on my DFI mobo (ethernet port 1).
Work has supplied me with a telephone line, ADSL service, router and IP phone. Router is connected to ethernet port 2 on my mobo.
All works okay, and i have DNS access to my work, so i can access all thier stuff, however, my internet now just seems to want to use the ADSL line, and nothing really of the virgin line, which i want to use for my normal internet access and downloading of "things" which i have ports forwarded for on my virgin router.
How can i go about this? I still need to keep it all plugged in, as i need to log stuff via the DNS, so i need that, but i want to shift all the rest of the stuff to my virgin line..
Thanks in advance
Portia
27th October 2007, 10:40
The default gateway will be set to your work router.
You wil need to set the default gateway back to Virgin and update your routing table so anything destined for you work's network gets sent to the work router.
Sorry, I forgot to laugh "Ha Ha Ha"
:)
[H8]Techno-P
27th October 2007, 11:03
yeah, not been in this job long, how do i do that? windows XP btw
Thanks :)
[H8]Techno-P
27th October 2007, 15:21
bump! i need help!
Portia
27th October 2007, 16:18
I haven't got 2 nics set up at the moment to test, but you will need to set the ip of your Virgin router as the default gateway, which may well need you to hardcode your virgin nic and possibly your work nic.
After that, you just need to update your routing table:
route add <<work network>> mask <<work mask>> <<work router ip>>
Once you have verified it works (http://www.whatsmyip.org/ is your friend) add -p to the route command, to make it stick after a reboot.
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/route.mspx?mfr=true
has more info...
[H8]Techno-P
27th October 2007, 16:33
thx, will try
WhiteKnight
27th October 2007, 17:20
What Portia said will work, however a slightly more flexible solution might be to setup a firewall with 3 interfaces.
I use this: www.pfsense.com
It supports multiple internet connections and inteligent routing and stuff. One useful option is that you can configure load balancing or redundancy. By default you might use one for work and one for home, but if virgin goes down, all traffic gets routed to the work router automatically. (or vice-versa).
Might be worth a look.
KingDaveRa
27th October 2007, 18:41
I was thinking I'd personally prefer to do what WK says.
Failing that, you could probably get away with having both routers on the same LAN (say plugged into a switch). Use one as your 'primary', say the Virgin one. Then tell it that all of your work's subnets are via the ADSL router's interface.
That way, all work traffic should transparently nip off over that connection, whilst all other stuff goes through the Virgin link. I don't think you could set a second default gateway though, to send 0.0.0.0/255.255.255.255 via. I think you can only have one.
/me ponders
Portia
27th October 2007, 19:36
I don't think you could set a second default gateway though, to send 0.0.0.0/255.255.255.255 via. I think you can only have one.
/me ponders
You can only have one default gateway, hence having to edit the routing tables.
You can do this on external kit, which is better, but needs external kit, or you can the client to do it.
I had this problem when connecting to work via a vpn and wanted to split work and private traffic...
Actually, if you have a decent router, you could put them on the same lan and have that do do the routing for you...
/me also ponders
Jez_Gafys
27th October 2007, 20:31
Make sure you delete the existing 0.0.0.0 route first though because i've seen xp and vista have two 0.0.0.0 routes and you get all kinds of issues
route delete 0.0.0.0
route add 0.0.0.0 MASK 0.0.0.0 <router ip> you maybe need to use /p as well to make it persistent.
Like king say you can direct all your work traffic done one router and the rest down yah virgin one thats what I do anyways
GeeDee
28th October 2007, 12:21
You can only have one default gateway, hence having to edit the routing tables.
Except that there's even an option in the TCP/IP GUI for adding multiple default gateways you mean? You obviously have to assign different metrics to each one however.
Where the GUI appears to be lacking is in configuring static routing (which seems to be what you're trying to do). Portias MS.com link or this (http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sag_tcpip_pro_addstaticroute.mspx?mfr=true) one should give you the right syntax for adding additional routes. :)
Jez_Gafys
28th October 2007, 18:22
Hmmm never bothered with metrics when adding static routers ever.
Elkeeed
28th October 2007, 18:24
vpn gives an option, with a second lan port you have to do it using the commandline. using route add/delete. Its not that tricky.
You only need metrics when you have 2 routes for the same address. It would explain why you had problems with 2 default gateways :)
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.