LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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-02-2009, 07:07 AM   #1
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Rep: Reputation: 30
Switch or Router? (3 servers)


Hello,

Please Please help me with this one
I have 3 servers. I connected two servers with 'Cross Cable' and they work fine, but when I tried to connect server3 to server1 with Cross Cable they can't ping to each other

What I'm doing wrong? maybe I need router? or external switch?

look at this

[root@server1 /]# ping 192.168.1.54
PING 192.168.1.54 (192.168.1.54) 56(84) bytes of data.
From 192.168.1.56 icmp_seq=2 Destination Host Unreachable
From 192.168.1.56 icmp_seq=3 Destination Host Unreachable
From 192.168.1.56 icmp_seq=4 Destination Host Unreachable

192.168.1.56 is the eth1 of server one! why it's pinging into himself?


Code:
[root@server1 /]# ping 192.168.1.54
PING 192.168.1.54 (192.168.1.54) 56(84) bytes of data.
From 192.168.1.56 icmp_seq=2 Destination Host Unreachable
From 192.168.1.56 icmp_seq=3 Destination Host Unreachable
From 192.168.1.56 icmp_seq=4 Destination Host Unreachable



[root@server1 /]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:22:19:5C:4D:4C
          inet addr:80.80.240.50  Bcast:80.80.240.255  Mask:255.255.255.0
          inet6 addr: fe80::222:19ff:fe5c:4d4c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:106628727 errors:0 dropped:0 overruns:0 frame:0
          TX packets:122905833 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17860911008 (16.6 GiB)  TX bytes:97241542919 (90.5 GiB)
          Interrupt:90 Memory:d6000000-d6012800

eth1      Link encap:Ethernet  HWaddr 00:22:19:5C:4D:4E
          inet addr:192.168.1.56  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::222:19ff:fe5c:4d4e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:835501569 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1730708116 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:56906304556 (52.9 GiB)  TX bytes:2518290131369 (2.2 TiB)
          Interrupt:98 Memory:d8000000-d8012800

eth2      Link encap:Ethernet  HWaddr 00:22:19:5C:4D:50
          inet addr:192.168.1.57  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::222:19ff:fe5c:4d50/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1518 (1.4 KiB)  TX bytes:7993 (7.8 KiB)
          Interrupt:106 Memory:da000000-da012800

eth3      Link encap:Ethernet  HWaddr 00:22:19:5C:4D:52
          inet addr:192.168.1.58  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:114 Memory:dc000000-dc012800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1963545 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1963545 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:331644107 (316.2 MiB)  TX bytes:331644107 (316.2 MiB)




Code:
[root@server3 ~]# ping 192.168.1.58
PING 192.168.1.58 (192.168.1.58) 56(84) bytes of data.

--- 192.168.1.58 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2000ms


[root@server3 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1E:C9:B0:7C:7C
          inet addr:80.80.240.49  Bcast:80.80.240.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:c9ff:feb0:7c7c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1424158 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72778 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:138178637 (131.7 MiB)  TX bytes:10447674 (9.9 MiB)
          Interrupt:169 Memory:f8000000-f8012100

eth1      Link encap:Ethernet  HWaddr 00:1E:C9:B0:7C:7E
          inet addr:192.168.1.54  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:c9ff:feb0:7c7e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:77 errors:0 dropped:0 overruns:0 frame:0
          TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:23146 (22.6 KiB)  TX bytes:12792 (12.4 KiB)
          Interrupt:169 Memory:f4000000-f4012100

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:179 errors:0 dropped:0 overruns:0 frame:0
          TX packets:179 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:108119 (105.5 KiB)  TX bytes:108119 (105.5 KiB)

Last edited by Stephan_Craft; 11-02-2009 at 07:10 AM.
 
Old 11-02-2009, 07:38 AM   #2
wfh
Member
 
Registered: Sep 2009
Location: Northern California
Distribution: Ubuntu Debian CentOS RHEL Suse
Posts: 164

Rep: Reputation: 44
Quote:
Originally Posted by Stephan_Craft View Post
What I'm doing wrong? maybe I need router? or external switch?
Short answer: Yes, get a switch!

Quote:
Originally Posted by Stephan_Craft View Post
[root@server1 /]# ping 192.168.1.54
PING 192.168.1.54 (192.168.1.54) 56(84) bytes of data.
From 192.168.1.56 icmp_seq=2 Destination Host Unreachable
...As highlighted in red, this is showing the host that is *ORIGINATING* the ping.
 
Old 11-02-2009, 07:52 AM   #3
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,095

Rep: Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112
Each of your servers has multiple network interfaces. Why?

Your server1 has four network interfaces with four different IP addresses. How/why did you configure it that way.

I'm not sure of the rules for configuring multiple interfaces.

Server1 seems to "know" that 192.168.1.* is reached through eth1.

Maybe you need to configure the private network between server1 and server3 as something else, such as 192.168.2.*


Rewiring it all using one interface and one IP address per server and using a switch to tie them all together would be the more common method and less confusing. I don't know whether you hope to transfer so much local data that direct connections are noticeably better and worth the trouble of working through this confusion.

Last edited by johnsfine; 11-02-2009 at 07:57 AM.
 
Old 11-02-2009, 07:59 AM   #4
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 201Reputation: 201Reputation: 201
It's not pinging into itself that I can see, it's trying to access x.x.x.54 from x.x.x.56 and x.x.x.56 doesn't seem to think that x.x.x.54 out there. I'm a big fan of routers and switches (a cheap gigabit switch can be had for under $50 here as of last week) so I've never tried your particular setup. Things I would check:

1. Can it ping itself? loopback and x.x.x.54
2. Can you ping in the other direction? that would tell you the cable and NICs are working correctly and that it's probably a path issue.
3. Swap cables around making sure to test a known good and the possible bad.
4. If all checks out well, try changing the network assignment for the specific link (change the x.x.1.x to x.x.2.x on both sides fo the link)
reconfigure the offending adapter.

Not knowing anything about your machine's setup aside from the adapter configuration, it may need additional configuration of services or packages.

And remember, switches are cheap! Good luck.
 
Old 11-02-2009, 09:57 AM   #5
roger_heslop
Member
 
Registered: Oct 2009
Location: Leander, TX
Distribution: Fedora 20
Posts: 82

Rep: Reputation: 31
In most setups I've seen, no two NICs are on the same subnet. If you have eth2 (on server 1) connected to server 3, and run a ping with eth1 on the same subnet, eth1 might reply that it can't find the address.
I would assume that changing either the subnet that server3 and server1 are communicating on, or changing the subnet of the other NIC should fix the problem.

If not running wireshark on the destination server will let you know if it,

1. See's the incoming ARP, and
2. If it's replying.

This should give you a good idea of where the problem is coming from.
 
Old 11-03-2009, 06:46 AM   #6
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by roger_heslop View Post
In most setups I've seen, no two NICs are on the same subnet. If you have eth2 (on server 1) connected to server 3, and run a ping with eth1 on the same subnet, eth1 might reply that it can't find the address.
I would assume that changing either the subnet that server3 and server1 are communicating on, or changing the subnet of the other NIC should fix the problem.

If not running wireshark on the destination server will let you know if it,

1. See's the incoming ARP, and
2. If it's replying.

This should give you a good idea of where the problem is coming from.
I tried to set them on subnet class-b 255.255.X.X but they couldn't communicate
tnx! i need to give Wireshark a try

Quote:
Originally Posted by damgar View Post
it's trying to access x.x.x.54 from x.x.x.56 and x.x.x.56 doesn't seem to think that x.x.x.54 out there. I'm a big fan of routers and switches (a cheap gigabit switch can be had for under $50 here as of last week) so I've never tried your particular setup. Things I would check:

1. Can it ping itself? loopback and x.x.x.54
2. Can you ping in the other direction? that would tell you the cable and NICs are working correctly and that it's probably a path issue.
3. Swap cables around making sure to test a known good and the possible bad.
4. If all checks out well, try changing the network assignment for the specific link (change the x.x.1.x to x.x.2.x on both sides fo the link)
reconfigure the offending adapter.

Not knowing anything about your machine's setup aside from the adapter configuration, it may need additional configuration of services or packages.

And remember, switches are cheap! Good luck.
1. Yes
2. Yes i can. if i turn off server2 and try to ping with server3 to server1, it's working.
3. I tried that already, also tried subnet class-b 255.255.X.X

Yeah my date-base center promised to give me 3com-switch for free))



Quote:
Originally Posted by johnsfine View Post
Each of your servers has multiple network interfaces. Why?

Your server1 has four network interfaces with four different IP addresses. How/why did you configure it that way.
.
Hmm I don't sure. At centos setup I had to set each eth* with ip and subnet, so I gave each eth a unique ip... can i give the same ip for eth1/2/3?

Quote:
Rewiring it all using one interface and one IP address per server and using a switch to tie them all together would be the more common method and less confusing. I don't know whether you hope to transfer so much local data that direct connections are noticeably better and worth the trouble of working through this confusion
please explain, what you mean by "Rewiring it all using one interface"

I can leave eth0(the internet connection on each server)
remove eth2 and etch3 from server1, then contact eth1 of each server to switch?

Last edited by Stephan_Craft; 11-03-2009 at 07:01 AM.
 
Old 11-03-2009, 07:56 AM   #7
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 201Reputation: 201Reputation: 201
Quote:
2. Yes i can. if i turn off server2 and try to ping with server3 to server1, it's working.
3. I tried that already, also tried subnet class-b 255.255.X.X
Seems that it's just path confusion. The switch should get you where you want to be. Maybe a reboot with the x.x.2.x's in place would get you working in the meantime (just a guess), but the switch is definitely a simpler configuration.

Good Luck
 
Old 11-03-2009, 08:02 AM   #8
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by damgar View Post
Seems that it's just path confusion. The switch should get you where you want to be. Maybe a reboot with the x.x.2.x's in place would get you working in the meantime (just a guess), but the switch is definitely a simpler configuration.

Good Luck
Never tried a switch before... how to config all that using switch?
 
Old 11-03-2009, 08:36 AM   #9
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 201Reputation: 201Reputation: 201
Quote:
I can leave eth0(the internet connection on each server)
remove eth2 and etch3 from server1, then contact eth1 of each server to switch?
Sounds like you will leave your Internet connections alone (public IP addresses/eth0 in your case I guess) and like you said above, leave just one other adapter per machine (eth1) and assign each of these an address from your 192.168.1.x private network. Plug a straight-thru cable into each adapter, the other end into the switch's lan ports and that should be the end of it. Simple. The only problem you might have is if the switch has a previous configuration in it you might need to default it or otherwise reconfigure it. That would be dependent on the switch model. Generally, there is nothing more to do than plug it in and assign addresses to the adaptors.
 
Old 11-03-2009, 11:42 AM   #10
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by damgar View Post
Sounds like you will leave your Internet connections alone (public IP addresses/eth0 in your case I guess) and like you said above, leave just one other adapter per machine (eth1) and assign each of these an address from your 192.168.1.x private network. Plug a straight-thru cable into each adapter, the other end into the switch's lan ports and that should be the end of it. Simple. The only problem you might have is if the switch has a previous configuration in it you might need to default it or otherwise reconfigure it. That would be dependent on the switch model. Generally, there is nothing more to do than plug it in and assign addresses to the adaptors.
Thanks a lot man =)
I'll try this Tomorrow.
 
Old 11-03-2009, 07:14 PM   #11
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 201Reputation: 201Reputation: 201
No problem. Hope all goes well.
 
Old 11-03-2009, 08:41 PM   #12
chappel
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Rep: Reputation: 1
In a standard configuration, each ethernet interface on a single device is expected to be on a unique subnet. Your server1 configuration shows interfaces eth1 - eth3 all having unique IP addresses, but are all on the same subnet. Looking at your routing table ('ip route show') you should have a path to each subnet reachable by that machine, with a single interface providing the path to each subnet, and ONE providing a default path to all other (unlisted) subnets. If you have multiple interfaces all pointing to the same subnet the machine won't know which to send traffic to. It is possible to interconnect three servers without a switch, but you'll need to configure a unique subnet for each connection pair, and enable routing on the machine in the middle if you want the machines on the ends to talk to each other.

Unless you are interesting in learning about subnets and routing (very beneficial if you have the time!), using a switch is by far the easier way to connect three servers. Plug ONE interface from each server into the switch, each with a unique IP but a matching subnet, and pick one to be the default gateway and pass traffic on to the next network (most likely the Internet).
 
Old 11-04-2009, 07:43 AM   #13
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 201Reputation: 201Reputation: 201
ip route show
Good command to know. Thanks
 
Old 11-04-2009, 11:52 AM   #14
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Original Poster
Rep: Reputation: 30
tnx! everything is working great now =)

Last edited by Stephan_Craft; 11-06-2009 at 03:26 PM.
 
  


Reply


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
Whats the best way to switch IP Addresses between servers in a redundant architecture helptonewbie Linux - Newbie 2 08-26-2008 12:14 PM
tell me the process router to router, hub to hub and switch to switch communication. yakuza003 Linux - Networking 4 06-21-2008 07:55 AM
Switch vs router? maxsanders Linux - Networking 4 07-16-2007 11:00 AM
How to switch off all X-Servers.. RetepNamenots Linux - Software 3 10-19-2006 03:53 PM
>1 router, one switch glj Linux - Networking 3 09-30-2002 03:25 PM


All times are GMT -5. The time now is 08:01 AM.

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