Re: f22: how to change default gateway via line command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/11/2015 02:42 AM, Dario Lesca wrote:
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?

Not sure about this, but you could try the "Automatic (DHCP)" option
under the IPV4 settings, then click "Routes..." and add a route with
address 0.0.0.0, netmask 0.0.0.0, gateway of your choosing and a metric
of 1. Also make sure the "Ignore automatically obtained routes" checkbox is ticked. I believe that now becomes your default gateway.

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?

Try the command:

	sudo nmcli conn show --active

and verify that the correct profile is being used. If it is, then:

	sudo nmcli conn show <profile-name>

and look carefully at the data. Verify that ipv4.method is set to auto.
If it is, then you may have to do a full NM restart:

	sudo systemctl restart NetworkManager
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-        "And on the seventh day, He exited from append mode."       -
----------------------------------------------------------------------
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux