LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: can I use ip route to dst:port

To: Joseph Mack <mack.joseph@xxxxxxx>
Subject: Re: can I use ip route to dst:port
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx, Joseph Mack <mack.joseph@xxxxxxxxxxxxxxx>, Roberto Nibali <ratz@xxxxxx>, Horms <horms@xxxxxxxxxxxx>, <busterb@xxxxxxxxxxxxxxx>, <J.D.F.Palmer@xxxxxxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Fri, 29 Mar 2002 23:05:01 +0000 (GMT)
        Hello,

On Fri, 29 Mar 2002, Joseph Mack wrote:

> er, OK, why do I need one? The src_addr = RIP not 0/0

        How RIP appears as src in your packets? :)

        If you know src IP you can bind to it, if you don't
know it, you ask one from the routing or by walking the list
with IPs.

> > Table RIP is used only from callers already bound to src RIP.
> > One of the ways to autoselect source IP address when talking
> > with destination host is to provide saddr=0.0.0.0 as
> > routing call argument.
>
> you're saying if I use src_addr=0/0 for routing then routing
> will only route locally generated packets, and not stuff being
> forwarded through the machine?

        Can this work (merge it)?:

# you still can select RIP for talks with direct networks:
ip rule add prio 50 table main

# Here is the place for rules with fwmark

# don't allow traffic bound to RIP or connected routes to use RIP
# when talking to universe
ip rule add prio 150 from RIP to 0/0 prohibit

# you still can select RIP as src but this is useless without
# fwmark routing
ip rule add prio 200 table RIP

but the things can be more complex, you have to try it.
I don't see your ip rules by fwmark

> > Without such routes you have to bind()
> > to some local IP before connect().
>
> haven't done a lot of this I'm afraid and it was a while ago.
> This happens in the application?

        Yes, same as in ip route get XXX without a "from RIP" arg

> thank you
>
> Joe

Regards

--
Julian Anastasov <ja@xxxxxx>



<Prev in Thread] Current Thread [Next in Thread>