Re: nmcli and gateway question

2020-08-11 Thread Tom H
On Mon, Aug 10, 2020 at 11:47 PM Mike Wright wrote: > For me, Tom H has the right idea. :) although there are many "right" answers. > If Todd wants simple what's wrong with something like this: > > alias gateways="ip route list | awk '/^default/ {print}'" > --or short form-- > alias

Re: nmcli and gateway question

2020-08-10 Thread Mike Wright
On 8/10/20 3:36 PM, Garry T. Williams wrote: On Monday, August 10, 2020 5:46:54 PM EDT Mike Wright wrote: alias gateways="ip route list | awk '/^default/ {print}'" That is the same as ip route list | grep ^default In general, ... | awk '/foo/ {print}' is equivalent to ...

Re: nmcli and gateway question

2020-08-10 Thread Garry T. Williams
On Monday, August 10, 2020 5:46:54 PM EDT Mike Wright wrote: > alias gateways="ip route list | awk '/^default/ {print}'" That is the same as ip route list | grep ^default In general, ... | awk '/foo/ {print}' is equivalent to ... | grep foo -- Garry T. Williams

Re: nmcli and gateway question

2020-08-10 Thread Mike Wright
Apologies, I've been kind of following this thread and haven't saved any of it except the latest. For me, Tom H has the right idea. If Todd wants simple what's wrong with something like this: alias gateways="ip route list | awk '/^default/ {print}'" --or short form-- alias gateways="ip r l |

Re: nmcli and gateway question

2020-08-10 Thread Tom H
On Fri, Aug 7, 2020 at 1:34 PM Ed Greshko wrote: > On 2020-08-07 18:44, Tom H wrote: >> On Wed, Aug 5, 2020 at 3:49 PM Ed Greshko >> wrote: >>> On 2020-08-05 21:02, Tom H wrote: Hopefully Todd, the OP, realized that you were implying that he might not have "systemd-resolved"

Re: nmcli and gateway question

2020-08-08 Thread ToddAndMargo via users
On 2020-08-07 16:28, Ed Greshko wrote: On 2020-08-08 05:42, ToddAndMargo via users wrote: On 2020-08-07 03:50, Ed Greshko wrote: On 2020-08-07 18:48, Tom H wrote: On Fri, Aug 7, 2020 at 1:05 AM ToddAndMargo via users wrote: On 2020-08-05 02:09, Tom H wrote: On Tue, Aug 4, 2020 at 1:32 AM

Re: nmcli and gateway question

2020-08-08 Thread ToddAndMargo via users
On 2020-08-07 21:05, Tim via users wrote: On Fri, 2020-08-07 at 14:42 -0700, ToddAndMargo via users wrote: I am after "configured" not "functioning" Just wondering, do you work for Microsoft? ;-) Chuckle. Check out my signature block! -- ~~ When you

Re: nmcli and gateway question

2020-08-07 Thread Tim via users
On Fri, 2020-08-07 at 14:42 -0700, ToddAndMargo via users wrote: > I am after "configured" not "functioning" Just wondering, do you work for Microsoft? ;-) -- uname -rsvp Linux 3.10.0-1127.18.2.el7.x86_64 #1 SMP Sun Jul 26 15:27:06 UTC 2020 x86_64 Boilerplate: All unexpected mail to my

Re: nmcli and gateway question

2020-08-07 Thread Ed Greshko
On 2020-08-08 05:42, ToddAndMargo via users wrote: > On 2020-08-07 03:50, Ed Greshko wrote: >> On 2020-08-07 18:48, Tom H wrote: >>> On Fri, Aug 7, 2020 at 1:05 AM ToddAndMargo via users >>> wrote: On 2020-08-05 02:09, Tom H wrote: > On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users

Re: nmcli and gateway question

2020-08-07 Thread ToddAndMargo via users
On 2020-08-07 03:50, Ed Greshko wrote: On 2020-08-07 18:48, Tom H wrote: On Fri, Aug 7, 2020 at 1:05 AM ToddAndMargo via users wrote: On 2020-08-05 02:09, Tom H wrote: On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users wrote: On 2020-08-03 03:40, Tom H wrote: "resolvectl query

Re: nmcli and gateway question

2020-08-07 Thread Ed Greshko
On 2020-08-07 18:44, Tom H wrote: > On Wed, Aug 5, 2020 at 3:49 PM Ed Greshko > wrote: >> On 2020-08-05 21:02, Tom H wrote: >>> Hopefully Todd, the OP, realized that you were implying that he >>> might not have "systemd-resolved" running... >> Hopefully >> >> I may be dense, but it seems to

Re: nmcli and gateway question

2020-08-07 Thread Tom H
On Fri, Aug 7, 2020 at 5:19 AM ToddAndMargo via users wrote: > On 2020-08-06 16:54, Ed Greshko wrote: >> >> I suppose you missed the discussion about resolvectl needing to work >> with systemd-resolved.service. >> >> So, to use resolvectl you need to have systemd-resolved.service >> running. It

Re: nmcli and gateway question

2020-08-07 Thread Ed Greshko
On 2020-08-07 18:48, Tom H wrote: > On Fri, Aug 7, 2020 at 1:05 AM ToddAndMargo via users > wrote: >> On 2020-08-05 02:09, Tom H wrote: >>> On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users >>> wrote: On 2020-08-03 03:40, Tom H wrote: > "resolvectl query _gateway" will tell you that

Re: nmcli and gateway question

2020-08-07 Thread Tom H
On Fri, Aug 7, 2020 at 1:05 AM ToddAndMargo via users wrote: > On 2020-08-05 02:09, Tom H wrote: >> On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users >> wrote: >>> On 2020-08-03 03:40, Tom H wrote: "resolvectl query _gateway" will tell you that the gateway's set to X ip

Re: nmcli and gateway question

2020-08-07 Thread Tom H
On Wed, Aug 5, 2020 at 3:49 PM Ed Greshko wrote: > On 2020-08-05 21:02, Tom H wrote: >> >> Hopefully Todd, the OP, realized that you were implying that he >> might not have "systemd-resolved" running... > > Hopefully > > I may be dense, but it seems to me there is no particular advantage > to

Re: nmcli and gateway question

2020-08-06 Thread Ed Greshko
On 2020-08-07 11:19, ToddAndMargo via users wrote: > On 2020-08-06 16:54, Ed Greshko wrote: >> On 2020-08-07 07:05, ToddAndMargo via users wrote: >>> On 2020-08-05 02:09, Tom H wrote: On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users wrote: > On 2020-08-03 03:40, Tom H wrote:

Re: nmcli and gateway question

2020-08-06 Thread ToddAndMargo via users
On 2020-08-06 16:54, Ed Greshko wrote: On 2020-08-07 07:05, ToddAndMargo via users wrote: On 2020-08-05 02:09, Tom H wrote: On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users wrote: On 2020-08-03 03:40, Tom H wrote: "resolvectl query _gateway" will tell you that the gateway's set to X

Re: nmcli and gateway question

2020-08-06 Thread Ed Greshko
On 2020-08-07 07:05, ToddAndMargo via users wrote: > On 2020-08-05 02:09, Tom H wrote: >> On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users >> wrote: >>> On 2020-08-03 03:40, Tom H wrote: "resolvectl query _gateway" will tell you that the gateway's set to X ip address, but only

Re: nmcli and gateway question

2020-08-06 Thread ToddAndMargo via users
On 2020-08-05 02:09, Tom H wrote: On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users wrote: On 2020-08-03 03:40, Tom H wrote: "resolvectl query _gateway" will tell you that the gateway's set to X ip address, but only if you have "myhostname" in "nsswitch.conf". I think I misunderstand.

Re: nmcli and gateway question

2020-08-05 Thread Ed Greshko
On 2020-08-05 21:02, Tom H wrote: > Hopefully Todd, the OP, realized that you were implying that he might > not have "systemd-resolved" running... Hopefully I may be dense, but it seems to me there is no particular advantage to using resolvectl, or getent over the "ip route" command to

Re: nmcli and gateway question

2020-08-05 Thread Tom H
On Wed, Aug 5, 2020 at 1:12 PM Tom H wrote: > On Wed, Aug 5, 2020 at 11:48 AM Ed Greshko > wrote: >> On 2020-08-05 17:39, Tom H wrote: >>> On Wed, Aug 5, 2020 at 11:28 AM Ed Greshko >>> wrote: On 2020-08-05 17:09, Tom H wrote: > On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users

Re: nmcli and gateway question

2020-08-05 Thread Tom H
On Wed, Aug 5, 2020 at 11:48 AM Ed Greshko wrote: > On 2020-08-05 17:39, Tom H wrote: >> On Wed, Aug 5, 2020 at 11:28 AM Ed Greshko >> wrote: >>> On 2020-08-05 17:09, Tom H wrote: On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users wrote: > On 2020-08-03 03:40, Tom H wrote:

Re: nmcli and gateway question

2020-08-05 Thread Ed Greshko
On 2020-08-05 17:39, Tom H wrote: > On Wed, Aug 5, 2020 at 11:28 AM Ed Greshko > wrote: >> On 2020-08-05 17:09, Tom H wrote: >>> On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users >>> wrote: On 2020-08-03 03:40, Tom H wrote: > "resolvectl query _gateway" will tell you that the

Re: nmcli and gateway question

2020-08-05 Thread Ed Greshko
On 2020-08-05 17:39, Tom H wrote: > On Wed, Aug 5, 2020 at 11:28 AM Ed Greshko > wrote: >> On 2020-08-05 17:09, Tom H wrote: >>> On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users >>> wrote: On 2020-08-03 03:40, Tom H wrote: > "resolvectl query _gateway" will tell you that the

Re: nmcli and gateway question

2020-08-05 Thread Tom H
On Wed, Aug 5, 2020 at 11:28 AM Ed Greshko wrote: > On 2020-08-05 17:09, Tom H wrote: >> On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users >> wrote: >>> On 2020-08-03 03:40, Tom H wrote: "resolvectl query _gateway" will tell you that the gateway's set to X ip address, but only

Re: nmcli and gateway question

2020-08-05 Thread Ed Greshko
On 2020-08-05 17:09, Tom H wrote: > On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users > wrote: >> On 2020-08-03 03:40, Tom H wrote: >>> "resolvectl query _gateway" will tell you that the gateway's set to >>> X ip address, but only if you have "myhostname" in "nsswitch.conf". >> I think I

Re: nmcli and gateway question

2020-08-05 Thread Tom H
On Tue, Aug 4, 2020 at 1:32 AM ToddAndMargo via users wrote: > On 2020-08-03 03:40, Tom H wrote: >> >> "resolvectl query _gateway" will tell you that the gateway's set to >> X ip address, but only if you have "myhostname" in "nsswitch.conf". > > I think I misunderstand. > > $ resolvectl query

Re: nmcli and gateway question

2020-08-03 Thread Ed Greshko
On 2020-08-04 07:45, ToddAndMargo via users wrote: > On 2020-08-03 16:10, Ed Greshko wrote: >> $ 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

Re: nmcli and gateway question

2020-08-03 Thread ToddAndMargo via users
On 2020-08-03 16:10, Ed Greshko wrote: $ 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 enp2s0 0.0.0.0 192.168.2.5 0.0.0.0 UG    0

Re: nmcli and gateway question

2020-08-03 Thread Ed Greshko
On 2020-08-04 06:48, ToddAndMargo via users wrote: > > I see you have two gateways.  Would you mind posting your > `netstat -n`? I think you want "netstat -rn".  And, yes, I've already said, at least twice, that I have 2 "default gateways" I already said it is for the case where one path is

Re: nmcli and gateway question

2020-08-03 Thread ToddAndMargo via users
On 2020-08-03 03:57, Ed Greshko wrote: On 2020-08-03 18:21, ToddAndMargo via users wrote: Hi Ed, Okay, lets look at this as a network detective. You start only know that there are two network connections. One to the to Internet, which I will call the Black connection. The other one to the 

Re: nmcli and gateway question

2020-08-03 Thread ToddAndMargo via users
to get nmcli to tell you if an interface is a gateway like you can with `netstat -rn`? Very related to the previous question. # nmcli --fields IP4.GATEWAY d show wlo1 IP4.GATEWAY:10.0.1.1 # nmcli --fields IP4.GATEWAY d show lo IP4.GATEWAY

Re: nmcli and gateway question

2020-08-03 Thread ToddAndMargo via users
On 2020-08-03 04:55, George N. White III wrote: On Mon, 3 Aug 2020 at 08:19, ToddAndMargo via users mailto:users@lists.fedoraproject.org>> wrote: Okay, lets look at this as a network detective. You start only know that there are two network connections. One to the to Internet,

Re: nmcli and gateway question

2020-08-03 Thread George N. White III
On Mon, 3 Aug 2020 at 08:19, ToddAndMargo via users < users@lists.fedoraproject.org> wrote: > Okay, lets look at this as a network detective. > > You start only know that there are two network connections. > One to the to Internet, which I will call the *Black* connection. > The other one to the

Re: nmcli and gateway question

2020-08-03 Thread Ed Greshko
On 2020-08-03 18:21, ToddAndMargo via users wrote: > Hi Ed, > > Okay, lets look at this as a network detective. > > You start only know that there are two network connections. > One to the to Internet, which I will call the Black connection. > The other one to the internal network, which I will 

Re: nmcli and gateway question

2020-08-03 Thread Tom H
gt;>> >>>>> Is there a way to get nmcli to tell you if an interface >>>>> is a gateway like you can with `netstat -rn`? >>>> >>>> Very related to the previous question. >>>> >>>> # nmcli --fields IP4.GATEWAY d show w

Re: nmcli and gateway question

2020-08-03 Thread ToddAndMargo via users
On 2020-08-03 02:20, Ed Greshko wrote: On 2020-08-03 14:22, ToddAndMargo via users wrote: You are presuming I know anything about several networks at this point I think I may have interpreted this incorrectly. Do you mean your script will run on a system/network for which you have no prior

Re: nmcli and gateway question

2020-08-03 Thread Ed Greshko
On 2020-08-03 17:20, ToddAndMargo via users wrote: > And NMCLI did not tell me if the router was up or not. It won't.  That is not its job. -- The key to getting good answers is to ask good questions. ___ users mailing list --

Re: nmcli and gateway question

2020-08-03 Thread ToddAndMargo via users
On 2020-08-03 00:16, Ed Greshko wrote: On 2020-08-03 14:22, ToddAndMargo via users wrote: On 2020-08-02 19:03, Ed Greshko wrote: On 2020-08-03 09:36, ToddAndMargo via users wrote: On 2020-08-02 18:26, Samuel Sieb wrote: On 8/2/20 6:22 PM, ToddAndMargo via users wrote: I am not after what

Re: nmcli and gateway question

2020-08-03 Thread Ed Greshko
On 2020-08-03 14:22, ToddAndMargo via users wrote: > You are presuming I know anything about several > networks at this point I think I may have interpreted this incorrectly. Do you mean your script will run on a system/network for which you have no prior knowledge? If that is the case, maybe

Re: nmcli and gateway question

2020-08-03 Thread Ed Greshko
On 2020-08-03 14:22, ToddAndMargo via users wrote: > On 2020-08-02 19:03, Ed Greshko wrote: >> On 2020-08-03 09:36, ToddAndMargo via users wrote: >>> On 2020-08-02 18:26, Samuel Sieb wrote: On 8/2/20 6:22 PM, ToddAndMargo via users wrote: > I am not after what the gateway address is, but

Re: nmcli and gateway question

2020-08-03 Thread ToddAndMargo via users
On 2020-08-02 21:04, Samuel Sieb wrote: On 8/2/20 6:36 PM, ToddAndMargo via users wrote: On 2020-08-02 18:26, Samuel Sieb wrote: On 8/2/20 6:22 PM, ToddAndMargo via users wrote: I am not after what the gateway address is, but rather 1) if gateway is up or not That can only be determined by

Re: nmcli and gateway question

2020-08-03 Thread ToddAndMargo via users
On 2020-08-02 19:03, Ed Greshko wrote: On 2020-08-03 09:36, ToddAndMargo via users wrote: On 2020-08-02 18:26, Samuel Sieb wrote: On 8/2/20 6:22 PM, ToddAndMargo via users wrote: I am not after what the gateway address is, but rather 1) if gateway is up or not That can only be determined

Re: nmcli and gateway question

2020-08-02 Thread Samuel Sieb
On 8/2/20 6:36 PM, ToddAndMargo via users wrote: On 2020-08-02 18:26, Samuel Sieb wrote: On 8/2/20 6:22 PM, ToddAndMargo via users wrote: I am not after what the gateway address is, but rather 1) if gateway is up or not That can only be determined by pinging it or something past it. That

Re: nmcli and gateway question

2020-08-02 Thread Ed Greshko
On 2020-08-03 09:36, ToddAndMargo via users wrote: > On 2020-08-02 18:26, Samuel Sieb wrote: >> On 8/2/20 6:22 PM, ToddAndMargo via users wrote: >>> I am not after what the gateway address is, but rather >>> >>> 1) if gateway is up or not >> >> That can only be determined by pinging it or

Re: nmcli and gateway question

2020-08-02 Thread ToddAndMargo via users
On 2020-08-02 18:26, Samuel Sieb wrote: On 8/2/20 6:22 PM, ToddAndMargo via users wrote: I am not after what the gateway address is, but rather 1) if gateway is up or not That can only be determined by pinging it or something past it. That is one way of doing it, but it gives a lot more

Re: nmcli and gateway question

2020-08-02 Thread Samuel Sieb
On 8/2/20 6:22 PM, ToddAndMargo via users wrote: I am not after what the gateway address is, but rather 1) if gateway is up or not That can only be determined by pinging it or something past it. 2) if my device connected to the gateway that is up Since you should know which interface goes

Re: nmcli and gateway question

2020-08-02 Thread ToddAndMargo via users
related to the previous question. # nmcli --fields IP4.GATEWAY d show wlo1 IP4.GATEWAY:    10.0.1.1 # nmcli --fields IP4.GATEWAY d show lo IP4.GATEWAY:    -- Uh Oh! This tells me "what" the gateway is, but not "if" the device is a

Re: nmcli and gateway question

2020-08-02 Thread Ed Greshko
; Very related to the previous question. >> >> # nmcli --fields IP4.GATEWAY d show wlo1 >> IP4.GATEWAY:    10.0.1.1 >> >> # nmcli --fields IP4.GATEWAY d show lo >> IP4.GATEWAY:    -- > > Uh Oh! > > Thi

Re: nmcli and gateway question

2020-08-02 Thread ToddAndMargo via users
On 2020-08-01 19:42, Samuel Sieb wrote: On 8/1/20 7:20 PM, ToddAndMargo via users wrote: Is there a way to get nmcli to tell you if an interface is a gateway like you can with `netstat -rn`? Very related to the previous question. # nmcli --fields IP4.GATEWAY d show wlo1 IP4.GATEWAY

Re: nmcli and gateway question

2020-08-02 Thread ToddAndMargo via users
On 2020-08-01 19:42, Samuel Sieb wrote: On 8/1/20 7:20 PM, ToddAndMargo via users wrote: Is there a way to get nmcli to tell you if an interface is a gateway like you can with `netstat -rn`? Very related to the previous question. # nmcli --fields IP4.GATEWAY d show wlo1 IP4.GATEWAY

Re: nmcli and gateway question

2020-08-01 Thread Ed Greshko
On 2020-08-02 10:42, Samuel Sieb wrote: > On 8/1/20 7:20 PM, ToddAndMargo via users wrote: >> Is there a way to get nmcli to tell you if an interface >> is a gateway like you can with `netstat -rn`? > > Very related to the previous question. > > # nmcli --fields IP

Re: nmcli and gateway question

2020-08-01 Thread Samuel Sieb
On 8/1/20 7:20 PM, ToddAndMargo via users wrote: Is there a way to get nmcli to tell you if an interface is a gateway like you can with `netstat -rn`? Very related to the previous question. # nmcli --fields IP4.GATEWAY d show wlo1 IP4.GATEWAY:10.0.1.1 # nmcli

nmcli and gateway question

2020-08-01 Thread ToddAndMargo via users
Hi All, Is there a way to get nmcli to tell you if an interface is a gateway like you can with `netstat -rn`? Many thanks, -T ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org