Open
Description
My deployment deploy docker container with calico network have 2 nodes (virtual machine created by KVM).
- node 1: hostname = docker and ip = 192.168.122.45
- node 2: hostname = database and ip = 192.168.122.13
when I done all step, I get state:
root@docker:~# calicoctl node status
Calico process is running.
IPv4 BGP status
+-----------------+-------------------+-------+----------+-------------+
| PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO |
+-----------------+-------------------+-------+----------+-------------+
| 192.168.122.13 | node-to-node mesh | up | 08:11:11 | Established |
+-----------------+-------------------+-------+----------+-------------+
IPv6 BGP status
No IPv6 peers found.
root@database:~# calicoctl node status
Calico process is running.
IPv4 BGP status
+-----------------+-------------------+-------+----------+-------------+
| PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO |
+-----------------+-------------------+-------+----------+-------------+
| 192.168.122.45 | node-to-node mesh | up | 08:11:10 | Established |
+-----------------+-------------------+-------+----------+-------------+
IPv6 BGP status
No IPv6 peers found.
I got two problems as follow:
- I created a ipPool and a network and two container in this network:
root@docker:~# cat << EOF | calicoctl create -f -
> - apiVersion: v1
> kind: ipPool
> metadata:
> cidr: 192.0.2.0/24
> EOF
Successfully created 1 'ipPool' resource(s)
root@docker:~# docker network create --driver calico --ipam-driver calico-ipam --subnet=192.0.2.0/24 my_net
0946dcb47a02515b80edbb09eadd170683bca7510d7a9d50656990760faab026
root@docker:~# docker run --net my_net --name my_workload --ip 192.0.2.100 -tid busybox
028462ea67ebb8ed2d8678b30cf158657cf2328b3fb39e70b4fe6be0534f5833
root@docker:~# docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my_workload
192.0.2.100
root@docker:~#docker run --net my_net --name my_workload01 --ip 192.0.2.200 -tid busybox
bb3777ffdbc5ec02671a6e152b6a84d2fac61e90c7cb11b20589e8f1c02e0630
root@docker:~# docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my_workload01
192.0.2.200
And then, I tried to ping from container my_workload
to container my_workload01
but it's failed.
root@docker:~# docker exec my_workload ping -c 4 my_workload01.my_net
PING my_workload01.my_net (192.0.2.200): 56 data bytes
--- my_workload01.my_net ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
2, I can see these container's IP on docker
host, but not on database
host:
root@docker:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.122.1 0.0.0.0 UG 0 0 0 ens3
10.10.10.0 192.168.122.13 255.255.255.192 UG 0 0 0 ens3
25.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 ham0
100.64.100.0 192.168.122.13 255.255.255.192 UG 0 0 0 tunl0
100.64.100.4 0.0.0.0 255.255.255.255 UH 0 0 0 cali7d5062fda79
100.64.100.8 0.0.0.0 255.255.255.255 UH 0 0 0 calic0d781ea16e
100.64.100.128 0.0.0.0 255.255.255.192 U 0 0 0 *
100.64.100.192 192.168.122.13 255.255.255.192 UG 0 0 0 tunl0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.0.2.64 0.0.0.0 255.255.255.192 U 0 0 0 *
192.0.2.100 0.0.0.0 255.255.255.255 UH 0 0 0 calif7149fe5d58
192.0.2.192 0.0.0.0 255.255.255.192 U 0 0 0 *
192.0.2.200 0.0.0.0 255.255.255.255 UH 0 0 0 calia50a4846148
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3
root@database:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.122.1 0.0.0.0 UG 0 0 0 ens3
10.10.10.0 0.0.0.0 255.255.255.192 U 0 0 0 *
25.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 ham0
100.64.100.0 0.0.0.0 255.255.255.192 U 0 0 0 *
100.64.100.128 192.168.122.45 255.255.255.192 UG 0 0 0 tunl0
100.64.100.192 0.0.0.0 255.255.255.192 U 0 0 0 *
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.0.2.64 192.168.122.45 255.255.255.192 UG 0 0 0 ens3
192.0.2.192 192.168.122.45 255.255.255.192 UG 0 0 0 ens3
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3
I aslo tried with IPIP mode, but I got the same error
can anyone help me:
why cali* interfaces not shown in other host?
why ping failed between containers in the same host and the same network, please?
My Environment
- calicoctl version (e.g.
calicoctl version
):
root@docker:~# calicoctl version
Client Version: v1.6.3
Build date: 2017-12-20T22:32:36+0000
Git commit: d4cfc95c
Cluster Version: v2.6.8
Cluster Type: unknown
- calico/node version (e.g.
docker run --rm calico/node versions
): v2.6.8 - Orchestrator type and version (e.g. kubernetes, mesos, rkt): docker
- Operating System and version: Ubuntu 16.04.2 LTS
- Link to your project (optional):