ip

ip is used for network configuration and troubleshooting. It is the successor to the ifconfig command and provides more advanced features and functionality. The ip command can be used to view and configure network interfaces, IP addresses, routing tables, tunnels, and more.

Basic Syntax

ip [option] object command

Here, option specifies the global options for the ip command, object specifies the network object to manipulate (such as link, address, route, etc.), and command specifies the action to perform on the network object (such as add, delete, show, etc.).

Commonly Used Options

  • address: This manipulates IP addresses on a network interface.
  • link: This manipulates network interfaces.
  • route: This manipulates the routing table.
  • tunnel: This manipulates IP tunnels.
  • neigh: This manipulates ARP or NDISC cache entries.
  • show: This displays the configuration and status information for the specified object.

Useful Examples

  • ip address show: This displays the IP addresses and network interfaces on the system.
  • ip link show: This displays the network interfaces on the system.
  • ip route show: This displays the routing table on the system.
  • ip tunnel add mytunnel mode gre remote 10.0.0.1 local 10.0.0.2: This creates a GRE tunnel between the local and remote hosts.
  • ip address add 192.168.1.100/24 dev eth0: This adds an IP address to the eth0 network interface.
  • ip route add default via 192.168.1.1 dev eth0: This adds a default route via the eth0 network interface.
  • ip neigh show: This displays the ARP or NDISC cache entries on the system.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments

  1. […] Once installed, let’s first allow TCP traffic over your SSH port so that you don’t get locked out of…

  2. […] have the option to choose between Password and SSH key selection. Learn more about SSH keys here. It’s recommended…