1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| ip address - protocol address management. ip address add - add new protocol address ip addr add IFADDR dev IFACE [label NAME]:为额外添加的地址指明接口别名; [broadcast ADDRESS]:广播地址;会根据IP和NETMASK自动计算得到; [scope SCOPE_VALUE]:路由的范围,主要是 link ,是与本设备有关的直接连接。 global:全局可用; link:接口可用; host:仅本机可用; [proto]:此路由的路由协定,主要有 redirect, kernel, boot, static, ra 等, 其中 kernel 指的是直接由核心判断自动设定。
ip address delete - delete protocol address ip addr delete IFADDR dev IFACE ip address show - look at protocol addresses ip addr list [IFACE]:显示接口的地址; ip address flush - flush protocol addresses ip addr flush dev IFACE #清空接口上的所有地址
|