Traffic Control

sniffer for linux

"tcpdump", "ethereal", "tethereal", "tshark", tcpflow, Wireshark

How to Install tcpdump in Linux

How to Install tcpdump in Linux

Many of Linux distributions already shipped with tcpdump tool, if in case you don’t have it on systems, you can install it using following Yum command.

# yum install tcpdump

Once tcpdump tool is installed on systems, you can continue to browse following commands with their examples.

1. Capture Packets from Specific Interface

The command screen will scroll up until you interrupt and when we execute tcpdump command it will captures from all the interfaces, however with -i switch only capture from desire interface.

# tcpdump -i eth0
Register to read more...

Traffic Control Journey

8. A Traffic Control Journey: Real World Scenarios

Having read the previous sections and familiarizing yourself with traffic control concepts and the tools available under GNU/Linux to deploy QoS, you should be ready to rock. Now, let us examine some real world scenarios and effective resolutions.

Below I overview two popular scenarios, guaranteeing a specific rate and guaranteeing flow priority. The first involves a basic Web server, the second a consumer broadband Internet connection. First, let us examine a few strategies to deal with situations that exist in many environments that may wish to employ traffic control.

Register to read more...

Jim diGriz's QoS

#!/bin/bash
#
# Jim diGriz's QoS Scheduler for an Ethernet Bridge
# <alex@digriz.junk-this.org.uk> [remove 'junk-this' to mail me]
# GPL V2 blar blar blar
# Version: 030706 (aka 6th July 2003)
#
# Dependencies
# 1) HTB3 patch (if <2.4.18) and 'tc' patch
# 2) RED (in kernel 2.4.x)
# 3) iptables (in kernel 2.4.x)
# 4) ESFQ patch (http://www.ssi.bg/~alex/esfq/index.html) and 'tc' patch
#
# N.B.
# shaping only works for OUTGOING packets simply so think which interface to us
#
# Changelog
# [03/04/28] - Started with wondershaper-1.1a script (http://lartc.org/)
# [03/04/28] - migrated using SFQ to ESFQ (for src ip hashing)
# [03/04/29] - added some RED usage (downloading tcp traffic)
#            - fix '$[9*$UPLINK/10]kbit' for 1:20 to '$[8*$UPLINK/10]kbit'
#            - migration to use iptables MANGLE rather than using 'tc filter'
# by using the ADSL-Bandwidth-Management-HOWTO for reference
#      - migration to not use ingress
# [03/07/06] - tweaked values, convinced myself that 15% bandwidth was lost
# due to header overhead and trimmed a further 5% to clear
# buffers.  Tweaked the download link, as ESFQ was set to 'src'
# instead of 'dst' and made RED use the $(DW/IP)IFLIMIT values.
# result in non-fluctuating ping and RED is now working.
# Also added support to exclude 'local' traffic.  Fixed various
# bugs where traffic was not going to their correct queues.
# Note that if you have no 'private' addresses (I have linux
# running as a ethernet brdige and so its on a private IP) you
# can leave the LOCAL_TRAFFIC section alone

# TODO:
# 1) more iptable mangle rules
# 2) tweak iptables rules
# 3) add support for IPMasq
# 4) support to ignore LOCAL_TRAFFIC if need be
Register to read more...

router shaping script

##############################################
#       router shaping script written by Phill Brown
# requires in the following order.
# an interface, ie eth0, wifi0
# a maximum speed in kilobits, for maximum effeciency, it is
# suggested that the speed is at least 5-10% lower than real
# life speeds
# and finally a unique id, for shaping purposes.  i might
# remove this necessity one day, but for now, it is required
##############################################

Register to read more...