码迷,mamicode.com
首页 > 系统相关 > 详细

Linux IP Alias

时间:2016-11-10 21:58:30      阅读:465      评论:0      收藏:0      [点我收藏+]

标签:ip   linux   alias   

1. Abount IP Alias

    IP alias / IP aliasing is assigning multiple IP addresses to a single physical network interface. Alias network interface is configured on top of existing physical network interface.


    By IP aliasing we can make applications and services running on linux server available on multiple IP addresses by using only one physical network interfase.


    Requirements for IP alias

        * Physical Network Interface Connectivity

        * Available Multiple IP Addresses


    Limitations of IP alias:

            * Subnet Aliasing (alias network interface IP address is preffered to be in the same network subnet as physical network interface below – if not proper network infrastructure configuration is needed)

    * DHCP (alias interfaces do not support DHCP)



Example: nic eth0 192.168.1.100


2. Non-Persistent IP Alias Configuration


[root@JerryDai ~]$ ifconfig eth0:0 192.168.1.100 up


3. Persistent IP Alias Configuration

[root@JerryDai network-scripts]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=none

IPADDR=192.168.1.100

PREFIX=24

GATEWAY=192.168.1.1

DNS1=114.114.114.114

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME="System eth0"


[root@JerryDai network-scripts]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0\:0

DEVICE=eth0

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=static

ONPARENT=yes

IPADDR=192.168.1.101

PREFIX=24

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME="System eth0:0"


Linux IP Alias

标签:ip   linux   alias   

原文地址:http://jerrydai.blog.51cto.com/12141841/1871518

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!