From: Marius Vaitiekunas <mariusvaitiekunas@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Adding more than one static IP
Date: Tue, 25 Jan 2011 18:48:50 +0200 [thread overview]
Message-ID: <AANLkTik-Va_K3+Oo0JCJtRYbw+mh_S-QyyPHW0h+Gscj@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinKoyQh3db=g1TYPTKa9++1VVHH9_-HX9gcdJEj@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2189 bytes --]
On Tue, Jan 25, 2011 at 1:08 PM, Amar Cosic <amar.cosic@gmail.com> wrote:
>
>
> On Tue, Jan 25, 2011 at 9:01 AM, Adam Carter <adamcarter3@gmail.com>wrote:
>
>>
>> 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" )
>>>
>>
>> You should let us know what you're trying to achieve with this. Every time
>> I have seen config like this, it has been because of fundamental
>> misunderstandings of networking. More that one IP address on a subnet
>> (unless there are VIPs) = fail.
>>
>> Remember routing occurs at layer 3, and for most configs should have no
>> reference physical interface. The OS knows which interface the next hop can
>> be found. In your config you've set the same route three times which makes
>> no sense.
>>
>> (ok i've oversimplified, but for 99.9% of cases the above is true)
>>
>
> I have this on Debian in /etc/network/interfaces:
>
> auto lo
> iface lo inet loopback
> auto eth0
> iface eth0 inet static
> address 82.xxx.148.194
> netmask 255.255.255.128
> gateway 82.xxx.148.131
> auto eth0:1
> iface eth0:1 inet static
> address 82.xxx.148.195
> netmask 255.255.255.128
> auto eth0:2
> iface eth0:2 inet static
> address 82.xxx.148.196
> netmask 255.255.255.128
> auto eth0:3
> iface eth0:3 inet static
> address 82.xxx.148.197
> netmask 255.255.255.128
>
>
> What I want to know is what is equivalent for this on Gentoo. Let's just
> say this is VPS server with 4 IP's assigned to me as customer
>
>
> --
> Amar Ćosić
> amar.cosic@gmail.com
>
>
Hi,
I am using like that in /etc/conf.d/net
-----
config_eth0=( "ip1 netmask 255.255.255.224"
"ip2 netmask 255.255.255.255"
"ip3 netmask 255.255.255.255"
)
routes_eth0=( "default via your_gw" )
-----
ifconfig doesn't show this info. I use ip command for that:
# ip addr
I hope it helps.
--
mv
[-- Attachment #2: Type: text/html, Size: 3550 bytes --]
next prev parent reply other threads:[~2011-01-25 16:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-24 15:15 [gentoo-user] Adding more than one static IP Amar Cosic
2011-01-24 15:28 ` Alan McKinnon
2011-01-24 17:59 ` Graham Murray
2011-01-25 3:35 ` Walter Dnes
2011-01-25 8:01 ` Adam Carter
2011-01-25 11:08 ` Amar Cosic
2011-01-25 16:48 ` Marius Vaitiekunas [this message]
2011-01-31 14:54 ` Bill Longman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTik-Va_K3+Oo0JCJtRYbw+mh_S-QyyPHW0h+Gscj@mail.gmail.com \
--to=mariusvaitiekunas@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox