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">&lt;<a href="mailto:gustin@meganerd.ca">gustin@meganerd.ca</a>&gt;</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&#39;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 &lt;<a href="mailto:voyage-linux@lihas.de">voyage-linux@lihas.de</a>&gt; wrote:<br>
&gt; Hi Roberto,<br>
&gt;<br>
&gt; On Sat, Sep 03, 2011 at 12:00:47PM +0200, Roberto Arena wrote:<br>
&gt;&gt; * auto eth0<br>
&gt;&gt; iface eth0 inet static<br>
&gt;&gt;        address 192.168.1.127<br>
&gt;&gt;        netmask 255.255.255.0<br>
&gt;&gt;        broadcast 192.168.1.255<br>
&gt;&gt;        gateway 192.168.1.249<br>
&gt;&gt;        dns-nameservers 212.216.112.112*<br>
&gt;&gt; * auto eth1<br>
&gt;&gt; iface eth1 inet static<br>
&gt;&gt;        address 192.168.1.128<br>
&gt;&gt;        netmask 255.255.255.0<br>
&gt;&gt;        broadcast 192.168.1.255<br>
&gt;&gt;        gateway 192.168.1.249<br>
&gt;&gt;        dns-nameservers 212.216.112.112*<br>
&gt;<br>
&gt; What does the &#39;*&#39; mean? If they actually are in the file it is wrong.<br>
&gt; If the resolvconf package is installed it should work. At least it does<br>
&gt; so here.<br>
&gt; However, having 2 interfaces within the same IP range asks for trouble.<br>
&gt; Why do you want to have eth0 and eth1 within the same network?<br>
&gt; - playing switch<br>
&gt;  -&gt; use a bridge instead<br>
&gt; - adding a second IP<br>
&gt;  -&gt; use eth0:0 for a virtual IP instead<br>
&gt; - redundant links to the same network<br>
&gt;  -&gt; use a bridge on the 2 devices<br>
&gt; - boosting performance<br>
&gt;  -&gt; use a bond-device on the 2 devices if your switch supports bonds<br>
&gt; You can combine the above.<br>
&gt;<br>
&gt; If you stick with your configuration and both network interfaces link to<br>
&gt; the same physical network, e.g. no proxy arp involved, be aware, the<br>
&gt; linux kernel always uses the interface for outgoing packets that comes<br>
&gt; first in the routing table, no matter which interfaces IP address you<br>
&gt; connect to.<br>
&gt; You can get round this by using source routing with alternate routing<br>
&gt; tables. That way you can make sure IP a traffic leaves the box via<br>
&gt; interface a and IP b traffic leaves the box via interface b.<br>
&gt;<br>
&gt; Another problem might be IP spoof protection. If you have traffic coming<br>
&gt; in via an interface that has no route to that IP it will be dropped.<br>
&gt; You can fix this by disabling spoof protection for that interface with<br>
&gt; echo 0 &gt; /proc/sys/net/ipv4/conf/eth0/rp_filter<br>
&gt; or permanently by adding this to /etc/sysctl.conf.<br>
&gt;<br>
&gt; The kernel answers a packet via the first interface that sees the<br>
&gt; packet, no matter if the IP is right. If I recall correctly, this can be<br>
&gt; changed with<br>
&gt; echo 0 &gt; /proc/ss/net/ipv4/conf/eth0/shared_media<br>
&gt; or, again, by adding this to /etc/sysctl.conf<br>
&gt; Obviously you need to state these lines for every interface in question.<br>
&gt;<br>
&gt; Another point might be your switch. It might block your ports if it<br>
&gt; detects packets with same MAC address on 2 interfaces the same time,<br>
&gt; again as it might think your did a short circuit. Check if you can<br>
&gt; configure your switch to suit your needs or if you need a bridged device<br>
&gt; with STP enabled.<br>
&gt;<br>
&gt; Regards,<br>
&gt;        Adrian<br>
&gt; --<br>
&gt; LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart<br>
&gt; 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>

&gt; Mail: <a href="mailto:lihas@lihas.de">lihas@lihas.de</a> - Web: <a href="http://lihas.de" target="_blank">http://lihas.de</a><br>
&gt; Linux, Netzwerke, Consulting &amp; Support - USt-ID: DE 227 816 626 Stuttgart<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&gt; _______________________________________________<br>
&gt; Voyage-linux mailing list<br>
&gt; <a href="mailto:Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</a><br>
&gt; <a href="http://list.voyage.hk/mailman/listinfo/voyage-linux" target="_blank">http://list.voyage.hk/mailman/listinfo/voyage-linux</a><br>
&gt;<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&#39;Agostino n°4<br>95031 Adrano (CT)<br>tel/fax +39 095 7602790</i><br><br>