Modifying Default route

HI Team,

When i run the below route command it is not working on rocky9. But same command works fine in RL7 servers? Could you please help me here?

As i want to change the advmss for the default route.

Note: i dont see any corresponding failure logs in the system.

ip route change default via advmss 8870
RTNETLINK answers: No such file or directory

Network is configured with NetworkManager.

Read man nm-settings. The parts about (ipv4|ipv6) gateway and routes.
Apparently the ‘gateway’ does not take attributes, but ‘routes’ does.

Alas, with “static” route you have to know the gateway, rather than use whatever the DHCP did offer.


Why is there “via” in your command?

Sorry, Below is correct command.

ip route change default via gateway-ip advmss 8870

So perhaps:

nmcli con mod $ConnName ipv4.never-default yes ipv4.gateway "" ipv4.routes "0.0.0.0/0 gateway-ip advmss=8870"

thanks. will try it out.