LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-28-2009, 12:43 AM   #1
zugvogel
LQ Newbie
 
Registered: Sep 2005
Location: Tokyo, Japan
Distribution: Mac, Ubuntu, Debian and Centos
Posts: 28

Rep: Reputation: 16
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!
 
Old 11-28-2009, 01:32 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
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.
 
Old 11-28-2009, 03:15 AM   #3
zugvogel
LQ Newbie
 
Registered: Sep 2005
Location: Tokyo, Japan
Distribution: Mac, Ubuntu, Debian and Centos
Posts: 28

Original Poster
Rep: Reputation: 16
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.
 
Old 11-28-2009, 08:42 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
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.
 
Old 11-28-2009, 06:56 PM   #5
zugvogel
LQ Newbie
 
Registered: Sep 2005
Location: Tokyo, Japan
Distribution: Mac, Ubuntu, Debian and Centos
Posts: 28

Original Poster
Rep: Reputation: 16
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?
 
Old 11-28-2009, 08:24 PM   #6
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Any router may work like switch. How many ports your second router has?
 
Old 11-29-2009, 02:25 AM   #7
zugvogel
LQ Newbie
 
Registered: Sep 2005
Location: Tokyo, Japan
Distribution: Mac, Ubuntu, Debian and Centos
Posts: 28

Original Poster
Rep: Reputation: 16
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.
 
Old 11-29-2009, 07:22 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
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) ...
 
Old 11-29-2009, 10:51 AM   #9
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Quote:
Originally Posted by zugvogel View Post
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.
 
Old 11-29-2009, 10:59 AM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by nimnull22 View Post
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.
 
Old 11-29-2009, 11:08 AM   #11
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Quote:
Originally Posted by catkin View Post
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.

Last edited by nimnull22; 11-29-2009 at 11:11 AM.
 
Old 11-29-2009, 11:23 AM   #12
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by nimnull22 View Post
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.
 
Old 11-30-2009, 01:32 AM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
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.
 
Old 12-03-2009, 11:10 PM   #14
zugvogel
LQ Newbie
 
Registered: Sep 2005
Location: Tokyo, Japan
Distribution: Mac, Ubuntu, Debian and Centos
Posts: 28

Original Poster
Rep: Reputation: 16
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!
 
  


Reply

Tags
expansion, networking, router


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
D-Link 904 Wireless router has 2 ISP IP's?? turnbui Linux - Networking 2 11-22-2009 04:03 AM
[SOLVED] trouble expanding 4+TB GPT partition after expanding hardware RAID-5 volume muad'dib Linux - Enterprise 6 09-26-2009 05:01 PM
Suggestions for a Router for business with multiple static IP's TheLinuxDuck Linux - Networking 4 12-20-2005 10:03 AM
My laptop receives an IP via DHCP, but can't ping router or outside IP's! Max P0wer Linux - Networking 12 08-17-2004 05:45 PM
2 NICs, 2 external IP's (1 behind a router) yskwong Linux - Networking 5 05-25-2001 07:22 AM


All times are GMT -5. The time now is 08:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration