Gentoo Archives: gentoo-user

From: Amar Cosic <amar.cosic@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Adding more than one static IP
Date: Tue, 25 Jan 2011 11:10:21
Message-Id: AANLkTinKoyQh3db=g1TYPTKa9++1VVHH9_-HX9gcdJEj@mail.gmail.com
In Reply to: Re: [gentoo-user] Adding more than one static IP by Adam Carter
1 On Tue, Jan 25, 2011 at 9:01 AM, Adam Carter <adamcarter3@×××××.com> wrote:
2
3 >
4 > config_eth0=( "77.xxx.104.14/24" )
5 >> routes_eth0=( "default via 77.xxx.104.1" )
6 >> config_eth0:1=( "77.xxx.104.100/24" )
7 >> routes_eth0:1=( "default via 77.xxx.104.1" )
8 >> config_eth0:2=( "77.xxx.104.101/24" )
9 >> routes_eth0:2=( "default via 77.xxx.104.1" )
10 >> config_eth0:3=( "77.xxx.105.100/24" )
11 >> routes_eth0:3=( "default via 77.xxx.105.1" )
12 >>
13 >
14 > You should let us know what you're trying to achieve with this. Every time
15 > I have seen config like this, it has been because of fundamental
16 > misunderstandings of networking. More that one IP address on a subnet
17 > (unless there are VIPs) = fail.
18 >
19 > Remember routing occurs at layer 3, and for most configs should have no
20 > reference physical interface. The OS knows which interface the next hop can
21 > be found. In your config you've set the same route three times which makes
22 > no sense.
23 >
24 > (ok i've oversimplified, but for 99.9% of cases the above is true)
25 >
26
27 I have this on Debian in /etc/network/interfaces:
28
29 auto lo
30 iface lo inet loopback
31 auto eth0
32 iface eth0 inet static
33 address 82.xxx.148.194
34 netmask 255.255.255.128
35 gateway 82.xxx.148.131
36 auto eth0:1
37 iface eth0:1 inet static
38 address 82.xxx.148.195
39 netmask 255.255.255.128
40 auto eth0:2
41 iface eth0:2 inet static
42 address 82.xxx.148.196
43 netmask 255.255.255.128
44 auto eth0:3
45 iface eth0:3 inet static
46 address 82.xxx.148.197
47 netmask 255.255.255.128
48
49
50 What I want to know is what is equivalent for this on Gentoo. Let's just
51 say this is VPS server with 4 IP's assigned to me as customer
52
53
54 --
55 Amar Ćosić
56 amar.cosic@×××××.com

Replies

Subject Author
Re: [gentoo-user] Adding more than one static IP Marius Vaitiekunas <mariusvaitiekunas@×××××.com>