2015-06-06 21:03 GMT+03:00 Dario Lesca <d.lesca@solinos.it>:
Il giorno sab, 06/06/2015 alle 07.01 -0400, Paul Cartwright ha scritto:
> On 06/06/2015 05:32 AM, Dario Lesca wrote:
> > Into Fedora 22 workstation, it's possible to change temporarily via
> > command line the default gateway, to test another gateway, when I
> > have
> > setup the network via DHCP?
> >
> > What is the best command line to use?
> >
> > Many thanks
> try :
> $ man route
>
> *DESCRIPTION
>        Route manipulates the kernel's IP routing tables.

Thanks Paul, but in f22 the command "ip r del default" (or ip r rep)
not work anymore if the NetworkManager is set to DHCP (see my previous message, Thu, 04 Jun 2015
14:15:59)

Some other suggest?


Couple of possible solutions

1) Put ignore-auto-routes=true into connection file in /etc/NetworkManager/system-connections and restart connection/NM service. This should reject DHCP routes, and you can add routes manually as tmp solution.

2) nmcli con mod --temporary {interface} ipv4.never-default true
After that NM will not add default route to that int.

3) In good old days NM honored /etc/sysconfig/network-scripts/ifcfg-interface config, and "DEFROUTE=no" in right place meant no def route for that interface. But I am not sure if it works nowadays, I dont use NM. More no than yes with -NM enabled.

Be careful, don't mess your network by having fun with NetworkManager and D-Bus.