Documentation/translations/zh_CN/networking/alias.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/networking/alias.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/networking/alias.rst- Extension
.rst- Size
- 1306 bytes
- Lines
- 57
- 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
.. include:: ../disclaimer-zh_CN.rst
:Original: Documentation/networking/alias.rst
:翻译:
邱禹潭 Qiu Yutan <qiu.yutan@zte.com.cn>
:校译:
======
IP别名
======
IP别名是管理每个接口存在多个IP地址/子网掩码的一种过时方法。
虽然更新的工具如iproute2支持每个接口多个地址/前缀,
但为了向后兼容性,别名仍被支持。
别名通过在使用 ifconfig 时在接口名后添加冒号和一个字符串来创建。
这个字符串通常是数字,但并非必须。
别名创建
========
别名的创建是通过“特殊的”接口命名机制完成的:例如,
要为eth0创建一个 200.1.1.1 的别名...
::
# ifconfig eth0:0 200.1.1.1 等等
~~ -> 请求为eth0创建别名#0(如果尚不存在)
该命令也会设置相应的路由表项。请注意:路由表项始终指向基础接口。
别名删除
========
通过关闭别名即可将其删除::
# ifconfig eth0:0 down
~~~~~~~~~~ -> 将删除别名
别名(重新)配置
================
别名不是真实的设备,但程序应该能够正常配置和引用它们(ifconfig、route等)。
与主设备的关系
==============
如果基础设备被关闭,则其上添加的所有别名也将被删除。
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.