Re: Fedora27: Cannot set the default network route

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

 



On 02/06/2018 01:16 PM, Terry Barnaby wrote:
> On 06/02/18 20:21, James Hogarth wrote:
>> On 3 February 2018 at 22:20, Terry Barnaby <terry1@xxxxxxxxxxx> wrote:
>>> On 02/02/18 16:40, Bill Shirley wrote:
>>>
>>> You didn't post the command or its output.  How can anyone help you?
>>>
>>> What's the output of these two commands?
>>> ip -o -4 addr
>>> ip -o -4 route
>>>
>>> Bill
>>>
>>> ip -o -4 addr
>>> 1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever
>>> preferred_lft forever
>>> 2: enp2s0    inet 192.168.202.2/24 brd 192.168.202.255 scope global
>>> dynamic
>>> enp2s0\       valid_lft 1205223sec preferred_lft 1205223sec
>>>
>>> ip -o -4 route
>>> default via 192.168.202.1 dev enp2s0 proto static metric 100
>>> 192.168.202.0/24 dev enp2s0 proto kernel scope link src 192.168.202.2
>>> metric
>>> 100
>>>
>>> These are when the route is up normally after a DHCP.
>>> The system is fine normally, its just that I wanted to manually
>>> change the
>>> default route to test a different router.
>>> I have managed to do this now by hardcoding the route on the next boot.
>>> I think the issue must be NetworkManager doing something more than it
>>> used
>>> to.
>>>
>> Since NetworkManager was?is managing that interface did you try using
>> nmcli conn modify or nmcli con edit to set the route in the connection
>> profile?
>>
>> https://www.hogarthuk.com/?q=node/8
>> _______________________________________________
>> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
>> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> 
> No, I didn't know you could change the default route with nmcli and it's
> not obvious in the man page how to do this. Will have a look to see how
> to do that.
> 
> Certainly up to Fedora25 changing the default route, temporarily, with
> "route del default; route add default ..." worked.

First, get a list of the connections, such as:

	sudo nmcli connection show    OR
	sudo nmcli connection show --active (for only active ones)

and locate the connection you wish to modify, then:

	sudo nmcli connection modify --temporary <connname> gateway <ipaddr>

should change it temporarily. If you omit the "--temporary", it should
make a permanent change.

The command is buried in the nmcli man page, but the parameters are
hidden in the nm-settings(5) man page under the "ipv4" section.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-      I won't rise to the occasion, but I'll slide over to it.      -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[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