Answer the question
In order to leave comments, you need to log in
Server and multiple IPs
Good afternoon.
And again I have a question about server administration.
The hoster has allocated several IPs for the server. How to bind them to the server?
Answer the question
In order to leave comments, you need to log in
RedHat / CentOS / Fedora
One IP
/etc/sysconfig/network-scripts/ifcfg-eth0:0
=====
DEVICE=eth0:0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=1.2.3.4
And so on for eth0:1, eth0:2 etc. Then you need to raise the interfaces "ifup eth0:0" "ifup eth0:1", etc.
The option to add an IP by batch
/etc/sysconfig/network-scripts/ifcfg-eth0-range0
=====
IPADD_START=1.2.3.4
IPADDR_END=1.2.3.100
/etc/init.d/network restart will raise 96 IP on the eth0 interface.
The commentary about each IP setevuha - tin. What if there are 50 ips?
OS RedHat 4.1 - you must be mistaken, now there are none.
In Fedora, you must first extinguish Network-Manager.
It is better to have several ethernet cards, then each one could be assigned its own ip address. If there is only one card, then you can make several “virtual” ones, for example eth0:1 eth0:2, etc. To say definitely what and how to change in the configs, you need to know what version of Linux you have (please specify this point).
ifconfig eth0:N 10.0.0.2 netmask 255.255.255.0
PS After the reboot it will not rise, for this use what is indicated above.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question