162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci===========
462306a36Sopenharmony_ciIP-Aliasing
562306a36Sopenharmony_ci===========
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciIP-aliases are an obsolete way to manage multiple IP-addresses/masks
862306a36Sopenharmony_ciper interface. Newer tools such as iproute2 support multiple
962306a36Sopenharmony_ciaddress/prefixes per interface, but aliases are still supported
1062306a36Sopenharmony_cifor backwards compatibility.
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciAn alias is formed by adding a colon and a string when running ifconfig.
1362306a36Sopenharmony_ciThis string is usually numeric, but this is not a must.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciAlias creation
1762306a36Sopenharmony_ci==============
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciAlias creation is done by 'magic' interface naming: eg. to create a
2062306a36Sopenharmony_ci200.1.1.1 alias for eth0 ...
2162306a36Sopenharmony_ci::
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci  # ifconfig eth0:0 200.1.1.1  etc,etc....
2462306a36Sopenharmony_ci	~~ -> request alias #0 creation (if not yet exists) for eth0
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ciThe corresponding route is also set up by this command.  Please note:
2762306a36Sopenharmony_ciThe route always points to the base interface.
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ciAlias deletion
3162306a36Sopenharmony_ci==============
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ciThe alias is removed by shutting the alias down::
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci  # ifconfig eth0:0 down
3662306a36Sopenharmony_ci	~~~~~~~~~~ -> will delete alias
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ciAlias (re-)configuring
4062306a36Sopenharmony_ci======================
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciAliases are not real devices, but programs should be able to configure
4362306a36Sopenharmony_ciand refer to them as usual (ifconfig, route, etc).
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ciRelationship with main device
4762306a36Sopenharmony_ci=============================
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ciIf the base device is shut down the added aliases will be deleted too.
50