Home
Latest Tutorials
Add IP Aliases in Red Hat Linux or CentOS Linux
Latest Tutorials
Add IP Aliases in Red Hat Linux or CentOS Linux | Add IP Aliases in Red Hat Linux or CentOS Linux |
|
|
If you have an IP for your server but you also want to add other IPs to the same server you must do the following: Adding a network alias from command line in Red Hat or CentOS Linux ------------------------------------------------------------------------------------------------- From command line, using ifconfig command do: /sbin/ifconfig lo 127.0.0.1 Your network aliases would be eth0:0 and eth0:1 Configure a script to setup your network / IP aliases on boot in Red Hat Linux ---------------------------------------------------------------------------------------------------------- cd /etc/sysconfig/network-scripts/ cp ifcfg-eth0 ifcfg-eth0:0 cp ifcfg-eth0 ifcfg-eth0:1 Then edit ifcfg-eth0:0 and ifcfg-eth0:1 files and add your IP aliases there. Also in Red Hat and CentOS Linux it is possible to add as IP aliases a range of IPs. To do that go to : /etc/sysconfig/network-scripts/ directory and create a file ifcfg-eth0-range0 with the following content: # -------- /etc/sysconfig/network-scripts/ifcfg-eth0-range0 file ------------ |
| < Prev | Next > |
|---|
