Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kein IP-Aliasing mehr mit openRC?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Christoph Schnauß
Guru
Guru


Joined: 17 Dec 2004
Posts: 553
Location: Berlin

PostPosted: Fri Apr 18, 2008 4:00 pm    Post subject: kein IP-Aliasing mehr mit openRC? Reply with quote

hallo,

mit dem letzten world-Update kam openRC mit. Vermutlich hängt der "Verlust" meiner IP-Aliase damit zusammen, ganz sicher bin ich mir dabei aber nicht.
Bisher hatte ich in /etc/conf.d/net stehen:
Code:
config_eth0=("192.168.0.1" "172.24.10.2" "10.0.0.1")
Die brauche ich alle drei für virtuelle Hosts in der Apache-Konfiguration, und das hat auch lange Zeit wunderbar funktioniert. Tut es nun sein gestern nicht mehr. Nur die letzte IP wird angenommen.
Im Handbuch steht unter http://www.gentoo.de/doc/de/handbook/handbook-amd64.xml?part=4&chap=2 noch ein Beispiel, das in dieser Form nun nicht mehr funktioniert. Weiß jemand, wie ich meine IP-Aliase wiedererwecken kann?

Christoph S.
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Fri Apr 18, 2008 5:40 pm    Post subject: Reply with quote

http://www.gentoo.org/doc/en/openrc-migration.xml

Code Listing 2.9
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
Christoph Schnauß
Guru
Guru


Joined: 17 Dec 2004
Posts: 553
Location: Berlin

PostPosted: Fri Apr 18, 2008 6:01 pm    Post subject: Reply with quote

hallo,
papahuhn wrote:
http://www.gentoo.org/doc/en/openrc-migration.xml
Code Listing 2.9
Das reicht leider nicht. Sobald ich da zwei unterschiedliche IP-Adressen einsetze, gibts einen Fehler.
Beispiel (Eintragung in /etc/conf.d/net):
Code:
config_eth0="192.168.0.1" "172.40.10.2"
Wenn ich jetzt meine Karte eth0 neu starte, erhalte ich:
Code:
pc1 / # /etc/init.d/net.eth0 restart
 * Caching service dependencies ...
/etc/init.d/../conf.d/net: line 6: 172.40.10.2: command not found
/etc/init.d/../conf.d/net: line 6: 172.40.10.2: command not found
/etc/init.d/../conf.d//net: line 6: 172.40.10.2: command not found
 * Bringing down interface eth0
 *   Removing addresses
/etc/init.d/../conf.d//net: line 6: 172.40.10.2: command not found
 * Bringing up interface eth0
 *   No configuration specified; defaulting to DHCP
 *   dhcp ...
 *     nothing provides `dhcp'                                                [ !! ]
 * ERROR: net.eth0 failed to start
pc1 / #
Über IP-Aliasing steht an der von dir angegebenen Handbuchseite leider nichts.

Es gibt neuerdings eine Datei /usr/share/doc/openrc/net.example. Und darin einen Absatz:
Code:
# If you need more than one address, you can use something like this
# NOTE: ifconfig creates an aliased device for each extra IPv4 address
#       (eth0:1, eth0:2, etc)
#       iproute2 does not do this as there is no need to
#config_eth0="192.168.0.2/24 192.168.0.3/24 192.168.0.4/24"
# However, that only works with CIDR addresses, so you can't use netmask.
Damit habe ich aber das schon genannte Problem, daß, wenn ich meine drei benötigten IP-Adressen eintrage, sowas passiert:
Code:
pc1 / # /etc/init.d/net.eth0 restart
 * Caching service dependencies ...
 * Bringing down interface eth0
 *   Removing addresses
 * Bringing up interface eth0
 *   192.168.0.1 ...                                                          [ ok ]
 *   172.24.10.2 ...                                                          [ ok ]
 *   10.0.0.1 ...                                                             [ ok ]
 *   Adding routes
 *     default via 192.168.0.254 ...
SIOCADDRT: Das Netzwerk ist nicht erreichbar
"Nicht erreichbar" heißt, daß eben leider nicht meine drei Adressen, sondern nur die letzte berücksichtigt werden - und die benutzt ein anderes Subnetz als mein Router. ifconfig zeigt mir auch nicht die erwarteten Aliase, sondern lediglich die 10.0.0.1 an.

Last edited by Christoph Schnauß on Fri Apr 18, 2008 6:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Fri Apr 18, 2008 6:17 pm    Post subject: Reply with quote

Dann schau mal in die /usr/share/doc/openrc/net.example rein, da sollte was drinstehen.
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
Christoph Schnauß
Guru
Guru


Joined: 17 Dec 2004
Posts: 553
Location: Berlin

PostPosted: Fri Apr 18, 2008 6:30 pm    Post subject: Reply with quote

papahuhn wrote:
Dann schau mal in die /usr/share/doc/openrc/net.example rein, da sollte was drinstehen.
Richtig - ich war grade bei EDIT, als du das geschrieben hast, deshalb steht meine Antwort oben drin.
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Fri Apr 18, 2008 6:39 pm    Post subject: Reply with quote

Christoph Schnauß wrote:
"Nicht erreichbar" heißt, daß eben leider nicht meine drei Adressen, sondern nur die letzte berücksichtigt werden - und die benutzt ein anderes Subnetz als mein Router. ifconfig zeigt mir auch nicht die erwarteten Aliase, sondern lediglich die 10.0.0.1 an.


ifconfig muss die nicht anzeigen, weil die Adressen standardmäßig mit iproute2 gesetzt werden. Ein "ip addr show eth0" sollte dir alle drei IPs ausgeben. Bist du sicher, dass die Netzmaske stimmt? Ich hab testweise überall /24 genommen, und bei mir funktionierts.
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
Christoph Schnauß
Guru
Guru


Joined: 17 Dec 2004
Posts: 553
Location: Berlin

PostPosted: Fri Apr 18, 2008 7:20 pm    Post subject: Reply with quote

hallo,
papahuhn wrote:
... weil die Adressen standardmäßig mit iproute2 gesetzt werden
Danke, das war der entscheidende Hinweis. iproute2 war gar nicht vorhanden, habe ich früher offenbar nicht benötigt
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3369
Location: de

PostPosted: Fri Apr 18, 2008 9:26 pm    Post subject: Reply with quote

Christoph Schnauß wrote:

Beispiel (Eintragung in /etc/conf.d/net):
Code:
config_eth0="192.168.0.1" "172.40.10.2"
Wenn ich jetzt meine Karte eth0 neu starte, erhalte ich:[code]pc1 / # /etc/init.d/net.eth0 restart
* Caching service dependencies ...
/etc/init.d/../conf.d/net: line 6: 172.40.10.2: command not found
/etc/init.d/../conf.d/net: line 6: 172.40.10.2: command not found
/etc/init.d/../conf.d//net: line 6: 172.40.10.2: command not found

Soweit ich das verstanden hab, sollte das auch heißen:

[code]config_eth0="192.168.0.1 172.40.10.2"[/code]

D.h. die Gänsefüßchen zwischen den IPs müssen raus.

Die Edith fragt sich grad, wieso das Code-Element nicht funzt. Hab ich da irgendwas versaubeutelt?
Back to top
View user's profile Send private message
Knieper
l33t
l33t


Joined: 10 Nov 2005
Posts: 846

PostPosted: Fri Apr 18, 2008 9:52 pm    Post subject: Reply with quote

Quote:
Die Edith fragt sich grad, wieso das Code-Element nicht funzt. Hab ich da irgendwas versaubeutelt?

Da fehlt vorher ein [/code].
_________________
Je dümmer desto Gnome/KDE.
Back to top
View user's profile Send private message
Christoph Schnauß
Guru
Guru


Joined: 17 Dec 2004
Posts: 553
Location: Berlin

PostPosted: Fri Apr 18, 2008 10:24 pm    Post subject: Reply with quote

hallo,
musv wrote:
Soweit ich das verstanden hab, sollte das auch heißen:
Code:
config_eth0="192.168.0.1 172.40.10.2"

D.h. die Gänsefüßchen zwischen den IPs müssen raus.
Schon richtig, hätte aber ohne iproute2 auch nix gebracht.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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