Sunday, March 18, 2012

Network Utilities


IPCONFIG                         
Using ipconfig /all or winipcfg
How can I find a NIC MAC address?

How to enable IP routing
How to find my public IP
How to fix corrupted IP Configuration
How to setup two static IPs on a computer
IP address conflictsXP client unable to obtain IP addresses from the DHCP server
Why the ipconfig shows 0.0.0.0 ip even you have assigned a static ip


Using ipconfig /all or winipcfg
When troubleshooting a TCP/IP networking problem, you can use the ipconfig command to get host computer configuration information, including the IP address, subnet mask, and default gateway. If it is running Win9x, ME, use winipcfg instead.How can I find a NIC MAC address?
Use ipconfig /all
How to enable IP routing
To enable IP routing on W2K/XP, go to the properties of the connection>TCP/IP>Advanced>Options>IP Filtering, check Enable IP Filtering.
How to find my public IP
Doesn't matter you are using public IP or private IP, you can open http://www.whatismyip.com to find your public ip.

How to fix corrupted IP Configuration


To fix a corrupted IP Configuration, 
1) for Win9x, NT, ME and W2K, you may want to remove and re-install TCP/IP. 
2) If it is win9x, you may try to run c:\windows\ws2bakup\ws2bakup.bat to restore the original settings. 
3) If you get "DHCP server unreachable" while using ipconfig /renew, you may want to update the network card drive or go to NIC configuration to change the media type matching the speed.
4) For XP, you can't uninstall TCP/IP (Uninstall is grayed out). You will use the Windows XP command line utility netsh.exe to reset all IP-related Registry settings to their default values. To do that, enter the command: netsh int ip reset filename, for example, netsh int ip reset ipreset.t.xt

How to setup two static IPs on a computer
Q: I have a laptop at the office and home using static IP. How can I configure tcp/ip for the office and home.
A: You may have two options. 1) Setup a static IP on the properties of TCP/IP, and then click Advanced to add more if it is w2k. If it is wxp, select Alternative Configuration. 2) Or run netsh.exe (from w2k Resource kits).
Click for help
 Your feedback and contributions to this web site

IP address conflicts

SYMPTOMS: when trying to set the IP address on a NIC,  you may receive the following error message: "The IP address XXX.XXX.XXX.XXX you have entered for this network adapter is already assigned to another adapter Name of adapter. Name of adapter is hidden from the network and Dial-up Connections folder because it is not physically in the computer or is a legacy adapter that is not working. If the same address is assigned to both adapters and they become active, only one of them will use this address. This may result in incorrect system configuration. Do you want to enter a different IP address for this adapter in the list of IP addresses in the advanced dialog box? "

RESOLUTION: 
1. If you click Yes, you see the TCP/IP properties where you can change the IP address. Then assign the different IP.
2.  If you click No, the IP address is assigned to the network adapter. To resolve this problem, uninstall the ghosted network adapter from the registry: At command prompt, type 
set devmgr_show_nonpresent_devices=1, and then press ENTER. Type Start DEVMGMT.MSC, and then press ENTER. Click View, and then clickShow Hidden Devices. Expand the Network Adapters tree and right-click the dimmed network adapter, and then click Uninstall.



RESOLUTION: To resolve this problem, obtain the latest service pack for Windows XP.

Why the ipconfig shows 0.0.0.0 ip even you have assigned a static ip
Question: I have assigned a static ip, subnet to the computer, but the ipconfig shows IP address is 0.0.0.0 and subnet mask 0.0.0.0.. Why?
Answer: An existing IP address on the network has the same IP address. You may use tracert ip, WINS and DNS records to find out another computer using the same IP.
If your laptop users frequently disconnect from one network segment and reconnect to another network segment, they may not be able to access the second network. Resolution will be run ipconfig /registerdns.


Wireless              
How to fix wireless connection issues
Wireless Modes
Wireless Security

How to fix wireless connection issues
1. Make sure all wireless devices are using the same mode, infrastructure in the most cases.
2. Make sure all wireless devices have the same SSID.
3. Make sure all wireless devices have the same WEP encryption settings if you have enabled them.
4. Make sure you have added the wireless MAC into MAC Address Control if you enable it.
5. Use ipconfig and ping to test the connection. All wireless devices must be in the same IP range.

Wireless Modes
Infrastructure: all wireless and wired devices communicate with each other by first going through an Access Point (AP) or wireless router. 
Ad-hoc: one wireless station communicates directly with other wireless stations without using an access point or a wireless router. However, if you want to access to a wired network, you will need a WAP or a router.
Point-to-Point: the WAPs are setup as a bridge connecting to LANs.

Wireless Security
1. Change the default SSID after testing the initial setup.
2. Enable WEP encryption settings.
3. Enable MAC Address Control.



Net command                   
net accounts can be used to display the user accounts database and modify password and logon requirements for all accounts. Syntax: net accounts [/forcelogoff:{minutes | no}] [/minpwlen:length] [/maxpwage:{days | unlimited}] 
 [/minpwage:days] [/uniquepw:number] [/domain]. Examples: 1) To display the current settings, the password requirements, and the server role for a server, type: net accounts. 2) to force users to log off after the logon time expires with a five-minute warning, type: net accounts /forcelogoff:5.

net config displays the configurable workstation and server services that are running. Syntax: net config [{server|workstation}]. To display computer name, DNS host name, logon user name,

 active NIC, logon domain, do net config workstation. To display server name, server active NIC, 

server hidden status and maximum logged on users, do net config server.

net file displays the names of all open shared files on a server and the number of file locks and closes individual shared files and removes file locks. Syntax:net file [ID [/close]]. To display the names and IDs of the open shared files, do net file without parameters. To close a file that has ID 5, type: net file 5 /close.

net send Sends messages to other users, computers, or messaging names on the network. Syntax: net send {name | * | /domain[:name] | /users} message. To send "This server will shut down in 15 minutes" message to all users connected to the DOMAIN, type: net send /domain:users This server will shut down in 15 minutes.

net share displays information about all of the resources that are shared on the local computer. Syntax: net share [ShareName]

net start/stop starts/stop a service. Syntax: net start/stop [service]. To displays a list of services that are currently operating, use net start without parameters. To stop the Event Log service, type: net stop eventlog.

net statistics displays the statistics log for the local Workstation or Server service, errors, logon time and transfer bytes.. Syntax:net statistics [{workstation | server}]

net time display and synchronizes the computer's clock with that of another computer or domain. Syntax:net time [{\\ComputerName | /domain[:DomainName] | /rtsdomain[:DomainName]}] [/set]. To synchronizes the computer's clock with the time on the specified computer or domain, type net time \\computername /set.


net use can be used to connect a computer to or disconnect a computer from a shared resource, or display information about computer connections. The command also controls persistent net connections. Syntax: net use [{DeviceName | *}] [\\ComputerName\ShareName[\volume]] [{Password | *}]] 

 [/user:[DomainName\]UserName] [/user:[DottedDomainName\]UserName] [/user: [UserName@DottedDomainName]  

[/savecred] [/smartcard] [{/delete | /persistent:{yes | no}}] To list network connections, type: net use. To connect to the resource accounting shared on the \\Financial data server, type:net use k: "\\financial data" \accounting.


net user adds or modifies user accounts or displays user account information such as user name, last logon, logon script, user profile, home directory and group memberships. Syntax: net user [UserName [Password | *] [options]] [/domain].  To view information about the user account jsmith in a domain, type: net user jsmith /domain. To specify logon hours of 4 A.M. until 5 P.M. on Monday, 1 P.M. until 3 P.M. on Tuesday, and 8 A.M. until 5 P.M. Wednesday through Friday for jsmith, type: net user jsmith /time:M,4am-5pm;T,1pm-3pm;W-F,8:00-17:00.

Net view Utility                    

How to use the net view command to view a list of computer or network resources

The net view command is ever useful network troubleshooting utility. You can use it to displays a list of domains, computers, or shared resources available on a specific computer.To list all shared resources on a domain or workgroup, at the command prompt, type net view.
To display the shared resources on a computer, do net view \\ComputerName where ComputerName is the name of a specific computer whose resources you want to view.
When using net view, you may see different messages. The following are some of them and resolutions.
Symptom: net view ip successful but not net view \\computername.
Resolutions: 1) name resolution. 2) cache credential - net use \\computername /user:username.
Symptom:  If you can net use \\ip but not net use \\computername.
Resolutions: you may just need to cache the credential pointing to the computername by using net net use \\computername /user:username command.
Symptom: There are no entries in the list.
Resolution: this is because no shared drive or folder.  Go to a folder you want to share, right-click>sharing and select sharing.
System error 5: access is denied.
Resolutions:1) check permission or 2) need to cache credential: logon the same username and password on both computers or use net net use \\computername/user:username command.
System error 51 has occurred. Windows cannot find the network path. Verify that the network path is correct and the destination computer is not busy or turned off. If windows still cannot find the network path, contact your network administrator.
Resolution: enable file and printer sharing.
Can't net view computername - error 52
Symptoms: you can ping a host but not net view it. When using net view \\hostname, you get system error 52 - a duplicate name exists on the network.
Resolutions: there are two host names or alias name (cname) are pointed to the same IP. 1) check the WINS records. 2) check DNS records.
Can't ping or net view computername - error 53
Symptom: if you can ping IP but not computername, or if you can net view \\IP but not \\computername (error 53). You have name resolution problem.
Resolutions: 1) if it is domain environment, check your WINS. 2) if it is peer-to-peer workgroup, enable NetBIOS over TCP/IP. 3) or add NetBEUI on all your workstations.


Ping                          
Using pingCan't use ping
Can't ping outside IP or name
Error code 65, 10043, 10050 and 10091 transmit failed
This is name resolution issue if you can ping IP but not computer name

Using ping

When troubleshooting, you can use ping to verify IP-level connectivity. You should perform the following steps when using ping:
  1. Ping the loopback address to verify that TCP/IP is configured correctly on the local computer - ping 127.0.0.1
  2. Ping the IP address of the local computer to verify that it was added to the network correctly - ping IP_address_of_local_host
  3. Ping the IP address of the default gateway to verify that the default gateway is functioning and that you can communicate with a local host on the local network - ping IP_address_of_default_gateway
  4. Ping the IP address of a remote host to verify that you can communicate through a router - ping IP_address_of_remote_host
Can't ping outside IP or name
If you can't ping outside IP, make sure you have correct gateway. If you can't ping outside computer name or web name, check the DNS settings.
Can't use ping
If you cannot use ping successfully at any point, confirm that:
1)The computer was restarted after TCP/IP was configured. 
2) The IP address of the local computer is valid and appears correctly on ipconfig /all. 
3) IP routing is enabled and the link between routers is operational. 
4) For the security reasons, many organizations block the return of ICMP (ping) packets so that ping or tracert may not be possible to obtain a response.
Error code 65, 10043 and 10050, transmit failed
Symptoms: When using ping command, you may receive either of the following: "Transmit failed, error code 65" or "Transmit failed, error code 10050"
Resolutions: make sure your firewall or router doesn't disable ping and to allow ICMP Echo and  Echo Reply packets.
This is name resolution issue if you can ping IP but not computer name
The ping command uses Windows Sockets-style name resolution to resolve a computer name to an IP address, so if pinging by address succeeds, but pinging by name fails, then the problem lies in address or name resolution, not network connectivity.


Network Tools             

IPCONFIG or WINIPCFGNBTSTATPing and Tracert

NET VIEW
What is netdiag for

Command-Line UtilitiesNetwork Utilities from Resource Kits
 

 

IPCONFIG or WINIPCFG

To confirm that your computer has the appropriate settings for DNS and WINS servers, an available IP address, the proper subnet mask, the proper default gateway, and the correct host name, you can use ipconfig/all or WINIPCFG tool. The following are list of ipconfig parameters and usage:

  • /? - Display this help message
  • /all - Display full configuration information
  • /release - Release the IP address for the specified adapter
  • /renew - Renew the IP address for the specified adapter
  • /flushdns - Purge the DNS resolve cache. The /flushdns switch flushes the list of locally cached DNS names. When a name is resolved from DNS, the client keeps it in the cache temporarily. This option removes the cached entries.
  • /registerdns - Refresh all DHCP leases and re-register DNS names. The /registerdns switch allows the client to re-register its dynamic DNS entries as well as renew the DHCP lease.
  • /displaydns - Display the contents of the DNS resolve cache. The /displaydns switch lists the contents of your resolved DNS name cache.

    The first four switches are for OS  those in Microsoft Windows NT 4.0 and earlier version.
You might want to use the IP Configuration data of the local area connection that you obtained by using the IPConfig tool for further analysis. To make it easier to use, you can send the results to a text file. At the command line, type ipconfig /all > <local drive>:\<document title.txt>, for example ipconfig /all c:\>ipconfig.txt.

Nbtstat.exe is a useful tool for troubleshooting NetBIOS name resolution problems. You can use the nbtstat.exe command to remove or correct preloaded entries.
·         To list the NetBIOS table of the local computer, type nbtstat -n at the command prompt, and then press ENTER. This command displays the names that were registered locally on the computer by programs such as the server and redirector.
 
·         To list the contents of the NetBIOS name cache, type nbtstat -c at the command prompt, and then press ENTER. This command shows the NetBIOS name cache, which contains name-to-address mappings for other computers.
·         To purge the name cache and reload it from the LMHOSTS file, type nbtstat -r at the command prompt, and then press ENTER.
·         To perform a NetBIOS adapter status command against the computer that you specify by name, type nbtstat -a NetBIOS computer name at the command prompt, and then press ENTER. The adapter status command returns the local NetBIOS name table for that computer and the MAC address of the network adapter.
·         To display a list of client and server connections, type nbtstat -s at the command prompt, and then press ENTER. This command lists the current NetBIOS sessions and their status, including statistics, as shown in the following example:
   NetBIOS Connection Table 
 

 For example, to find out if your local machine is running NetBEUI/NetBIOS, type nbtstat -n on the computer. If it shows 'type' of '<20>', it is using NetBIOS. For a remote computer, type nbtstat -a computername or nbtstat -A IP.


Ping and Tracert

If you are unable to contact to a remote server, there are two common tools that you can use. Use the ping command to verify that a host computer can connect to the TCP/IP network and network resources. Use the tracert command to examine the route taken to a destination.
 

To Test Connections by Using Ping.exe


If you can ping a remote computer's IP but not the ComputerName (Time out), this is likely caused by a name resolution failure, rather than network connectivity. You need to check the network settings such as DHCP, DNS, WINS and NetBIOS over TCP/IP.

If you cannot ping both IP and ComputerName, 1)  Ping the loopback address (by using the ping 127.0.0.1 command) to verify that TCP/IP is installed and working correctly on the local computer. 2)   Ping the IP address of the local computer to verify that it was added to the network correctly. 3)   Ping the IP address of the default gateway to verify that the gateway is functional and it is possible to connect to a local host on the local network. You can obtain the IP address of the local default gateway by using the ipconfig /renew command. 4)  Ping the IP address of another remote host to verify that you can communicate through a router.

To Test Connections by Using Tracert.exe

Tracert.exe is a route-tracing utility that you can use to determine the network path to a destination. To determine the path that a packet takes on the network and where that path may be ending.

For example, your LAN works fine but no one can access the Internet. You may want to use tracert to determine the network path to a Internet destination like yahoo.com before you call your ISP. You can use tracert to examine the results to determine the length of time that the packet took to reach each network segment and the point at which the connection may stop working.

PathPing display all routers along the way
Using PathPing can displays information for the destination computer and all routers along the way. For example, to display the information of all router paths to yahoo.com, use command pathping yahoo.com.

NET VIEW

You can use net view \\computername command to test a network connection. Net view command will display a list of the file and print shares of a computer that is running Windows 2000 is generated by establishing a temporary NetBIOS connection.

If there are no file or print shares available on the specified computer, you receive a "There are no entries in the list." message. If the command (net view\\computername) does not work, use net view \\IP address of the remote computer. If net view \\ip works, but a net view attempt to the computer name does not work, the computer name may be resolving to the wrong address.

To list all computers are running on the network, type net view only (or net view /domain:domainname for each domain). That will show all computers.
Notes:
If you can contact an Internet resource directly, but "Ping" the Internet IP gets  "Request Timed Out". That is because many organizations block the return of ICMP (ping) packets as a security measure.
What is netdiag for
Netdiag is a command-line diagnostic tool that you can use to test network connectivity. It performs a series of tests to determine the state and functionality of your network client. You can use the results of these tests and network status information that is provided by Netdiag to help you isolate network and connectivity problems on your Windows 2000-based workstation or server computer. 

Netdiag is included with the Windows 2000 Support Tools. To install the Support Tools, run Setup.exe from the Support\Tools folder on the Windows 2000 CD-ROM. To download Netdiag, visit the following Microsoft Web site: http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/netdiag-o.asp

Command-line utilities

Viewing configuration by using ipconfig /all or winipcfg

When troubleshooting a TCP/IP networking problem, you can use the ipconfig command to get host computer configuration information, including the IP address, subnet mask, and default gateway. If it is running Win9x, ME, use winipcfg instead.

Refreshing configuration by using ipconfig /renew

When troubleshooting a TCP/IP networking problem, you can use the ipconfig /renew command to renew all network adapters on the computer that uses DHCP (except those that are manually configured) try to contact a DHCP server and renew their existing configuration or obtain a new configuration. You can also use the ipconfig command with the /release option to immediately release the current DHCP configuration for a host. For Win9x and ME, use the release and renew options of the winipcfg command instead of ipconfig /release andipconfig /renew to perform manual release or renewal of the IP configuration lease for a client.

Flush and re-register WINS and DNS

To flush the NetBIOS cache, use nbtstat -R, and to re-registers with WINS, use nbtstat -RR.

To flushes the DNS cache, use ipconfig /flushdns, and re-registers with DNS, use ipconfig /registerdns.
Network Utilities from Resource Kits
CConnect.exe - Monitor user connections to servers and which system they are logging in to.
CConnect.exe can perform the following functions:
  • Limit concurrent connections per user.
  • Log off remote computers when concurrent connections are reached.
  • List all computers that a user is logged on to.
  • List logon servers for each user.
  • Show how many users are logged on to a domain controller (DC).
  • Force a logoff when concurrent connections are reached.
  • Enable debugging of the CConnect tool.
  • Write events to the event log of a specified server concerning the status of the CConnect tool.
  • Save all lists to a file for further examination.
  • Track the last user of the computer and only limit that user from logging on to the computer if the computer was shut down improperly.
dhcploc.exe - Locates DHCP servers on the network.
lockflop.exe - Locks the floppy drive so that users cannot read floppy disk.
logoff.exe - Log off a user.
nlmom.exe - Tests and debugs trust relationships between domains.
netclip.exe - Views the Clipboard on a remote system nd can be copied to the local system to.
rcmd.Excutes command-line commands on local and remote systems.
srvcheck.exe - List the non-administrative shares on a remote system and return the ACLs on those shares.
usrstat.exe - Lists the user information (username, full name, last logon time in a domain.
winscl.exe - Checks the WINS database information.




No comments: