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

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

 



On 06/09/15 15:26, James Hogarth wrote:
>
>
> On 8 Jun 2015 13:12, "Dario Lesca" <d.lesca@xxxxxxxxxx <mailto:d.lesca@xxxxxxxxxx>> wrote:
> >
> > Il giorno sab, 06/06/2015 alle 21.43 +0300, Alchemist ha scritto:
> > > Couple of possible solutions
> >
> > Thanks Alchemist, one of that sure probably partially solves my
> > problem.
> >
> > But the question is: Why in f22 (or new version of NetworkManager?) it
> > has removed the option to change the default gateway via "ip r rep..."
> > command line, like i do in previous version or all other version of
> > redhat or centos?
> >
> > I thing this is a issue, not a feature.
> >
> > Thanks
> >
>
> Think of it this way.
>
> You have your network manager configured (via static or dhcp) to have your default route pointed somewhere.
>
> NM tries to maintain its configuration so when it notices you've changed the route at the kernel level it doesn't know it's an admin override and fixes what it thinks is a broken setup.
>
> On NM based systems instead of using ip route try the nmcli command.
>
> Something like this ought to work:
>
> nmcli conn mod <connection-profile-name> ipv4.gateway <ip-address-of-gateway>
>
> You can see the present configuration NM thinks it should be with:
>
> nmcli conn show <connection-profile-name>
>
>

Or not....

[root@f22k ~]# nmcli conn mod enp0s3 ipv4.gateway 192.168.1.18
Error: Failed to modify connection 'enp0s3': ipv4.gateway: gateway cannot be set if there are no addresses configured

FWIW, on this system ....

[root@f22k ~]# ip route sho
default via 192.168.1.1 dev enp0s3  proto static  metric 100
192.168.1.0/24 dev enp0s3  proto kernel  scope link  src 192.168.1.224  metric 100

[root@f22k ~]# nmcli conn show enp0s3 | grep 192.168.1.1
IP4.GATEWAY:                            192.168.1.1
IP4.DNS[1]:                             192.168.1.1
DHCP4.OPTION[5]:                        domain_name_servers = 192.168.1.1
DHCP4.OPTION[8]:                        dhcp_server_identifier = 192.168.1.1
DHCP4.OPTION[17]:                       routers = 192.168.1.1
DHCP4.OPTION[29]:                       next_server = 192.168.1.1

I'm not the OP, but I figured I'd test it out anyway.


-- 
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