LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 12-20-2008, 04:40 AM   #1
denisj
LQ Newbie
 
Registered: Dec 2008
Posts: 7

Rep: Reputation: 0
2 servers and more 2 eth cards to comunicate


Hi all,
i have a little problem.

I have 2 servers.. all 2 with inside:
eth0 that go external to my router
eth1 that i connect via crossed-cable in order to comunicate
from server1 to server2 directly with out router.

My question is: witch gateway i must set on the two eth1 ?
...cause i can't see, for example, the server2 from server1 trough the two eth1 cards.

I must play with route ?

Thanks all for the help
Denis
 
Old 12-20-2008, 04:41 AM   #2
denisj
LQ Newbie
 
Registered: Dec 2008
Posts: 7

Original Poster
Rep: Reputation: 0
p.s. i allready set gtw of the eth1 cards with the ip of the other eth1
... but ca't see it

Thanks again
 
Old 12-20-2008, 04:51 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can you give the output of "ifconfig" and "route -n" for both machines, and what are you trying to do when you "can't see" the other server (with output of the command if possible)?
 
Old 12-20-2008, 08:00 AM   #4
denisj
LQ Newbie
 
Registered: Dec 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by billymayday View Post
Can you give the output of "ifconfig" and "route -n" for both machines, and what are you trying to do when you "can't see" the other server (with output of the command if possible)?
Ok ... first of all thanks a lot for the help... i go creasy
here is my ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr 00:14:5E:28:11:E8
          inet addr:192.168.1.90  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::214:5eff:fe28:11e8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:232 errors:0 dropped:0 overruns:0 frame:0
          TX packets:189 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29343 (28.6 KiB)  TX bytes:25692 (25.0 KiB)
          Interrupt:169

eth1      Link encap:Ethernet  HWaddr 00:14:5E:28:11:E9
          inet addr:10.10.10.110  Bcast:10.10.10.255  Mask:255.255.255.0
          inet6 addr: fe80::214:5eff:fe28:11e9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:4422 (4.3 KiB)
          Interrupt:169

eth2      Link encap:Ethernet  HWaddr 00:10:18:0C:E1:3E
          inet addr:10.10.11.122  Bcast:10.10.11.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:209

eth3      Link encap:Ethernet  HWaddr 00:10:18:0C:E1:3F
          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:201

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:298709 errors:0 dropped:0 overruns:0 frame:0
          TX packets:298709 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:97936140 (93.3 MiB)  TX bytes:97936140 (93.3 MiB)
the eth3 is stoped ... i don't use it for now

... and here is route:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.10.10.0      0.0.0.0         255.255.255.0   U     0      0        0 eth1
10.10.11.0      0.0.0.0         255.255.255.0   U     0      0        0 eth2
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth2
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
Pratically what i want is to comunicate between the two servers thru
the eth2 cards with out a router ... just a crossed cable.

Thanks again for the help
Denis
 
Old 12-20-2008, 01:58 PM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What about the other machine?
 
Old 12-20-2008, 04:34 PM   #6
denisj
LQ Newbie
 
Registered: Dec 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks again Billy for attention...

let's make the simple first question... about gateway of the eth2 cards

My situation is... i must send the two servers in housing.
This servers will have only one ethernet cable to external router.
One by server. Two in total.

And here is the first think; the servers is ibm and have a rsa cards (like DRAC of hp) for controll the boot, bios etc ... via ethernet.
The problem is that i will have only one external cable by server.

For this reason i need the eth1 cards on servers:
if, for example, the server1 is broke, i will see and controll it, trought server2 cable > eth0 > eth1 > server1:rsa card.
... and vice versa if the server2 will broke.

The eth2 cards i need because all trafic between servers, like sync, nfs
etc... i will pay if will go trought the external router.
For this i need to use the cross over cable between
server1:eth2 and server2:eth2

here is my situation for now:
Code:
server1
eth0 192.168.1.90    gtw 192.168.1.1      link at internet router
eth1 10.10.10.110    gtw 192.168.1.90     link at  rsa2 client 
eth2 10.10.11.122    gtw now have nothing link at server2:eth2 cross
rsa1 10.10.10.111    gtw 10.10.10.210     link at server2:eth1

server2
eth0 192.168.1.91    gtw 192.168.1.1      link at internet router
eth1 10.10.10.210    gtw 192.168.1.91     link at  rsa1 client 
eth2 10.10.11.222    gtw now have nothing link at server1:eth2 cross
rsa2 10.10.10.211    gtw 10.10.10.110     link at server1:eth1
The ibm rsa1 is inside of server1 and rsa2 is inside of server2...
is work as a normal lan client.


I have make a nat iptables for the rsa card for now:
all trafic arrive on server1:eth0 port:8888 is forward on
rsa2 on port 80 ... and this is work
It's work also viceversa... from server2 to rsa1.

The problem begin when i put the eth2 cards...
For the fist... i don't know witch gateway i must assing.

if i make ping from server1 to server2:

Code:
[4 root@ns3 /etc]=> ping 10.10.11.222
PING 10.10.11.222 (10.10.11.222) 56(84) bytes of data.
From 10.10.11.122 icmp_seq=2 Destination Host Unreachable
or
Code:
[4 root@ns3 /etc/shorewall]=> ping -I eth2 10.10.11.222
PING 10.10.11.222 (10.10.11.222) from 10.10.11.122 eth2: 56(84) bytes of data.
From 10.10.11.122 icmp_seq=2 Destination Host Unreachable
Obviusly if still need the ifconfig from the servers i'll paste here.
But for now i need to understant if the gateway is ok,
and if i must play with routes table.

Thanks a lot.
Denis
 
Old 12-20-2008, 08:49 PM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I don't quite follow the tables in the above post, but according to the routing table given earlier, pinging 10.10.11.222 should go via eth2
Code:
10.10.11.0      0.0.0.0         255.255.255.0   U     0      0        0 eth2
Are you sure the cable is OK?

Read this as a general guide to routing http://linux-ip.net/html/ch-routing.html - it'll give you a much better idea of what routes/gateways, etc. are.
 
Old 12-20-2008, 09:39 PM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I've got some more time now, sop let me explain your routing table

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.10.10.0      0.0.0.0         255.255.255.0   U     0      0        0 eth1
10.10.11.0      0.0.0.0         255.255.255.0   U     0      0        0 eth2
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth2
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
Ignore the 169 line (that's broadcast stuff)

Any traffic destined for an IP address in the 192.168.1.0/255.255.255.0 range (ie 192.168.1.0-192.168.1.255) will be sent via eth0.

Any traffic for 10.10.10.0-10.10.10.255 will be sent via eth1

Any traffic for 10.10.11.0-10.10.11.255 will be sent via eth2

Any traffic that doesn't get caught above (to say 77.123.32.65) will go via the default gateway, in this case eth0

So when you ping 10.10.11.222, this falls in the range 10.10.11.0-10.10.11.255, it's automatically sent via eth2.

hopefully that helps clarify how it works a bit.

Last edited by billymayday; 12-20-2008 at 09:42 PM.
 
Old 12-21-2008, 12:29 AM   #9
denisj
LQ Newbie
 
Registered: Dec 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Hi Billy, and welcome to another day :-)

...well the cable is ok cause i can use it with other pc, also the leds is green.

But anyway can't ping... is the gateway ok if i let it blank ? on the two eth2 ?
... if not, witch gateway i must put there ?

Thanks again.
Denis
 
Old 12-22-2008, 04:57 PM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I think your route is OK.

I'd put a copy of wireshark on each box and monitor network traffic on that interface when you try to ping.

Don't forget, it could just be your firewall blocking pings.

Can you connect with ssh or anything else?

Perhaps the card(s) have a problem? Are the light on? Can you switch with eth1 for example?
 
  


Reply



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
VMware on Mandrivia 2005LE, problem with handling 2 eth cards vratojr Linux - Networking 0 12-05-2005 05:15 AM
Need help to route traffic properly with 2 eth cards mchan Linux - Networking 1 03-20-2005 07:55 PM
Two identical eth cards (tulip driver error) pgmer6809 Linux - Hardware 1 04-20-2004 12:43 AM
Trouble config. two eth. cards to act as a router ConcreteClam Linux - Networking 4 01-28-2004 01:51 PM
2 static IP addresses on 2 eth cards Zingaro2002 Linux - Networking 8 01-21-2003 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:35 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration