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


Groups > linux.debian.user > #193321

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-03-04 20:30 +0100
Message-ID <vpHux-xc-5@gated-at.bofh.it> (permalink)
References (5 earlier) <vnTzP-11Q-7@gated-at.bofh.it> <vodyx-5X0-1@gated-at.bofh.it> <voeXD-6VJ-1@gated-at.bofh.it> <vogmJ-88M-3@gated-at.bofh.it> <vp1OG-kP-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 02 Mar 2018 at 23:56:02 (+0100), Pascal Hambourg wrote:
> Le 28/02/2018 à 21:13, David Wright a écrit :
> >>>#
> >>># /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.
> (...)
> >allow-hotplug eth0
> >iface eth0 inet static
> >   address 192.168.2.15/24
> 
> Note : I wrote "also", not "instead".

Restored.

> >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
> 
> Something went wrong. eth0 is up but the IPv4 address defined in
> /etc/interfaces.d/directcable is not configured.
> 
> Could you post the output of
> 
> ifdown -v eth0
> ifup -v eth0

[…]
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
[…]
# ifdown -v eth0
Parsing file /etc/network/interfaces.d/directcable
ifdown: interface eth0 not configured
# ifup -v eth0
Parsing file /etc/network/interfaces.d/directcable
Configuring interface eth0=eth0 (inet)
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/linux-wlan-ng-pre-up
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.2.15/255.255.255.0 broadcast 192.168.2.255    dev eth0 label eth0
ip link set dev eth0   up

run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/openvpn
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant
Configuring interface eth0=eth0 (inet)
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/linux-wlan-ng-pre-up
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.2.15/255.255.255.0 broadcast 192.168.2.255    dev eth0 label eth0
RTNETLINK answers: File exists
Failed to bring up eth0.
# 
[…]
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
    inet 192.168.2.15/24 brd 192.168.2.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::21c:23ff:fe3b:9f34/64 scope link 
       valid_lft forever preferred_lft forever
[…]
$ ip r
default via 192.168.1.1 dev wlan0 
169.254.0.0/16 dev eth0  scope link  metric 1000 
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.15 
192.168.2.0/24 dev eth0  proto kernel  scope link  src 192.168.2.15 
$ 

So, yes, that allows commands like this to work:

$ scp -p /etc/network/interfaces.d/directcable root@192.168.2.10:/tmp

leaving just the two problems:

a) if the cable is connected at boot, the machines' normal default
   routes don't come up properly, but they're only able to connect
   with each other,
b) I have to down and up the interface as root before making transfers.

which leads me to see no reason for withdrawing my original remark:

"I have one valuable use for IPv6 which is point-to-point connections.
I plug a CAT5 cable into the two ends and use predefined functions
to bulk-transfer files with scp."

but just to point out what I didn't make explicit six weeks ago:

1) you don't have to change anything as root in /etc,
2) you don't need root access for configuring the interfaces
   before doing transfers,
3) it's unimportant whether the CAT5 cable is connected at other
   times (particularly when booting).

So I'll be ignoring the Keep Off The Grass signs. Really.

Cheers,
David.

Back to linux.debian.user | Previous | NextPrevious 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