f22: how to change default gateway via line command

Dario Lesca d.lesca at solinos.it
Thu Jun 11 09:42:21 UTC 2015


Il giorno mar, 09/06/2015 alle 15.50 -0700, Rick Stevens ha scritto:
> I think you have to change the method to "manual", then set the IP
> address and route:
> 
>       sudo nmcli conn mod p6p1 ipv4.method manual ipv4.address 
> 192.168.61.80/24 ipv4.gateway 192.168.61.254
> 
> The "auto" method for an ethernet port means DHCP.

Ok, this can work, but I must setup also ipv4.dns  and ipv4.dns-search,
but this method is similar an more simple to configuring a static new
profile in NM. And this is not want to do.
                        
What I want to do, is a setting in NetworkManager to use the IP and DNS
via DHCP and default gateway set by me, for test some time other router
into network.
I could not set this kind of configuration via the configuration panel
of NetworkManager.

Someone can help me to do that?

But now it appeared a new problem, the IP set with nmcli, remain set
also when I have put the ipv4.method to auto, disconnect then reconnect
the cabled and restart NetworkManager.

it seems that the change is permanent, and now I do not know how to
delete it.

Can someone help me?

Thanks

-- 
Dario Lesca
(inviato dal mio Linux Fedora 22 con Gnome 3.16)


More information about the users mailing list