Skip to contentSkip to conversation

Source Mac based Routing

LARTC Deepak singhal 2 participants 2 messages Jun 26, 2001

lore
Share & tools
lore
#0 lore raw

Hi ,

Has anybody out there implemented source mac based routing .. The Howto mentions the following line :

Do routing based on user id (yes!), MAC address, source IP address, port, type of service, time of day or content

But i could not find any mention of mac based routing anywhere else .I am also interested in user id based routing ..How to implement these ..I read the man pages for ip rule ..but it accepts only an ip address in 'from' field. Can anybody help on this ?

Thanxs

Deepak

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

#1 lore raw
Quoted 5 lines · Deepak singhal

Hi ,

Has anybody out there implemented source mac based routing .. The Howto mentions the following line :

Quoted 7 lines

Do routing based on user id (yes!), MAC address, source IP address, port, type of service, time of day or content

But i could not find any mention of mac based routing anywhere else .I am also interested in user id based routing ..How to implement these ..I read the man pages for ip rule ..but it accepts only an ip address in 'from' field. Can anybody help on this ?

Yes. The ip routing tables also allow rule-selection based on fwmarks. This gives you all the power of netfilter for routing-rule-selection. So, given something like
iptables -A INPUT -m mac --mac-source ab:cd:ef:01:23:45 -m mark --mark 45 ip rule add fwmark 45 table 45

Would let all packets coming from MAC ab:cd:ef:01:23:45 be routed according to the rules in routing table 45.

Doei, Arthur.

Signature · 8 lines
  /\    / |      [email protected]      | Work like you don't need the money
 /__\  /  | A friend is someone with whom | Love like you have never been hurt
/    \/__ | you can dare to be yourself   | Dance like there's nobody watching


_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/