ip
ip 命令与ifconfig命令类似,但比 ifconfig 命令更加强大,主要功能是用于显示或设置网络设备。
ip 命令是 Linux 加强版的的网络配置工具,用于代替 ifconfig 命令。
语法说明
ip [ OPTIONS ] OBJECT { COMMAND | help }
ip [ -force ] -batch filename
-
OBJECT:
OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |
tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |
netns | l2tp | macsec | tcp_metrics | token }
-V:显示指令版本信息;
-s:输出更详细的信息;
-f:强制使用指定的协议族;
-4:指定使用的网络层协议是IPv4协议;
-6:指定使用的网络层协议是IPv6协议;
-0:输出信息每条记录输出一行,即使内容较多也不换行显示;
-r:显示主机时,不使用IP地址,而使用主机的域名。 -
OPTIONS:
OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
-h[uman-readable] | -iec |
-f[amily] { inet | inet6 | ipx | dnet | bridge | link } |
-4 | -6 | -I | -D | -B | -0 |
-l[oops] { maximum-addr-flush-attempts } |
-o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |
-rc[vbuf] [size] | -n[etns] name | -a[ll] }
网络对象:指定要管理的网络对象;
具体操作:对指定的网络对象完成具体操作;
help:显示网络对象支持的操作命令的帮助信息。