Delay, Jitter, Packet loss.

This commit is contained in:
Miguel Scapolla 2016-05-06 23:17:19 -03:00
parent 9608255574
commit 1d5d7bde5a
2 changed files with 21 additions and 8 deletions

View File

@ -0,0 +1,13 @@
#
# Add output delay, jitter and packet loss.
#
# +-- delay +-- lost percent
# +-- interface | +-- jitter | +-- burst
# v v v v v
tc qdisc add dev eth1 root netem delay 10ms 1ms distribution normal loss 4% 10%
# Change.
tc qdisc change dev eth1 root netem delay 10ms 1ms distribution normal loss 4% 10%
# Delete.
tc qdisc del dev eth1 root netem

View File

@ -8,7 +8,7 @@
VBoxManage list hostinfo VBoxManage list hostinfo
VBoxManage list bridgedifs VBoxManage list bridgedifs
VBoxManage list ostypes VBoxManage list ostypes
# Create a vm. # Create a vm.
VBoxManage createvm -name VMNAME VBoxManage createvm -name VMNAME
@ -56,15 +56,15 @@
--cableconnected5 on --cableconnected6 on --cableconnected7 on --cableconnected8 on \ --cableconnected5 on --cableconnected6 on --cableconnected7 on --cableconnected8 on \
--macaddress1 00001D3C5F00 --macaddress2 00001D3C5F01 --macaddress3 00001D3C5F02 --macaddress4 00001D3C5F03 \ --macaddress1 00001D3C5F00 --macaddress2 00001D3C5F01 --macaddress3 00001D3C5F02 --macaddress4 00001D3C5F03 \
--macaddress5 00001D3C5F04 --macaddress6 00001D3C5F05 --macaddress7 00001D3C5F06 --macaddress8 00001D3C5F07 \ --macaddress5 00001D3C5F04 --macaddress6 00001D3C5F05 --macaddress7 00001D3C5F06 --macaddress8 00001D3C5F07 \
# NIC with NAT. # NIC with NAT.
VBoxManage modifyvm VMNAME --nic1 nat VBoxManage modifyvm VMNAME --nic1 nat
# NIC host only. # NIC host only.
VBoxManage modifyvm VMNAME --nic1 hostonly --hostonlyadapter1 vboxnet0 VBoxManage modifyvm VMNAME --nic1 hostonly --hostonlyadapter1 vboxnet0
# NIC with udp tunnel. # NIC with udp tunnel.
VBoxManage modifyvm VMNAME --nic1 generic --nicgenericdrv1 UDPTunnel --nicproperty1 dest=127.0.0.1 --nicproperty1 dport=9000 --nicproperty1 sport=9001 VBoxManage modifyvm VMNAME --nic1 generic --nicgenericdrv1 UDPTunnel --nicproperty1 dest=127.0.0.1 --nicproperty1 dport=9000 --nicproperty1 sport=9001
# NIC bridged with real host interface. # NIC bridged with real host interface.
VBoxManage modifyvm VMNAME --nic1 bridged --bridgeadapter1 eth1 VBoxManage modifyvm VMNAME --nic1 bridged --bridgeadapter1 eth1
@ -74,7 +74,7 @@
# VM serial port to host tcp server socket. # VM serial port to host tcp server socket.
VBoxManage modifyvm VMNAME --uart1 0x3f8 4 --uartmode1 tcpserver 2000 VBoxManage modifyvm VMNAME --uart1 0x3f8 4 --uartmode1 tcpserver 2000
# See the vm configuration. # See the vm configuration.
VBoxManage showvminfo VMNAME VBoxManage showvminfo VMNAME
@ -86,7 +86,7 @@
# Create a hdd disk. # Create a hdd disk.
VBoxManage createmedium disk --filename hdddisk.vdi --size 2048 --format VDI --variant Standard VBoxManage createmedium disk --filename hdddisk.vdi --size 2048 --format VDI --variant Standard
# Add hdd to vm. # Add hdd to vm.
VBoxManage storageattach VMNAME --storagectl sata --port 0 --type hdd --mtype normal --medium FILENAME.vdi VBoxManage storageattach VMNAME --storagectl sata --port 0 --type hdd --mtype normal --medium FILENAME.vdi
@ -115,7 +115,7 @@
# Compact a hdd. # Compact a hdd.
VBoxManage modifymedium FILENAME.vdi --compact VBoxManage modifymedium FILENAME.vdi --compact
#----- Serial port to host pipe ----- #----- Serial port to host pipe -----
# Install socat: # Install socat: