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-sprints routing statistics

netstat -i-nshows all configured interfaces

netstat -a-nprints a list of all active connections

netstat -g-nprints the multicast route table

netstat -r-nprints 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 -lreturns the number of entries in the routing table, here is an example of a 50-entry table:

#netstat -rn wc -l 50

netstat -sprints 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 -rnoptions 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 -rnoutput, 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 -rnoutput should correspond to at least one route that specifies the reachable network in the Destination column. The TCP/IP address of the SP

3-8

SP Switch Router Adapter Guide - 1.4 Update 2

Page 84
Image 84
Lucent Technologies 9077 16S, 9077 04S, 9076 manual Using the netstat command, Netstat -rn