LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Configuring IP's when expanding network with 2nd router (http://www.linuxquestions.org/questions/linux-networking-3/configuring-ips-when-expanding-network-with-2nd-router-772039/)

zugvogel 11-28-2009 01:43 AM

Configuring IP's when expanding network with 2nd router
 
Hello,
I have a problem expanding my wired network with a 2nd router - I wonder if anyone can help me sort out IP addresses?

My situation is as follows:

I have 1 LAN router with wired connections (no wireless involved), through which a number of computers connect to the internet. They all have static IP addresses. All computers on the 1st router are directly open to the internet.

I ran out of space for connections so I bought a 2nd LAN router, and connected the "WAN"-labelled connection on the 2nd router to the 1st router. This 2nd router has also been given a static IP address (eg, .81) with gateway, dns etc in exactly the same way as when I set up one of the computers that connect to the 1st router directly.

I now have 2 computers that I would like to connect to the 2nd router. I tried giving them static IP addresses as before (.82 and .83), but they can't connect to the internet. Maybe the 1st router is confused, since it's expecting the 2nd router to be a computer, not a router?

Any help on this would be much appreciated.

Thanks!

acid_kewpie 11-28-2009 02:32 AM

you've not mentioned anything useful about your subnets. These two sets of clients have different subnets, right? Something like 192.168.1.0/24 and 192.168.2.0/24? In that case the "main" router needs to know where the 2nd subnet lives. So you need to update its routing table to point that subnet back via the IP of the outside interface of the 2nd router. Alternatively if you configure the 2nd router to NAT all connections going through it, then all traffic hitting the 1st router will think it is all actually coming from the 2nd router, which it knows about, rather than the machines behind it, which it doesn't. Both these two things depend on the functionality of your router.

Another third option would also be to increase your subnet size, change /24 to /23 and then you've doubled the amount of machines that one router can handle. You don't mention in what way you've run out of space though. You don't just mean you ran out of physical ports do you?? I really hope not - that would just be a case of buying a new switch.

zugvogel 11-28-2009 04:15 AM

Hello and thanks for your reply.

It is indeed the case that I've run out of ports: there is space for 8 computers, and I now have 9 computers. You say I may need a "switch" instead of a "router"? I looked up "network switch" on wikipedia and it looks quite complicated. Is there a simple way to expand my network with the 2nd router I've just bought?

Regarding the subnets, the first router has an IP beginning 163.239. and all the IP addresses of the computers directly connected to this 1st router begin 163.239.

The 2nd router begins with 192.168. and for example, it assigns a local 192.168.xxx.xxx IP address via DHCP if requested to any computers that connect to it. This is not what I want however. My aim is to connect 2 new computers to this 2nd router, and give each of these 2 computers 163.239.xxx.xxx IP addresses so they can seamlessly connect with the outside world, and be connected to from the outside world, just like the other computers which connect directly to the 1st router.

I hope that's a little clearer - I've never had to deal with more than 1 router before so it's all new to me. I appreciate your help.

acid_kewpie 11-28-2009 09:42 AM

quite complicated? A simple switch costs $10 and requires no configuration whatsoever... it's just the 8 ports in the back of your router, that IS a switch. the bit that provides you internet access and does all the "fancy" stuff is the router part of the device.

Right... so, you bought the wrong thing, and wasted your money. take it back and buy an 8 port switch for a fraction of the cost and just plug it in.

zugvogel 11-28-2009 07:56 PM

A switch it is then
 
Hello,

Thanks for your help - I appreciate you taking the time to help me. It seems a "switch" rather than a "router" is what I need then.

Just so there's no misunderstanding: the router will not be confused if 7 of its ports are connected to individual computers and 1 of its ports is connected to the switch which connects to two more computers, right? I can still assign these two computers individual 163.239.xxx.xxx static IP addresses just like I did with the other computers - in other words, the switch will basically be invisible as far as the network is concerned?

nimnull22 11-28-2009 09:24 PM

Any router may work like switch. How many ports your second router has?

zugvogel 11-29-2009 03:25 AM

Hi Nimnull22,
The new router has 8 ports + a 'wan' port which I connect to a port in the 1st router (which also has 8 ports).
In case I can't return the router, if you have a way to achieve what I'm aiming for with the 2nd router, I'd be interested to learn about it.

catkin 11-29-2009 08:22 AM

You can probably use your router as a switch by using its LAN ports only. This arrangement is slightly better than a basic switch because the router itself has an IP address and that can be useful when troubleshooting.

If you decide to try this, it's a good idea to run through the router configuration and turn unwanted things off -- such as DHCP service, UPnP, WAN (to save some electricity) ...

nimnull22 11-29-2009 11:51 AM

Quote:

Originally Posted by zugvogel (Post 3772948)
Hi Nimnull22,
The new router has 8 ports + a 'wan' port which I connect to a port in the 1st router (which also has 8 ports).
In case I can't return the router, if you have a way to achieve what I'm aiming for with the 2nd router, I'd be interested to learn about it.


You need crossover ethernet cable. On router #2 turn as much services as possible.
Connect an ordinary port of router#1 to ordinary port of router#2. To the others port of router#2 connect you computers by straight cable.
Configuration: router#2 - doesn't need any. Computers are connected to #2 - remember that that they are in the same LAN now. So, the same GW, IP addresses like in router #1.

When you connect it all together, ping computers from router#1, and router#1, WAN port.

catkin 11-29-2009 11:59 AM

Quote:

Originally Posted by nimnull22 (Post 3773366)
You need crossover ethernet cable.

That used to be so but many current generation devices auto-sense the cable and adjust accordingly. It's not wrong to use a crossover cable in this situation but it may not be necessary.

nimnull22 11-29-2009 12:08 PM

Quote:

Originally Posted by catkin (Post 3773379)
That used to be so but many current generation devices auto-sense the cable and adjust accordingly. It's not wrong to use a crossover cable in this situation but it may not be necessary.

Do you know why so many problems this software, hardware? Because people rely on something like "many current generation devices auto-sense". So if you are lazy, and want to confuse other, don't post here, please.

He needs crossover cable to connect two switch/routers.

catkin 11-29-2009 12:23 PM

Quote:

Originally Posted by nimnull22 (Post 3773394)
Do you know why so many problems this software, hardware? Because people rely on something like "many current generation devices auto-sense". So if you are lazy, and want to confuse other, don't post here, please.

He needs crossover cable to connect two switch/routers.

I am posting via a switch connected to a router (used as a switch) connected to a switch connected to another switch connected to a router and not a single crossover cable in the entire network. We don't have any "problems this software, hardware".

It is neither lazy nor confusing, it is simply using the the hardware's features for the network administrators' convenience. Actually it's less confusing because we do not have to keep crossover cables in stock, unlike the bad old days when standard and crossover cables used to get mixed up.

acid_kewpie 11-30-2009 02:32 AM

I would be VERY suprised to need a crossover cable to connect ANY device aimed at a home market made in the last 10 years. Whilst it can't be 100% guarenteed, I wouldn't doubt anyone's advice that it'll probably be fine is worth taking as a strong recommendation, and not confusing at all.

1) take router back, get refund.
2) buy switch for 1/4 of the price.
3) connect switch to router with standard straight network cable.
4) plug additional machines into switch.

simple. easy.

zugvogel 12-04-2009 12:10 AM

Thanks!
 
Thanks for all of your replies. It's good to get different ideas and opinions. In the end, I was able just to take a line from a port on the 1st router, and plug it in to a normal port (not the WAN port!) on the 2nd router. The 2nd router is then basically invisible, and plugging additional computers into ports on the 2nd router is just like plugging into the 1st router itself - the network doesn't care as far as IP addresses are concerned.

Plugging a cable from a port on the 1st router to a normal (not WAN) port on the 2nd router is not intuitive to me, but this seems to be the way to do it. Thank you all for taking the time to help me!


All times are GMT -5. The time now is 05:04 AM.