Linux 101 : IP commands (The essentials)
Attributing an address to a network interface:
Maximun transmission unit:
Attributing a value to the MTU for an Ethernet frame:
Displaying the interfaces with their addresses:
Displaying only the network interface "interface":
Displaying only the ipv6 addresses:
![](https://1.bp.blogspot.com/-jmBZGUZqzcQ/X6z53_AbeLI/AAAAAAAABlk/KAKgxpPY4vIbUCund3b61XfpRr4TJtsdQCLcBGAsYHQ/s0/Untitled%2BDiagram.jpg)
Deleting the ip_address of the interface "interface":
![](https://1.bp.blogspot.com/-nbvORA3Du7k/X6z6qmGkjVI/AAAAAAAABls/cxNHBFmtjQEuqO0zuD9z3GIMp9Vk86t5gCLcBGAsYHQ/s320/Untitled%2BDiagram.jpg)
Deleting an IP address:
Deletes the IP address of the interface "interface":
Adds a gateway to an ip destination address:
Adds a default gateway:
Adds a default gateway for all the IP destination, used when no other specific gateway is available for a certain destination.
![](https://1.bp.blogspot.com/-LRZ529Xb62o/X61H6-ygcrI/AAAAAAAABoI/ABja9K1Ezyk6v6YipMD7ubXA_0rYBp3wwCLcBGAsYHQ/w372-h73/Untitled%2BDiagram.jpg)
Deletes the route for the ip_address:
![](https://1.bp.blogspot.com/-g4M8GYdYX4s/X60iwzll-_I/AAAAAAAABmk/EHcb4NyGbZ4SzlTfUCobcQGr52RbEhgqACLcBGAsYHQ/s0/Untitled%2BDiagram.jpg)
Deletes the default route:
![](https://1.bp.blogspot.com/-Fqsu4xtR3Eo/X60i5_L92aI/AAAAAAAABmo/hFiYEwmqiCcArr3ztTfdOgLYvaLGnd46gCLcBGAsYHQ/s0/Untitled%2BDiagram.jpg)
Deletes the route for the destination ip_address:
We can also mention just the IP address if it is unique in the routing table.
Displays the routing table:
Displays the routing table:
![](https://1.bp.blogspot.com/-ohoNR1sUqcg/X60jZCftl3I/AAAAAAAABm4/-SLmUtzQBgMkjyUveUYLQqhXbPFQMA3fQCLcBGAsYHQ/s0/Untitled%2BDiagram.jpg)
Replacing a route:
Replaces the route for "network/mask" address to use network device "interface" to send the packets:
Comments