What's eth0 used for in docker host machine - networking

I'm using Docker on Windows. When I ssh to a docker host machine(local VM) and type ifconfig, normally we get something like this:
docker#master:~$ ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:82:A3:2D:FB
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth0 Link encap:Ethernet HWaddr 08:00:27:E8:A3:F6
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fee8:a3f6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:243 errors:0 dropped:0 overruns:0 frame:0
TX packets:235 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:39044 (38.1 KiB) TX bytes:39544 (38.6 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:83:CF:41
inet addr:192.168.99.101 Bcast:192.168.99.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe83:cf41/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:297 errors:0 dropped:0 overruns:0 frame:0
TX packets:227 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29987 (29.2 KiB) TX bytes:32525 (31.7 KiB)
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:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:2752 (2.6 KiB) TX bytes:2752 (2.6 KiB)
I know that docker0 is the bridge network created by Docker, eth1 is the interface connects to the outer world, lo is the loopback interface, my question is what's eth0 here used for?

I think I got the point. When I come to the VirtualBox Network Settings, I found there're 2 network cards, and the first one using NAT with port forwarding.
Name:ssh | Host Port:53289 | Guest Port:22
So I thought the eth0 is used for ssh connection by docker client. That's why there's no such an interface in a normal Linux OS(rather than this Boot2Docker local VM).
Different ideas are welcome!

Related

centos 6.7 - no connection- unknown host

I'm new to centos.
When I'm at work I'm able to connect to my centos server from my mac, Now I'm trying to connect from home and I can't.
I've tried pinging google.com and recieved: unknown host google.com .
Maybe it's something with the ip I get from my home router?
here's my /etc/hosts file:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Here's my ifconfig:
eth0 Link encap:Ethernet HWaddr 00:1C:42:B3:AC:2C
inet6 addr: fe80::21c:42ff:feb3:ac2c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:730172 errors:0 dropped:0 overruns:0 frame:0
TX packets:582258 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:642394306 (612.6 MiB) TX bytes:59636955 (56.8 MiB)
eth1 Link encap:Ethernet HWaddr 00:1C:42:19:FB:DC
inet addr:10.37.129.3 Bcast:10.37.129.255 Mask:255.255.255.0
inet6 addr: fdb2:2c26:f4e4:1:21c:42ff:fe19:fbdc/64 Scope:Global
inet6 addr: fe80::21c:42ff:fe19:fbdc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:694184 errors:0 dropped:0 overruns:0 frame:0
TX packets:465777 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:104085044 (99.2 MiB) TX bytes:1662635867 (1.5 GiB)
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:3581071 errors:0 dropped:0 overruns:0 frame:0
TX packets:3581071 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3060357993 (2.8 GiB) TX bytes:3060357993 (2.8 GiB)
P.S-
I'm not sure if it matters, but I'm using Nginx server. I can't restart it also.
Please checks your Centos server file
/etc/hosts.allow
It maybe only allowing certain IPs access to the Centos Box
Your work IP maybe in there but your home IP may not

Vagrant Host Unreachable - Possible Conflict

I have multiple Vagrant 1.7.4 boxes running on VirtualBox 5, but I believe I am running into conflicts with my network setup. I can always "vagrant ssh" to a box when it comes online, but it's hit or miss if I can access the webserver. Rebooting my machine or starting the boxes in a different order can correct the problem. I am running OSX El Capitan. Here is the relevant setup:
Machine 1 (can't access webserver from OSX):
config.vm.network "private_network", ip: "10.10.10.10"
eth0 Link encap:Ethernet HWaddr 08:00:27:6B:1C:DD
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6b:1cdd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:775 errors:0 dropped:0 overruns:0 frame:0
TX packets:572 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:80340 (78.4 KiB) TX bytes:70508 (68.8 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:3E:44:A3
inet addr:10.10.10.10 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe3e:44a3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:1128 (1.1 KiB)
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Machine 2 (working fine):
config.vm.network "private_network", ip: "10.11.11.11"
eth0 Link encap:Ethernet HWaddr 08:00:27:6B:1C:DD
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6b:1cdd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10773 errors:0 dropped:0 overruns:0 frame:0
TX packets:6361 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7430638 (7.0 MiB) TX bytes:482303 (470.9 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:73:39:23
inet addr:10.11.11.11 Bcast:10.11.11.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe73:3923/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5646 errors:0 dropped:0 overruns:0 frame:0
TX packets:6693 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:625645 (610.9 KiB) TX bytes:6934485 (6.6 MiB)
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:1270 errors:0 dropped:0 overruns:0 frame:0
TX packets:1270 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1144652 (1.0 MiB) TX bytes:1144652 (1.0 MiB)

Beaglebone black eth0 does not get static ip configuration

I have an interface eth0 which I add to bridge (br-lan).
Then I want to give eth0's IP to br-lan and bring eth0 to state with no IP for it.
I did following steps but after some interval eth0 gets another DHCP IP different from br-lan but within same subnet.
# brctl addbr br-lan
# brctl addif br-lan eth0
# ifconfig br-lan up
# ifconfig
br-lan Link encap:Ethernet HWaddr d0:39:72:54:c5:93
inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
inet6 addr: fd00:aaaa::d239:72ff:fe54:c593/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:545 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:44350 (43.3 KiB) TX bytes:6125 (5.9 KiB)
eth0 Link encap:Ethernet HWaddr d0:39:72:54:c5:93
inet addr:192.168.11.175 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27 errors:0 dropped:0 overruns:0 frame:0
TX packets:306 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5145 (5.0 KiB) TX bytes:37372 (36.4 KiB)
Interrupt:40
root#beaglebone:~# ifconfig eth0 0.0.0.0
root#beaglebone:~# ifconfig
br-lan Link encap:Ethernet HWaddr d0:39:72:54:c5:93
inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
inet6 addr: fd00:aaaa::d239:72ff:fe54:c593/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:545 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:44350 (43.3 KiB) TX bytes:6125 (5.9 KiB)
eth0 Link encap:Ethernet HWaddr d0:39:72:54:c5:93
inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35 errors:0 dropped:0 overruns:0 frame:0
TX packets:313 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6048 (5.9 KiB) TX bytes:37792 (36.9 KiB)
Interrupt:40
root#beaglebone:~# dhclient br-lan
root#beaglebone:~# ifconfig
br-lan Link encap:Ethernet HWaddr d0:39:72:54:c5:93
inet addr: 192.168.11.192 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
inet6 addr: fd00:aaaa::d239:72ff:fe54:c593/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:548 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:45134 (44.0 KiB) TX bytes:9094 (8.8 KiB)
eth0 Link encap:Ethernet HWaddr d0:39:72:54:c5:93
inet addr:192.168.11.175 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:499 errors:0 dropped:0 overruns:0 frame:0
TX packets:794 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:42497 (41.5 KiB) TX bytes:74010 (72.2 KiB)
Interrupt:40
Does anyone have any idea why eth0 gets back different IP?
My /etc/network/interfaces have no configuration for eth0 DHCP. Infact even if I add following lines to it, eth0 still gets 192.168.11.X IP after I do "dhclient br-lan"
auto eth0
iface eth0 inet static
address 192.168.0.102
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.1
How do I ask eth0 to net get DHCP IP and just stick to no-IP
I am running Debian 7.4 on Beaglebone
Apparently wicd was reconnecting eth0. Following steps fixed the problem of auto- reconnecting eth0
Change the "auto_reconnect = True" to "auto_reconnect = False" in /etc/wicd/manager-settings.conf
/etc/init.d/wicd restart

Capturing on a non-default interface with tcpdump

O/P of if config is
[root#test2 ~]# ifconfig
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:16436 Metric:1
RX packets:3045306 errors:0 dropped:0 overruns:0 frame:0
TX packets:3045306 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:969363066 (924.4 MiB) TX bytes:969363066 (924.4 MiB)
p4p1 Link encap:Ethernet HWaddr F0:4D:A2:F7:CE:20
inet addr:192.168.250.58 Bcast:192.168.250.255 Mask:255.255.255.0
inet6 addr: fe80::f24d:a2ff:fef7:ce20/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:222163621 errors:0 dropped:0 overruns:0 frame:0
TX packets:29525032 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:67504475609 (62.8 GiB) TX bytes:13910424527 (12.9 GiB)
virbr0 Link encap:Ethernet HWaddr 52:54:00:3C:38:60
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
when i executed tcpdump , o/p is
root#test2 ~]# tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on virbr0, link-type EN10MB (Ethernet), capture size 65535 bytes
where it is listening to vibra0 interface as default.
I want to set p4p1 interface as default interface so that i may get appropriate o/p when executing tcpdump.
Any solutions.
You cannot change tcpdump's default interface (unless you hack either tcpdump or libpcap's code).
You can, however, tell tcpdump to capture on a particular interface by using the -i option:
tcpdump -i p4p1

Keystone error with Devstack

I have followed this link to deploy devstack on my virtual machine. When I execute ./stack.sh script in the VM, I get the following error after sometime:
keystone endpoint-create: error: argument --service-id/--service_id: expected one argument
++ failed
++ local r=2
+++ jobs -p
++ kill
++ set +o xtrace
The script terminates without giving any information such as the host on which to access Horizon and the time elapsed in running the script. I am using NAT as my virtual machine network configuration since I am not able to connect to my network using bridge mode.
I get no response when trying to access Horizon from my web browser. When I try to execute stack.sh (not preceded by ./unstack.sh), I get the error that stack is already running. Please note that I am behind a proxy server and this is my network configuration on host and guest machines respectively:
Host Machine:
eth0 Link encap:Ethernet HWaddr d4:be:d9:7f:b3:6f
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
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:16436 Metric:1
RX packets:110688 errors:0 dropped:0 overruns:0 frame:0
TX packets:110688 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6738439 (6.7 MB) TX bytes:6738439 (6.7 MB)
vmnet1 Link encap:Ethernet HWaddr 00:50:56:c0:00:01
inet addr:172.16.85.1 Bcast:172.16.85.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
vmnet8 Link encap:Ethernet HWaddr 00:50:56:c0:00:08
inet addr:172.16.145.1 Bcast:172.16.145.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:602 errors:0 dropped:0 overruns:0 frame:0
TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 60:36:dd:3e:99:e6
inet addr:10.99.19.21 Bcast:10.99.19.255 Mask:255.255.252.0
inet6 addr: fe80::6236:ddff:fe3e:99e6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:215802 errors:0 dropped:0 overruns:0 frame:0
TX packets:222520 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:245659430 (245.6 MB) TX bytes:30196677 (30.1 MB)
Guest Machine (Bridge):
eth0 Link encap:Ethernet HWaddr 00:0c:29:8a:c9:d4
inet addr:172.16.145.128 Bcast:172.16.145.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe8a:c9d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1965 errors:0 dropped:0 overruns:0 frame:0
TX packets:1508 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2229981 (2.2 MB) TX bytes:160543 (160.5 KB)
Interrupt:19 Base address:0x2024
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:16436 Metric:1
RX packets:485 errors:0 dropped:0 overruns:0 frame:0
TX packets:485 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:36153 (36.1 KB) TX bytes:36153 (36.1 KB)
virbr0 Link encap:Ethernet HWaddr 2e:32:9b:c3:f4:12
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
My localrc file is configured like this:
FLOATING_RANGE=192.168.1.224/27
FIXED_RANGE=10.11.12.0/24
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0
ADMIN_PASSWORD=password
MYSQL_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=tokentoken
Please note that I am behind a proxy server. Googling this error returned me some pages that suggest that the issue can be solved by setting the 'no_proxy' variable with the main IP address of the devstack machine.
Links to pages:
https://bugs.launchpad.net/devstack/+bug/1015705
https://answers.launchpad.net/devstack/+question/219539
I don't know where to add these settings or how to solve this whole keystone error. Any help is highly appreciated. Thanks in advance.
You can add your VM IP to the no_proxy variable. In Below snippet, 10.0.2.15 is my devstack VM IP. To be permanently exported when starting your terminal, you can add the below line in /etc/bash.bashrc file.
export no_proxy=localhost,127.0.0.1,10.0.2.15

Resources