# ip address show
- show all IP
addresses (also ip ad sh)
# ip address show ens36
- show IP addresses of a particular interface
# ip address show up
- only show IPs of those interfaces that are up
# ip address show dynamic|permanent
- show dynamic or static IPv6 addys
# ip address add 192.0.2.1/27 dev ens36
- add a new IP address to the interface
First addy you added will be used as SRC addy for outgoing traffic by def, often called primary addy . Receiving will do for all added IPs
# ip address add 192.0.2.1/29 dev ens36 lablel ens36:hahaha
- add IP and label it
# ip address delete 192.0.2.1/29 dev ens36
delete Ip address from interface
# ip address flush dev ens36
- delete all IPs from an interface
ROUTE
If you set up a static route and interface through which it is available goes down - the route is removed from the active routing table as well.
Also you cannot add route via inaccessible gateways.
# ip route [show] / ip ro
Show the routing table, includes IPv4 and IPv6
# ip -6 route
- show only IPv6 , which are not shown by def
# ip -4 route
# ip route show root
192.0.2.0/24 - can use supernet to include multiple more specific routes to show, i.e. show this net and SMALLER subnets
# ip route show match 192.0.2.0/29
// show routes to this and LARGER nets
# ip route show exact 192.168.13.0/24
// show routes to EXACT network only
# ip route get 192.176.12.1/24
// simulate resolving of a route in real time
Continue reading