Documentation/networking/alias.rst
Source file repositories/reference/linux-study-clean/Documentation/networking/alias.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/networking/alias.rst- Extension
.rst- Size
- 1231 bytes
- Lines
- 50
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
===========
IP-Aliasing
===========
IP-aliases are an obsolete way to manage multiple IP-addresses/masks
per interface. Newer tools such as iproute2 support multiple
address/prefixes per interface, but aliases are still supported
for backwards compatibility.
An alias is formed by adding a colon and a string when running ifconfig.
This string is usually numeric, but this is not a must.
Alias creation
==============
Alias creation is done by 'magic' interface naming: eg. to create a
200.1.1.1 alias for eth0 ...
::
# ifconfig eth0:0 200.1.1.1 etc,etc....
~~ -> request alias #0 creation (if not yet exists) for eth0
The corresponding route is also set up by this command. Please note:
The route always points to the base interface.
Alias deletion
==============
The alias is removed by shutting the alias down::
# ifconfig eth0:0 down
~~~~~~~~~~ -> will delete alias
Alias (re-)configuring
======================
Aliases are not real devices, but programs should be able to configure
and refer to them as usual (ifconfig, route, etc).
Relationship with main device
=============================
If the base device is shut down the added aliases will be deleted too.
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.