Home > networking > Labeling/Aliasing multiple network addresses

Labeling/Aliasing multiple network addresses

November 29Hits:1

If my machine is connected to several networks and configured with multiple addresses (ipv4), is it wise to configure and use labels to identify them ?

By labels I mean the iproute2 ip command's "label" tag:

ip address add dev eth0 label eth0:local 

I want to be able to identify the address and change it using a script when needed.

I'm asking because the man page refers to Linux-2.0 net aliases compatibility which sounds deprecated.

Also, I might be missing a better solution.


Any recent distribution should support text labels and all support numeric labels (eth0:0 for example). Maybe some scripts/utilities will have issues when they expect a number and find a text label after the colon. Also the start-up scripts support network configuration with the labels. Labels (alias interfaces) can be setup also with plain old ifconfig (not only the ip command).

For your question regarding changing of the IPs, there are several possibilities:

  1. Use text labels
  2. Use numeric labels (eth0:0, eth0:1, ...) and remember which number corresponds to which network; I think the effect is the same for both text and numeric labels
  3. Find the correct interface in the script by the network address (assuming each labeled interface will belong only to one network); this is the most correct option in my opinion

Related Articles

  • Labeling/Aliasing multiple network addressesNovember 29

    If my machine is connected to several networks and configured with multiple addresses (ipv4), is it wise to configure and use labels to identify them ? By labels I mean the iproute2 ip command's "label" tag: ip address add dev eth0 l

  • Is a network connection always a single network address? August 5

    With a figure showing a communication between a network and a server, does that indicate a single network address or can it include multiple network addresses? Is a single network address the same as an IP address ? Does a patent figure showing a com

  • Assigning additional labeled aliases to a single physical network interface for IPv6 addressesMay 6

    Currently I am stuck trying to label the interfaces for additional IP addresses I am adding to an interface. Let's say the interface is eth0 ($IFACE), then for $ADDRFAM="inet" I can add an IPv4 address to a labeled alias of eth0 like this: ip -f

  • Arch Linux - Add Multiple IP Addresses to NetworkJuly 20

    I'm trying to add multiple ip addresses to arch linux server. Since I have only one network card with interface eth0 I think I need to add virtual interfaces like eth0:1 etc.. I have tried using this following syntax in /etc/rc.conf, but it seems to

  • Using Network Interface With Multiple IP AddressesApril 19

    If I have a network interface with multiple IP addresses bound to it can I set which IP address on the interface my server uses? It sees to be set to use the first IP address I added to it. Info: Ubuntu on OpenVZ --------------Solutions-------------

  • multiple MAC addresses on one physical network interface (linux)January 18

    Simple question: How can I setup multiple MAC addresses on one physical network interface (linux)? Why? My ISP is checking ip<->mac on GW and I d like to route traffic through my "linuxbox" and than forward it with different source ip. Wit

  • Why do multiple IP Addresses in my local network point to the same computer?February 2

    I'm new to linux and nmap, and I am attempting to do a scan of my local network. Using nmap I find that there are 4 hosts on my network (,,, I am using VirtualBox and running a Kali Linux VM with a native Windows

  • Multiple MAC addresses on a single network interfaceMarch 16

    Since the other question about this (Multiple network interfaces on a single NIC in Windows) only asks about different routing, I'm going to ask this again: Is there any way to create multiple virtual connections, each with its own MAC address, from

  • Multiple IP addresses on one NIC register twice in DNS serverAugust 21

    We've got a build server (Windows Server 2008 SP2, 64-bit) which has one NIC and two IP addresses registered to that NIC ( and The build server is registering two identical Host (A) records for itself in our DNS server: bui

  • Creating multiple IP addresses in different subnets on Windows Vista

    Creating multiple IP addresses in different subnets on Windows VistaAugust 24

    I am using Windows Vista, and only have 1 NIC. I know that in Linux, I can create IP aliasing such as: eth0 - eth0:1 - eth0:2 - and access all 3 subnets with just one eth interface. Is there such an equivalent in W

  • Using DHCP to get multiple IP addresses on single NIC on RedHatMarch 12

    I am trying to obtain multiple IP addresses using the ISC dhclient supplied with Red Hat Enterprise Linux 5 in order to provide the IPs to multiple applications, which will run on separate virtual interfaces (such as eth0:1, eth0:2) other than the so

  • How do I add interface aliases using Network Manager GUI?

    How do I add interface aliases using Network Manager GUI?April 2

    I have seen numerous tutorials for creating network interface aliases (for assigning multiple IPv4 addresses to a single interface), but I seem unable to find one for using the Network Manager GUI. Is it even possible? Or is Network Manager yet to su

  • How can I (from CLI) assign multiple IP addresses to one interface?November 8

    On my server I want to assign several IP addresses to one NIC, but without using the deprecated ifconfig or the obsolete "alias" notation (like eth0:0) in /etc/network/interfaces because in IP Aliasing (on www.kernel.org) you can read IP-aliases

  • Connecting to multiple network shares on the same host using different credentials?June 30

    Is it possible to connect to multiple network shares on the same Windows 7 host using different credentials? Example: Host H has shares \H\A and \H\B. Share A is configured to be only accessible by user account U1 (via Properties>Security tab), and s

  • Multiple IP addresses per NICApril 30

    How can I have multiple IP addresses assigned to a single NIC? I remember doing this on Unix way back when. Can it be done on Windows? --------------Solutions------------- Yes, it can be done in Windows: Go to the Control Panel > Network Connections

  • How do I associate IP masks/ranges with multiple network cards in WinXP/VistaApril 30

    I have multiple network interfaces on a Windows client machine. I would like for some IP traffic to go through one card and other traffic to go through the other card based upon the IP (actually, I would prefer domain names) of the destination server

  • What is the origin of the private network address 192.168.*.*?September 10

    I had a smart (but non-technical) user ask me today: Why did they pick 192.168.. for a private network address? The only answer I could come up with is because 192 = 11000000 in binary. And 168 is 10101000 in binary. Both of which are kind of cool lo

  • Multiple "from" addresses for single Exchange account in Outlook 2007

    Multiple "from" addresses for single Exchange account in Outlook 2007March 14

    I have a single Exhange account with multiple aliases (e-mail addresses), for which it recieves incoming mail messages. Using "rules" it is possible to have the incoming messages sorted into folders depending on the address they are sent to. Whe

  • How can I tell which of multiple network cards is in use?June 30

    Suppose I have multiple network cards connected to my PC, how can I know which card is used for communication. For example, if I use ping 192.168.x.xxx I would like to know which card (and which IP address) used for communication. The command netstat

  • How can I use multiple IP-addresses, multi-homing, on a Windows 7 machine?July 26

    Is there an easy way to set up multiple IP-addresses (multi-homing) for a Windows 7 machine? Today the machine is on a LAN and the IP-address is allocated by DHCP, I can change to static address allocation if needed. I have seen multi-homing been don

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.754 s.