Re: IP Options and ICMP Messages

C. Philip Wood (cpw%sneezy@LANL.GOV)
Wed, 23 Mar 88 14:41:36 MST

To all those who picked up the network exercising stuff from

I gave you a bum [ls] Due to my lack of understanding how
BSD4.3 handles the loose/strict source route option on output, the lsrr
and ssrr scripts are in error. It is not intuitive that BSD UNIX will
strip off the first address in the option to use as a destination,
ignoring the destination requested via an open system call. I have another
script 'sr' which takes the above into account. For example:

        sr loose

ships an icmp echo packet to the lanl gateway via gateways and What the heck, here's the script (BTW, the ping is a modified
Muuse ping):
#! /bin/sh
# Los Alamos National Laboratory
# Copyright, 1988. The Regents of the University of California. This software
# was produced under a U.S. Government contract (W-7405-ENG-36) by Los Alamos
# National Laboratory, which is operated by the University of
# California for the U.S. Department of Energy. The U.S. Government is
# licensed to use, reproduce, and distribute this software. Permission is
# granted to the public to copy and use this software without charge, provided
# that this Notice and any statement of authorship are reproduced on all
# copies. Neither the Government nor the University makes any warranty,
# express or implied, or assumes any liability or responsibility for the use
# of this software.
# ICMP ECHO with IP Loose/Strict Source and Record Route
# "@(#) 1.1 (LANL) 3/23/88"
Usage: sr {loose,strict} destination(1), destination(2) ... destination(n)
if [ $# -lt 3 ] ; then
        echo "$Usage"
        exit 1
if [ $1 = loose ]; then
elif [ $1 = strict ]; then
        echo "$Usage"
        exit 1
SRLEN=`expr 3 + \( $# \* 4 \)`
GW1=$1 # it dont matter what host you "open a connection to"
for i
list="$list -o d$i"

        -o d${NOP} \
        -o d${SR} \
        -o d${SRLEN}.${SRPOINTER} \
        $list \
        $GW1 12 1

This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:41:31 GMT