230 likes | 341 Views
Bandwidth Test Controller (BWCTL). Speaker: Shin-Fu Huang Date: 2009/10/08. Outline. Architecture of BWCTL Building BWCTL Applications of BWCTL BWCTLD(bwctld.conf, bwctld.limits, bwctld.keys) BWCTL Reference. Architecture of BWCTL.
E N D
Bandwidth Test Controller (BWCTL) Speaker: Shin-Fu Huang Date: 2009/10/08
Outline • Architecture of BWCTL • Building BWCTL • Applications of BWCTL • BWCTLD(bwctld.conf, bwctld.limits, bwctld.keys) • BWCTL • Reference
Architecture of BWCTL Source : http://www.internet2.edu/pubs/bwctl-cookbook.pdf
Architecture of BWCTL(Cont.) Source : http://www.internet2.edu/pubs/bwctl-cookbook.pdf
Building the Application • tar –zxvf bwctl-1.3.tar.gz • cd bwctl-1.3 • ./configure --prefix=/ami • --prefix is only needed if you don't like the default • (/usr/local on most systems) • make • make install
Applications of BWCTL • bwctl (Client) • bwctld (Deamon)
BWCTLD • bwctld.conf • Configuration file for the bwcltd daemon • bwctld.limits • Authentication(who) • Authorization(what) • bwctld.keys • Be used to hold the identity/AES keys pairs needed for bwctld to authenticate users
bwctld.conf • var_dir • Directory where bwctld.pid file is stored • user • Specifies the uid the bwctld process will run as • group • Specifies the gid the bwctld process will run as
bwctld.limits • allow_open_mode (on) • This limit is only useful if the class is assigned to a netmask. It is used to limit specific IP/netmask identities to only encrypted or authenticated mode transactions or to allow open mode. • allow_tcp(on) • Allow TCP Iperf tests for userclass. • allow_udp (off) • Allow UDP Iperf tests for userclass. • Security issue(UDP no congestion control)
bwctld.limits(Cont.) • bandwidth • Maximum amount of bandwidth to allow userclass to use in a UDP Iperf test. 0 indicates unlimited by policy, but remember this is checked all the way to the root of the hierarchy. • If you want an unlimited userclass, your root must be unlimited, and the whole path down to the given userclass.
bwctld.limits(Cont.) • Hierarchical Limitclasses root allow_udp=on ncnu allow_udp=off jail regular local
bwctld.limits(Cont.) • root: • limit root with \ bandwidth=900m, \ allow_udp=on, \ allow_tcp=on, \ allow_open_mode=off
bwctld.limits(Cont.) • default: • limit regular with parent=root, \ duration=30, \ allow_tcp=on, \ allow_udp=off, \ allow_open_mode=on
bwctld.limits(Cont.) • ncnu: • limit ncnu with parent=root, \ allow_open_mode=on, \ allow_udp=off, \ allow_tcp=on
bwctld.limits(Cont.) • Assign • assign default regular • net subnet • assign net 10.10.0.0/16 ncnu • assign net 2001:e10:6840::/48 ncnu • assign net 2001:288:c001::/48 ncnu • user user • Assign a specific user to a given userclass. The user must be defined in the bwctld.keys file. • assign user xinfu root
bwctld.keys • Username and AES Key Rules: • Usernames are limited to 16 characters • AES key is a 128 bit session key • AES key is not encrypted in the keys file, use UNIX permissions to protect it • Can use a pass phrase to generate the AES key • Use aespasswd to add pass phrase generated keys into the keys file • Client: application prompts user for pass phrase
bwctld.keys(Cont.) • aespasswd • To create a new key file use the ‘-n’ option • aespasswd -n -f bwctld.keys xinfu • Add User • aespasswd -f bwctld.keys ccc • Delete User • aespasswd -d -f bwctld.keys ccc
BWCTL(Cont.) • SYNOPSIS • bwctl [options] -c recvhost -s sendhost • From sendhost to recvhost • bwctl [options] -c recvhost • Send to recvhost • bwctl [options] -s sendhost • Receive from sendhost
BWCTL(Cont.) • Testing Authentication Options • Within a single authentication domain • bwctl -A AE AESKEY myname -s hostA -c hostB • Between different authentication domains • bwctl -s hostA AE AESKEY myname -c hostB AE AESKEY othername
BWCTL(Cont.) • OPTIONS • -u • UDP test. • -T tool (iperf) • Specify which throughput tester to use: iperf, thrulay, nuttcp • -b bandwidth (1Mb) • Limit UDP send rate to bandwidth (bits/sec).
BWCTL(Cont.) • -l len • length of read/write buffers (bytes). • -P nStreams (1) • Number of concurrent streams for the test. • -t time (10) • Duration of test (seconds).
BWCTL(Cont.) • Output Arguments • -f units • Specify the units for the tool to use when displaying the results. • Iperf: • k (Kilobits per second) • K (Kilobytes per second) • m (Megabits per second) • M (Megabytes per second)
Reference • Bandwidth Test Controller (BWCTL) • http://www.internet2.edu/performance/bwctl/