Management – IP System

ping

Use the ping EXEC mode command to send ICMP echo request packets to another node on the network.

Syntax

ping [ip] {ipv4-address | hostname} [size packet_size] [count packet_count]

[timeout time_out] [source source-address]

ping ipv6 {ipv6-address | hostname} [size packet_size] [count packet_count] [timeout time_out] [source source-address]

Parameters

  • ip—Use IPv4 to check the network connectivity.
  • ipv6—Use IPv6 to check the network connectivity.
  • ipv4-address—IPv4 address to ping.
  • ipv6-address—Unicast or Multicast IPv6 address to ping. When the IPv6 address is a Link Local address (IPv6Z address), the outgoing interface name must be specified.
  • hostname—Hostname to ping (Length: 1-158 characters. Maximum label size for each part of the host name: 58.)
  • size packet_size—Number of bytes in the packet not including the VLAN tag. The default is 64 bytes. (IPv4:64–1518, IPv6: 68–1518)
  • count packet_count—Number of packets to send, from 1 to 65535 packets. The default is 4 packets. If 0 is entered, it pings until stopped (0–65535).
  • time time-out—Timeout in milliseconds to wait for each reply, from 50 to 65535 milliseconds. The default is 2000 milliseconds (50–65535).
  • source source-address—Source address (Unicast IPv4 address or global Unicast IPv6 address).

Default Usage

N/A

Command Mode

Privileged EXEC mode

User Guidelines

Press Esc to stop pinging. Following are sample results of the ping command:

  • Destination does not respond—If the host does not respond, a “no answer from host” appears within 10 seconds.
  • Destination unreachable—The gateway for this destination indicates that the destination is unreachable.
  • Network or host unreachable—The switch found no corresponding entry in the route table.

When using the ping ipv6 command to check network connectivity of a directly attached host using its link local address, the egress interface may be specified in the IPv6Z format. If the egress interface is not specified, the default interface is selected.

When using the ping ipv6 command with a Multicast address, the information displayed is taken from all received echo responses.

When the source keyword is configured and the source address is not an address of the switch, the command is halted with an error message and pings are not sent.

Examples

Example 1 – Ping an IP address.

switchxxxxxx> ping ip 10.1.1.1
 
Pinging 10.1.1.1 with 64 bytes of data:
 
64 bytes from 10.1.1.1: icmp_seq=0. time=11 ms
 
64 bytes from 10.1.1.1: icmp_seq=1. time=8 ms
 
64 bytes from 10.1.1.1: icmp_seq=2. time=8 ms
 
64 bytes from 10.1.1.1: icmp_seq=3. time=7 ms
 
----10.1.1.1 PING Statistics----
 
4 packets transmitted, 4 packets received, 0% packet loss
 
round-trip (ms) min/avg/max = 7/8/11

Example 2 – Ping a site.

switchxxxxxx> ping ip yahoo.com
 
Pinging yahoo.com [66.218.71.198] with 64 bytes of data:
 
64 bytes from 66.218.71.198: icmp_seq=0. time=11 ms
 
64 bytes from 66.218.71.198: icmp_seq=1. time=8 ms
 
64 bytes from 66.218.71.198: icmp_seq=2. time=8 ms
 
64 bytes from 66.218.71.198: icmp_seq=3. time=7 ms
 
----10.1.1.1 PING Statistics----
 
4 packets transmitted, 4 packets received, 0% packet loss round-trip (ms) min/avg/max = 7/8/11

Example 3 – Ping an IPv6 address.

switchxxxxxx> ping ipv6 3003::11
 
Pinging 3003::11 with 64 bytes of data:
 
64 bytes from 3003::11: icmp_seq=1. time=0 ms
 
64 bytes from 3003::11: icmp_seq=2. Insert time=50 ms
 
64 bytes from 3003::11: icmp_seq=3. time=0 ms
 
64 bytes from 3003::11: icmp_seq=4. time=0 ms
 
----3003::11 PING Statistics----
 
4 packets transmitted, 4 packets received, 0% packet loss round-trip (ms) min/avg/max = 0/12/50
 
switchxxxxxx> ping ipv6 FF02::1
 
Pinging FF02::1 with 64 bytes of data:
 
64 bytes from FF02::1: icmp_seq=1. time=0 ms
 
64 bytes from FF02::1: icmp_seq=1. time=70 ms
 
64 bytes from FF02::1: icmp_seq=2. time=0 ms
 
64 bytes from FF02::1: icmp_seq=1. time=1050 ms
 
64 bytes from FF02::1: icmp_seq=2. time=70 ms
 
64 bytes from FF02::1: icmp_seq=2. time=1050 ms
 
64 bytes from FF02::1: icmp_seq=3. time=0 ms
 
64 bytes from FF02::1: icmp_seq=3. time=70 ms
 
64 bytes from FF02::1: icmp_seq=4. time=0 ms
 
64 bytes from FF02::1: icmp_seq=3. time=1050 ms
 
64 bytes from FF02::1: icmp_seq=4. time=70 ms
 
64 bytes from FF02::1: icmp_sq=4. time=1050 ms
 
---- FF02::1 PING Statistics----
 
4 packets transmitted, 12 packets received

telnet

The telnet EXEC mode command logs on to a host that supports Telnet.

Syntax

telnet {ip-address | hostname} [port] [keyword…]

Parameters

  • ip-address—Specifies the destination host IP address (IPv4 or IPv6).
  • hostname—Hostname to ping (Length: 1-158 characters. Maximum label size for each part of the host name: 58.)
  • port—Specifies the decimal TCP port number or one of the keywords listed in the Ports table in the User Guidelines.
  • keyword—Specifies the one or more keywords listed in the Keywords table in the User Guidelines.

Default Configuration

The default port is the Telnet port (23) on the host.

Command Mode

Privileged EXEC mode

User Guidelines

Telnet software supports special Telnet commands in the form of Telnet sequences that map generic terminal control functions to operating system-specific functions. To enter a Telnet sequence, press the escape sequence keys (Ctrl-shift-6) followed by a Telnet command character.

Special Telnet Sequences

Telnet SequencePurpose
Ctrl-shift-6-bBreak
Ctrl-shift-6-cInterrupt Process (IP)
Ctrl-shift-6-hErase Character (EC)
Ctrl-shift-6-oAbort Output (AO)
Ctrl-shift-6-tAre You There? (AYT)
Ctrl-shift-6-uErase Line (EL)

At any time during an active Telnet session, available Telnet commands can be listed by pressing the ?/help keys at the system prompt.

A sample of this list follows.

switchxxxxxx> ?/help

[Special telnet escape help]

^^ B sends telnet BREAK

^^ C sends telnet IP ^^ H sends telnet EC ^^ O sends telnet AO

^^ T sends telnet AYT

^^ U sends telnet EL

?/help suspends the session (return to system command prompt)

Several concurrent Telnet sessions can be opened, enabling switching between the sessions. To open a subsequent session, the current connection has to be suspended by pressing the escape sequence keys (Ctrl-shift-6) and x to return to the system command prompt. Then open a new connection with the telnet EXEC mode command.

This command lists concurrent Telnet connections to remote hosts that were opened by the current Telnet session to the local device. It does not list Telnet connections to remote hosts that were opened by other Telnet sessions.

Keywords Table

OptionsDescription
/echoEnables local echo.
/quietPrevents onscreen display of all messages from the software.
/source-interfac eSpecifies the source interface.
/streamTurns on stream processing, which enables a raw TCP stream with no Telnet control sequences. A stream connection does not process Telnet options and can be appropriate for connections to ports running UNIX-to-UNIX Copy Program (UUCP) and other non-Telnet protocols.
Ctrl-shift-6 xReturns to the System Command Prompt.

Ports Table

KeywordDescriptionPort Number
BGPBorder Gateway Protocol179
chargenCharacter generator19
cmdRemote commands514
daytimeDaytime13
discardDiscard9
domainDomain Name Service53
echoEcho7
execExec512
fingerFinger79
ftpFile Transfer Protocol21
ftp-dataFTP data connections20
gopherGopher70
hostnameNIC hostname server101
identIdent Protocol113
ircInternet Relay Chat194
kloginKerberos login543
kshellKerberos shell544
loginLogin513
lpdPrinter service515

KeywordDescriptionPort Number

nntpNetwork News Transport Protocol119

pim-auto-r pPIM Auto-RP496

pop2Post Office Protocol v2109

pop3Post Office Protocol v3110

smtpSimple Mail Transport Protocol25

sunrpcSun Remote Procedure Call111

syslogSyslog514

tacacsTAC Access Control System49

talkTalk517

telnetTelnet23

timeTime37

uucpUnix-to-Unix Copy Program540

whoisNickname43

wwwWorld Wide Web80







Example

The following example displays logging in to IP address 176.213.10.50 via Telnet.

switchxxxxxx>  telnet 176.213.10.50

traceroute

To display the routes that packets will take when traveling to their destination, use the traceroute EXEC mode command.

Syntax

traceroute ip {ipv4-address | hostname} [size packet_size] [ttl max-ttl] [count

packet_count] [timeout time_out] [source ip-address]

traceroute ipv6 {ipv6-address | hostname} [size packet_size] [ttl max-ttl] [count packet_count] [timeout time_out] [source ip-address]

Parameters

  • ip—Use IPv4 to discover the route.
  • ipv6—Use IPv6 to discover the route.
  • ipv4-address—IPv4 address of the destination host.
  • ipv6-address—IPv6 address of the destination host.
  • hostname—Hostname to ping (Length: 1-158 characters. Maximum label size for each part of the host name: 58.)
  • size packet_size—Number of bytes in the packet not including the VLAN tag. The default is 64 bytes. (IPv4:64-1518, IPv6: 68-1518)
  • ttl max-ttl—The largest TTL value that can be used. The default is 30. The traceroute command terminates when the destination is reached or when this value is reached. (Range: 1–255)
  • count packet_count—The number of probes to be sent at each TTL level. The default count is 3. (Range: 1–10)
  • timeout time_out—The number of seconds to wait for a response to a probe packet. The default is 3 seconds. (Range: 1–60)
  • source ip-address—One of the interface addresses of the device to use as a source address for the probes. The device selects the optimal source address by default. (Range: Valid IP address)

Default Usage

N/A

Command Mode

Privileged EXEC mode

User Guidelines

The traceroute command works by taking advantage of the error messages generated by routers when a datagram exceeds its time-to-live (TTL) value.

The traceroute command starts by sending probe datagrams with a TTL value of one. This causes the first router to discard the probe datagram and send back an error message. The traceroute command sends several probes at each TTL level and displays the round-trip time for each.

The traceroute command sends out one probe at a time. Each outgoing packet can result in one or two error messages. A “time exceeded” error message indicates that an intermediate router has seen and discarded the probe. A “destination unreachable” error message indicates that the destination node has received the probe and discarded it because it could not deliver the packet. If the timer goes off before a response comes in, the traceroute command prints an asterisk (*).

The traceroute command terminates when the destination responds, when the maximum TTL is exceeded, or when the user interrupts the trace with Esc.

The traceroute ipv6 command is not relevant to IPv6 link local addresses.

Example

switchxxxxxx> traceroute ip umaxp1.physics.lsa.umich.edu

Type Esc to abort.

Tracing the route to umaxp1.physics.lsa.umich.edu (141.211.101.64)

Trace completed

The following table describes the significant fields shown in the display:

FieldDescription
1Indicates the sequence number of the router in the path to the host.
i2-gateway.stanford.eduHost name of this router.
192.68.191.83IP address of this router.
1 msec 1 msec 1 msecRound-trip time for each of the probes that are sent.

The following are characters that can appear in the traceroute command output:

FieldDescription
*The probe timed out.
?Unknown packet type.
AAdministratively unreachable. Usually, this output indicates that an access list is blocking traffic.
FFragmentation required and DF is set.
HHost unreachable.
NNetwork unreachable.
PProtocol unreachable.
QSource quench.
RFragment reassembly time exceeded
SSource route failed.
UPort unreachable.

Was this article helpful?

Related Articles

Leave A Comment?