LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Subscribe to Linux Subscribe to Newsletters

NISTNet: Emulating Networks on Your Own LAN
Pages: 1, 2, 3

Let's try another test. Let's this time try having NISTNet emulate a circuit with 25% datagram loss. To do this we edit our rule, entering 0 into the delay field, entering 25 into the "Drop %" field and again hitting "Update". When we run our ping test it now looks like:



ping -c 10 -i 2 -s 1460 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 1460 data bytes
1468 bytes from 192.168.2.1: icmp_seq=0 ttl=254 time=1014.3 ms
1468 bytes from 192.168.2.1: icmp_seq=2 ttl=254 time=1011.1 ms
1468 bytes from 192.168.2.1: icmp_seq=3 ttl=254 time=1004.4 ms
1468 bytes from 192.168.2.1: icmp_seq=4 ttl=254 time=1027.4 ms
1468 bytes from 192.168.2.1: icmp_seq=6 ttl=254 time=1033.9 ms
1468 bytes from 192.168.2.1: icmp_seq=7 ttl=254 time=1056.5 ms
1468 bytes from 192.168.2.1: icmp_seq=9 ttl=254 time=1043.5 ms

--- 192.168.2.1 ping statistics ---
10 packets transmitted, 7 packets received, 30% packet loss
round-trip min/avg/max = 1004.4/1027.3/1056.5 ms

Ten datagrams is too short a test to expect very accurate results for this sort of test, but it's clear that again NISTNet has done what we've asked of it.

Finally, let's change our test such that rather than dropping 25% of datagrams, we duplicate them. To do this we zero the drop field, and enter 25 into the "Dup %" field instead, hitting the "Update" button once more to activate the change. Our ping test now looks like:

ping -c 10 -i 2 -s 1460 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 1460 data bytes
1468 bytes from 192.168.2.1: icmp_seq=0 ttl=254 time=1097.0 ms
1468 bytes from 192.168.2.1: icmp_seq=0 ttl=254 time=1698.0 ms (DUP!)
1468 bytes from 192.168.2.1: icmp_seq=0 ttl=254 time=1893.2 ms (DUP!)
1468 bytes from 192.168.2.1: icmp_seq=1 ttl=254 time=1013.8 ms
1468 bytes from 192.168.2.1: icmp_seq=2 ttl=254 time=1137.5 ms
1468 bytes from 192.168.2.1: icmp_seq=3 ttl=254 time=1080.7 ms
1468 bytes from 192.168.2.1: icmp_seq=4 ttl=254 time=993.6 ms
1468 bytes from 192.168.2.1: icmp_seq=5 ttl=254 time=993.7 ms
1468 bytes from 192.168.2.1: icmp_seq=6 ttl=254 time=1219.9 ms
1468 bytes from 192.168.2.1: icmp_seq=6 ttl=254 time=1770.3 ms (DUP!)
1468 bytes from 192.168.2.1: icmp_seq=6 ttl=254 time=1828.0 ms (DUP!)
1468 bytes from 192.168.2.1: icmp_seq=7 ttl=254 time=1266.5 ms
1468 bytes from 192.168.2.1: icmp_seq=7 ttl=254 time=1514.3 ms (DUP!)
1468 bytes from 192.168.2.1: icmp_seq=8 ttl=254 time=1041.2 ms
1468 bytes from 192.168.2.1: icmp_seq=9 ttl=254 time=1065.5 ms

--- 192.168.2.1 ping statistics ---
10 packets transmitted, 10 packets received, +5 duplicates, 0% packet loss
round-trip min/avg/max = 993.6/1307.5/1893.2 ms

Magic stuff!

Linux Network Administrator's Guide, 2nd EditionLinux Network Administrator's Guide, 2nd Edition
By Olaf Kirch & Terry Dawson
2nd Edition June 2000
1-56592-400-2, Order Number: 4002
503 pages, $39.95

You can design tests that combine all of these together, and of course we've only looked at the simplest of capabilities. NISTNet has a whole suite of much more sophisticated things it can do with datagrams.

One final thing to look at are the statistics that are collected in real time. Start a ping test and scroll the right-hand panel across to the right-most fields. You will see running tallies of packet sizes, bytes transmitted, average bandwidth, and others. These are useful for keeping an eye on progress of the tests.

If you're in a situation where you need to quickly test how a network application or protocol will perform under realistically poor conditions, then NISTNet provides an excellent solution. Mark has gone to a lot of work to ensure that the emulation is as accurate and useful as possible, and I'm sure you'll agree that it truly is one of those tools that you know will come in handy one day; keep it around.

Terry Dawson is the author of a number of network-related HOWTO documents for the Linux Documentation Project, a co-author of the 2nd edition of O'Reilly's Linux Network Administrators Guide, and is an active participant in a number of other Linux projects.


Read more Linux Network Administration columns.

Discuss this article in the O'Reilly Network Linux Forum.

Return to the Linux DevCenter.

 




Tagged Articles

Post to del.icio.us

This article has been tagged:

linux

Articles that share the tag linux:

Managing Disk Space with LVM (74 tags)

Use Your Digital Camera with Linux (60 tags)

mdadm: A New Tool For Linux Software RAID Management (59 tags)

Asterisk: A Bare-Bones VoIP Example (43 tags)

View All

networking

Articles that share the tag networking:

Untwisting Python Network Programming (47 tags)

Wireless Mesh Networking (36 tags)

Inside Samba: Windows Sharing for the Mac (29 tags)

Demystifying LDAP (11 tags)

Visualizing Network Traffic with Netflow and FlowScan (10 tags)

View All

network

Articles that share the tag network:

Untwisting Python Network Programming (67 tags)

Wireless Mesh Networking (52 tags)

Building a Desktop Firewall (24 tags)

VPN on Mac OS X (19 tags)

Demystifying LDAP (19 tags)

View All

nistnet

Articles that share the tag nistnet:

NISTNet: Emulating Networks on Your Own LAN (3 tags)

View All

sysadmin

Articles that share the tag sysadmin:

Building a FreeBSD Build System (30 tags)

Best Windows Admin Downloads (30 tags)

Managing Disk Space with LVM (26 tags)

The Ultimate Free Windows Toolkit (21 tags)

Six Things First-Time Squid Administrators Should Know (20 tags)

View All

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com