Hi.<br>I am new to this group and I have requirement were the ip addresses are auto configured through dhcp and no config file changes.<br><br>I short, the following are the steps I tried with no fruitful results.<br>// create a bridge and associate a dnsmasq instance<br>
sudo brctl addbr mgmtbr0<br>sudo ip addr add <a href="http://10.0.4.1/24">10.0.4.1/24</a> dev mgmtbr0<br>sudo ifconfig mgmtbr0 up<br>sudo dnsmasq --strict-order --bind-interfaces --pid-file=<some-dir>/dnsmasq.pid --conf-file= --listen-address 10.0.4.1 --except-interface=lo --dhcp-range 10.0.4.2,10.0.4.254 --dhcp-lease-max=253 --dhcp-no-override --interface=mgmtbr0 <br>
==<br>$ ifconfig mgmtbr0<br>mgmtbr0 Link encap:Ethernet HWaddr ee:97:b7:9c:ce:58 <br> inet addr:10.0.4.1 Bcast:0.0.0.0 Mask:255.255.255.0<br> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br> RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br> collisions:0 txqueuelen:0 <br> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)<br><br>// create a link and add to the bridge<br>$ sudo ip link add name test1 dynamic on type veth peer name test2 dynamic on<br>
$ sudo ifconfig test1 up<br>$ sudo ifconfig test2 up<br>$ sudo brctl addif mgmtbr0 test1<br>$ ifconfig test1<br>test1 Link encap:Ethernet HWaddr 26:10:69:f6:78:8f <br> UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1<br>
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br> TX packets:1 errors:0 dropped:0 overruns:0 carrier:0<br> collisions:0 txqueuelen:1000 <br> RX bytes:0 (0.0 B) TX bytes:46 (46.0 B)<br>
<br>===<br>I was expecting ip address assignment for the interface.<br>I also tried "$ sudo dhclient -v test1 ", but could not.<br><br>==<br>I was wondering how virbr0 and lxcbr0 host instances get their ip, but could not.<br>
<br>Kindly help me to understand.<br>Thanks a lot,<br>vy <br><br>