Closed mgomezch closed 7 years ago
What's your full interface list? Is there an interface with ip4 address as well? Why btw do you have these IPv6 interfaces. Are they expected. I am just trying to understand what's happening here.
Regarding your suggestion of verifying whether the ipv4 field even exist, it sounds reasonable. @Werelds what do you think?
Those interfaces are expected, yes: they are created by the Docker daemon for each Docker container running on the host. This documentation is for an old version of Docker, but it has a reasonably detailed explanation of the use of those interfaces — they seem to have removed that part of the documentation from newer versions, but the mechanism appears to remain for the most part unchanged.
My full interface list at the moment:
br-44ba74744d5d Link encap:Ethernet HWaddr 02:42:e1:01:ae:98
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:e1ff:fe01:ae98/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:10570 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1072 (1.0 KB) TX bytes:1845601 (1.8 MB)
br-7884014b4104 Link encap:Ethernet HWaddr 02:42:c0:4b:90:0c
inet addr:172.19.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:c0ff:fe4b:900c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:45096 errors:0 dropped:0 overruns:0 frame:0
TX packets:54036 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:26259944 (26.2 MB) TX bytes:18831949 (18.8 MB)
br-efce9da0c1fd Link encap:Ethernet HWaddr 02:42:02:46:f1:d1
inet addr:172.18.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:2ff:fe46:f1d1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4973 errors:0 dropped:0 overruns:0 frame:0
TX packets:14548 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2749308 (2.7 MB) TX bytes:2192337 (2.1 MB)
docker0 Link encap:Ethernet HWaddr 02:42:db:1b:6e:92
inet addr:172.16.0.1 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::42:dbff:fe1b:6e92/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:60492 errors:0 dropped:0 overruns:0 frame:0
TX packets:101978 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3546881 (3.5 MB) TX bytes:161267891 (161.2 MB)
docker_gwbridge Link encap:Ethernet HWaddr 02:42:72:96:c6:df
inet addr:172.20.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:72ff:fe96:c6df/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:944 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1072 (1.0 KB) TX bytes:174670 (174.6 KB)
enp4s0 Link encap:Ethernet HWaddr d8:cb:8a:81:eb:0e
inet addr:192.168.88.97 Bcast:192.168.88.255 Mask:255.255.255.0
inet6 addr: fe80::323d:9fa0:ef2a:ddf5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1958964 errors:0 dropped:0 overruns:0 frame:0
TX packets:828786 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1173288638 (1.1 GB) TX bytes:127197275 (127.1 MB)
Interrupt:19
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:83986 errors:0 dropped:0 overruns:0 frame:0
TX packets:83986 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:10867944 (10.8 MB) TX bytes:10867944 (10.8 MB)
veth050aa01 Link encap:Ethernet HWaddr ca:3a:8e:7a:32:44
inet6 addr: fe80::c83a:8eff:fe7a:3244/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:110564 errors:0 dropped:0 overruns:0 frame:0
TX packets:74708 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9429951 (9.4 MB) TX bytes:25170553 (25.1 MB)
veth1c191f7 Link encap:Ethernet HWaddr b6:98:f3:a1:32:43
inet6 addr: fe80::b498:f3ff:fea1:3243/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3010 errors:0 dropped:0 overruns:0 frame:0
TX packets:3034 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1402991 (1.4 MB) TX bytes:495730 (495.7 KB)
veth38aa771 Link encap:Ethernet HWaddr 8e:97:e2:1a:b1:4f
inet6 addr: fe80::8c97:e2ff:fe1a:b14f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:74232 errors:0 dropped:0 overruns:0 frame:0
TX packets:112184 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27865557 (27.8 MB) TX bytes:11420160 (11.4 MB)
veth5f49498 Link encap:Ethernet HWaddr 6a:25:20:f5:a0:0d
inet6 addr: fe80::6825:20ff:fef5:a00d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17138 errors:0 dropped:0 overruns:0 frame:0
TX packets:26475 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4036532 (4.0 MB) TX bytes:4356896 (4.3 MB)
veth7803c65 Link encap:Ethernet HWaddr 36:d7:6c:28:54:ce
inet6 addr: fe80::34d7:6cff:fe28:54ce/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1934 errors:0 dropped:0 overruns:0 frame:0
TX packets:3149 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1801596 (1.8 MB) TX bytes:2187736 (2.1 MB)
veth8a09803 Link encap:Ethernet HWaddr b6:36:30:d1:59:8e
inet6 addr: fe80::b436:30ff:fed1:598e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:12474 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:648 (648.0 B) TX bytes:2045996 (2.0 MB)
veth8bf1652 Link encap:Ethernet HWaddr 62:a8:67:85:cc:e4
inet6 addr: fe80::60a8:67ff:fe85:cce4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:334319 errors:0 dropped:0 overruns:0 frame:0
TX packets:306936 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:103880259 (103.8 MB) TX bytes:55654352 (55.6 MB)
veth95ef8de Link encap:Ethernet HWaddr 9e:45:e8:69:e6:2f
inet6 addr: fe80::9c45:e8ff:fe69:e62f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:12473 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:648 (648.0 B) TX bytes:2045906 (2.0 MB)
vethc75f284 Link encap:Ethernet HWaddr 7a:b2:7f:55:00:59
inet6 addr: fe80::78b2:7fff:fe55:59/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:300717 errors:0 dropped:0 overruns:0 frame:0
TX packets:349239 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:54672769 (54.6 MB) TX bytes:106063629 (106.0 MB)
vethe533ef0 Link encap:Ethernet HWaddr ba:3e:93:52:aa:c7
inet6 addr: fe80::b83e:93ff:fe52:aac7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:991 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:648 (648.0 B) TX bytes:177191 (177.1 KB)
wlp3s0 Link encap:Ethernet HWaddr b4:6d:83:a4:ec:f0
inet addr:192.168.88.118 Bcast:192.168.88.255 Mask:255.255.255.0
inet6 addr: fe80::6b80:15d4:e83c:a59d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1180400 errors:0 dropped:0 overruns:0 frame:0
TX packets:522853 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:738026625 (738.0 MB) TX bytes:84768851 (84.7 MB)
Sorry for the late response @mgomezch :)
Your solution is indeed correct for the current mechanics, but after quickly discussing it with @hferentschik I think there's an even neater solution:
That'll solve your issue as well as making Landrush a bit more flexible in this regard.
Resolved via pull #270
My
ifconfig
shows these network interfaces, among others:landrush-ip
shows them thus, among others:Note they have IPv6 address, but no IPv4 address.
Landrush::Cap::All::ReadHostVisibleIpAddress::read_host_visible_ip_address
does something like this (abridged; there’s actually some logic to deal with configuration settings):filter_addresses
does this:I could manually exclude these interfaces with no IPv4 addresses, but it sounds to me like that’s not quite a proper solution; perhaps some user of my
Vagrantfile
could have an interface with only IPv4 addresses and with some name that I can’t predict, and I’d prefer if this just works for them. In any case, trying to bring up an existing Vagrant machine in the presence of such an interface yields thus:One solution, perhaps not ideal, is to change the
select
criterion thus:Is this a proper solution? Should I send a pull request? I suppose this might also be dealt with in
landrush-ip
and I understand significant changes are in progress on that front.