[rešeno] Več IP-jev na enem systemu

LP

Na razpolago imam več ipjev uporabljam samo enega...
Zanima me pa, če sa da narediti tako da lahko uporabljam več ipjev na enem systemu?

Trenutne nastavitve imam pa takšne

# The primary network interface
auto eth0
iface eth0 inet static
address xxx.185.208.xxx
netmask 255.255.255.0
network xxx.185.208.xxx
gateway xxx.185.208.xxx
broadcast xxx.185.208.xxx
# dns-* options are implemented by the resolvconf package, if installed
#dns-nameservers
#dns-search linux

Komentarji

  • sajko Član
    uredil/-a 5. May, 2011
    Da se, vprašanje je zakaj rabiš to.

    V /etc/network/interfaces moras dodat virtualni interface, npr. :

    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet dhcp
    hwaddress ether 00:11:11:C1:C7:02

    auto eth0:0
    iface eth0:0 inet static
    address 192.168.2.200
    netmask 255.255.255.0
    gateway 192.168.2.1
    hwaddress ether 00:11:11:C1:C7:02


    Kjer je eth0:0 virtualni interface za eth0. Lahko jih dodaš še več (eth0:1, eth0:2,...)

    ne pozabi na:
    sudo /etc/init.d/networking restart


    Preveri če stvar deluje z ifconfigom :)
  • Rabil bi za game serverje...

    navoljo imam ipje

    IP-ji:
    91.185.208.208/29
    Uporabni: 210-214
    GW: 91.185.208.209
    maska: 255.255.255.248

    V interfaces imam pa takole

    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 91.185.208.214
    netmask 255.255.255.248
    network 91.185.208.0
    gateway 91.185.208.209
    broadcast 91.185.208.255
    # dns-* options are implemented by the resolvconf package, if installed
    #dns-nameservers 91.185.208.209
    #dns-search linux

    Kaj morem sedaj dodati....
  • sajko Član
    uredil/-a 8. May, 2011
    #Virtual network interfaces
    auto eth0:0
    iface eth0:0 inet static
    address 91.185.208.210
    netmask 255.255.255.248
    auto eth0:1
    iface eth0:1 inet static
    address 91.185.208.211
    netmask 255.255.255.248
    auto eth0:2
    iface eth0:2 inet static
    address 91.185.208.212
    netmask 255.255.255.248
    auto eth0:3
    iface eth0:3 inet static
    address 91.185.208.213
    netmask 255.255.255.248


    Tole bo pomoje delal, nimam pa pojma kako naprej, ker se s tem še nikoli nism igral. Če ti uspe poročaj.
  • Dela hvala ti... :):)
Za komentiranje se prijavite ali pa se vpišite.