Technical Configuration Example - op-pingsweep

Technical Configuration Example
Feature Automation Script—op-pingsweep.slax
Automatically ping sweep a remote host to easily identify transmission size issues.
Juniper Networks, Inc.
1194 North Mathilda Avenue
Sunnyvale, CA 94089
USA
408-745-2000
www.juniper.net
This product includes the Envoy SNMP Engine, developed by Epilogue Technology, an Integrated Systems Company. Copyright © 1986–1997, Epilogue Technology
Corporation. All rights reserved. This program and its documentation were developed at private expense, and no part of them is in the public domain.
This product includes memory allocation software developed by Mark Moraes, copyright © 1988, 1989, 1993, University of Toronto.
This product includes FreeBSD software developed by the University of California, Berkeley, and its contributors. All of the documentation and software included in
the 4.4BSD and 4.4BSD-Lite Releases is copyrighted by The Regents of the University of California. Copyright © 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992,
1993, 1994. The Regents of the University of California. All rights reserved.
GateD software copyright © 1995, The Regents of the University. All rights reserved. Gate Daemon was originated and developed through release 3.0 by Cornell
University and its collaborators. Gated is based on Kirton’s EGP, UC Berkeley’s routing daemon (routed), and DCN’s HELLO routing protocol. Development of Gated
has been supported in part by the National Science Foundation. Portions of the GateD software copyright © 1988, Regents of the University of California. All rights
reserved. Portions of the GateD software copyright © 1991, D. L. S. Associates.
Juniper Networks, the Juniper Networks logo, NetScreen, and ScreenOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries.
JUNOS and JUNOSe are trademarks of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or registered service marks are the property
of their respective owners.
Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise
this publication without notice.
Products made or sold by Juniper Networks or components thereof might be covered by one or more of the following patents that are owned by or licensed to Juniper
Networks: U.S. Patent Nos. 5,473,599, 5,905,725, 5,909,440, 6,192,051, 6,333,650, 6,359,479, 6,406,312, 6,429,706, 6,459,579, 6,493,347, 6,538,518, 6,538,899,
6,552,918, 6,567,902, 6,578,186, and 6,590,785.
Copyright © 2009, Juniper Networks, Inc.
All rights reserved. Printed in USA.
„
ii
:
Table of Contents
op-pingsweep.slax
1
Description................................................................................................................... 1
System Requirements .................................................................................................. 1
What it Does ................................................................................................................ 1
Set Up .......................................................................................................................... 1
How to Run .................................................................................................................. 2
„
iii
op-pingsweep.slax
Description
Automatically send a series of pings to the remote host. Subsequent pings send packets of
increasing size so that transmission size issues are detected.
System Requirements
All platforms; JUNOS Software 8.5 and above.
What it Does
This script sends a series of pings to a remote host, starting with a packet size of $min-size.
The size of the packet is increased with each ping by specified $step increments until it
reaches $max-size. The results are useful for troubleshooting issues related to maximum
transmission unit (MTU) or maximum segment size (MSS).
Set Up
1.
Copy the op-pingsweep.slax script to the /var/db/scripts/op directory on the router.
2.
Enable the script by adding the file statement and script filename to the [edit system
scripts op] hierarchy level in the configuration. Only superusers can enable scripts in
the configuration.
[edit system scripts op]
user@host# set file op-pingsweep.slax
3.
Commit the configuration:
[edit]
user@host# commit and-quit
Description
„
1
: op-pingsweep.slax
How to Run
1.
To run this script, issue the command op op-pingsweep from the CLI operational
mode:
user@host> op op-pingsweep remote-host <hostname>
NOTE: Note: The argument remote-host is mandatory. Optional arguments are min-size,
max-size, and step. The default values for the optional arguments are:
2.
„
min-size = 1400
„
max-size = 1600
„
step = 100
The output will appear similar to this:
user@host> op pingsweep remote-host <hostname> min-size 1400 max-size 1600
step 100
Executing command: ping <hostname> size 1400 count 1 do-not-fragment
Ping Success!!!
Executing command: ping <hostname> size 1500 count 1 do-not-fragment
Ping Failed!!!
Executing command: ping <hostname> size 1600 count 1 do-not-fragment
Ping Failed!!!
3.
To see a list of all arguments for the script, type “?” after the command op
op-pingsweep:
user@host> op op-pingsweep ?
Possible completions:
<[Enter]>
Execute this command
<name>
Argument name
detail
Display detailed output
max-size
Maximum packet size
min-size
Minimum packet size
remote-host
Host name or ip-address to ping
step
Packet size difference
How to Run
„
2