The qemu in my FreeBSD virtualizes a 2003 value and has always been a NAT method (default). The problem is that I cannot communicate with other machines on the Intranet, therefore, many tests cannot be performed. After checking the information, we found that Bridge can be used. The specific practices are as follows:
1. Add the following lines in/boot/loader. conf to start the machine to automatically load aio, kqemu, if_tap, if_bridge, and bridge modules (if the module is not supported, re-compile the kernel ):
Aio_load = "YES"
Kqemu_load = "YES"
Bridge_load = "YES"
If_tap_load = "YES"
If_bridge_load = "YES"
2. Run the sysctl variable and add the following line to/etc/sysctl. conf.
Net. link. tap. user_open = 1
3. Bridge and kqemu, and add the following lines to/etc/rc. conf:
Kqemu_enable = "YES"
Cloned_interfaces = "bridge0"
Ifconfig_bridge0 = "addm fxp0"
My physical network port is fxp0.
4. Add the-net nic-net tap parameter at startup. Otherwise, the NAT mode is used by default instead of bridging:
/Usr/local/bin/qemu-net nic-net tap-hda/usr/local/qemu/windows. img-cdrom/root/8029.iso-boot c-m 512-localtime