jpetazzo / pipework

Software-Defined Networking tools for LXC (LinuX Containers)
Apache License 2.0
4.22k stars 727 forks source link

pipework add eth0, my container can lost default gateway. #123

Closed epiphyllum closed 9 years ago

epiphyllum commented 9 years ago

Problem is as follow

  1. I docker run my container with parameter --net=none
  2. I use pipework add eth0 to my container
  3. netstat -nr, the container does not container a default gateway, nor can I add it, so my container can not access the internet.

so how can not use pipework to add interface, in the meantime , make my container has the access to the internet ?

55bce17c-cfc4-40ad-8af6-9d028c7d1581

pierrecdn commented 9 years ago

Hi, RTFM ! https://github.com/jpetazzo/pipework#default_gateway The syntax to add a gateway is ip/mask@gateway.

So, with the following, you should succeed:

pipework docker0 -i eth0 tt 172.17.0.188/24@172.17.0.1