From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?q?Ra=FAl_Alexis_Betancort_Santana?= Date: Wed, 18 Feb 2004 23:21:43 +0000 Subject: Re: [LARTC] Getting crazy with marking packets Message-Id: <200402182321.43105.rabs@dimension-virtual.com> List-Id: References: <200402131005.35613.rabs@dimension-virtual.com> In-Reply-To: <200402131005.35613.rabs@dimension-virtual.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org El Wednesday 18 February 2004 22:05, Corey Hickey escribi=F3: > Ra=FAl 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 provi= er > > 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 dev table \ > mail.traffic The mail.traffic table has a multipath route with diferent weights, I want= =20 traffic to go by ISP1, but if it gets down, go by ISP2, but it is going out= =20 by the ISP it get at random .. ip route add table mail.traffic default nexthop via dev eth1 wei= ght=20 1 nexthop via 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)=20 table for the rest of traffic (the reverse order with weigths as on the=20 mail.traffic table), when GW1 gets down, traffic go out by GW2, thats ok ..= =20 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= ,=20 no matter the weights they have, no matter that GW1 is online again. Any wa= y=20 to solve this ? Best Regards _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/