Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the network commands commonly used by network managers in dos

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article is about what network commands are commonly used by network management in dos. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

If you have played with the router, you will know the interesting command abbreviations in the router.

For example, "sh int" means "show interface".

Now Windows 2000 has a tool with a similar interface, called netsh.

We enter netsh under cmd shell of Windows 2000

Just come out: netsh > prompt

Enter int ip and it shows:

Interface ip >

Then type dump, and we can see the network configuration of the current system:

#--

# Interface IP Configuration

#--

Pushd interface ip

# Interface IP Configuration for "Local Area Connection"

Set address name = "Local Area Connection" source = static addr = 192.168.1.168

Mask = 255.255.255.0

Add address name = "Local Area Connection" addr = 192.1.1.111 mask = 255.255.255.0

Set address name = "Local Area Connection" gateway = 192.168.1.100 gwmetric = 1

Set dns name = "Local Area Connection" source = static addr = 202.96.209.5

Set wins name = "Local Area Connection" source = static addr = none

Popd

# End of interface IP configuration

The above is a way to operate interactively.

We can enter the command directly:

"netsh interface ip add address" Local Area Connection "10.0.0.2

255.0.0.0 "

To add an IP address.

If you don't know the grammar, it doesn't matter!

At the prompt, enter? We can find the answer. Is it convenient?

It turns out that there are some things that people like in Microsoft's things. Unfortunately, there are very few.

Windows network command line program

This part includes:

Use ipconfig / all to view the configuration

Refresh the configuration using ipconfig / renew

Use ipconfig to manage DNS and DHCP categories ID

Use Ping to test the connection

Using Arp to solve hardware address problem

Using nbtstat to solve the NetBIOS name problem

Display connection statistics using netstat

Use tracert to track network connections

Use pathping to test the router

Use ipconfig / all to view the configuration

When discovering and resolving TCP/IP network problems, first check the TCP/IP configuration on the computer where the problem occurs. Sure

Use the ipconfig command to obtain host configuration information, including the IP address, subnet mask, and default gateway.

Be careful

For clients of Windows 95 and Windows 98, use the winipcfg command instead of ipconfi

G command.

When using the ipconfig command with the / all option, a detailed configuration report is given for all interfaces, including any

Configured serial port. Using ipconfig / all, you can redirect command output to a file and set the

The output is pasted into another document. You can also use this output to confirm the TCP/IP configuration of each computer on the network, or

To further investigate the TCP/IP network problems.

For example, if the IP address configured by the computer duplicates the existing IP address, the subnet mask is displayed as 0.0.0

. 0 .

The following example is the output of the ipconfig / all command, which is configured to dynamically configure using the DHCP server

TCP/IP and resolve the name using WINS and DNS servers.

Windows 2000 IP Configuration

Node Type.. . . . . . . . : Hybrid

IP Routing Enabled.. . . . : No

WINS Proxy Enabled.. . . . : No

Ethernet adapter Local Area Connection:

Host Name.. . . . . . . . : corp1.microsoft.com

DNS Servers. . . . . . . : 10.1.0.200

Description. . . . . . . : 3Com 3C90x Ethernet Adapter

Physical Address. . . . . : 00-60-08-3E-46-07

DHCP Enabled.. . . . . . . : Yes

Autoconfiguration Enabled.: Yes

IP Address. . . . . . . . . : 192.168.0.112

Subnet Mask. . . . . . . . : 255.255.0.0

Default Gateway. . . . . . : 192.168.0.1

DHCP Server. . . . . . . . : 10.1.0.50

Primary WINS Server. . . . : 10.1.0.101

Secondary WINS Server. . . : 10.1.0.102

Lease Obtained.. . . . . . : Wednesday, September 02, 1998 10:32:13 AM

Lease Expires.. . . . . . : Friday, September 18, 1998 10:32:13 AM

If there is no problem with the TCP/IP configuration, the next step is to test that you can connect to other hosts on the TCP/IP network.

Refresh the configuration using ipconfig / renew

When resolving TCP/IP network problems, first check the TCP/IP configuration on the computer that is experiencing the problem. If the computer

To enable DHCP and use the DHCP server to obtain the configuration, please use the ipconfig / renew command to start refreshing the rent

Make an appointment.

When using ipconfig / renew, all network cards on computers that use DHCP (except those that are manually configured

Adapters) try to connect to the DHCP server, update the existing configuration or get a new configuration.

You can also use the ipconfig command with the / release option to release the current DHCP configuration of the host immediately. Yes

For more information about DHCP and the leasing process, see how the client gets the configuration.

Be careful

For Windows 95 and Windows 98 customers with DHCP enabled, use the rel of the winipcfg command

Ease and renew options instead of ipconfig / release and ipconfig / renew commands, manual

Release or update the customer's IP configuration lease.

Use ipconfig to manage DNS and DHCP categories ID

You can also use the ipconfig command:

Displays or resets the DNS cache.

For more information, see using ipconfig to view or reset the customer resolver cache.

Refresh the registered DNS name.

For more information, see updating DNS customer Registration with ipconfig.

Displays the DHCP category ID of the adapter.

For more information, see displaying DHCP category ID information on the client.

Sets the DHCP category ID for the adapter.

For more information, see setting up the DHCP category ID information on the client.

Use Ping to test the connection

The Ping command helps verify connectivity at the IP level. When you discover and resolve a problem, you can use Ping to report to the target master

The machine name or IP address sends the ICMP echo request. Need to verify that the host can connect to the TCP/IP network and network

When using a resource, use Ping. You can also use Ping to isolate network hardware problems and incompatible configurations.

It is usually best to use the Ping command to verify the existence of the route between the local computer and the network host, and to connect

The IP address of the connected network host. The IP address of the Ping target host to see if it responds, as follows:

Ping IP_address

The following steps should be performed when using Ping:

The Ping loopback address verifies that TCP/IP is installed on the local computer and that it is configured correctly.

Ping 127.0.0.1

The IP address of the Ping local computer verifies that it is correctly added to the network.

Ping IP_address_of_local_host

The IP address of the Ping default gateway verifies that the default gateway is running and can communicate with the local host on the local network

News.

Ping IP_address_of_default_gateway

The IP address of the Ping remote host verifies that it can communicate through the router.

Ping IP_address_of_remote_host

The Ping command resolves the computer name to an IP address using Windows socket-style name resolution, so if

If you succeed with an address but fail to Ping with a name, the problem lies in the address or name resolution, not the network connection

It's a question of generality. For more information, see using Arp to resolve hardware address issues.

If you cannot successfully use Ping at any point, verify that:

Restart your computer after installing and configuring TCP/IP.

The IP address of the local computer on the General tab of the Internet Protocol (TCP/IP) Properties dialog box

Effective and correct.

IP routing is enabled and the links between routers are available.

You can use the different options of the Ping command to specify the size of the packet to use, how many packets to send,

Whether to record used routes, time-to-live (TTL) values to be used, and whether to set the No Segmentation flag. But

To type ping -? Review these options.

The following example shows how to send two Ping, each 1450 bytes, to the IP address 172.16.48.10:

C:\ > ping-n 2-l 1450 172.16.48.10

Pinging 172.16.48.10 with 1450 bytes of data:

Reply from 172.16.48.10:bytes=1450 timenetstat-a

Active Connections

Proto Local Address Foreign Address State

TCP CORP1:1572 172.16.48.10:nbsession ESTABLISHED

TCP CORP1:1589 172.16.48.10:nbsession ESTABLISHED

TCP CORP1:1606 172.16.105.245:nbsession ESTABLISHED

TCP CORP1:1632 172.16.48.213:nbsession ESTABLISHED

TCP CORP1:1659 172.16.48.169:nbsession ESTABLISHED

TCP CORP1:1714 172.16.48.203:nbsession ESTABLISHED

TCP CORP1:1719 172.16.48.36:nbsession ESTABLISHED

TCP CORP1:1241 172.16.48.101:nbsession ESTABLISHED

UDP CORP1:1025 *: *

UDP CORP1:snmp *: *

UDP CORP1:nbname *: *

UDP CORP1:nbdatagram *: *

UDP CORP1:nbname *: *

UDP CORP1:nbdatagram *: *

C:\ > netstat-s

IP Statistics

Packets Received = 5378528

Received Header Errors = 738854

Received Address Errors = 23150

Datagrams Forwarded = 0

Unknown Protocols Received = 0

Received Packets Discarded = 0

Received Packets Delivered = 4616524

Output Requests = 132702

Routing Discards = 157,

Discarded Output Packets = 0

Output Packet No Route = 0

Reassembly Required = 0

Reassembly Successful = 0

Reassembly Failures =

Datagrams Successfully Fragmented = 0

Datagrams Failing Fragmentation = 0

Fragments Created = 0

ICMP Statistics

Received Sent

Messages 693 4

Errors 0 0

Destination Unreachable 685 0

Time Exceeded 0 0

Parameter Problems 0 0

Source Quenches 0 0

Redirects 0 0

Echoes 4 0

Echo Replies 0 4

Timestamps 0 0

Timestamp Replies 0 0

Address Masks 0 0

Address Mask Replies 0 0

TCP Statistics

Active Opens = 597

Passive Opens = 135,

Failed Connection Attempts = 107

Reset Connections = 91

Current Connections = 8

Segments Received = 106770

Segments Sent = 118431

Segments Retransmitted = 461

UDP Statistics

Datagrams Received = 4157136

No Ports = 351928

Receive Errors = 2

Datagrams Sent = 13809

Use tracert to track network connections

Tracert (tracking routes) is a route tracking utility that determines the path that IP datagrams take to access the destination. The Tracert command uses the IP time to Live (TTL) field and ICMP error messages to determine the route from one host to other hosts on the network.

How Tracert works

By sending "Internet Control message Protocol (ICMP)" response packets with different IP time to live (TTL) values to the target, the Tracert diagnostics determine the route taken to the target. Each router on the path is required to decrement at least 1 of the TTL on the packet before forwarding the packet. When the TTL on the packet is reduced to 0, the router should send the message "ICMP timed out" back to the source system.

Tracert first sends an echo packet with a TTL of 1 and increments the TTL by 1 in each subsequent transmission until the destination response or TTL reaches the maximum value to determine the route. Determine the route by checking the "ICMP timed out" message sent back by the intermediate router. Some routers drop packets that have expired from TTL without being asked, which is not seen in the Tracert utility.

The Tracert command prints a list of the near-end router interfaces in the path that returns the "ICMP timed out" message in order. If you use the-d option, the Tracert utility does not query DNS on each IP address.

In the following example, the packet must pass through two routers (10.0.0.1 and 192.168.0.1) to reach the host

172.16.0.99 . The default gateway of the host is the IP of the router on the 10.0.0.1192.168.0.0 network

The address is 192.168.0.1.

C:\ > tracert 172.16.0.99-d

Tracing route to 172.16.0.99 over a maximum of 30 hops

1 2s 3s 2s 10,0.0,1

2 75 ms 83 ms 88 ms 192.168.0.1

3 73 ms 79 ms 93 ms 172.16.0.99

Trace complete.

Solve problems with tracert

You can use the tracert command to determine where packets stop on the network. In the following example, the default gateway determines 19

2.168.10.99 host does not have a valid path. This may be a problem with the router configuration, or 192.168.10.

0 network does not exist (wrong IP address).

C:\ > tracert 192.168.10.99

Tracing route to 192.168.10.99 over a maximum of 30 hops

1 10.0.0.1 reportsestination net unreachable.

Trace complete.

The Tracert utility is very useful for solving large network problems, where you can take several paths to the same

Point.

Tracert command line options

The Tracert command supports several options, as shown in the following table.

Tracert [- d] [- h maximum_hops] [- j host-list] [- w timeout] target_name

Option description

-d specifies that IP addresses are not resolved to host names.

-h maximum_hops specifies the number of hops to trace routes to a host called target_name.

-j host-list specifies the list of router interfaces in the path taken by the Tracert utility packet.

-w timeout waits for the number of milliseconds specified by timeout for each reply.

The name or IP address of the target_name target host.

For more information, see tracking paths using the tracert command.

Use pathping to test the router

The pathping command is a route tracking tool that combines the functionality of the ping and tracert commands with other information that the two tools do not provide. The pathping command sends the packet to each router on the path to the final destination for a period of time, and then returns from each hop based on the computer results of the packet. Because the command shows the extent to which packets are lost on any given router or link, it is easy to identify the router or link that may cause network problems. Some options are available, as shown in the following table.

Option name function

-n Hostnames does not resolve addresses to hostnames.

-the maximum number of hops for the h Maximum hops search target.

-g Host-list releases the source route along the route list.

The number of milliseconds that p Period waits between ping.

-Q Num_queries the number of queries per hop.

-w Time-out is the number of milliseconds to wait for each reply.

-T Layer 2 tag connects a layer 2 priority tag (for example, for IEEE 802.1p) to a packet and sends it to each network device in the path. This helps identify network devices that are not properly configured with layer 2 priorities. The-T switch is used to test quality of service (QoS) connectivity.

-R RSVP isbase Che checks to determine if each router in the path supports the Resource Reservation Protocol (RSVP), which allows hosts to reserve a certain amount of bandwidth for data streams. The-R switch is used to test quality of service (QoS) connectivity.

The default number of hops is 30, and the default wait time before timeout is 3 seconds. The default time is 250 milliseconds, and the number of queries per router along the path is 100.

Here is a typical pathping report. The statistics edited after the hop list indicate packet loss on each separate router.

D:\ > pathping-n msw

Tracing route to msw [7.54.1.196]

Over a maximum of 30 hops:

0 172.16.87.35

1 172.16.87.218

2 192.68.52.1

3 192.68.80.1

4 7.54.247.14

5 7.54.1.196

Computing statistics for 125 seconds...

Source to Here This Node/Link

Hop RTT Lost/Sent = Pct Lost/Sent = Pct Address

0 172.16.87.35

0 / 100 = 0% |

1 41ms 0 / 100 = 0% / 100 = 0% 172.16.87.218

13 / 100 = 13% |

2 22ms 16 / 100 = 16% 3 / 100 = 3% 192.68.52.1

0 / 100 = 0% |

3 24ms 13 / 100 = 13% 0 / 100 = 0% 192.68.80.1

0 / 100 = 0% |

4 21ms 14 / 100 = 14% 1 / 100 = 1% 10.54.247.14

0 / 100 = 0% |

5 24ms 13 / 100 = 13% 0 / 100 = 0% 10.54.1.196

Trace complete.

When running pathping, first look at the results of the route when testing the problem. This path is the same as the path displayed by the tracert command. The pathping command then displays a busy message for the next 125ms (this time varies according to the hop count). During this period, pathping collects information from all previously listed routers and the links between them. At the end of this period, it displays the test results.

The two rightmost columns This Node/Link Lost/Sent=Pct and Address contain the most useful information. 172.16.87.218 (Hop 1) and 192.68.52.1 (Hop 2) lost 13% of the packets. All other links work fine. Routers in hop 2 and 4 also lose packets addressed to them (as shown in the This Node / Link column), but the loss does not affect the forwarding path.

The loss rate shown for the link (marked as | in the rightmost column) indicates that lost packets are forwarded along the path. The loss indicates that the link is blocked. The loss rate shown for the routers (shown by the IP address in the rightmost column) indicates that the CPU of those routers may be overloaded. These blocked routers may also be a factor in end-to-end problems, especially when software routers forward packets.

Thank you for reading! This is the end of this article on "what are the network commands commonly used by network managers in dos?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report