I can add route over the interface using ip route add command, for example:
ip r a 1.1.244.244/32 dev main-br
How to achieve the same using nmcli?
I can add route over the interface using ip route add command, for example:
ip r a 1.1.244.244/32 dev main-br
How to achieve the same using nmcli?
A search for nmcli add route
brings us to this documentation, which says that we can add a static route like this:
nmcli connection modify enp1s0 +ipv4.routes "192.168.122.0/24 10.10.10.1"
Experimenting with that command, it looks like if you want to specify a device route as in your example, you can simply leave out the nexthop address, giving you:
nmcli connection modify enp1s0 +ipv4.routes "192.168.122.0/24"
Or in your case:
nmcli connection modify <connection_name> +ipv4.routes 1.1.244.244/32
Where you would replace <connection_name>
with the name of the networkmanager connection associated with device main-br
.