Zekeriya Akgül
Zekeriya Akgül

Reputation: 318

Connection issue between Docker container and Other machine

I'm using open vSwitch(with DPDK) for communicating my machines. I have 2 physical PC. Nginx is working on one of them and its ip=10.10.10.6/24. Open vSwitch and Docker is working on the other machine. I create a bridge via this command:

ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev

And I add one port to physical port via this command which is using DPDK driver and connected to the Ngnix machine with a cable:

ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 \
        type=dpdk options:dpdk-devargs=0000:05:00.1

And assign an IP to the br0:

ifconfig br0 10.10.10.11 netmask 255.255.255.0 up

After this I create a container using my image:

Dockerfile:

FROM ubuntu:latest
MAINTAINER Zekeriya Akgul


RUN apt-get update -y && \
    apt-get upgrade -y && \
    apt-get install -y apache2 iputils-ping iputils-tracepath iproute2 net-tools wget

EXPOSE 80 443 444 

And run the container using following command:

docker run --rm -P -it --cap-add NET_ADMIN --name ubuntu1 zkryakgul/ubuntu /bin/bash

After this I assign a port to the container using the following command:

ovs-docker add-port br0 eth1 attacker1 --ipaddress=10.10.10.12/24

After all of this steps my nginx machine pinging the container and container pinging nginx.

But when I try to wget 10.10.10.6:80, the container cannot connect. But on the other hand, my physical machine(ip:10.10.10.11) can do. When I run the same command (wget) it gets the page from 10.10.10.6:80.

What am I doing wrong?

Upvotes: 1

Views: 699

Answers (1)

Zekeriya Akgül
Zekeriya Akgül

Reputation: 318

I finally catch the problem.The problem is tcp offloading on the docker container.When i close the tcp offloading via this command:

ethtool -K eth6 tx off rx off

Everything works fine.

Next time try to find a solution instead of finding an excuse please.

Upvotes: 1

Related Questions