[Samba] try to bind samba traffic to specific interface - without success

Bjørn Tore Sund bjorn.sund at it.uib.no
Sat Aug 4 20:46:22 GMT 2007


Jan wrote:
> Hey Bjørn,
Hey Jan,

If you bottom-quote and edit when you respond to me, it becomes that 
much easier to reply _in_ your email and address specifics there.
>
> the traffic isn't send by a different subnet ...
>
> eth1 = 192.168.0.100 ( default route via 192.168.0.150 )
>
> eth2 = 192.168.0.200
>
> both interfaces belonging to the same net (255.255.255.0) ...
>
Then you don't have a Samba issue, you have discovered what happens when 
you give a Linux box multiple interfaces on the same subnet.  The IP 
stack implementation is good for a number of things, but gives 
interesting results in just such instances.  
http://pontus.ullgren.com/view/Multiple_interfaces_on_the_same_subnet 
looks like it describes how to solve it using iproute2, other solutions 
may be better.  
http://www.linuxquestions.org/questions/showthread.php?t=6676 gives a 
brief runtroügh of the problem, Google may give you more - I didn't 
spend much time finding references.

I stopped giving Linux boxes two interfaces on the same subnet a long 
time ago. :)

> eth2 is not configurated with an default route. could this be the 
> failure? (i don't think so because the route for the default gateway 
> was set for eth1 only by /etc/conf.d/net)
You can only have one default route out of a computer.  You can, 
however, use iproute2 to configure it to always respond to traffic 
through the interface it was contacted on, and lots of other interesting 
things.  Highly recommended to look into.

>
> output of route table:
>
> Destination     Gateway         Genmask         Flags Metric Ref    
> Use  Iface
>
> 192.168.0.0    0.0.0.0         255.255.255.0    U     0      0        
> 0  eth1
>
> 192.168.0.0    0.0.0.0         255.255.255.0    U     0      0        
> 0  eth2
>
> 127.0.0.0      0.0.0.0         255.0.0.0        U     0      0        
> 0  lo
>
> 0.0.0.0        192.168.0.150  0.0.0.0           UG    0      0        
> 0  eth1
>
> i hope that could bring some light on this situation ...
The situation is nicely illuminated, yes. :)

Bjørn

-- 
Bj¯rn Tore Sund       Phone: 555-84894   Email:   bjorn.sund at it.uib.no
IT department         VIP:   81724       Support: http://bs.uib.no 
Univ. of Bergen

When in fear and when in doubt, run in circles, scream and shout.



More information about the samba mailing list