Request: how do packet routing based on input gateway

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 24, 2009 at 4:19 PM, Dunc <dunc@xxxxxxxxxxx> wrote:
> If both of your last hops are on the same subnet you can't use incoming
> interface, so the only thing I can think of is to match the MAC address
> of the ethernet frame. If the last hop wasn't the source of the packet I
> don't think there's anything else to uniquely identify it.

There is another reason why I can't use the input interface. It's
because 2 or more gateways of mine could be accessible by the same
interface. I have to distinguish the route on the base of the last
hop, not on the base of the interface.

If I get it right, the kernel is aware of what the MAC address of the
previous hop was, but it is not aware of its IP address.

This is surprising to me. I mean, I can understand that this
information is not in the headings of the packet, but nevertheless I
thought the kernel was able to remember the gateway it came from.

If this is the situation I have to live in, then what are the commands
I must give to instruct the kernel?
Suppose I want a packet for 192.168.1.0/24 to be forwarded to
192.168.2.1 if the packet was sent to me by MAC 00:22:44:99:66:77.

Thanks alot
--Luca Dionisi
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux