Priradenie niekolkych IP adries
Martin Tiršel
lk na blackpage.eu
Neděle Únor 19 19:27:51 CET 2012
Zdravim,
potreboval by som poradit, mam tu niekolko IPciek, ktore potrebujem
priradit jednemu serveru, ale nerad by som si zlou konfiguraciou odstrihol
pristup, nie je to totizto zrovna moja parketa. Pouzivam Debian Squeeze a
sucasny stav je:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address x.x.x.x
netmask 255.255.255.0
network x.x.x.0
broadcast x.x.x.255
gateway x.x.x.1
dns-nameservers y.y.y.y
Bezi mi tam XEN, ktory ak spravne rozumiem, povodny interface eth0 na host
systeme premenuje(?) a vytvori bridge s nazvom eth0:
# brctl show
bridge name bridge id STP enabled interfaces
eth0 8000.1c6f65d47ead no peth0
vif2.0
Ja teraz potrebujem priradit host systemu dalsie IPcky (nie do guest
systemu). Nasiel som postup, ze by malo stacit /etc/network/interfaces
prepisat nasledovne, len neviem, ci to takto bude korektne fungovat aj pre
bridge:
allow-hotplug eth0
iface eth0 inet static
address x.x.x.x
netmask 255.255.255.0
network x.x.x.0
broadcast x.x.x.255
gateway x.x.x.1
dns-nameservers y.y.y.y
up ip addr add x.x.x.y/24 dev eth0 label eth0:0
down ip addr del x.x.x.y/24 dev eth0 label eth0:0
Potrebujem priradit 5 IPciek, cize dalsie rovnako, len eth0:1, eth0:2,
atd. Je tento postup spravny alebo to treba riesit inak? Nerad by som
totiz stratil spojenie po (pripadne treba pouzit iny prikaz?):
# ifdown eth0 && ifup eth0
Dakujem za rady
--
S pozdravom,
Martin Tiršel
Další informace o konferenci Linux