The problem is that I have only 2 ethernet adapters in my linux router, one of this adapter pluged to the LAN and the other is pluged to a HUB who have 2 routers DSL. Each DSL routers have an static ip and the solution that I found was creating an eth0 and eth0:1 but with this option I have any way to use the eth0:1 adapte... Any one knows a solution for this ? Regards.
On Sat, 23 Jul 2005 15:51:43 +0100 ZeuS SN <zeus_securenet@hotmail.com> wrote:>The problem is that I have only 2 ethernet adapters in my linux router, >one of this adapter pluged to the LAN and the other is pluged to a HUB >who have 2 routers DSL. Each DSL routers have an static ip and the >solution that I found was creating an eth0 and eth0:1 but with this >option I have any way to use the eth0:1 adapte...You don''t have to use eth0:1, it is actually considered obsolete since kernel 2.2. Use ip addr add ip1/mask1 dev eth0 ip addr add ip2/mask2 dev eth0 As far as I know, modern distributions support this, although I am not sure about the exact syntax in their configuration files. In Shurdix I do it like this: http://docs.shurdix.org/shurdix:network_interfaces#ip>Regards.Yours sincerely, Peter
Ok. It works and now I don''t have the problem with ip route and virtual eth, but now my problem continues, If a ping the first IP, who has the default gateway it works fine, but if I ping the second IP that not have gateway, the pakect arrives the machine, but not respond, because it don''t know which route get. Theres anyway to set the gateway for this second IP address ? Thanks and Regards
Dnia sobota, 23 lipca 2005 16:51, ZeuS SN napisał(a):> The problem is that I have only 2 ethernet adapters in my linux router, > one of this adapter pluged to the LAN and the other is pluged to a HUB > who have 2 routers DSL. Each DSL routers have an static ip and the > solution that I found was creating an eth0 and eth0:1 but with this > option I have any way to use the eth0:1 adapte... > > Any one knows a solution for this ?Multipatch routing probably won''t work this way - at least I was unable to set up SNAT because booth gateways are on the same interface. However masquerade was working correctly, as it is choosing ip address to SNAT (AFAIK) after routing. Another solution is to get a switch with 802.1q VLANs, and "divide" single network interface into many fully functional interfaces (fully functional means for me that you can use their names in iptables -o to choose proper SNAT address). -- | pozdrawiam | powered by Slackware, Gentoo and FreeBSD | | Kajetan Staszkiewicz | JID: vegeta@chrome.pl | | Vegeta | http://kajtek.biezanow.net | +----------------------+------------------------------------------+