From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PjvB8-0004LG-Hn for garchives@archives.gentoo.org; Mon, 31 Jan 2011 14:56:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 44652E0AB9; Mon, 31 Jan 2011 14:54:30 +0000 (UTC) Received: from mail-iy0-f181.google.com (mail-iy0-f181.google.com [209.85.210.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 1412AE0AB9 for ; Mon, 31 Jan 2011 14:54:29 +0000 (UTC) Received: by iyj18 with SMTP id 18so7212366iyj.40 for ; Mon, 31 Jan 2011 06:54:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=pfDX/nuwmItiDRzLy33ZPjTwlroqiAnrOYyWRa3/WOM=; b=qCc1dr86/DaoDw9dts+j2C517g1F3m2wn7GyOg6Pyo1aBIX1LqbMe1Bsg2KmZJ+KAp 3jwMRHVIXM89/xTPT93qN0JgMH5jnR695wvKlcDMazh3Yr05XOdQK8B4manpN67Znlsx dfgySaSMH+Eo9yJQXEj0s0HUplz3mdGUYxR9U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Yup3vuu7xf4Gg5o2YvyZSguqlmctoZd9sEzABNyDd7JJQ6U0bgWfR8RYGUGx22v4Y+ HgC0NFM9YDhIMk+INPhGR2zrrKYJxDQAfaCQ2OstXSTf/Ya8HEMHsOEygh2OD59wBQJa M2f9RGqoiWJuQNafeY2t3Eq9zhC/9DsaJBqeQ= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.231.19.136 with SMTP id a8mr6735769ibb.73.1296485669247; Mon, 31 Jan 2011 06:54:29 -0800 (PST) Received: by 10.231.21.161 with HTTP; Mon, 31 Jan 2011 06:54:29 -0800 (PST) In-Reply-To: References: Date: Mon, 31 Jan 2011 06:54:29 -0800 Message-ID: Subject: Re: [gentoo-user] Adding more than one static IP From: Bill Longman To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=00221534d727c59c4d049b2597bc X-Archives-Salt: X-Archives-Hash: 2ad1a73605d33dd2d96a1964fcd807ad --00221534d727c59c4d049b2597bc Content-Type: text/plain; charset=UTF-8 On Mon, Jan 24, 2011 at 7:15 AM, Amar Cosic wrote: > Hello list > > My mind is just "locked" at the moment and I am trying to figure out what > am I doing wrong here. I have 4 static IP's on server machine and I have > something like this in /etc/conf.d/net : > > > > config_eth0=( "77.xxx.104.14/24" ) > routes_eth0=( "default via 77.xxx.104.1" ) > config_eth0:1=( "77.xxx.104.100/24" ) > routes_eth0:1=( "default via 77.xxx.104.1" ) > config_eth0:2=( "77.xxx.104.101/24" ) > routes_eth0:2=( "default via 77.xxx.104.1" ) > config_eth0:3=( "77.xxx.105.100/24" ) > routes_eth0:3=( "default via 77.xxx.105.1" ) > > > eth0 works just fine while other ones fail. Could you help me with this one > ? > > Amar, You should read up some more on how IP networking is configured and how it works. A default route is, by definition, the next hop on the local network to which packets are sent when no other local interface matches the intended target IP address. Your IP stack looks for local interfaces which match the target network for the target IP address. If it cannot find any, it has no other recourse but to forward it to someone who might know better. That's your default gateway router, and that's its job. If you tell your IP stack that you have four default gateways, it will get very confused. Get rid of all but one of those default route statements. If, on the other hand, you just want your local machine to know the gateways for those networks, your route statements should be of this form: routes_eth:2=("77.xxx.104.101/24 via 77.xxx.104.1") --00221534d727c59c4d049b2597bc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Mon, Jan 24, 2011 at 7:15 AM, Amar Cosic <amar.cosic@gmail.= com> wrote:
Hello list

My mind is just "locked" at the mom= ent and I am trying to figure out what am I doing wrong here. I have 4 stat= ic IP's on server machine and I have something like this in /etc/conf.d= /net :



config_eth0=3D( "77.xxx.104.14/24" )
routes= _eth0=3D( "default via 77.xxx.104.1" )
config_eth0:1=3D= ( "77.xxx.104.100/24" )
routes_eth0:1=3D( "default= via 77.xxx.104.1" )
config_eth0:2=3D( "77.xxx.104.101/24" )
routes_eth= 0:2=3D( "default via 77.xxx.104.1" )
config_eth0:3=3D( = "77.xxx.105.100/24" )
routes_eth0:3=3D( "default v= ia 77.xxx.105.1" )


eth0 works just fine while other ones fa= il. Could you help me with this one ?


Amar,

You should read up some more on how IP networki= ng is configured and how it works. A default route is, by definition, the n= ext hop on the local network to which packets are sent when no other local = interface matches the intended target IP address. Your IP stack looks for l= ocal interfaces which match the target network for the target IP address. I= f it cannot find any, it has no other recourse but to forward it to someone= who might know better. That's your default gateway router, and that= 9;s its job. If you tell your IP stack that you have four default gateways,= it will get very confused. Get rid of all but one of those default route s= tatements.

If, on the other hand, you just want your local machine to know the gat= eways for those networks, your route statements should be of this form:
=
routes_eth:2=3D("77.xxx.104.101/24 via 77.xxx.104.1")
--00221534d727c59c4d049b2597bc--