Thanks,<br><br>Ok the subnet of eth0-eth1-eth2 now are in different subnet and i have solved the problem.<br><br><div class="gmail_quote">2011/9/4 Gustin Johnson <span dir="ltr"><<a href="mailto:gustin@meganerd.ca">gustin@meganerd.ca</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">In addition to what Adrian said, you also do not need to define the<br>
DNS and gateway IPs twice.  If one of the interfaces is getting it's<br>
IP from DHCP, then those variables are also going to come from the<br>
DHCP server.<br>
<br>
Is there a reason that you are even using DHCP here?  Do you need more<br>
than one IP on the same subnet?<br>
<br>
If you want to reach the box via either interface, then a bridge with<br>
a single IP is probably what you want.<br>
<div><div></div><div class="h5"><br>
On Sun, Sep 4, 2011 at 3:07 PM, Adrian Reyer <<a href="mailto:voyage-linux@lihas.de">voyage-linux@lihas.de</a>> wrote:<br>
> Hi Roberto,<br>
><br>
> On Sat, Sep 03, 2011 at 12:00:47PM +0200, Roberto Arena wrote:<br>
>> * auto eth0<br>
>> iface eth0 inet static<br>
>>        address 192.168.1.127<br>
>>        netmask 255.255.255.0<br>
>>        broadcast 192.168.1.255<br>
>>        gateway 192.168.1.249<br>
>>        dns-nameservers 212.216.112.112*<br>
>> * auto eth1<br>
>> iface eth1 inet static<br>
>>        address 192.168.1.128<br>
>>        netmask 255.255.255.0<br>
>>        broadcast 192.168.1.255<br>
>>        gateway 192.168.1.249<br>
>>        dns-nameservers 212.216.112.112*<br>
><br>
> What does the '*' mean? If they actually are in the file it is wrong.<br>
> If the resolvconf package is installed it should work. At least it does<br>
> so here.<br>
> However, having 2 interfaces within the same IP range asks for trouble.<br>
> Why do you want to have eth0 and eth1 within the same network?<br>
> - playing switch<br>
>  -> use a bridge instead<br>
> - adding a second IP<br>
>  -> use eth0:0 for a virtual IP instead<br>
> - redundant links to the same network<br>
>  -> use a bridge on the 2 devices<br>
> - boosting performance<br>
>  -> use a bond-device on the 2 devices if your switch supports bonds<br>
> You can combine the above.<br>
><br>
> If you stick with your configuration and both network interfaces link to<br>
> the same physical network, e.g. no proxy arp involved, be aware, the<br>
> linux kernel always uses the interface for outgoing packets that comes<br>
> first in the routing table, no matter which interfaces IP address you<br>
> connect to.<br>
> You can get round this by using source routing with alternate routing<br>
> tables. That way you can make sure IP a traffic leaves the box via<br>
> interface a and IP b traffic leaves the box via interface b.<br>
><br>
> Another problem might be IP spoof protection. If you have traffic coming<br>
> in via an interface that has no route to that IP it will be dropped.<br>
> You can fix this by disabling spoof protection for that interface with<br>
> echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter<br>
> or permanently by adding this to /etc/sysctl.conf.<br>
><br>
> The kernel answers a packet via the first interface that sees the<br>
> packet, no matter if the IP is right. If I recall correctly, this can be<br>
> changed with<br>
> echo 0 > /proc/ss/net/ipv4/conf/eth0/shared_media<br>
> or, again, by adding this to /etc/sysctl.conf<br>
> Obviously you need to state these lines for every interface in question.<br>
><br>
> Another point might be your switch. It might block your ports if it<br>
> detects packets with same MAC address on 2 interfaces the same time,<br>
> again as it might think your did a short circuit. Check if you can<br>
> configure your switch to suit your needs or if you need a bridged device<br>
> with STP enabled.<br>
><br>
> Regards,<br>
>        Adrian<br>
> --<br>
> LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart<br>
> Fon: <a href="tel:%2B49%20%287%2011%29%2078%2028%2050%2090" value="+4971178285090">+49 (7 11) 78 28 50 90</a> - Fax:  <a href="tel:%2B49%20%287%2011%29%2078%2028%2050%2091" value="+4971178285091">+49 (7 11) 78 28 50 91</a><br>

> Mail: <a href="mailto:lihas@lihas.de">lihas@lihas.de</a> - Web: <a href="http://lihas.de" target="_blank">http://lihas.de</a><br>
> Linux, Netzwerke, Consulting & Support - USt-ID: DE 227 816 626 Stuttgart<br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Voyage-linux mailing list<br>
> <a href="mailto:Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</a><br>
> <a href="http://list.voyage.hk/mailman/listinfo/voyage-linux" target="_blank">http://list.voyage.hk/mailman/listinfo/voyage-linux</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><i style="font-family:verdana,sans-serif"><b>Roberto Arena</b><br></i><i><span lang="en"><span title="Fai clic per visualizzare le traduzioni alternative">technical Manager</span></span></i><br>
<i style="font-family:verdana,sans-serif"><a href="mailto:r.arena@gisat.net" target="_blank">r.arena@gisat.net</a><br>mobile: +39 3920827888</i><br><br><i style="font-family:verdana,sans-serif"><font size="2"><br><a href="http://www.gisat.it" target="_blank">www.gisat.it</a><br>
<a href="http://www.gisat.net" target="_blank">www.gisat.net</a></font><br>Gisat di Michele Maccarrone<br>Piazza Sant'Agostino n°4<br>95031 Adrano (CT)<br>tel/fax +39 095 7602790</i><br><br>