2020-03-27 13:37:59 +00:00
|
|
|
# ip address
|
|
|
|
|
|
|
|
> IP Address management subcommand.
|
|
|
|
|
|
|
|
- List network interfaces and their associated IP addresses:
|
|
|
|
|
|
|
|
`ip address`
|
|
|
|
|
|
|
|
- Filter to show only active network interfaces:
|
|
|
|
|
|
|
|
`ip address show up`
|
|
|
|
|
|
|
|
- Display information about a specific network interface:
|
|
|
|
|
2020-04-30 13:50:51 +01:00
|
|
|
`ip address show dev {{eth0}}`
|
2020-03-27 13:37:59 +00:00
|
|
|
|
|
|
|
- Add an IP address to a network interface:
|
|
|
|
|
2020-04-30 13:50:51 +01:00
|
|
|
`ip address add {{ip_address}} dev {{eth0}}`
|
2020-03-27 13:37:59 +00:00
|
|
|
|
|
|
|
- Remove an IP address from a network interface:
|
|
|
|
|
2020-04-30 13:50:51 +01:00
|
|
|
`ip address delete {{ip_address}} dev {{eth0}}`
|
2020-03-27 13:37:59 +00:00
|
|
|
|
|
|
|
- Delete all IP addresses in a given scope from a network interface:
|
|
|
|
|
2020-04-30 13:50:51 +01:00
|
|
|
`ip address flush dev {{eth0}} scope {{global|host|link}}`
|