From ea631fe642f1926b649a2468438b40651ed3be07 Mon Sep 17 00:00:00 2001 From: lutixiaya <48750425+lutixiaya@users.noreply.github.com> Date: Tue, 30 Aug 2022 13:07:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20`ip`=20=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E9=83=A8=E5=88=86=E8=A7=A3=E9=87=8A=20(#408)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- command/ip.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/command/ip.md b/command/ip.md index 01f2e99060..a4112e81d1 100644 --- a/command/ip.md +++ b/command/ip.md @@ -10,12 +10,12 @@ ip ### 语法 ```shell -ip(选项)(参数) +ip(选项)(对象) Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } ip [ -force ] -batch filename ``` -### 选项 +### 对象 ```shell OBJECT := { link | address | addrlabel | route | rule | neigh | ntable | @@ -31,7 +31,7 @@ OBJECT := { link | address | addrlabel | route | rule | neigh | ntable | -r:显示主机时,不使用IP地址,而使用主机的域名。 ``` -### 参数 +### 选项 ```shell OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] | @@ -50,16 +50,16 @@ help:显示网络对象支持的操作命令的帮助信息。 ### 实例 ```shell -ip link show # 显示网络接口信息 +ip link show # 显示网络接口信息 ip link set eth0 up # 开启网卡 ip link set eth0 down # 关闭网卡 ip link set eth0 promisc on # 开启网卡的混合模式 -ip link set eth0 promisc offi # 关闭网卡的混个模式 +ip link set eth0 promisc offi # 关闭网卡的混合模式 ip link set eth0 txqueuelen 1200 # 设置网卡队列长度 ip link set eth0 mtu 1400 # 设置网卡最大传输单元 ip addr show # 显示网卡IP信息 -ip addr add 192.168.0.1/24 dev eth0 # 设置eth0网卡IP地址192.168.0.1 -ip addr del 192.168.0.1/24 dev eth0 # 删除eth0网卡IP地址 +ip addr add 192.168.0.1/24 dev eth0 # 为eth0网卡添加一个新的IP地址192.168.0.1 +ip addr del 192.168.0.1/24 dev eth0 # 为eth0网卡删除一个IP地址192.168.0.1 ip route show # 显示系统路由 ip route add default via 192.168.1.254 # 设置系统默认路由