Thanks, Ok the subnet of eth0-eth1-eth2 now are in different subnet and i have solved the problem.
2011/9/4 Gustin Johnson <[email protected]> > In addition to what Adrian said, you also do not need to define the > DNS and gateway IPs twice. If one of the interfaces is getting it's > IP from DHCP, then those variables are also going to come from the > DHCP server. > > Is there a reason that you are even using DHCP here? Do you need more > than one IP on the same subnet? > > If you want to reach the box via either interface, then a bridge with > a single IP is probably what you want. > > On Sun, Sep 4, 2011 at 3:07 PM, Adrian Reyer <[email protected]> > wrote: > > Hi Roberto, > > > > On Sat, Sep 03, 2011 at 12:00:47PM +0200, Roberto Arena wrote: > >> * auto eth0 > >> iface eth0 inet static > >> address 192.168.1.127 > >> netmask 255.255.255.0 > >> broadcast 192.168.1.255 > >> gateway 192.168.1.249 > >> dns-nameservers 212.216.112.112* > >> * auto eth1 > >> iface eth1 inet static > >> address 192.168.1.128 > >> netmask 255.255.255.0 > >> broadcast 192.168.1.255 > >> gateway 192.168.1.249 > >> dns-nameservers 212.216.112.112* > > > > What does the '*' mean? If they actually are in the file it is wrong. > > If the resolvconf package is installed it should work. At least it does > > so here. > > However, having 2 interfaces within the same IP range asks for trouble. > > Why do you want to have eth0 and eth1 within the same network? > > - playing switch > > -> use a bridge instead > > - adding a second IP > > -> use eth0:0 for a virtual IP instead > > - redundant links to the same network > > -> use a bridge on the 2 devices > > - boosting performance > > -> use a bond-device on the 2 devices if your switch supports bonds > > You can combine the above. > > > > If you stick with your configuration and both network interfaces link to > > the same physical network, e.g. no proxy arp involved, be aware, the > > linux kernel always uses the interface for outgoing packets that comes > > first in the routing table, no matter which interfaces IP address you > > connect to. > > You can get round this by using source routing with alternate routing > > tables. That way you can make sure IP a traffic leaves the box via > > interface a and IP b traffic leaves the box via interface b. > > > > Another problem might be IP spoof protection. If you have traffic coming > > in via an interface that has no route to that IP it will be dropped. > > You can fix this by disabling spoof protection for that interface with > > echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter > > or permanently by adding this to /etc/sysctl.conf. > > > > The kernel answers a packet via the first interface that sees the > > packet, no matter if the IP is right. If I recall correctly, this can be > > changed with > > echo 0 > /proc/ss/net/ipv4/conf/eth0/shared_media > > or, again, by adding this to /etc/sysctl.conf > > Obviously you need to state these lines for every interface in question. > > > > Another point might be your switch. It might block your ports if it > > detects packets with same MAC address on 2 interfaces the same time, > > again as it might think your did a short circuit. Check if you can > > configure your switch to suit your needs or if you need a bridged device > > with STP enabled. > > > > Regards, > > Adrian > > -- > > LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart > > Fon: +49 (7 11) 78 28 50 90 - Fax: +49 (7 11) 78 28 50 91 > > Mail: [email protected] - Web: http://lihas.de > > Linux, Netzwerke, Consulting & Support - USt-ID: DE 227 816 626 Stuttgart > > > > _______________________________________________ > > Voyage-linux mailing list > > [email protected] > > http://list.voyage.hk/mailman/listinfo/voyage-linux > > > -- *Roberto Arena **technical Manager* *[email protected] mobile: +39 3920827888* * www.gisat.it www.gisat.net Gisat di Michele Maccarrone Piazza Sant'Agostino n°4 95031 Adrano (CT) tel/fax +39 095 7602790*
_______________________________________________ Voyage-linux mailing list [email protected] http://list.voyage.hk/mailman/listinfo/voyage-linux
