To display the network interfaces we have on a machine, we could use the below command:
To display a specific interface, for example "eno1", we use:
To enable an interface "eno1" when it is "down", we use:
To add an IP address and a netmask to our interface, we use the below command:
To add a broadcast IP address to our interface, we use:
To delete an IP address, we use:
To display the routes of our interface, we use:
The first line shows us a route to the "10.15.4.0/24" network.
The second line describes the default route to other networks if none is exits.
To add a static route to a network, we use:
It tells the machine to send traffic for the network "10.30.10.0/24" through the IP address "10.122.2.4" and the interface "eno1".
To delete the above route, we use the below command:
To get the Mac table "ARP cache", we use the below command:
To add an entry - IP address, MAC address, interface - to the "ARP table", we use the below command:
Comments