hello,
I have a Linux server with two interfaces eth0 and eth1. I configured two IP addresses from two different networks on 2 interfaces, and I connected both interfaces on two different switches.
the IP address of eth0 is responding without problem to ping from equipment of its home network, unfortunately this is not the case for the IP address of eth1. a moment I thought the problem was on the switch, but when I try to connect another device on the same switch port, this device can communicate with others on the same network. LEDs are lit, but impoosible to ping the IP address of eth1.
suddenly I thought to myself that maybe the problem come from the IP configuration on the interface eth1, or within the system that I do not control too.
well, I have to ask you for help to solve this problem.
Well, there is no eth1. All the other NICs have traffic shown for RX and TX. If you are talking about eth2, have you checked the routing settings or do you ping from the same network?
Very basic but missing information: have you correctly set their hostnames in /etc/hosts , that must be different if you dont want serious issues and each interface should have their correct GW set also... or were you just testing using IP which would not change the fact that each Network should have its correct default gateway...
---------- Post updated at 11:38 AM ---------- Previous update was at 11:26 AM ----------
hi vbe,
sorry but i'm not understanding well what are you saying.
do you think that there is some configurations to do in the file /etc/hosts ? here is the current content of this file:
#cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.10.136.10 sigserv01
10.6.0.50 sigsrv01
#
also, as the server is in the same network that the machine from which i'm pinging it, is it necessary to check the GW ?
You have a mask of 255.255.255.255 on the top two rows, which seems a little odd to me.
So are your subnets:-
10.10.126.0-63 routing via 10.10.136.2 on eth0
10.6.0.0-63.......no routing from eth2
It would suggest that if you should be able to ping addresses 10.6.0.0-63 from your server but not beyond. Is there a route via 10.10.136.2 back across to 10.6..x.x? If not then your eth2 does not know how to respond.
I'm on RHEL 6.3 (you don't say, or I've missed it) but have a look in /etc/sysconfig/network-scripts/ifcfg-eth0 and eth1 if you have them.
Be careful if you make backup copies in the same directory as the process to set them up at boot time will read all files called ifcfg-* We found this out by 'experience', i.e. a big mess that took us a while to work out. :o
hi rbatte1,
if there is an error in my routing table, could you please tell me how can I configure it, so that my server be able to communicate with the other equipments in the same network 10.6.x.x via eth2 ?
hi rbatte1,
once again thank you for your support.
what I do not understand in fact, it is the fact that I need to add a gateway for the network 10.6.0.0/26. As eth2 (10.6.0.50), is in the network 10.6.0.0 and the other equipment (10.6.0.33), is also in the same network, then what is the reason to add a gateway between them to communicate? I'm sorry but I still do not understand why the gateway is necessary in this case. if you can provide me more clarifications, it will help me a lot.
please find below ifcfg for eth0 and eth2:
I notify that there is a gateway in the network 10.10.136.0 to permit my server to comunicate with the other network differents of the network 10.6.0.0 and network 10.10.136.0
Because as I already told you each interface unless they are on same network need their default getaway�
If its too difficult for you to understand, then do this: Give the correct GW to your Eth2 and remove the GW from Eth0, now you tell us what is working
What do you conclude?
We have a terminology problem here. There must be (in general) one gateway per interface. However, there should only be a single default gateway. If there is only one interface and therefore only one gateway it will be the default gateway. If you have several interfaces with several gateways, you must anoint one as the default gateway by putting it in /etc/sysconfig/network. Meanwhile every interface must have its own gateway defined in the interface script.
cerco, suppose that you got your system to work with a single gateway. And assume that from some distant IP address I ping your box on the IP address on eth2. How do you respond? You can't send a packet out eth2, it doesn't know how to reach me (no gateway). Do you send the packet out eth0 to the only gateway you know? What to use for the source IP address? Do I ping one IP address and get and response from a different IP?
**edit**
I have some more time after all... my meeting just got canceled
So if you try to reach some distant IP address, with your setup, the default gateway will tell you which interface to use. But if you have decided to use the second interface, you need some gateway for it. If there are just a few hosts that you talk to on the second interface and they are all on the same subnet as your interface you should be ok with no gateway. But that does not seem like what you have.
If the system is using dynamic routing which means that gated is running you can dynamically switch default gateways. This allows the router (which is what your system would be at this point) to adapt to network outages and exploit redunant routes.
ok i'll be very simple. my situation is exactly like this:
I have 3 hosts with below configs:
Host A:
eth0: 10.10.136.10 255.255.255.192 gw 10.10.136.1
eth2: 10.6.0.50 255.255.255.192 no gateway
Host C :
eth0: 10.6.0.33 255.255.255.192 no gateway
the interfaces eth2 (host A), eth2 (host B) and eth0 (host C), are connected on the same switch (network 10.6.0.0/26)
B is communicating with C without problem (pings are working fine), but it's impossible for A to communicate with C (pings are not working), and with B.
so my problem is, how to do so that A be able to ping B and C.
do you think that in this case it's necessary to configure a gateway from A to permit him to ping B and C? if yes, what IP must I configure for this gateway, as the 3 interfaces (A-eth2, B-eth2 and C-eth0), are already on the same network 10.6.0.0
hope my explanations are clearer this time, so that you can help me easly.
Based on what you just posted, those 10.6.0.0/26 adresses should be able to communicate with each other without using a gateway. If they aren't it must be either the routing tables or the configuration of the switch. Are the 10.6.0.0/26 ports all on the same vlan? Try switching the cables between hosta and hostb.
Are you pinging 10.6.0.0/26 IP addreses rather than hostnames? Try traceroute to be sure the working system is working the way you think it is.
all ports on the switch are in the same vlan and these ports are working fine. when I try to deconnect hostA from switch and replace it by hostB on the same port, hostB can communicate with hostC (pings are working fine). so i think that the issue come from hostA network config.
I'm pinging IP address and not hostnames
below is the traceroute from A to C:
[root@sigsrv01 ~]# traceroute 10.6.0.33
traceroute to 10.6.0.33 (10.6.0.33), 30 hops max, 40 byte packets
1 sigsrv01 (10.6.0.50) 3002.150 ms !H 3002.143 ms !H 3002.133 ms !H
[root@sigsrv01 ~]#