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.