Show Table of Contents
1.7. 使用命令行界面(CLI)进行网络配置
ip 程序的命令有时是 iproute2 中论述的 upstream 软件包名称,请参考
man ip(8) 页面。该软件包在 Red Hat Enterprise Linux 7 中的名称是 iproute。必要时,可按照以下方法检查其版本后确认安装的 ip 程序:
~]$ ip -V
ip utility, iproute2-ss130716
可使用 ip 命令添加和删除连接到接口的地址和路由,同时使用 NetworkManager 在 nmcli、nmtui、control-center 及 D-Bus API 中保留并识别它们。
注:ip 程序可代替
ifconfig 程序,因为 net-tools 软件包(提供 ifconfig)不支持 InfiniBand 地址。命令 ip help 可提供用法信息。可为 OBJECTS 提供具体帮助信息,例如:ip link help 和 ip addr help
注意
重启后,该命令行中给出的 ip 命令不会保留。如果需要保留,则请使用配置文件
ifcfg,或者在脚本中添加命令。
使用命令行及配置文件完成每个人物的示例均在 nmtui 和 nmcli 示例之后,但在 NetworkManager 图形用户界面(即 control-center 和 nm-connection-editor)使用说明之前。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.