Common Windows DOS Commands

The following are some of the most widely used DOS operating commands in Windows environments along with sample displays:

• ipconfig—Displays IP address and subnet mask:

C:\>ipconfig

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix

IP Address

Subnet Mask

Default Gateway

cisco.com 150.100.1.253 255.255.255.0 150.100.1.240

ipconfig /all—Displays more detailed information about TCP/IP configurations, such as DNS and domain names:

C:\>ipconfig /all

Windows 2000 IP Configuration

Host Name

Primary DNS Suffix . .

Node Type

IP Routing Enabled. . . WINS Proxy Enabled. . . DNS Suffix Search List.

C03298157693425

cisco.com

Hybrid

No cisco.com

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix Description . . Physical Address DHCP Enabled. . IP Address. . . Subnet Mask . . Default Gateway DNS Servers . .

Primary WINS Server cisco.com

3Com 10/100 Mini PCI Ethernet Adaptr

00-00-86-48-7B-35

150.100.1.253 255.255.255.0 150.100.1.240 64.104.200.116

171.68.10.70 64.104.193.200

arp -a—Displays ARP entries on the local machine:

Interface: 150.100.1.253 on Interface 0x1000003 Internet Address Physical Address Type

150.100.1.240 00-60-09-c4-34-17 dynamic

150.100.1.254 00-b0-64-46-a8-40 dynamic

• hostname—Displays the local host name:

C:\>hostname c03298157693425

• nbtstat—Displays the NetBIOS over TCP/IP statistics. A number of options are displayed:

C:\>nbtstat

Displays protocol statistics and current TCP/IP connections using NBT (NetBIOS over TCP/IP).

NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [interval] ]

(adapter status) (Adapter status)

(cache)

(names) (resolved) (Reload) (Sessions) (sessions)

-a (adapter status) Lists the remote machine's name table given its name -A (Adapter status) Lists the remote machine's name table given its IP address.

Lists NBT's cache of remote [machine] names and their IP addresses

Lists local NetBIOS names.

Lists names resolved by broadcast and via WINS Purges and reloads the remote cache name table Lists sessions table with the destination IP addresses Lists sessions table converting destination IP addresses to computer NETBIOS names. -RR (ReleaseRefresh) Sends Name Release packets to WINs and then starts Refresh

RemoteName Remote host machine name.

IP address Dotted decimal representation of the IP address, interval Redisplays selected statistics, pausing interval seconds between each display. Press Ctrl+C to stop redisplaying statistics.

• ping—Provides a means to test and verify remote locations. An example ping to www.cisco.com follows:

C:\>ping www.cisco.com

Pinging www.cisco.com [198.133.219.25] with 32 bytes of data: Reply from 198.133.219.25: bytes=32 time=182ms TTL=248 Reply from 198.133.219.25: bytes=32 time=180ms TTL=248 Reply from 198.133.219.25: bytes=32 time=180ms TTL=248 Reply from 198.133.219.25: bytes=32 time=181ms TTL=248 Ping statistics for 198.133.219.25:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:

Minimum = 180ms, Maximum = 182ms, Average = 180ms

• tracert—Provides a method to list next hop addresses for remote networks. The following is a sample Windows output when tracert routing to the URL www.smh.com.au:

C:\>tracert www.smh.com.au

Tracing route to smh.com.au [203.26.51.42] over a maximum of 30 hops:

C:\>tracert www.smh.com.au

Tracing route to smh.com.au [203.26.51.42] over a maximum of 30 hops:

1

<1

ms

<1

ms

<1

ms

c6k-bbn1-vlan105.cisco.com [64.105.208.2]

2

<1

ms

<1

ms

<1

ms

c6k-bbn1-msfc-v161.cisco.com [10.66.2.2]

3

<1

ms

<1

ms

<1

ms

sydneycisco-wall-1-f0-1.cisco.com [10.166.128.15

4

41

ms

236

ms

<1

ms

telstra-gw.cisco.com [103.141.98.141]

5

1

ms

1

ms

<1

ms

FastEthernet6-1-0.chw12.Sydney.telstra.net

49.

.130.

85.3]

6

1

ms

1

ms

1

ms

FastEthernet1-0-0.ken4.Sydney.telstra.net

• route—Provides a method to define static routing entries (Windows NT supports RIP and 2000 supports OSPF). The following example adds a static route for the network 150.100.100.0/24 via the next hop address 131.108.1.1:

c:\>route add 150.100.100.0 mask 255.255.255.0 131.108.1.1

• nslookup—Provides a DNS query for any host names. The following displays the use of nslookup for the host name www.cisco.com:

C:\>nslookup www.cisco.com

Server: dns-sydney.cisco.com Address: 64.104.200.248

Name: www.cisco.com Address: 198.133.219.25

0 0

Post a comment