home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] static ip setup for Linux Mint 18 and similar

  • Subject: Re: [OCLUG-Tech] static ip setup for Linux Mint 18 and similar
  • From: Richard Guy Briggs <rgb [ at ] tricolour [ dot ] ca>
  • Date: Tue, 13 Dec 2016 21:29:03 -0500
On 16/12/13, Alex Pilon wrote:
> On Tue, Dec 13, 2016 at 02:55:00PM -0500, J C Nash wrote:
> > It has been useful to sshfs to this desktop to transfer files over LAN, so I
> > have used a static IP.
> 
> I do not see at all how these two statements have anything to do each
> other. LAN does not imply static IP. Could you elaborate?
> 
> Is it just that you used a static IP because you didn't know about
> discovery protocols like mDNS+DNS-SD or can't set them up? Any big Linux
> distro will have Avahi configured and running, so you should just be
> able to use the fake .local TLD. E.g., if my hostname is tplinux, I can
> SSHFS to tplinux.local.
> 
> Is there some other reason?
> 
> General note to all readers, don't use static IPs unless you know you
> have a particular need for them.

Static IPs are far easier to debug remotely on routable networks when there are
occasional problems with DHCP.  They are particularly useful on the machine
serving DHCP and at least one other should the first die.

> > Running ifconfig
> 
> ifconfig will soon disappear from all sane systems. It has a host of
> problems, not just internal technical, but also usability and
> correctness. Use iproute2. See
> 
>     http://unix.stackexchange.com/questions/93412/difference-between-ifconfig-and-ip-commands/93461#93461
> 
> So, `ip -4 address show scope global` (verbose, remove all the noise), or
> just `ip a` (if you don't mind *some* noise in the output). `ip -4 r
> show scope global` to see the non-link IPv4 routes.

Or "ip addr" and "ip route" for the equivalents to "ifconfig" and "route".  Add
a "-6" if you need that.

> Alex Pilon

	slainte mhath, RGB

--
Richard Guy Briggs               --  ~\    -- ~\             <hpv.tricolour.ca>
<www.TriColour.ca>                 --  \___   o \@      @        Ride yer bike!
Ottawa, ON, CANADA                  --  Lo_>__M__\\/\%__\\/\%
Vote! -- <greenparty.ca>_____GTVS6#790__(*)__(*)________(*)(*)_________________