首页 > 系统服务 > 详细

Linux IP Alias

时间:2016-11-10 21:55:18      阅读:219      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!