2014-02-25 02:25:47 +00:00
|
|
|
# ip
|
|
|
|
|
|
|
|
> Show / manipulate routing, devices, policy routing and tunnels
|
|
|
|
|
|
|
|
- List interfaces with detailed info
|
|
|
|
|
|
|
|
`ip a`
|
|
|
|
|
|
|
|
- Display the routing table
|
|
|
|
|
|
|
|
`ip r`
|
|
|
|
|
2015-10-22 08:00:05 +01:00
|
|
|
- Make an interface up/down
|
2014-02-25 02:25:47 +00:00
|
|
|
|
|
|
|
`ip link set {{interface}} up/down`
|
|
|
|
|
|
|
|
- Add/Delete an ip address to an interface
|
|
|
|
|
2014-02-25 02:28:45 +00:00
|
|
|
`ip addr add/del {{ip}}/{{mask}} dev {{interface}}`
|
2014-02-25 02:25:47 +00:00
|
|
|
|
|
|
|
- Add an default route
|
|
|
|
|
|
|
|
`ip route add default via {{ip}} dev {{interface}}`
|