jpetazzo / pipework

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

DHCP + default route #228

Closed ipeakermit closed 5 months ago

ipeakermit commented 6 years ago

How do I combine get dhclient to use the DHCP server-provided default route (latest version as of Aug '17)?

I can do the following to assign an IP address with all traffic flowing via 10.234.2.47, but then the address has to be static: sudo pipework/pipework ens1f1 vxlab-red 10.234.2.47/24@10.234.2.254

Or I can do the following to assign an IP address via our local DHCP server, but then there is no default route (see below): sudo pipework/pipework ens1f1 -i eth0 vxlab-red dhcp:-f U:red1

root@864d3754976a:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.42.1.0 10.234.2.49 255.255.255.0 UG 0 0 0 eth0 10.234.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

(For normal clients such as the docker host, dhclient shows an additional entry 0.0.0.0 10.234.2.254 0.0.0.0 UG 100 0 0 ens1f1 )

jpetazzo commented 5 months ago

Closing old issues.