Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QEMU, Multiple NICs
1. In dts/xen.dts, change status = "disabled"; to status = "okay"; for each Ethernet controller you want to use in the QEMU target.
2. Rebuild /tftpboot/xen.dtb from dts/xen.dts using make install-xen-dtb or dtc.
3. For each NIC you want to use, including the first one, add "-net nic,vlan=0 -net user,vlan=0" options to the QEMU invocation.
4. From dom0, issue 'udhcpc -i ethN' for each NIC other than eth0 that you want the QEMU DHCP server to assign an address to.
   *Note that using vlan=0 for each configuration pair means that all NICs will be on the same virtual network, and the DHCP server will assign a unique IP address. If you assign each NIC to its own vlan (by using unique vlan IDs for each configuration pair), then the DHCP server will assign the same IP address ( by default) to each NIC.

From the qemu monitor (normally entered by ctl-a c from serial0)  info network will show how the NICs are configured. With the first two Ethernet controllers enabled and put on the same vlan, info network returns:
hub 0

 \ user.1: index=0,type=user,net=,restrict=off
 \ ps7-ethernet@0xFF0C0000: index=0,type=nic,
 \ user.0: index=0,type=user,net=,restrict=off
 \ ps7-ethernet@0xFF0B0000: index=0,type=nic,
ps7-ethernet@0xFF0D0000: index=0,type=nic,
ps7-ethernet@0xFF0E0000: index=0,type=nic,

Forum Jump:

Users browsing this thread: 1 Guest(s)