I am kinda new to doing traffic control using Linux tc commands. So i am doing some hands-on on introducing network delay, packet loss and corruption etc across two hosts in the same network. The below commands were used to corrupt all traffic from port 20786 in Host A to port 202 in Host machine B.
sudo tc qdisc add dev eth0 root handle 1: prio priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sudo tc qdisc add dev eth0 parent 1:2 handle 20: netem corrupt 30%
sudo tc filter add dev eth0 parent 1:0 protocol ip u32 match ip sport 20786 0xffff flowid 1:2
sudo tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dport 202 0xffff flowid 1:2
How do i make sure the packets will be corrupted? I am asking this because won't there be TCP error control which make sure that the packets don't get corrupted?