Re: Fedora27: Cannot set the default network route

2018-02-08 Thread Terry Barnaby

Hi,

Thanks for the info, not sure i will remember that complex method though !
A bit strange that changing the "default" route has to be done on a 
particular connection though rather than as a system route change.
If NetworkManager is now managing routes like this would be nice if it 
had a "route" command matching the system "ip route" command.


Anyway thanks for the info.

Terry
On 06/02/18 22:07, Rick Stevens wrote:

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  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@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

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 showOR
sudo nmcli connection show --active (for only active ones)

and locate the connection you wish to modify, then:

sudo nmcli connection modify --temporary  gateway 

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, AllDigitalri...@alldigital.com -
- AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 -
--
-  I won't rise to the occasion, but I'll slide over to it.  -
--
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-06 Thread Rick Stevens
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  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@lists.fedoraproject.org
>> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> 
> 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 showOR
sudo nmcli connection show --active (for only active ones)

and locate the connection you wish to modify, then:

sudo nmcli connection modify --temporary  gateway 

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, AllDigitalri...@alldigital.com -
- AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 -
--
-  I won't rise to the occasion, but I'll slide over to it.  -
--
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-06 Thread Terry Barnaby

On 06/02/18 20:21, James Hogarth wrote:

On 3 February 2018 at 22:20, Terry Barnaby  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: loinet 127.0.0.1/8 scope host lo\   valid_lft forever
preferred_lft forever
2: enp2s0inet 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@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


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.

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-06 Thread James Hogarth
On 3 February 2018 at 22:20, Terry Barnaby  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: loinet 127.0.0.1/8 scope host lo\   valid_lft forever
> preferred_lft forever
> 2: enp2s0inet 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@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-03 Thread Terry Barnaby

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.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-02 Thread Marcelo Beckmann
You can also use ip route to replace a route (don't need to delete and add):
ip route replace default via  dev 




2018-02-02 14:29 GMT-02:00 Terry Barnaby :

> I tied using "ip route" it had the same effect.
>
>
> On 02/02/18 14:21, Bill Shirley wrote:
>
> Use 'ip' and add the dev parameter:
> ip route add default 173.xxx.yyy.zzz dev ccast
>
> man route:
> NOTE
>This program is obsolete. For replacement check ip route.
>
> Bill
>
> On 2/2/2018 8:42 AM, Terry Barnaby wrote:
>
> A strange one this. I was trying to change the default route of a machine
> for testing a different gateway.
>
> I ran:
>
> route del default gw 
>
> route add default gw 
>
> However the second command did not add the route and I could not add the
> old default route back. There were no errors on stdout or in
> /var/log/messages.
>
> Now I found that if there is already a default route you can add another
> one, so could do a:
>
> route add default gw 
>
> route del default gw 
>
> And these worked fine. It seems you cannot set a default route if there
> isn't one set.
>
> Any ideas ?
>
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
>
>
>
>
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
>
>
>
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
>
>
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-02 Thread Ed Greshko
On 02/03/18 00:29, Terry Barnaby wrote:
> I tied using "ip route" it had the same effect.

[root@f27k ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags   MSS Window  irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG    0 0  0 enp0s3
192.168.1.0 0.0.0.0 255.255.255.0   U 0 0  0 enp0s3

[root@f27k ~]# route del default gw 192.168.1.1
[root@f27k ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags   MSS Window  irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0   U 0 0  0 enp0s3

[root@f27k ~]# route add default netmask 255.255.255.0 gw 192.168.1.1
[root@f27k ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags   MSS Window  irtt Iface
0.0.0.0 192.168.1.1 255.255.255.0   UG    0 0  0 enp0s3
192.168.1.0 0.0.0.0 255.255.255.0   U 0 0  0 enp0s3


>
> On 02/02/18 14:21, Bill Shirley wrote:
>> Use 'ip' and add the dev parameter:
>> ip route add default 173.xxx.yyy.zzz dev ccast
>>
>> man route:
>> NOTE
>>    This program is obsolete. For replacement check ip route.
>>
>> Bill
>>
>> On 2/2/2018 8:42 AM, Terry Barnaby wrote:
>>> A strange one this. I was trying to change the default route of a machine 
>>> for
>>> testing a different gateway.
>>>
>>> I ran:
>>>
>>> route del default gw 
>>>
>>> route add default gw 
>>>
>>> However the second command did not add the route and I could not add the old
>>> default route back. There were no errors on stdout or in /var/log/messages.
>>>
>>> Now I found that if there is already a default route you can add another 
>>> one, so
>>> could do a:
>>>
>>> route add default gw 
>>>
>>> route del default gw 
>>>
>>> And these worked fine. It seems you cannot set a default route if there 
>>> isn't one
>>> set.
>>>
>>> Any ideas ?
>>>
>>> ___
>>> users mailing list -- users@lists.fedoraproject.org
>>> To unsubscribe send an email to users-le...@lists.fedoraproject.org
>>
>>
>>
>> ___
>> users mailing list -- users@lists.fedoraproject.org
>> To unsubscribe send an email to users-le...@lists.fedoraproject.org
>
>
>
>
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org


-- 
A motto of mine is: When in doubt, try it out


signature.asc
Description: OpenPGP digital signature
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-02 Thread Bill Shirley

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

On 2/2/2018 11:29 AM, Terry Barnaby wrote:

I tied using "ip route" it had the same effect.

On 02/02/18 14:21, Bill Shirley wrote:

Use 'ip' and add the dev parameter:
ip route add default 173.xxx.yyy.zzz dev ccast

man route:
NOTE
   This program is obsolete. For replacement check ip route.

Bill

On 2/2/2018 8:42 AM, Terry Barnaby wrote:

A strange one this. I was trying to change the default route of a machine for 
testing a different gateway.

I ran:

route del default gw 

route add default gw 

However the second command did not add the route and I could not add the old default route back. There were no errors on 
stdout or in /var/log/messages.


Now I found that if there is already a default route you can add another one, 
so could do a:

route add default gw 

route del default gw 

And these worked fine. It seems you cannot set a default route if there isn't 
one set.

Any ideas ?

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org




___
users mailing list --users@lists.fedoraproject.org
To unsubscribe send an email tousers-le...@lists.fedoraproject.org





___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-02 Thread Terry Barnaby

I tied using "ip route" it had the same effect.

On 02/02/18 14:21, Bill Shirley wrote:

Use 'ip' and add the dev parameter:
ip route add default 173.xxx.yyy.zzz dev ccast

man route:
NOTE
   This program is obsolete. For replacement check ip route.

Bill

On 2/2/2018 8:42 AM, Terry Barnaby wrote:
A strange one this. I was trying to change the default route of a 
machine for testing a different gateway.


I ran:

route del default gw 

route add default gw 

However the second command did not add the route and I could not add 
the old default route back. There were no errors on stdout or in 
/var/log/messages.


Now I found that if there is already a default route you can add 
another one, so could do a:


route add default gw 

route del default gw 

And these worked fine. It seems you cannot set a default route if 
there isn't one set.


Any ideas ?

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org




___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org



___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-02 Thread Ed Greshko
On 02/02/18 21:42, Terry Barnaby wrote:
> A strange one this. I was trying to change the default route of a machine for
> testing a different gateway.
>
> I ran:
>
> route del default gw 
>
> route add default gw 
>
> However the second command did not add the route and I could not add the old
> default route back. There were no errors on stdout or in /var/log/messages.
>
> Now I found that if there is already a default route you can add another one, 
> so
> could do a:
>
> route add default gw 
>
> route del default gw 
>
> And these worked fine. It seems you cannot set a default route if there isn't 
> one set.
>
> Any ideas ? 

If you use the route command to add a route you must also specify the netmask.

So, you'll need to use

route add default netmask x.x.x.x gw 

Look at the man page for route.

  netmask NM
  when adding a network route, the netmask to be used.

-- 
A motto of mine is: When in doubt, try it out



signature.asc
Description: OpenPGP digital signature
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Fedora27: Cannot set the default network route

2018-02-02 Thread Bill Shirley

Use 'ip' and add the dev parameter:
ip route add default 173.xxx.yyy.zzz dev ccast

man route:
NOTE
   This program is obsolete. For replacement check ip route.

Bill

On 2/2/2018 8:42 AM, Terry Barnaby wrote:

A strange one this. I was trying to change the default route of a machine for 
testing a different gateway.

I ran:

route del default gw 

route add default gw 

However the second command did not add the route and I could not add the old default route back. There were no errors on 
stdout or in /var/log/messages.


Now I found that if there is already a default route you can add another one, 
so could do a:

route add default gw 

route del default gw 

And these worked fine. It seems you cannot set a default route if there isn't 
one set.

Any ideas ?

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Fedora27: Cannot set the default network route

2018-02-02 Thread Terry Barnaby
A strange one this. I was trying to change the default route of a 
machine for testing a different gateway.


I ran:

route del default gw 

route add default gw 

However the second command did not add the route and I could not add the 
old default route back. There were no errors on stdout or in 
/var/log/messages.


Now I found that if there is already a default route you can add another 
one, so could do a:


route add default gw 

route del default gw 

And these worked fine. It seems you cannot set a default route if there 
isn't one set.


Any ideas ?

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org