Žilinská univerzita > Fakulta riadenia a informatiky > Katedra informačných sietí

Viaceré IP adresy na rozhraní - debian

Pridaj do /etc/network/interfaces dalsi interface a pridaj ip adresy.

Pôvodné nastavenie s jednou IP na rozhraní eth1:

# The primary network interface
auto eth1
iface eth1 inet static
        address 158.193.152.1
        netmask 255.255.255.0
        broadcast 158.193.152.255
        gateway 158.193.152.38

 

Pridal som druhú IP adresu na eth1:0

# The primary network interface
auto eth1
iface eth1 inet static
        address 158.193.152.1
        netmask 255.255.255.0
        broadcast 158.193.152.255
        gateway 158.193.152.38


# druha IP na primarnom rozhrani
auto eth1:0
iface eth1:0 inet static
        address 158.193.152.2
        netmask 255.255.255.0
        broadcast 158.193.152.255
        gateway 158.193.152.38

a reštart

 /etc/init.d/networking restart
Groups: