Advertisement
Spyros

Untitled

Jun 3rd, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.78 KB | None | 0 0
  1. IMAGE=/home/northpole/openwrt/trunk/bin/x86/openwrt-x86-generic-combined-jffs2-128k.img
  2.  
  3.  
  4. sudo killall -q qemu
  5. sudo killall -q wirefilter
  6. sudo killall -q vde_switch
  7.  
  8. vde_switch -d --hub --sock num1.ctl -f colourful.rc
  9. vde_switch -d --hub --sock num2.ctl -f colourful.rc
  10.  
  11. cp ${IMAGE} num1.image
  12. cp ${IMAGE} num2.image
  13.  
  14.  
  15.  qemu \
  16.     -no-acpi -m 32M \
  17.     -net vde,sock=num1.ctl,port=1 -net nic,macaddr=fe:fe:00:00:01:01 \
  18.     -net nic -net tap,ifname=tapwrt1,script=no \
  19.     num1.image&
  20.  
  21.  qemu \
  22.    -no-acpi -m 32M \
  23.    -net vde,sock=num2.ctl,port=2 -net nic,macaddr=fe:fe:00:00:02:01 \
  24.   -net nic -net tap,ifname=tapwrt2,script=no \
  25.  num2.image&
  26.  
  27. sudo ifconfig tapwrt1 inet 192.168.2.1 up
  28. sudo ifconfig tapwrt2 inet 192.168.3.1 up
  29.  
  30. wirefilter --daemon -v num1.ctl:num2.ctl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement