tldr/pages/linux/ip.md

37 lines
667 B
Markdown
Raw Normal View History

2014-02-25 02:25:47 +00:00
# ip
> Show / manipulate routing, devices, policy routing and tunnels.
> More information: <https://www.man7.org/linux/man-pages/man8/ip.8.html>.
2014-02-25 02:25:47 +00:00
- List interfaces with detailed info:
2014-02-25 02:25:47 +00:00
2020-10-06 12:12:54 +01:00
`ip address`
- List interfaces with brief network layer info:
`ip -brief address`
- List interfaces with brief link layer info:
`ip -brief link`
2014-02-25 02:25:47 +00:00
- Display the routing table:
2014-02-25 02:25:47 +00:00
2020-10-06 12:12:54 +01:00
`ip route`
2014-02-25 02:25:47 +00:00
- Show neighbors (ARP table):
2020-10-06 12:12:54 +01:00
`ip neighbour`
- 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:25:47 +00:00
`ip addr add/del {{ip}}/{{mask}} dev {{interface}}`
2014-02-25 02:25:47 +00:00
- Add a default route:
2014-02-25 02:25:47 +00:00
`ip route add default via {{ip}} dev {{interface}}`