How To Add Multiple IP Addresses On Linux / Fedora Core / Fedora Come aggiungere più indirizzi IP su Linux / Fedora / Fedora Core
Most guide to adding multiple IP addresses on Linux starts with the Microsoft-like solution of using ifconfig. La maggior parte guida per l'aggiunta di più indirizzi IP su Linux inizia con la Microsoft-come soluzione di usare ifconfig. While the solution is correct it doesn’t survive a reboot or even a network restart. Mentre la soluzione è corretta non sopravvivere un riavvio o anche una rete di riavviare. Here’s how you can easily and permanently add multiple IP addresses to the same (or different) network interface on your Linux machine. Ecco come si può facilmente e permanentemente aggiungere più indirizzi IP per lo stesso (o diverso) interfaccia di rete sulla vostra macchina Linux. I just successfully configured dozens of IP addresses on our new dedicated server using this method. Ho appena configurata correttamente decine di indirizzi IP sul nostro nuovo server dedicato con questo metodo. First I will explain how you can add using the Fedora user interface and then from the Linux command line. In primo luogo vi spiegherò come è possibile aggiungere utilizzando l'interfaccia utente di Fedora Core e poi dalla riga di comando di Linux.
How to set multiple IP addresses using the Fedora user interface Come impostare più indirizzi IP utilizzando l'interfaccia utente di Fedora Core
Linux supports multiple IP adresses on the same network interface. Linux supporta più indirizzi IP sulla stessa interfaccia di rete. Adding multiple IP addresses from the user interface in Fedora is simple. Aggiunta di più indirizzi IP da l'interfaccia utente in Fedora è semplice.
1. Select menu item System->Administration->Network. Selezionare dal menù Sistema-> Amministrazione-> Rete.
2. Click on New to add a new IP address Fare clic su Nuovo per aggiungere un nuovo indirizzo IP
3. Select Ethernet connection Seleziona connessione Ethernet
4. Select the Ethernet card (in my case it is Intel Corp 82566DC Gigabit Network Connection) Selezionare la scheda Ethernet (nel mio caso è Intel Corp 82566DC connessione di rete Gigabit)
5. Specify your chosen IP address Specificare il tuo indirizzo IP scelto
6. Specify subnet mask (if in doubt use 255.255.255.0; better yet ask your system admin) Specifica la subnet mask (in caso di dubbio uso 255.255.255.0; meglio ancora chiedete al vostro amministratore di sistema)
7. Specify your gateway, if you have one configured Specificare il gateway, se si dispone di uno configurato
8. Click Next and then click on Apply. Fare clic su Avanti e quindi fare clic su Applica.
Repeat the procedure for all your IP addresses. Ripetere la procedura per tutti i vostri indirizzi IP.
Restart the network: Riavviare la rete:
/sbin/service network restart / sbin / service rete riavviare
You are done! Avete finito!
How to set multiple IP addresses using Linux command line Come impostare più indirizzi IP usando Linux riga di comando
Go to /etc/sysconfig/network-scripts Vai a / etc / sysconfig / network-scripts
Make multiple copies of ifcfg-eth0 and name them as ifcfg-eth0:0, ifcfg-eth0:1 etc. Rendere più copie di ifcfg-eth0 e come nome ifcfg-eth0: 0, ifcfg-eth0: 1 ecc
Open each of them and at least change the IPADDR to your chosen IP address and the NETMASK to the subnet mask for that IP address. Apri ciascuna di esse e almeno cambiare la IPADDR scelto per il tuo indirizzo IP e la netmask per la subnet mask per tale indirizzo IP.
A sample entry would look like this: Un esempio l'ingresso del tipo:
DEVICE=eth0:0 DEVICE = eth0: 0
BOOTPROTO=static BOOTPROTO = static
IPADDR=34.123.111.21 IPADDR = 34.123.111.21
NETMASK=255.255.255.0 NETMASK = 255.255.255.0
ONBOOT=yes ONBOOT = yes
Restart the network: Riavviare la rete:
/sbin/service network restart / sbin / service rete riavviare
You are done! Avete finito!
Filed under Elencato sotto Fedora 7 Fedora Core 7 , Fedora Core 6 Fedora Core 6 , Headline News Headline News , How To Come , Linux , Linux Migration Linux , Web , Web Hosting Web Hosting , Web Services Servizi Web | |
| |
RSS 2.0 RSS 2,0 | |
Trackback this Article | questo articolo |
Email this Article Invia questo articolo
You may also like to read Si può anche leggere come |




November 14th, 2007 at 8:42 am 14 novembre 2007 alle 8:42 am
Don’t forget to add the :0, :1, etc as in the filename to the DEVICE= lines in each file! Non dimenticare di aggiungere l': 0, 1, ecc come nel nome del file sulla DEVICE = linee di ogni file!
April 18th, 2008 at 10:29 am 18 aprile 2008, 10:29 am
Hi, Salve,
I have a problem setting up multiple IP addresses under Fedora 8: I can configure the addresses fine as detailed on this website, and I can ping them no trouble. Ho un problema la creazione di più indirizzi IP sotto Fedora Core 8: Sono in grado di configurare gli indirizzi delle belle, come indicato su questo sito, e posso ping loro senza problemi. The problem is when I come to actually use them with a client-server program I am developing: Il problema è quando vengo a effettivamente utilizzarli con un client-server programma sono in via di sviluppo:
The server program opens up a socket and binds it to one of the addresses, but when it tries to bind a second socket to one of the other address, I get the error “Address in use” - so it seems that I can’t actually set up concurrent servers on the different addresses. Il programma server apre un socket e si lega a uno degli indirizzi, ma quando si cerca di impegnare una seconda presa di corrente a un altro indirizzo, ricevo l'errore "Indirizzo in uso" - così sembra che non posso effettivamente istituiti server concorrenti sui diversi indirizzi.
Further, when the client program tries to connect with the one open server socket, it will quite happily connect with the server irrespective of the address used by the server, so long as it is connecting to one of those I have configured, or is the primary address. Inoltre, quando il programma client tenta di connettersi a un server aprire socket, sarà molto lieto di connettersi con il server, indipendentemente l'indirizzo utilizzato dal server, sempre che sia la connessione a uno di quelli che ho configurato, o è il indirizzo principale.
I hope I have explained this clearly enough … Spero di aver spiegato in modo sufficientemente chiaro…
I am programming in C. Io sono di programmazione in C.
Cheers, Salute,
Keith Moore Keith Moore
April 18th, 2008 at 11:19 am 18 aprile 2008, 11:19 am
OK, panic over, found the problem - I was still binding with INADDR_ANY instead of the specific address, which had the dual effect of taking up all the IP addresses, and accepting incoming connections on all of them! OK, panico più, ha trovato il problema - ero ancora vincolante con INADDR_ANY invece di specifico indirizzo, che ha avuto il duplice effetto di occupare tutto lo indirizzi IP, e che accetta le connessioni in entrata a tutti loro!
D’oh! D'oh!
April 21st, 2008 at 10:47 am 21 aprile 2008 10:47
Cool guide, but I need multi DNS (already know about the ip addresses tips) Cool guida, ma ho bisogno di più DNS (già conoscono gli indirizzi IP suggerimenti)
thanks anyway Grazie comunque