Changeset 613c341 in rtems-libbsd for libbsd.txt
- Timestamp:
- 10/01/15 06:03:19 (8 years ago)
- Branches:
- 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
- Children:
- e78b3dc
- Parents:
- 556a07c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libbsd.txt
r556a07c r613c341 324 324 mDNS resolver instance. See also rtems_mdns_sethostname() and 325 325 rtems_mdns_gethostname(). 326 327 == Qemu 328 329 Use the following script to set up a virtual network with three tap devices 330 connected via one bridge device. 331 332 ------------------------------------------------------------------------------- 333 #!/bin/sh -x 334 335 user=`whoami` 336 interfaces=(1 2 3) 337 338 tap=qtap 339 bri=qbri 340 341 case $1 in 342 up) 343 sudo -i brctl addbr $bri 344 for i in ${interfaces[@]} ; do 345 sudo -i tunctl -t $tap$i -u $user ; 346 sudo -i ifconfig $tap$i up ; 347 sudo -i brctl addif $bri $tap$i ; 348 done 349 sudo -i ifconfig $bri up 350 ;; 351 down) 352 for i in ${interfaces[@]} ; do 353 sudo -i ifconfig $tap$i down ; 354 sudo -i tunctl -d $tap$i ; 355 done 356 sudo -i ifconfig $bri down 357 sudo -i brctl delbr $bri 358 ;; 359 esac 360 ------------------------------------------------------------------------------- 361 362 Connect your Qemu instance to one of the tap devices, e.g. 363 364 ------------------------------------------------------------------------------- 365 qemu-system-i386 -m 512 -boot a -cpu pentium3 \ 366 -drive file=$HOME/qemu/pc386_fda,index=0,if=floppy,format=raw \ 367 -drive file=fat:$HOME/qemu/hd,format=raw \ 368 -net nic,model=e1000,macaddr=0e:b0:ba:5e:ba:11 \ 369 -net tap,ifname=qtap1,script=no,downscript=no \ 370 -nodefaults -nographic -serial stdio 371 ------------------------------------------------------------------------------- 372 373 Make sure that each Qemu instance uses its own MAC address to avoid an address 374 conflict (or otherwise use it as a test). 326 375 327 376 == Issues and TODO
Note: See TracChangeset
for help on using the changeset viewer.