Date: Fri, 7 Dec 2018 13:56:45 -0600 From: Doug McIntyre <merlyn@geeks.org> To: Ernie Luzar <luzar722@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: sh code to determine if host is on lan Message-ID: <20181207195645.GA64030@geeks.org> In-Reply-To: <5C09C491.1060803@gmail.com> References: <5C099F41.2020407@gmail.com> <5C09AB7B.4010001@gmail.com> <20181207011905.af7d5c29.freebsd@edvax.de> <5C09C491.1060803@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 06, 2018 at 07:53:37PM -0500, Ernie Luzar wrote: > Polytropon wrote: > > elOn Thu, 06 Dec 2018 16:06:35 -0700, JD wrote: > >> > >> On 12/06/2018 03:14 PM, Ernie Luzar wrote: > >>> Hello list > >>> > >>> Know that "route -n get default" will give me the nic name of the > >>> interface connected upstream. That "ifconfig nic" will give me the ip > >>> address. That if that ip address is one of these ranges > >>> 192.168/16 or 172.16/12 or 10/8 then the host is on a lan. Hmm, I thought my host here was on a LAN.. vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 inet 216.250.176.100 netmask 0xffffffe0 broadcast 216.250.176.127 inet6 2001:4980:2:dad::100 prefixlen 64 And this one too.. bce0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 inet6 2001:4980:0:1000:21e:c9ff:feb5:663a prefixlen 64 autoconf inet6 2001:4980:0:ffff:21e:c9ff:feb5:663a prefixlen 64 autoconf Are you sure your definition of "LAN" is the correct term? What is it you are trying to determine?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181207195645.GA64030>