View previous topic :: View next topic |
Author |
Message |
jhunholz Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/163484943243c3e1ee661d6.png)
Joined: 29 Apr 2004 Posts: 154 Location: Raleigh, NC
|
Posted: Wed Jan 26, 2005 7:32 pm Post subject: Tying multiple IP addresses to a single interface |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Wed Jan 26, 2005 8:07 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
jhunholz Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/163484943243c3e1ee661d6.png)
Joined: 29 Apr 2004 Posts: 154 Location: Raleigh, NC
|
Posted: Thu Jan 27, 2005 4:53 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Jan 27, 2005 12:33 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
nobspangle Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/210249061640b0c1d626f5b.gif)
Joined: 23 Mar 2004 Posts: 1318 Location: Manchester, UK
|
Posted: Thu Jan 27, 2005 5:49 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
expat_iain Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 09 Jan 2004 Posts: 361 Location: Malta GC
|
Posted: Thu Jan 27, 2005 6:53 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Jan 27, 2005 7:06 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Sat Jan 29, 2005 4:19 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
expat_iain Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 09 Jan 2004 Posts: 361 Location: Malta GC
|
Posted: Mon Jan 31, 2005 8:13 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|