Forrest logo
tool overview
On this page you find all important commands for the CLI tool ip. If the command you are looking for is missing please ask our AI.

ip

The "ip" command line tool is a powerful utility for managing network interfaces and routing in Linux systems. It allows you to perform various network-related tasks from the command line.

  1. "ip" stands for Internet Protocol and is used for network interface configuration and management.
  2. It is part of the iproute2 package and is commonly found on modern Linux distributions.
  3. With "ip," you can display and manage network interfaces, IP addresses, routing tables, and neighbor entries.
  4. It provides more advanced features compared to the older ifconfig and route commands.
  5. "ip" allows you to add, delete, or modify network interfaces and IP addresses.
  6. You can also create virtual interfaces like bridges, VLANs, and tunnels using this tool.
  7. It supports configuration of advanced network parameters like Quality of Service (QoS) and Traffic Control (tc).
  8. The "ip" tool allows you to set up and manage routing tables, enabling you to control traffic flow between networks.
  9. You can easily monitor network statistics, such as packet counts, using the "ip" command.
  10. Overall, "ip" is a versatile and comprehensive command line tool for network configuration and management in Linux systems.

List of commands for ip:

  • ip-address:tldr:05f62 ip-address: Display information about a specific network interface.
    $ ip address show dev ${eth0}
    try on your machine
    explain this command
  • ip-address:tldr:2863b ip-address: Add an IP address to a network interface.
    $ ip address add ${ip_address} dev ${eth0}
    try on your machine
    explain this command
  • ip-address:tldr:50d7e ip-address: List network interfaces and their associated IP addresses.
    $ ip address
    try on your machine
    explain this command
  • ip-address:tldr:5191a ip-address: Delete all IP addresses in a given scope from a network interface.
    $ ip address flush dev ${eth0} scope ${select}
    try on your machine
    explain this command
  • ip-address:tldr:74a9c ip-address: Remove an IP address from a network interface.
    $ ip address delete ${ip_address} dev ${eth0}
    try on your machine
    explain this command
  • ip-address:tldr:773cf ip-address: Filter to show only active network interfaces.
    $ ip address show up
    try on your machine
    explain this command
  • ip-link:tldr:062d1 ip-link: Show information about all network interfaces.
    $ ip link
    try on your machine
    explain this command
  • ip-link:tldr:13015 ip-link: Change the MTU size for a network interface to use jumbo frames.
    $ ip link set ${ethN} mtu ${9000}
    try on your machine
    explain this command
  • ip-link:tldr:54f49 ip-link: Show information about a specific network interface.
    $ ip link show ${ethN}
    try on your machine
    explain this command
  • ip-link:tldr:741b1 ip-link: Give a meaningful name to a network interface.
    $ ip link set ${ethN} alias "${LAN Interface}"
    try on your machine
    explain this command
  • ip-link:tldr:c1bd5 ip-link: Bring a network interface up or down.
    $ ip link set ${ethN} ${select}
    try on your machine
    explain this command
  • ip-link:tldr:cf808 ip-link: Change the MAC address of a network interface.
    $ ip link set ${ethN} address ${ff:ff:ff:ff:ff:ff}
    try on your machine
    explain this command
  • ip-neighbour:tldr:6c353 ip-neighbour: Perform a neighbour lookup and return a neighbour entry.
    $ ip neighbour get ${lookup_ip} dev ${eth0}
    try on your machine
    explain this command
  • ip-neighbour:tldr:88883 ip-neighbour: Display the neighbour/ARP table entries.
    $ ip neighbour
    try on your machine
    explain this command
  • ip-neighbour:tldr:ac441 ip-neighbour: Add or delete an ARP entry for the neighbour IP address to `eth0`.
    $ sudo ip neighbour ${select} ${ip_address} lladdr ${mac_address} dev ${eth0} nud reachable
    try on your machine
    explain this command
  • ip-neighbour:tldr:d3415 ip-neighbour: Remove entries in the neighbour table on device `eth0`.
    $ sudo ip neighbour flush dev ${eth0}
    try on your machine
    explain this command
  • ip-neighbour:tldr:f8038 ip-neighbour: Change or replace an ARP entry for the neighbour IP address to `eth0`.
    $ sudo ip neighbour ${select} ${ip_address} lladdr ${new_mac_address} dev ${eth0}
    try on your machine
    explain this command
  • ip-route-show:tldr:0a8c9 ip-route-show: Display the main routing table (same as first example).
    $ ip route show ${select}
    try on your machine
    explain this command
  • ip-route-show:tldr:1539f ip-route-show: Display the local routing table.
    $ ip route show table ${select}
    try on your machine
    explain this command
  • ip-route-show:tldr:1cf98 ip-route-show: Display the routing cache.
    $ ip route show cache
    try on your machine
    explain this command
  • ip-route-show:tldr:3cf69 ip-route-show: List routes within a given scope.
    $ ip route show scope link
    try on your machine
    explain this command
  • ip-route-show:tldr:b1c38 ip-route-show: List routes from a given device only.
    $ ip route show dev ${eth0}
    try on your machine
    explain this command
  • ip-route-show:tldr:e70b9 ip-route-show: Display the routing table.
    $ ip route show
    try on your machine
    explain this command
  • ip-route:tldr:28164 ip-route: Show which route will be used by the kernel to reach an IP address.
    $ ip route get ${destination_ip}
    try on your machine
    explain this command
  • ip-route:tldr:58130 ip-route: Delete a static route.
    $ sudo ip route del ${destination_ip} dev ${eth0}
    try on your machine
    explain this command
  • ip-route:tldr:72e9b ip-route: Change or replace a static route.
    $ sudo ip route ${select} ${destination_ip} via ${gateway_ip} dev ${eth0}
    try on your machine
    explain this command
  • ip-route:tldr:928dd ip-route: Add a static route.
    $ sudo ip route add ${destination_ip} via ${gateway_ip} dev ${eth0}
    try on your machine
    explain this command
  • ip-route:tldr:ea0d7 ip-route: Add a default route using gateway forwarding.
    $ sudo ip route add default via ${gateway_ip}
    try on your machine
    explain this command
  • ip-route:tldr:ee27f ip-route: Display the routing table.
    $ ip route ${select}
    try on your machine
    explain this command
  • ip-route:tldr:f8850 ip-route: Add a default route using `eth0`.
    $ sudo ip route add default dev ${eth0}
    try on your machine
    explain this command
  • ip-rule:tldr:11172 ip-rule: Restore all rules from a file.
    $ ip rule restore < ${path-to-ip_rules-dat}
    try on your machine
    explain this command
  • ip-rule:tldr:6dd26 ip-rule: Delete a rule based on packet source addresses.
    $ sudo ip rule delete from ${192-168-178-2-32}
    try on your machine
    explain this command
  • ip-rule:tldr:7bfe2 ip-rule: Delete a rule based on packet destination addresses.
    $ sudo ip rule delete to ${192-168-178-2-32}
    try on your machine
    explain this command
  • ip-rule:tldr:832d2 ip-rule: Display the routing policy.
    $ ip rule ${select}
    try on your machine
    explain this command
  • ip-rule:tldr:ab278 ip-rule: Add a new rule based on packet destination addresses.
    $ sudo ip rule add to ${192-168-178-2-32}
    try on your machine
    explain this command
  • ip-rule:tldr:ce0c9 ip-rule: Save all rules to a file.
    $ ip rule save > ${path-to-ip_rules-dat}
    try on your machine
    explain this command
  • ip-rule:tldr:d6714 ip-rule: Add a new rule based on packet source addresses.
    $ sudo ip rule add from ${192-168-178-2-32}
    try on your machine
    explain this command
  • ip-rule:tldr:e1aba ip-rule: Flush all deleted rules.
    $ ip rule flush
    try on your machine
    explain this command
  • ip:tldr:0f057 ip: List interfaces with brief link layer info.
    $ ip -brief link
    try on your machine
    explain this command
  • ip:tldr:1cbdb ip: Display the routing table.
    $ ip route
    try on your machine
    explain this command
  • ip:tldr:7516a ip: Add/Delete an IP address to an interface.
    $ ip addr add/del ${ip}/${mask} dev ${interface}
    try on your machine
    explain this command
  • ip:tldr:be204 ip: List interfaces with brief network layer info.
    $ ip -brief address
    try on your machine
    explain this command
  • ip:tldr:c172f ip: Add a default route.
    $ ip route add default via ${ip} dev ${interface}
    try on your machine
    explain this command
  • ip:tldr:da0b6 ip: Make an interface up/down.
    $ ip link set ${interface} up/down
    try on your machine
    explain this command
tool overview