Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- virbr1 Link encap:Ethernet HWaddr 52:54:00:82:3e:4e
- inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0
- UP BROADCAST MULTICAST MTU:1500 Metric:1
- RX packets:615 errors:0 dropped:0 overruns:0 frame:0
- TX packets:355 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:47897 (47.8 KB) TX bytes:34634 (34.6 KB)
- virbr2 Link encap:Ethernet HWaddr 52:54:00:4f:a0:f3
- inet addr:192.168.101.1 Bcast:192.168.101.255 Mask:255.255.255.0
- UP BROADCAST MULTICAST MTU:1500 Metric:1
- RX packets:129 errors:0 dropped:0 overruns:0 frame:0
- TX packets:133 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:11775 (11.7 KB) TX bytes:12674 (12.6 KB)
- liunx@liunx-G41MT-S2PT:~/Work/DocBook/work/code-farmer-note/examples/chapter8$ cat router.sh
- #!/bin/bash -
- set -o nounset
- # Treat unset variables as an error
- /usr/local/bin/qemu-system-i386
- -m 64M
- -kernel images/bzImage
- -hda images/rootfs.ext2
- -append "root=/dev/sda console=ttyS0"
- -enable-kvm
- -daemonize
- -vnc :51
- -net nic,vlan=0,model=e1000,macaddr=52:54:00:12:34:01
- -net tap,vlan=0,ifname=router1,script=router1-ifup,downscript=router1-ifdown
- -net nic,vlan=1,model=e1000,macaddr=52:54:00:12:34:02
- -net tap,vlan=1,ifname=router2,script=router2-ifup,downscript=router2-ifdown
- -net nic,vlan=2,model=e1000,macaddr=52:54:00:12:34:11
- -net vde,vlan=2,sock=/tmp/lan1.ctl[]
- -net nic,vlan=3,model=e1000,macaddr=52:54:00:12:34:12
- -net vde,vlan=3,sock=/tmp/lan2.ctl[]
- -net nic,vlan=4,model=e1000,macaddr=52:54:00:12:34:13
- -net vde,vlan=4,sock=/tmp/lan3.ctl[]
- -net nic,vlan=5,model=e1000,macaddr=52:54:00:12:34:14
- -net vde,vlan=5,sock=/tmp/lan4.ctl[]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement