虚拟路由器后面的Docker容器

我的docker主机没有直接的互联网访问。 它位于虚拟路由器的后面。 我已经添加一个静态路由到路由表连接到外面。

# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.114.49.128 * 255.255.255.192 U 0 0 0 eth0 link-local * 255.255.0.0 U 1002 0 0 eth0 172.17.0.0 * 255.255.0.0 U 0 0 0 docker0 10.0.0.0 10.114.49.129 255.0.0.0 UG 0 0 0 eth0 default 10.114.49.140 0.0.0.0 UG 0 0 0 eth0 # ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 06:10:ce:77:e1:11 brd ff:ff:ff:ff:ff:ff inet 10.114.49.137/26 brd 10.114.49.191 scope global eth0 inet6 fe80::410:ceff:fe77:e111/64 scope link valid_lft forever preferred_lft forever 3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether 52:7e:b0:0c:19:1d brd ff:ff:ff:ff:ff:ff inet 172.17.42.1/16 scope global docker0 inet6 fe80::44d4:8fff:fec4:7c4a/64 scope link valid_lft forever preferred_lft forever 

10.114.49.140是网关地址。

当我启动Docker容器时,容器中的路由表看起来像这样。

 #route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.17.0.0 * 255.255.0.0 U 0 0 0 eth0 default 172.17.42.1 0.0.0.0 UG 0 0 0 eth0 

我可以ping容器中的docker主机。 但是不能ping通虚拟路由和外部世界。 如何configurationdocker主机上的路由表,使容器中的stream量能够被转发到我的网关?

谢谢