Using the netstat command, Netstat -rn, Using the netstat command -8 – Lucent Technologies 9077 16S User Manual

Page 84: Netstat -rn -8

Advertising
background image

3-8

October 22, 1999

SP Switch Router Adapter Guide - 1.4 Update 2

Monitoring and Management Tools
Using the netstat command

Using the netstat command

The UNIX netstat command reports status and information about SP Switch Router media
card physical interfaces. netstat is available from the CLI and the UNIX shell.

netstat -r -s prints routing statistics

netstat -i -n shows all configured interfaces

netstat -a -n prints a list of all active connections

netstat -g -n prints the multicast route table

netstat -r -n prints the current table of installed routes

In the output from netstat -r -n, the => symbol next to a route means it is a duplicate
key, but with a different netmask.

netstat -rn | wc -l returns the number of entries in the routing table, here is an
example of a 50-entry table:

# netstat -rn | wc -l

50

netstat -s prints comprehensive statistics for protocols, including: IP, ICMP, TCP, and
UDP, and GRIT, GRIEF, and GRID for SP Switch Router entities.

Refer to the man page for a complete list of netstat options. Examples of netstat usage follow.

netstat -rn

Use this netstat command to determine that the SP Switch Router Adapter card has the correct
routing table entries. You must have properly configured routing table entries so that TCP/IP
packets can be routed to and from the SP system to the SP Switch Router Adapter card. Use
netstat with the -rn options to view the card’s current routing table entries:

# netstat -rn

Routing tables

Internet:

Destination Gateway Flags Refs Use Interface

default 129.40.85.126 UGS 3 19356 tn0

127.0.0.1 127.0.0.1 UH 0 19 lo0

129.40.85.64/26 link#1 UC 0 0 tn0

129.40.85.121 0:c0:f2:0:26:8a UHL 4 490 lo0

129.40.85.126 0:0:a2:1:ff:e8 UHL 1 2 tn0

129.40.85.128/26 129.40.85.130 U 0 0 gt020

129.40.158.128/26 129.40.158.139 U 0 88652 gt030

129.40.192.128/26 129.40.192.139 U 0 34 gt060

224/8 link#1 UC 0 0 tn0

In the netstat -rn output, you will see the routing entries for the various SP Switch Router
Adapters installed in the SP Switch Router. In the example above there are three. These are
identified by their

Interface

names having the form

gt0y0

where

y

is the number of the

chassis slot in which a specific SP Switch Router Adapter is installed. For more information on
the logical interface naming convention, refer to Chapter 2.

Each

Interface

in the netstat -rn output should correspond to at least one route that

specifies the reachable network in the

Destination

column. The TCP/IP address of the SP

Advertising
This manual is related to the following products: