Re: Getting crazy with marking packets

Linux Advanced Routing and Traffic Control

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

 



El Wednesday 18 February 2004 22:05, Corey Hickey escribió:
> Raúl Alexis Betancort Santana wrote:
> > Hi all .. I'm getting crazy triying to undestand why my packets are not
> > going by the ISP I want them to  .. :S
> >
> > I mark smtp and pop3 packets on PREROUTING with -j MARK setting it mark
> > to 0x02 .. then with ip rule add fwmark table mail.traffic its supposed
> > they will only go out by ISP1, but they are going out by a random provier
> > from my list of ones ... :(
> >
> > Any hit please ? ... what are I'm doing wrong? .. I have read the
> > archives and searched at google with no success ...
>
> Perhaps you need to add a default route for mail.traffic?
> ip route add default via <addr-on-if-ISP1> dev <if-ISP1> table \
> mail.traffic

 The mail.traffic table has a multipath route with diferent weights, I want 
traffic to go by ISP1, but if it gets down, go by ISP2, but it is going out 
by the ISP it get at random ..

ip route add table mail.traffic default nexthop via <GWofISP1> dev eth1 weight 
1 nexthop via <GWofISP2> dev eth1 weight 200

ip rule add fwmark 0x02 table mail.traffic

iptables -A PREROUTING -t mangle -p tcp --dport 25 -j MARK --set-mark 0x02
iptables -A PREROUTING -t mangle -p tcp --dport 110 -j MARK --set-mark 0x02


Also I have other problem now .. on my multiroute (it is called that way) 
table for the rest of traffic (the reverse order with weigths as on the 
mail.traffic table), when GW1 gets down, traffic go out by GW2, thats ok .. 
but when GW1 get online again traffic continues going by GW2, I have tryed 
with "ip route flush cache", but it continues the same ... going out by GW2, 
no matter the weights they have, no matter that GW1 is online again. Any way 
to solve this ?

Best Regards
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux