With ifconfig we can change the netmask with the folowing:
ifconfig eth0 netmask <new netmask>
How can we do this with the command ip?
I know ifconfig is deprecated and this mostly why I would like to do it the iproute2 way.
My objective is to extend our current network from a /24 to a /21 on-the-fly without disturbing services running on our servers. As a workaround currently I simply add a new route to the /21 and eventually a planned network restart will officialize the change. It works but I was wondering if there is a better way.