Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   Networking (https://www.cableforum.uk/board/forumdisplay.php?f=87)
-   -   2 routers, 2 internet connections, 1 LAN possible? (https://www.cableforum.uk/board/showthread.php?t=33665314)

Chrysalis 20-05-2010 01:34

2 routers, 2 internet connections, 1 LAN possible?
 
ok here is my current setup.

1 x VM connection.
1 x ukonline connection.
router for ukonline ip 192.168.1.254
router for VM ip 192.168.1.1
so both routers same subnet.
laptop connected to ukonline router
desktop pc 1 connected to VM router
xbox360 connected to VM router.
desktop pc 2 connected to nowhere at the moment isnt often used

My theory is I can very easily get my laptop and desktop pc 1 talking to each other simply by connecting a cable between both routers, since they all on the same subnet thats all I need to do.

am I right or is something else required?

Tali 20-05-2010 15:38

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
It's been a while since I did any networking but I think this should work. I can't remember whether you need to connect the routers together with a cross over cable or a normal cable, but whatever happens, the routers will need to be on different sub-nets.

eg UK Online 192.168.1.*
VM 192.168.2.*

However, you might not want to connect 2 routers together that are facing the internet as you may find that the traffic is all routed to one connection or the other. It all depends on the abilities of the router and whether you can set up the routing yourself.

jamiefrost 20-05-2010 16:10

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
The problem will be both routers trying to issue IP addresses and set themselves as the default gateway.

You will need to manually set the configurations for each PC otherwise I don;t think you will be able to guarantee which device connects to which internet connection.

JJ

theoldbill 20-05-2010 16:55

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
Turn DHCP off on one of the routers so only one allocates IPs and manually set whichever gateway you wish to use on each PC/device (or write a handy .bat script to make this as easy as picking from a basic menu!). Using a static IP for each PC and turning off the automatic assignments is the way to go.

I have 4 internet gateways here running no problem on the same LAN, works perfectly.

Lord Nikon 20-05-2010 17:16

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
Wrong, whichever router is allocating IP via DHCP will set itself as default gateway. Both machines need to be set to manual IP, both routers need DHCP disabled, and the default gateway you set on each device will determine it's internet routing.

theoldbill 20-05-2010 17:40

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
Quote:

Originally Posted by Lord Nikon (Post 35025217)
Wrong, whichever router is allocating IP via DHCP will set itself as default gateway. Both machines need to be set to manual IP, both routers need DHCP disabled, and the default gateway you set on each device will determine it's internet routing.

On my LAN I have dynamic hosts so need one router with DHCP that's why I said leave one with it enabled - or were you correcting somebody else's post? Either way it works for me and I'm only trying to help ;)

Ignitionnet 20-05-2010 18:25

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
Quote:

Originally Posted by Chrysalis (Post 35024903)
ok here is my current setup.

1 x VM connection.
1 x ukonline connection.
router for ukonline ip 192.168.1.254
router for VM ip 192.168.1.1
so both routers same subnet.
laptop connected to ukonline router
desktop pc 1 connected to VM router
xbox360 connected to VM router.
desktop pc 2 connected to nowhere at the moment isnt often used

My theory is I can very easily get my laptop and desktop pc 1 talking to each other simply by connecting a cable between both routers, since they all on the same subnet thats all I need to do.

am I right or is something else required?

Oh they'll see each other easily enough, just not whatever is behind each one. Remember that they will both perceive themselves as being the gateway to the network 192.168.1.0/24 so will look for a directly connected device.

If you connect them via their respective LAN ports your internal network will be just fine, apart from where the devices are to get their DHCP leases from - both devices would respond to a broadcast discovery message, and the potential for IP addressing conflict as both are handing out IP leases in total ignorance of devices taking leases from the other. You could turn DHCP off on one of the devices then you need to mess around with static assignment, not ideal.

I could go on, but the point is don't do it. Where there are 2 routers on a single subnet they are running some kind of redundancy protocol such as HSRP to avoid the problems your set up would cause and devices aren't taking IP leases from the router.

You would need a dual-WAN router in between your LAN and the two routers, with a switch connecting to that dual-WAN router if there weren't enough ethernet ports available for your needs on the dual-WAN device. This would also have the bonus of allowing you to load balance between the connections.

Chrysalis 21-05-2010 02:43

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
thanks for the replies, so not as simple as I thought then. I did have concerns about my devices been confused over which internet connection to use which was why I didnt just go ahead and do it.

theoldbill 21-05-2010 04:50

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
It /IS/ simple.

I have a working setup as I said, with no problems! Just connect your patch cable between the two routers and it's done! If you need dhcp capability just make sure only one router has it enabled (decide which connection you want as your 'main' one for devices to use as default). For other machines use static IP and manually set the gateway yourself or do as I have and have a script you can run to pick the gateway from a menu as and when you want to change it - simple!

Chrysalis 21-05-2010 06:07

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
sorry didnt read your posts properly.

so I am guessing when a dhcp client connects to a network it scans for dhcp servers, as long as only one dhcp server exists there is no problem. The router which has dhcp disabled I then manually configure the machines that use it.

I am also guessing I can even connect a device to the router that wont be its gateway? so as to avoid unneeded long runs of cable.

Jon T 21-05-2010 08:11

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
Quote:

Originally Posted by Chrysalis (Post 35025471)
sorry didnt read your posts properly.

so I am guessing when a dhcp client connects to a network it scans for dhcp servers, as long as only one dhcp server exists there is no problem. The router which has dhcp disabled I then manually configure the machines that use it.

I am also guessing I can even connect a device to the router that wont be its gateway? so as to avoid unneeded long runs of cable.

A DHCP client will transmit a "DHCP discover" message to try and find any DHCP servers on the network, any DHCP servers on the network able to giv out an IP will then back an "offer", multiple DHCP servers may respond, so the client will then send a reqeust to one of the servers that responded. When a DHCP server recieves this request, IP configuration in then transmitted to the host.

In answer to your second question, think of a router as two devices in one, the router/gatway/NAT section, and a switch connected to that. So, if you have two routers connected together, your actually connecting the two switch's together. So yes, device's connecting to one router will be able to use the gateway of the other.

theoldbill 21-05-2010 08:31

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
Quote:

Originally Posted by Chrysalis (Post 35025471)

I am also guessing I can even connect a device to the router that wont be its gateway? so as to avoid unneeded long runs of cable.


Yes that's right!

:)

Chrysalis 22-05-2010 06:20

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
I did as theoldbill said and works well.

my wireless on the laptop was set to dhcp and originally went over VM, then I manually reconfigured the gateway and was over ukonline, so I can now interswitch connections without physical work, very good.

also can now access both routers from this pc as well as my laptop.

Matth 23-05-2010 17:51

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
Using the "ROUTE" command in Windows, you can even send traffic over different routes from the same machine, by adding a route which puts a certain IP range to the other (not default gateway) router as the next hop.

Chrysalis 24-05-2010 06:21

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
yeah looks similiar to unix route so I can even assign both gateways to 0.0.0.0 so if one connection goes down the other auto takes over.

Chrysalis 24-05-2010 12:55

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
C:\Windows\system32>route ADD 212.58.224.138/32 MASK 255.255.255.0 192.168.1.254
METRIC 5
OK!

C:\Windows\system32>tracert bbc.co.uk

Tracing route to bbc.co.uk [212.58.224.138]
over a maximum of 30 hops:

1 <1 ms <1 ms <1 ms home.router [192.168.1.254]
2 11 ms 10 ms 8 ms cr1.emcentl.uk.easynet.net [195.189.159.163]
3 5 ms 4 ms 5 ms ip-87-87-168-65.easynet.co.uk [87.87.168.65]
4 15 ms 13 ms 13 ms te0-1-0-5.er11.thlon.ov.easynet.net [89.200.135.
37]
5 13 ms 13 ms 12 ms 212.58.238.189
6 12 ms 12 ms 12 ms 212.58.238.129
7 13 ms 13 ms 13 ms virtual-vip.thdo.bbc.co.uk [212.58.224.138]

works well.

default route is 0.0.0.0 metric 10 via 192.168.1.1 router (VM)

C:\Windows\system32>route PRINT *
<snip crap>
IPv4 Route Table
================================================== =========================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.124 10
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.1.0 255.255.255.0 On-link 192.168.1.124 261
192.168.1.124 255.255.255.255 On-link 192.168.1.124 261
192.168.1.255 255.255.255.255 On-link 192.168.1.124 261
212.58.224.138 255.255.255.255 192.168.1.254 192.168.1.124 10
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.1.124 261
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.1.124 261

so although it works it doesnt show when I list.

theoldbill 24-05-2010 19:01

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
Quote:

Originally Posted by Chrysalis (Post 35027188)
C:\Windows\system32>route ADD 212.58.224.138/32 MASK 255.255.255.0 192.168.1.254
METRIC 5
OK!


Make sure you add the -p command to make the route persistent otherwise it'll only last till reboot.

You may want to add a static route for VM's pop3 email service as outgoing emails can only be sent from VM IPs (you can receive mail via other gateways but not send).

Chrysalis 25-05-2010 07:12

Re: 2 routers, 2 internet connections, 1 LAN possible?
 
ok thanks, as it stands now VM is the default connection so if I do use the VM email servers I wont need to add a route for it.


All times are GMT +1. The time now is 19:16.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum