Linux – How to limit outgoing traffic per IP Address using Linux TC

linuxnetworkingtc

I want to limit outgoing traffic per IP address. For example I have a network interface eth0, having 1Gbps of bandwidth.

I want to limit the whole network interface to 1Mbps each destination IP Address.

For example 1Mbps for 192.168.1.1 and 1Mbps for 192.168.1.2

Currently I am using wondershaper using this command:

wondershaper eth0 1024[outbound traffic] 1024000[inbound traffic]

But this is limiting the whole network interface and there won't be seperated traffic for each IP address.

Best Answer