Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #193237

Re: stretch and DNS name resolution service for other devices on a LAN

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: stretch and DNS name resolution service for other devices on a LAN
Date 2018-02-28 21:20 +0100
Message-ID <vogmJ-88M-3@gated-at.bofh.it> (permalink)
References (5 earlier) <vmDQu-8iM-11@gated-at.bofh.it> <vn8rf-2KD-17@gated-at.bofh.it> <vnTzP-11Q-7@gated-at.bofh.it> <vodyx-5X0-1@gated-at.bofh.it> <voeXD-6VJ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed 28 Feb 2018 at 19:42:27 (+0100), Pascal Hambourg wrote:
> Le 28/02/2018 à 18:14, David Wright a écrit :
> >
> >$ cat /etc/network/interfaces /etc/network/interfaces.d/directcable
> ># This file describes the network interfaces available on your system
> ># and how to activate them. For more information, see interfaces(5).
> >
> >source /etc/network/interfaces.d/*
> >
> ># The loopback network interface
> >auto lo
> >iface lo inet loopback
> >
> >#
> ># /etc/interfaces.d/directcable for west 2018-02-25
> >
> >auto eth0
> >iface eth0 inet static
> >   address 192.168.2.15/24
> 
> Fine. You could also add "allow-hotplug eth0" in case eth0 would be
> discovered late.

OK. Tried that here. The   ip a   is before and after connecting the cable.

$ cat /etc/network/interfaces /etc/network/interfaces.d/directcable-hot-plug 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

#
# /etc/interfaces.d/directcable for west 2018-02-25

allow-hotplug eth0
iface eth0 inet static
  address 192.168.2.15/24

#
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:1c:23:3b:9f:34 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:1c:bf:d5:28:76 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.15/24 brd 192.168.1.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::21c:bfff:fed5:2876/64 scope link 
       valid_lft forever preferred_lft forever
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:1c:23:3b:9f:34 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::21c:23ff:fe3b:9f34/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:1c:bf:d5:28:76 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.15/24 brd 192.168.1.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::21c:bfff:fed5:2876/64 scope link 
       valid_lft forever preferred_lft forever
$ 

> >$ ip a
> >2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
> >     link/ether 00:1c:23:3b:9f:34 brd ff:ff:ff:ff:ff:ff
> >     inet6 fe80::21c:23ff:fe3b:9f34/64 scope link
> >        valid_lft forever preferred_lft forever
> 
> The IPv4 address is not configured on eth0. No need to check the
> connectivity with ping, it won't work until the IPv4 addresses are
> configured on both ethernet interfaces.
> 
> After adding the iface stanza, did you restart the system, or start
> the interface with "ifup -a" ?

Yes. AFAIK there's no clean way to restart networking, so I've always
rebooted at both ends after making any change.

# ifup -a
# ifup eth0
ifup: interface eth0 already configured
# 

If I reboot but forget to disconnect the cable, then the machines
come up in a deadly embrace, ie each is the default IPv4 gateway
for the other, by way of the cable. OTOH in the absence of
/etc/interfaces.d/directcable or /etc/interfaces.d/directcable-hot-plug,
the machines come up normally, with their gateway through the wlan0
interface, but also able to transfer files or login to one another
through the already connected cable. I just tested that from this
laptop two floors below them both.

Cheers,
David.

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

stretch and DNS name resolution service for other devices on a LAN "D. R. Evans" <doc.evans@gmail.com> - 2018-01-18 22:40 +0100
  Re: stretch and DNS name resolution service for other devices on a  LAN Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-01-18 22:50 +0100
    Re: stretch and DNS name resolution service for other devices on a  LAN "D. R. Evans" <doc.evans@gmail.com> - 2018-01-19 06:20 +0100
      Re: stretch and DNS name resolution service for other devices on a  LAN Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-01-19 21:10 +0100
  Re: stretch and DNS name resolution service for other devices on a  LAN Greg Wooledge <wooledg@eeg.ccf.org> - 2018-01-18 22:50 +0100
    Re: stretch and DNS name resolution service for other devices on a  LAN "D. R. Evans" <doc.evans@gmail.com> - 2018-01-19 06:20 +0100
    Re: stretch and DNS name resolution service for other devices on a  LAN Andy Hawkins <andy@gently.org.uk> - 2018-01-19 12:50 +0100
      Re: stretch and DNS name resolution service for other devices on a  LAN john doe <johndoe65534@mail.com> - 2018-01-19 13:10 +0100
        Re: stretch and DNS name resolution service for other devices on a  LAN Andy Hawkins <andy@gently.org.uk> - 2018-01-19 13:30 +0100
          Re: stretch and DNS name resolution service for other devices on a  LAN Michael Stone <mstone@debian.org> - 2018-01-19 15:10 +0100
            Re: stretch and DNS name resolution service for other devices on a  LAN Andy Hawkins <andy@gently.org.uk> - 2018-01-19 15:30 +0100
      Re: stretch and DNS name resolution service for other devices on a  LAN Greg Wooledge <wooledg@eeg.ccf.org> - 2018-01-19 14:50 +0100
        Re: stretch and DNS name resolution service for other devices on a  LAN Michael Stone <mstone@debian.org> - 2018-01-19 15:10 +0100
        Re: stretch and DNS name resolution service for other devices on a  LAN Andy Hawkins <andy@gently.org.uk> - 2018-01-19 15:20 +0100
          Re: stretch and DNS name resolution service for other devices on a  LAN Rob van der Putten <rob@sput.nl> - 2018-01-19 16:20 +0100
            Re: stretch and DNS name resolution service for other devices on a  LAN Michael Stone <mstone@debian.org> - 2018-01-19 17:40 +0100
            Re: stretch and DNS name resolution service for other devices on a  LAN Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-01-19 20:40 +0100
        Re: stretch and DNS name resolution service for other devices on a  LAN David Wright <deblis@lionunicorn.co.uk> - 2018-01-19 16:20 +0100
          Re: stretch and DNS name resolution service for other devices on a  LAN Andy Hawkins <andy@gently.org.uk> - 2018-01-22 18:30 +0100
            Re: stretch and DNS name resolution service for other devices on a  LAN David Wright <deblis@lionunicorn.co.uk> - 2018-01-22 23:30 +0100
              Re: stretch and DNS name resolution service for other devices on a  LAN Andy Hawkins <andy@gently.org.uk> - 2018-01-23 10:30 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN Curt <curty@free.fr> - 2018-01-23 12:20 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN Joe <joe@jretrading.com> - 2018-01-23 14:50 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN David Wright <deblis@lionunicorn.co.uk> - 2018-01-23 15:50 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN Andy Hawkins <andy@gently.org.uk> - 2018-01-23 17:10 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN David Wright <deblis@lionunicorn.co.uk> - 2018-01-23 18:10 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-01-23 21:00 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN David Wright <deblis@lionunicorn.co.uk> - 2018-02-22 23:00 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-02-24 10:00 +0100
                Re: stretch and DNS name resolution service for other devices on a   LAN Curt <curty@free.fr> - 2018-02-24 11:10 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN David Wright <deblis@lionunicorn.co.uk> - 2018-02-25 18:40 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-02-27 21:00 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN David Wright <deblis@lionunicorn.co.uk> - 2018-02-28 18:20 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-02-28 19:50 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN David Wright <deblis@lionunicorn.co.uk> - 2018-02-28 21:20 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-03-03 00:00 +0100
                Re: stretch and DNS name resolution service for other devices on a  LAN David Wright <deblis@lionunicorn.co.uk> - 2018-03-04 20:30 +0100

csiph-web