|
Prev: Strange behavior of NetworkManager and keyring [Hardy andGutsy]
Next: Strange routing / NAT issue
From: Andy Furniss on 13 Apr 2008 18:32 Eric B. wrote: > I have already read through what seemed to be the relevant sections, but > unfortunately, am no further ahead. Specifically, sections 3, 4 and 11, but > from everything I read, they all seem to be pointing to configuration on a > per device basis. Given that eth0:0 is only a virtual device, I don't think you could even call it a virtual device. It's just the way ifconfig let you add secondary addresses to nics. ip just uses what it calls secondary addresses (though there is a way to add labels that look like the ifconfig way IIRC) > the ip tool > doesn't seem to like it very much. From what I can tell, it seems as though > I have to mark the packets on the way in from gw1 differently than those > coming in from gw2, and then use the ip route to add different gateways > based on the routing table, but again, I am having trouble understanding how > to do this with a single device only. > > Any ideas? I've never done anything like this. Have a look on http://www.linux-ip.net as an alternative to LARTC. Andy.
From: Andy Furniss on 13 Apr 2008 19:42 Eric B. wrote: > Hi, > > I've got a computer running RHEL with a single NIC that is multi-homed with > a single default gateway for everything. > eth0: 192.168.101.54/24 > eth0:0 192.168.104.54/24 > > So far, everything is running fine. The machine is able to respond to > requests coming in to 101.54 and 104.54 without any problems. > > However, I have now reached a situation where I need to route my response > packets to 2 different gateways, based on where the packets came in from. > All packets that came in to eth0 have to be routed out via gateway1 and all > packets that came in on eth0:0 have to be routed via gateway2. > > How can I accomplish this? I've tried reading the lartc howto for routing > for multiple uplinks/providers, but it doesn't seem to address my issue. > The howto for split access seems to require 2 independent NICs. When I try > to follow the instructions, the ip route add command complains that it > doesn't recognize eth0:0 as a valid interface. > > Is there any thing I can do? Can anyone point me to the right place to look > for this? I'm assuming that it shouldn't be too difficult to configure the > system to respond differently based on the incoming address, but not quite > sure how to approach the situation. I am unsure of your setup - if this box is the default gateway for others then the addresses on your nic won't be involved - just the mac address which will be the same as you only have one nic. I guess you will need to use the source address of the incoming packet to tell where it came from. Andy.
First
|
Prev
|
Pages: 1 2 Prev: Strange behavior of NetworkManager and keyring [Hardy andGutsy] Next: Strange routing / NAT issue |