# Modifying Default route

**URL:** <https://forums.rockylinux.org/t/modifying-default-route/10185>\
**Category:** Rocky Linux Help & Support\
**Created:** [June 6, 2023, 5:21am UTC](https://forums.rockylinux.org/t/modifying-default-route/10185 "2023-06-06T05:21:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Learner](https://avatars.discourse-cdn.com/v4/letter/l/b782af/32.png) [@Learner](https://forums.rockylinux.org/u/Learner)\
**Post date:** [June 6, 2023, 5:21am UTC](https://forums.rockylinux.org/t/modifying-default-route/10185/1 "2023-06-06T05:21:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [June 6, 2023, 7:04am UTC](https://forums.rockylinux.org/t/modifying-default-route/10185/2 "2023-06-06T07:04:59Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Learner](https://avatars.discourse-cdn.com/v4/letter/l/b782af/32.png) [@Learner](https://forums.rockylinux.org/u/Learner)\
**Post date:** [June 6, 2023, 10:44am UTC](https://forums.rockylinux.org/t/modifying-default-route/10185/3 "2023-06-06T10:44:45Z")

</div>

Sorry, Below is correct command.

ip route change default via gateway-ip advmss 8870

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [June 6, 2023, 11:34am UTC](https://forums.rockylinux.org/t/modifying-default-route/10185/4 "2023-06-06T11:34:55Z")

</div>

So perhaps:

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

```

---

<div class="post-metadata">

**Author:** ![Learner](https://avatars.discourse-cdn.com/v4/letter/l/b782af/32.png) [@Learner](https://forums.rockylinux.org/u/Learner)\
**Post date:** [June 6, 2023, 12:04pm UTC](https://forums.rockylinux.org/t/modifying-default-route/10185/5 "2023-06-06T12:04:15Z")

</div>

thanks. will try it out.

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:11am UTC](https://forums.rockylinux.org/t/modifying-default-route/10185/6 "2023-08-25T03:11:38Z")

</div>


