ARP, Tracert, Route and NBTSTAT Commands Details

xiaoxiao2021-03-06  22

Source; Tianji Net

ARP

ARP is an important TCP / IP protocol and is used to determine the physical address of the network card corresponding to the IP address. Practical ARP commands, we can view current content in the ARP cache of local computers or another computer. In addition, use the ARP command, you can also use the static network card physical / IP address in manual mode, which may use this way for the default gateway and local servers, which help to reduce the network. The amount of information.

According to the default setting, the project in the ARP cache is dynamic, and whenever a data report for a specified location and there is no current project in the cache, the ARP will automatically add the item. Once the cache project is entered, they have begun to go to the failure state. For example, in the Windows NT / 2000 network, if you do not use it after entering the project, the physical / IP address pair will fail within 2 to 10 minutes. Therefore, if the project is rare or at all in the ARP cache, please don't be strange, you can add it through another computer or router's PING command. So, when you need to view the contents of the cache via the ARP command, please take the computer first PIN (you can't send the ping command).

ARP common command options:

· ARP -A or ARP -G

Used to view all items in the cache. The result of the -a and -g parameters is the same, and -g has always been an option to display all items in the ARP cache in the UNIX platform, and Windows is ARP -A (-A can be considered ALL, That is, all the meaning), but it can also accept comparing traditional -g options.

· ARP -A IP

If we have multiple network cards, use the ARP -A plus the IP address of the interface, you can only display the ARP cache item related to the interface.

· ARP -S IP physical address

We can manually enter a static item in the ARP cache. The project will remain active during the computer boot process, or when an error occurs, the manually configured physical address will automatically update the item.

· ARP -D IP

Use this command to manually delete a static project.

For example, we type arp -a under the command prompt; if we use the ping command to test and verify the connectivity of the host from this computer to 10.0.0.99, the ARP cache displays the following:

Intertface: 10.0.0.1 on interface 0x1

ITYSical Address         

  10.0.0.99   00-E0-98-00-7C-DC  DYNAMIC

In this case, the cache item indicates the media access control address of 00-E0-98-00-7C-DC at 10.0.0.99, which is assigned in the network card hardware of the remote computer. The media access control address is the address of the computer for physical communication with the remote TCP / IP host with the network.

At this point, we can use the ipconfig and ping commands to view your own network configuration and determine if it is correct. You can use NetStat to view the connection we have established by others and identify IP information hidden by ICQ users. You can use ARP to view the MAC address of the NIC. .

Tracert

If there is a network connectivity problem, you can use the tracert command to check the path to the target IP address and record the result. The tracert command displays a set of IP routers for transferring packets from the computer to the target location, as well as the time required for each hop. If the packet cannot be passed to the target, the Tracert command will display the last router that successfully forwards the packet. When the datagram is transmitted from our computer to the destination, the Tracert command can be used to track the route (path) of the datagram. The utility tracking path is a path to the source computer to the destination, and it cannot be guaranteed or considered to follow this path. If our configuration uses DNS, then we often get the name of the city, address, and common communication company from the generated response. Tracert is a slower command (if we specify the target address is far), we need to give it 15 seconds for each router. The use of Tracert is very simple, just need to follow an IP address or URL behind Tracert, Tracert will perform the corresponding domain name conversion.

Tracert's most common usage:

Tracert IP Address [-d] This command returns the list of routers that arrive at the IP address. By using the -d option, the router path will be displayed more quickly, because Tracert does not attempt to resolve the name of the router in the path.

Tracert is generally used to detect the location of the fault. Can we use Tracert IP to have problems, although there is still no problem, but it has already told our problem, we can also tell it. Others ---- a certain place.

Route

Most hosts are generally located on a network segment that is only connected to a router. Since there is only one router, there is no problem that uses which router to publish the datagram to the remote computer, the IP address of the router can be entered as the default gateway of all computers on the network segment.

However, when there are two or more routers on the network, we don't have to rely on the default gateway. In fact, we may want to pass some of the remote IP addresses through a particular router, while other remote IPs are passed through another router.

In this case, we need the corresponding routing information, which is stored in the routing table, each host and each router with its own unique routing table. Most routers use specialized routing protocols to exchange and dynamically update the routing table between the routers. However, in some cases, it must be manually added to the router and the routing table on the host. Route is used to display, manually add and modify routing table items.

General use options:

Route Print

This command is used to display the current item in the routing table, the output on a single router network segment; because the NIC is configured with an IP address, all of these items are automatically added.

· Route Add

Using this command, you can add a pathway project to a routing table. For example, if you want to set a route to the destination network 209.98.32.33, there is a 5 router network segment, first go through a router on the local network, the device IP is 202.96.123.5, the subnet mask is 255.255.255.224 Then we should enter the following command:

Route Add 209.98.32.33 Mask 255.255.255.224 202.96.123.5 Metric 5

Route Change

We can use this command to modify the transmission routing of the data, but we cannot use this command to change the destination of the data. The following example can change the route of the data to another router, which uses a straight path containing 3 network segments:

Route Add 209.98.32.33 Mask 255.255.255.224 202.96.123.250 metric 3

· Route delete uses this command to delete routing from the routing table. For example: Route delete 209.98.32.33

NBTSTAT

Use the nbtstat command to release and refresh the NetBIOS name. NBTSTAT (NetBIOS Statistics on TCP / IP) utility is used to provide statistics about NetBIOS. With NetBIOS, we can view NetBIOS name forms on your local computer or remote computer.

Common options:

· NBTSTAT-N

Shows the local name and service program.

· NBTSTAT -C

This command is used to display the contents of the NetBIOS name cache. The NetBIOS name cache is used to inch the NetBIOS name and IP address pair of other computers that have recently communicated with this computer.

· NBTSTAT -R

This command is used to clear and reload the NetBIOS name cache.

· NBTSTAT -A IP

Show another computer's physical address and name list through IP, what we have displayed is like the other computer running NBTSTAT-N.

· NBTSTAT -S IP

A NetBIOS connection table that displays another computer of the Practical IP address.

For example, under the command prompt, type: NBTSTAT -RR release and refresh processes are displayed in the form of command line output. This information indicates that all local NetBIOS names currently registered in the WINS of the computer have been released and renewed in the WINS server.

转载请注明原文地址:https://www.9cbs.com/read-45379.html

New Post(0)