Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tying multiple IP addresses to a single interface
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jhunholz
Apprentice
Apprentice


Joined: 29 Apr 2004
Posts: 154
Location: Raleigh, NC

PostPosted: Wed Jan 26, 2005 7:32 pm    Post subject: Tying multiple IP addresses to a single interface Reply with quote

I am moving my webserver over to Gentoo while it is still live running Fedora. Anyway, my server has a main IP address that is tied to eth0, and then a block of 8 IPs that are tied to the lo interface (lo:1, lo:2, etc.). In Fedora, this is all handled with different files, but I believe I would put this all in the /etc/conf.d/net in Gentoo, correct? How would I list the lo interfaces then?

Code:
iface_lo:1="xx.xx.xx.xx netmast 255.255.255.255"


Does that look correct? Any help would be appreciated! Thanks.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Wed Jan 26, 2005 8:07 pm    Post subject: Reply with quote

The example is in the /etc/conf.d/net file.
Why on earth would you want aliases for the loopback interface ?
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
jhunholz
Apprentice
Apprentice


Joined: 29 Apr 2004
Posts: 154
Location: Raleigh, NC

PostPosted: Thu Jan 27, 2005 4:53 am    Post subject: Reply with quote

I asked that same question when I first started renting this server. But as it turns out, it is perfectly normal to assign IPs to the loopback interface since the server is the final destination for them. The reason I was asking is I didn't see anything in the /etc/conf.d/net file about assigning them to the lo interface. Is it handled the same as assigning them to the eth0 interface? Thanks.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Thu Jan 27, 2005 12:33 pm    Post subject: Reply with quote

One would assume so; I would read the /etc/init.d/net.lo script to see if the necessary code is there.

But again - ignore me if I seem to nag at you: why would you alias net.lo ?
What you say makes little sense to me - sure the webserver is the final destination for traffic, but no traffic ever comes in on the loopback interface, and nothing is ever routed there.

I'm just curious how you would make this work.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Thu Jan 27, 2005 5:49 pm    Post subject: Reply with quote

The only reason I can see for attaching multiple IPs to the loopback would be so that you could run multiple services on the same port that only needed to be accessed internally, but I can't think of an example where that would be something you wanted to do.
Back to top
View user's profile Send private message
expat_iain
Guru
Guru


Joined: 09 Jan 2004
Posts: 361
Location: Malta GC

PostPosted: Thu Jan 27, 2005 6:53 pm    Post subject: Reply with quote

Perhaps another reason would be if you were able to reach the machine from different intrefaces and want to make sure that the service is always available, after all the loopback interfaces aren't going to 'disconnect'.

Regs.

Iain.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Thu Jan 27, 2005 7:06 pm    Post subject: Reply with quote

Sure, but available to who ? (Or possiby whom...)

As they will only be available to the localhost, what is the point of running the services on different interfaces ?
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sat Jan 29, 2005 4:19 pm    Post subject: Reply with quote

Currently this is not possible with Gentoo init scripts.

However, it will be possible in baselayout-1.12.x - but that won't be available for some time as we don't have 1.11.x stable yet :/
Back to top
View user's profile Send private message
expat_iain
Guru
Guru


Joined: 09 Jan 2004
Posts: 361
Location: Malta GC

PostPosted: Mon Jan 31, 2005 8:13 am    Post subject: Reply with quote

adaptr wrote:
Sure, but available to who ? (Or possiby whom...)

As they will only be available to the localhost, what is the point of running the services on different interfaces ?


Well, if you bind a public IP to an additional loopback int and then advertise that IP via a routing protocol, you should be able to receive requests from any interface.

Same thing is ofen done with routers to make sure that they are always available remotely...as long as one physical interface is up!

Regs.

Iain,
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum