Two NIC Setup - Unable to route via one of them.
Hi Folks,
I am not a network expert but not a newbie either, I am having an interesting issue. I have just setup a machine which got two NICs, one for private network and the other one for public network which has a real IP assigned to it. Configuration of eth0 for private network as follows; Code:
DEVICE=eth0 Code:
DEVICE=eth1 Code:
Kernel IP routing table I would appreaciate any ideas on this. Where I am wrong at? TIA. |
It is not clear what you want to achieve?. Can you clarify?
|
Hi KinnowGrower,
I just want to be able to access 172.26.111.128/25 via eth0. At this time, with this setup, I even cannot ping gateway. Thanks. |
The private network has a gateway between your system and the other hosts on the private segment? If you're sure it does perhaps we need more info. Otherwise:
I'm not 100% familiar with the centos method of configuring networks, but in debian based systems to achieve what you describe i would omit the gateway entry of the private network config as it will confuse the routing, especially if that gateway doesn't lead out onto the wider internet. Assuming your system's private nic is on the same subnet (172.26.111.129-254 i assume) as the systems you are trying to talk to there is no requirement for a gateway because all hosts should be able to talk directly to each other via a switch or such (unless your actual situation is more complex than that you describe). If there really is a gateway - well - normally gateways are used to bridge networks, i.e. a gateway would be between your internal network and the external network (internet) - To quote wikipedia: Quote:
|
Quote:
LOL, this all was my fault. I was trying to ping/trace a host that indeed does not exist at all. No IP was assigned to router's interface and I was trying to ping that IP which supposed to be the IP of router and was thinking as if the machine was not routing the packets properly. :) Here's some personal explanation; I was trying to get this internal gateway working because I was trying to get this machine communicating with other internal subnets(different) inside a large internal network. However, after all these I now understand this better. Static routes are what we need in such situations. No need for a second gateway for the second interface - instead, a static route can be defined to route specific subnets via a specific router as long as the machine itself has an IP inside that subnet(the subnet where router resides). But I think it would be better to have an option to have a second gateway with a higher metric for redundancy? I am sure this can be achieved with some work arounds but not sure if Linux supports this natively? Lessons learned. Thanks everyone! :) |
All times are GMT -5. The time now is 03:23 AM. |