Thursday, March 25, 2010

Summary of TCP/IP commands for all platforms..

INTRODUCTION
This summary lists many of the commonly used commands (with
brief descriptions) for FTP and TCP/IP, as well as related z/OS,
z/VM, VSE, Linux, and VTAM commands.

TCP/IP Commands for TSO/E
**Note: The following TCP/IP commands should be done from the
TSO command panel or the READY prompt.
Note: hostname may be the IP address of the host, or the host
name of the host.

• FTP hostname {port} - Connect to remote host to get/put files.
Defaults to port 21.
• HOMETEST - Validate TCP/IP configuration.
• NETSTAT option {TCP procname} - Display network status
of local host. Use ? for list of options.
• NETSTAT ALLCON|CONN - Display port connections for
the TCP/IP stack.
• NETSTAT ARP ALL|ipaddress - Display ARP cache for the
TCP/IP stack.
• NETSTAT DEV - Display the status of the device(s) and
link(s) for the TCP/IP stack.
• NETSTAT GATE|ROUTE - Display routing information for
the TCP/IP stack. (Different views)
• NETSTAT HOME - Display IP address(es) for the stack.
• PING hostname - Sends an echo request to a host name or
address to determine if the computer is accessible. Use ? for list
of options.
• TELNET hostname {port} - Log on to remote host. By default,
port 23 is used. Use ? for list of options.
• TRACERTE hostname - Trace hops from this host to
destination host. Use ? for list of options.


z/OS Console Commands for TCP/IP

***Note: If multiple stacks are running, you must identify the stack in
the procname field.
• D TCPIP - list names and status of TCP/IP stacks.
• D TCPIP,{procname},HELP - display list of TCP/IP display
options. These include -NETSTAT, TELNET, HELP,
DISPLAY, VARY, OMPROUTE, SYSPLEX, STOR.
• D TCPIP,{procname},Netstat,ALLCONN|CONN - display
socket information for the TCP/IP stack.
• D TCPIP,{procname},Netstat,ARP - display contents of ARP
cache for the TCP/IP stack.
• D TCPIP,{procname},Netstat,DEVlinks - display Device and
link status for the TCP/IP stack.
• D TCPIP,{procname},Netstat,HOME - display the IP
address(es) for the TCP/IP stack.
• D TCPIP,{procname},Netstat,ROUTE - display the routing
table for the TCP/IP stack.
• V TCPIP,{procname},HELP - display list of TCP/IP vary
options. These include - HELP, OBEYFILE, PKTTRACE,
DATTRACE, START, STOP, PURGECACHE
• V TCPIP,{procname},PURGECACHE,linkname - purge
ARP cache for the specified adapter (linkname from
NETSTAT,DEVLINKS).
• V TCPIP,{procname},START|STOP,devname - Start or stop
the device name identified in NETSTAT DEV output.
• V TCPIP,{procname},Telnet,xxxx - performs specified
function for TELNET.
ACT|INACT,luname - Enables|disables lu as VTAM
session candidate
QUIESCE - Blocks new connections.
RESUME - Ends QUIESCEd state.
STOP - Ends telnet connections and closes port.

Related z/OS Console Commands :

• D IOS,MIH,DEV=dddd - MIH value for device
Note: The value for "c's and d's" in the following Display
Matrix (D M) command is optional, but if included, must be in
parentheses ().
• D M=CHP{(cc)}|DEV{(dddd)} - Status of CHPID cc, or
summary of all CHPIDs if (cc) is not provided.
Display CHPIDs/device status or summary of CHPID status of
all devices if (dddd) is not provided.
• D U,,ALLOC|OFFLINE|ONLINE - Display information for
all devices by selected status.
• D U,,,dddd{,nnn} - Display status of devices starting at device
dddd for nnn number of devices (default 16).
• SETIOS MIH,DEV=ddd,TIME=mm:ss - set MIH time for
specified device.
• V dddd|dddd-dddd,OFFLINE|ONLINE - vary device(s)
offline or online.
• CF CHP(cc),ONline|OFFline - Configure online/offline
CHPID cc to MVS & hardware.

z/VM Operator Commands:

***Note: Requires class B authority to issue the following commands.

• Q MITIME - Display MIH times for devices.
• Q OSA ACTIVE|ALL - display status of OSA devices.
• Q rdev|rdev-rdev - Display status of real device(s).
• Q PATHS rdev|rdev-rdev - Display path status to real
device(s) (PIM, PAM, LPM).
• Q CHPID cc - Display real CHPID status.
• VARY OFF|ON rdev|rdev-rdev - vary device(s) off or online
• VARY OFF|ON PATH cc FROM|TO rdev|rdev-rdev -
change the status of a path to device(s).
• VARY OFF|ON CHPID cc - configure a CHPID off or on to
both hardware and software.

z/VM TCP/IP Commands:

***Note: Your CMS userid must be linked to the TCPMAINT 592
minidisk to execute the following commands.
***Note: hostname may be the IP address of the host, or the host
name of the host.

• FTP hostname {port} - Connect to remote host to get/put files.
Defaults to port 21. Enter FTP ? for list of options.
• HOMETEST - Validate TCP/IP configuration.
• IFCONFIG - display network interfaces.
• IFCONFIG interface UP|DOWN - Start or stop the specified
network interface.
• NETSTAT option - Display network status of local host. Use ?
for list of options.
• NETSTAT ALLCON|CONN - Display all port connections
for the TCP/IP stack.
• NETSTAT ARP *|ipaddress - Display ARP cache for the
TCP/IP stack.
• NETSTAT DEV - Display the status of the device(s) and
link(s) for the TCP/IP stack.
• NETSTAT GATE - Display TCP/IP routing information.
• NETSTAT HOME - Display IP address(es) in TCP/IP stack.
• NETSTAT OBEY START|STOP devname - Start or stop the
device name identified in NETSTAT DEV output.
• PING hostname - Sends an echo request to a host name or
address to determine if the computer is accessible. Use ? for list
of options.
• TELNET hostname {port} - Log on to remote host. By default,
port 23 is used. Use ? for list of options.
• TRACERTE hostname - Trace hops from this host to
destination host. Use ? for list of options.

VSE TCP/IP Commands:

***Note: hostname may be the IP address of the host, or the host
name of the host.
• PING hostname - Sends an echo request to a host name or
address to determine if the computer is accessible.
• Query ARP{,IP=hostname} - Display contents of ARP cache
for the TCP/IP stack.
• Query CON{,IP=hostname} - Display port connections for
the TCP/IP stack.
• Query LINKs{,ID=name} - Display link status.
• Query MASKs - Display contents of subnet mask table.
• Query ROUTes{ID=name|,IP=hostname} - Display routing
table for the TCP/IP stack.
• STATUS dddd - Display device status
• START LINK=name -start a link in the TCP/IP stack.
• STOP LINK=name -suspends attempts to activate a link.
• Note: Use with CTCA and cross-partition links (not OSA).
• TRACERT hostname - Trace hops from this host to
destination host.

VTAM Commands:-
VTAM commands related to OSA cards.

• D NET,ID=name - display network named in ID field
Additional parameters that may be added:
,SCOPE=ONLY|ACT|ALL|INACT
,E - Gives extended information about the node.
• D NET,MAJNODES|APPLS - Shows status of all active
major nodes or applications.
• D NET,PENDING - Lists nodes in pending states.
• D NET,TRL - display list of TRLEs.
• D NET,TRL,TRLE=trlename - display status of specific
TRLE. (Use this command to display the devices assigned to a
QDIO (or MPC) OSA-Express resource.)
• V NET,ACT,ID=ISTTRL,UPDATE=ALL - Deletes all
inactive TRLEs.
• V NET,ACT,ID=name - Activates the VTAM resource
identified by the name.
• V NET,INACT,ID=name - Inactivates the VTAM resource
identified by the name.
,F|I|U - Deactivate FORCE, IMMEDIATE, or
UNCONDITIONAL (if normal inact fails).

TCP/IP Commands for OS/2:-

***Note:Commands must be done from a command prompt window.
The commands are listed in upper case for presentation only. They
should be entered in lower case.
***Note: hostname may be the IP address of the host, or the host
name of the host.

• ARP -A - Display ARP cache. Use -? for options.
• FTP hostname {port} - Connect to remote host to get/put files.
Defaults to port 21. Use -? for list of options.
NETSTAT command output may roll through the OS/2 window. To
prevent this, add |more to the end of the netstat command. (Or direct
output to a file by adding >filename.TXT to the end of the
NETSTAT command.)
• HOST ipaddress - Sends request to an IP address and returns
information about the hostname.
• NETSTAT -? - Display a list of options.
• NETSTAT -A - Display host network address.
• NETSTAT -C - Display host ICMP statistics.
• NETSTAT -H - host name for specified IP address.
• NETSTAT -I - Display host IP statistics.
• NETSTAT -N - Display host network interface details. (Like
MAC, speed, and statistics)
• NETSTAT -P - Display host ARP cache.
• NETSTAT -R - Display host routes.
• NETSTAT -S - Display host sockets.
• NETSTAT -T - Display host TCP statistics.
• NETSTAT -U - Display host UDP statistics.
• PING hostname - Sends an echo request to a host name or
address to determine if computer is accessible. (To cancel, use
Ctrl + C.) Use -? for list of options.
• TELNET {-p port} hostname - Log on to remote host. By
default, port 23 is used. Use -? for list of options.
• TRACERTE hostname - Trace hops from this host to
destination host. Use -? for list of options.

TCP/IP Commands for Windows(older):

***Commands should work for Windows 95, 98, NT, & 2000 1.
Commands must be done from a command prompt window.
The commands are listed in upper case for presentation only. They
should be entered in lower case.
***Note: hostname may be the IP address of the host, or the host
name of the host.

• ARP -A - Display ARP cache. Use -? for options.
• FTP hostname - Connect to remote host to get/put files.
Defaults to port 21. Use -? for list of options.
Note: The output of the NETSTAT command may roll through your
window. To prevent this, add |more to the end of the netstat
command. (Or direct the output to a file by adding >filename.TXT
to the end of the NETSTAT command.)
• NETSTAT -? - Display a list of options.
• NETSTAT -A - Display host socket information.
• NETSTAT -E - Display host Ethernet statistics.
• NETSTAT -N - Display host addresses and ports numerically.
• NETSTAT -P TCP|UDP|IP - Display connection information
for the selected protocol.
• NETSTAT -R - Display host routes.
• NETSTAT -S - Display host statistics.
• PING hostname - Sends an echo request to a host name or
address to determine if the computer is accessible. Use -? for
list of options.
• TELNET hostname {port} - Log on to remote host. By default,
port 23 is used. Use -? for list of options.
• TRACERT hostname - Trace hops from this host to
destination host. Use -? for list of options.
1Windows, Windows 95, 98, NT, and 2000 are trademarks of Microsoft Corporation.

TCP/IP Commands for Linux:

***The commands are listed in upper case for presentation only. They
should be entered in lower case.

• ARP - Display ARP cache. Use -? for options.
• DMESG |MORE - Display complete information about the
Linux environment including network devices. ( |MORE keeps
output from scrolling.) ( > filename to send to a file.)
• FTP hostname|ipaddress - Connect to remote host to get/put
files. Defaults to port 21. Use -? for options.
• IFCONFIG - display network interfaces (like LO,EN0,TR0)
• IFCONFIG interface UP|DOWN - Start or stop the selected
network interface(EN0,TR0, etc).
For the following NETSTAT commands, adding N to the option
will display numerical output. AddingV will display verbose.
• NETSTAT -A - Display all sockets.
• NETSTAT -I - Display interface table.
• NETSTAT -R - Display host routes.
• PING hostname|ipaddress - Sends an echo request to a host to
determine if the computer is accessible. Use -? for options.
• ROUTE - Displays IP routing table.
• TELNET hostname|ipaddress {port} - Log on to remote host.
By default, port 23 is used. Use -? for options.
• TRACEROUTE hostname|ipaddress - Trace hops from this
host to destination host. Use -? for list of options.

FTP Subcommands:-

• ascii - ASCII transfer of text files.
• binary - BINARY transfer of binary files.
• cd remote-directory - Change directory on remote host.
• close - Ends the FTP session. After close, OPEN a new
connection or QUIT from FTP.
• delete filename - Delete the file from remote host.
• dir {file destination} - Gives full directory listing on remote
host. file - file to be listed. destination - where to put listing.
Both file and destination are optional.
• get filename {localfilename} - Get a file from remote host.
• hash - Display a hash sign (#) every time a block of data is
transferred. (Useful for large transfers.)
• help {command} - Displays a description of the command. If a
command is not specified, a list of commands is displayed.
• lcd directory - Change directory on your local machine.
• ls {file destination} - Like dir, but less information.
• mget file-list - Get multiple files from remote machine.
• mput file-list - Put multiple files to remote machine.
• open machine-name - Connect to named machine (IP or host
name). Old connection must be CLOSEd first.
• prompt - Turn prompting off/on for mget and mput.
• put filename {remotefilename} - Put a file onto remote host.
• pwd - Present Working Directory on remote host.
• quit|bye - exits FTP.



Some Questions for CCNA Guys:

Some sample and easy questions on CCNA just to refresh you:-

1) Which of the following protocols use "Hello" packets?
A) OSPF
B) RIP2
C) IGRP
D) RIP
2) How to enable a Banner on a Cisco Router ?
A) Router(Config-if)# banner motd #
B) Router(Config)# banner motd #
C) Router(Config)# motd banner motd #
D) Router(Config-if)# motd banner #
3) How many hosts and subnets are possible if you have an IP of 151.242.16.49 with a
subnet mask of 7 bits?
A) 510 hosts and 126 subnets
B) 512 hosts and 128 subnets
C) 126 subnets and 510 hosts
D) 128 subnets and 512 hosts
4) What's the default subnet mask for a Class C IP adresses?
A) 255.0.0.0
B) 255.255.0.0
C) 255.255.255.0
D) 255.255.255.255
5) Which encapsulation must be used to enable Ethernet_II frame type on your Ethernet
interface?
A) SAP
B) ARPA
C) RIP
D) SNAP
6) Which IP-class provides the least number of Hosts?
A) Class A
B) Class B
C) Class C
D) Class D
7) How to define access-list commands ?
A) Router(config-if)# access-list 1 permit 172.16.20.1 255.255.0.0
B) Router(config) # access-list 1 permit 172.16.20.1 255.255.0.0
C) Router(config-if)# access-list 1 permit 172.16.20.1 0.0.0.0
D) Router(config) # access-list 1 permit 172.16.20.1 0.0.0.0
8) Which of the following solutions prevent routing loops?
A) Split Horizon
B) Poison Reverse
C) Hold-down Timers
D) Triggered Updates
9) Which of the following is a valid extended IP access list?
A) access-list 101 permit ip host 175.2.10.0 any eq 80
B) access-list 101 permit ip host 175.2.10.0 any eq www
C) access-list 101 permit tcp host 175.2.10.0 any eq 80
D) access-list 101 permit icmp host 175.2.10.0 any eq www
10) Which of the following is true about IP RIP based networks?
A) The default update time is 30 seconds.
B) The default update time is 90 seconds.
C) Only changes to the routing tables are sent during updates.
D) Complete routing table are sent during updates.
11) How do you apply the access group command?
A) Router(config) # access-list 1 out
B) Router(config-if) # access-listp 1 out
C) Router(config) # access-group 1 out
D) Router(config-if) # access-group 1 out
12) What are the access-list ranges of IP (standard and extended)?
A) 1-99 and 100-199
B) 1-99 and 900-999
C) 100-199 and 800-899
D) 800-899 and 900-999
13) Which are true regarding VLANs?
A) VLANs have the same collision domain
B) VLANs have the same broadcast domain
C) VLANs are less secure compared to switch or hub networks.
D) VLANs use layer 2 switching which is a substitute for routing technology which uses
routers.
14) Which of the following statements are true about EIGRP route summarization?
A) EIGRP provides summarization of routes at classful boundaries by default.
B) For summarizing routes at an arbitrary boundary, one need to disable auto
summarization, using “no auto-summary” command.
C) Manual summarization in EIGRP network takes place on any interface in the network.
D) For specifying a summary route manually, you must specify the metrics.
15) How many access-lists are possible on an interface per protocol ?
A) There can be only one access list in and one for out per router.
B) There can be only one access list for in and one for out on each interface per protocol.
C) There can be only one access list per router.
D) There can be only one access list for each interface per protocol.
16) What does the ISDN protocol Q define ?
A) Concepts, terminology and services
B) Existing telephone network
C) Switching and signaling
D) Quality of Services
17) You have a network ID of 121.69.0.0. You need to divide it into multiple subnets
with at least 500 hosts per each subnet. Which subnet mask should you use so that you
will be able to divide the network into maximum number of subnets?
A) 255.255.128.0
B) 255.255.224.0
C) 255.255.248.0
D) 255.255.254.0
18) What switching type has the lowest latency?
A) Store and forward
B) Cut-through
C) Split horizon
D) Fragment-free
19) What comprises an ISDN BRI line?
A) Two 64 KBPS B channels and one 4 KBPS D channel
B) 24 B channels and one 64 KBPS D channel
C) Two 64 KBPS B channels and one 16 KBPS D channel
D) One 64 KBPS B channels and one 16 KBPS D channel
20) Where is the fully functional IOS stored?
A) Flash
B) ROM
C) RAM
D) NVRAM
Answer Key
1)A, 2)B, 3)C, 4)C, 5)B, 6)C, 7)D, 8)A,B,C,D 9)C, 10)A,D 11)D, 12)A, 13)B, 14)A,B,C
15)B, 16)C 17)D, 18)B, 19)C, 20)A