вторник, 14 сентября 2021 г.

Linux "ip" util

Set static address to interface : 

sudo ip address add 10.0.0.1/24 dev eth0

Remove static address from interface :

sudo ip address del 10.0.0.1 dev enp4s0

Add static route : 

sudo ip route add 10.10.3.0/24 dev en0sp3

Also :

sudo ip route add 10.10.3.0/24 via 10.10.1.10 dev en0sp3

Delete route :

sudo ip route delete 10.10.3.0//24 dev en0sp3

Delete default route : 

sudo ip route delete default