Beruflich Dokumente
Kultur Dokumente
R ussian Поиск
С А Й Т С ВД ВС Н А ЧА ЛО П О М О ЩЬ ПО ИС К ВО Й ТИ Р Е ГИ С ТР А ЦИ Я
Официальный форум СВД Встраиваемые Системы > International Forum > English Discussion (Мод ератор: Олег
Большаков) > QEMU network configuration in QNX
С ообщ е ний: 39
QEMU network configuration in QNX
(русск ая ве рсия)
QEMU hardware emulator provides broad range of networking capabilities. Large set of
emulated network controllers makes it possible (NE2000, Intel 82551, Intel 82557B, Intel
82559ER, Realtek RTL8139, Intel E1000 etc.), and allows networking in majority of guest
systems. It hard to find advanced OS, which doesn't support NE2000 or RTL8139. Flexible
network configurations and interactions between guest and host systems also play big
role. In this article we will discuss various network configurations for QEMU in QNX host.
Additional information you can also find in the Internet, and keep in mind that QNX6
networking subsystem is very similar to NetBSD.
DHCP server automatically assigns 10.0.2.15 to your interface when a DHCP request is
received from guest system. When the host system (QNX) is connected to the Internet,
the guest will be automatically be able to access the Internet too. No additional steps are
required.
forum.kpda.ru/index.php/topic,411.0.html 1/5
3/9/2011 QEMU network configuration in QNX
1. [QNX] Start virtual machine:
Код:
# qemu -net user -net nic -cdrom /home/qemu/img/archlinux-2009.08-netinstall-i686.iso
Код:
# dhcpcd eth0
# ifconfig
Код:
# ping -c2 10.0.2.2
# telnet 10.0.2.2
Код:
# qemu -net nic,macaddr=52:54:00:12:34:57 -net socket,listen=:8010 -cdrom /home/qemu/img/archlinux-2009.08-netinst
Код:
# qemu -net nic,vlan=2,macaddr=52:54:00:12:34:56 -net socket,vlan=2,connect=127.0.0.1:8010 -cdrom /home/qemu/img/a
Код:
# ifconfig eth0 10.0.2.101 netmask 255.255.255.0 up
Код:
# ifconfig eth0 10.0.2.102 netmask 255.255.255.0 up
forum.kpda.ru/index.php/topic,411.0.html 2/5
3/9/2011 QEMU network configuration in QNX
# ifconfig eth0 10.0.2.102 netmask 255.255.255.0 up
Код:
# ping -c 3 10.0.2.102
Код:
# ping -c 3 10.0.2.101
Using devnp-qtap.so driver for QNX6, applications are allowed to interact with a network
device using a simple file descriptor. Any data sent over the file descriptor will be received
on both sides. This means that applications running on the guest system will be able to
access and connect to applications running on the host system. If port forwarding is
allowed, guest applications can also access the Internet.
With the -net tap option QEMU will try to execute /etc/qemu-ifup script to configure TAP
device and /etc/qemu-ifdown script after closing the device. If /etc/qemu-ifup is not
found, program will be terminated. You can change default script names, or specify not to
run them. For example:
Код:
# qemu -net tap,script=no,downscript=no <...>
To avoid specifying these options every time, you can create empty /etc/qemu-ifup
script. Do not forget to set executable flag for file.
Код:
# mount -T io-pkt /lib/dll/devnp-qtap.so
# ifconfig tap0 10.0.0.1 netmask 255.255.255.0 up
Код:
# qemu -net nic -net tap,ifname=/dev/tap0 -cdrom /home/qemu/img/archlinux-2009.08-netinstall-i686.iso
Код:
# ifconfig eth0 10.0.0.2 netmask 255.255.255.0 up
# ifconfig
forum.kpda.ru/index.php/topic,411.0.html 3/5
3/9/2011 QEMU network configuration in QNX
Код:
# ping -c 2 10.0.0.1
# telnet 10.0.0.1
Код:
# ping -c 3 10.0.0.2
Код:
# mount -T io-pkt /lib/dll/devnp-qtap.so
# ifconfig tap0 10.0.0.1 netmask 255.255.255.0 up
# mount -T io-pkt /lib/dll/devnp-qtap.so
# ifconfig tap1 10.0.1.1 netmask 255.255.255.0 up
Код:
# qemu -net tap,ifname=/dev/tap0 -net nic,macaddr=80:00:00:12:34:57 -cdrom /home/qemu/img/archlinux-2009.08-netins
Код:
# qemu -net tap,ifname=/dev/tap1 -net nic,macaddr=80:00:00:12:34:56 -cdrom /home/qemu/img/archlinux-2009.08-netins
Код:
# ifconfig bridge0 create
# brconfig bridge0 add tap0 add tap1 up
Код:
# ifconfig eth0 10.0.0.2 netmask 255.255.0.0 up
forum.kpda.ru/index.php/topic,411.0.html 4/5
3/9/2011 QEMU network configuration in QNX
6. [ARCH2] Configuring network in guest system 2:
Код:
# ifconfig eth0 10.0.1.2 netmask 255.255.0.0 up
7. Test network using ping. In all cases you should be able to ping/access any system no
matter what system you operate on.
В после дний раз google посе щ ал эту страницу 07 Марта, 2011, 01:23:15
forum.kpda.ru/index.php/topic,411.0.html 5/5