$ sudo ip netns exec client ip link set c-veth up
$ sudo ip netns exec server ip address add 192.0.2.254/24 dev s-veth0</pre>
*dhcp サーバーをserverで起動
<pre>
$ sudo ip netns exec server dnsmasq --dhcp-range=192.0.2.100,192.0.2.200,255.255.255.0 --interface=s-veth0 --port 0 --no-resolv --no-daemon
</pre>
*別ターミナルから利用する
<pre>
$ sudo ip netns exec client dhclient -d c-veth
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/c-veth/fa:e0:8a:cb:c5:19
Sending on LPF/c-veth/fa:e0:8a:cb:c5:19
Sending on Socket/fallback
DHCPDISCOVER on c-veth to 255.255.255.255 port 67 interval 3 (xid=0x47349475)
DHCPDISCOVER on c-veth to 255.255.255.255 port 67 interval 6 (xid=0x47349475)
DHCPOFFER of 192.0.2.131 from 192.0.2.254
DHCPREQUEST for 192.0.2.131 on c-veth to 255.255.255.255 port 67 (xid=0x75943447)
DHCPACK of 192.0.2.131 from 192.0.2.254 (xid=0x47349475)
bound to 192.0.2.131 -- renewal in 1695 seconds.
</pre>