2
Management
25
Troubleshooting with ICMP ping
For
troubleshooting
communication
problems
with
external
devices,
one
of
the
most
useful
tools
is
the
CLI
ping
command.
This
command
sends
an
ICMP
ping
message
to
an
external
IPv4
address
and
reports
if
the
device
replies.
For
example,
to
send
an
ICMP
ping
message
to
the
IPv4
address
10.4.0.2
,
the
CLI
command
would
be:
Device:/>
ping
10.4.0.2
The
sending
interface
is
not
specified
because
the
SEG
derives
it
by
looking
up
the
destination
IP
in
the
relevant
routing
table.
By
default,
the
routing
table
used
is
main
but
can
be
specified
in
the
command
using
the
‐
pbr=
<table>
option.
Note:
The
ping
command
cannot
send
ICMP
messages
to
IPv6
addresses
in
the
current
SEG
version.
The
ping
command
options
enable
the
ICMP
message
to
be
modified.
For
example,
to
send
a
UDP
ping
message,
the
above
command
becomes:
Device:/>
ping
10.4.0.2
‐
udp
If
the
ICMP
message
is
to
come
from
the
IPv4
address
192.168.0.5
,
the
command
would
be:
Device:/>
ping
10.4.0.2
‐
srcip=192.168.0.5
When
the
‐
srcip=
option
is
used,
the
source
IP
address
must
be
one
of
the
IP
addresses
configured
on
the
sending
interface.
When
ICMP
ping
messages
are
sent
by
external
devices
to
SEG
interfaces,
both
IPv4
and
IPv6
messages
will
be
responded
to.
CLI scripting
To
allow
the
administrator
to
easily
store
and
execute
sets
of
CLI
commands,
the
SEG
provides
a
feature
called
CLI
scripting.
A
CLI
script
is
a
predefined
sequence
of
CLI
commands
that
can
be
executed
after
they
are
saved
to
a
file
that
is
then
uploaded
to
the
SEG.
The
steps
for
creating
a
CLI
script
are
as
follows:
1. Create
a
text
file
with
a
text
editor
containing
a
sequential
list
of
CLI
commands,
one
per
line.
The
recommended
convention
is
for
these
files
to
use
the
file
extension
.sgs
(Security
Gateway
Script).
2. Upload
the
file
to
the
SEG
using
Secure
Copy
(SCP).
Script
files
must
be
stored
in
a
directory
under
the
root
called
/scripts
.
SCP
uploading
is
discussed
in
detail
in
Secure
copy
on
page
30
.
3. Use
the
CLI
command
script
‐
run
to
run
the
script
file.