Menu Zavrieť

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
Rate this post

Pridaj komentár

Vaša e-mailová adresa nebude zverejnená. Vyžadované polia sú označené *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.