Transcript
  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    1/21

    Comenzi de retea pentru sitemul de operare Windows folosite din linie de

    comanda:

    Start->Run->cmd

    Windows IP Configuration Tool (ipconfig)

    WindowsIPConfigurationtoolesteechivalentulinliniedecomandaaldin

    Windows9X/Me.

    Utilizare:afisazaparametriidinconfiguratiaprotocoluluiTCP/IP.

    Moddefolosire:

    >i pconf i g >afisazaadresadeIPconfiguratapeinterfataconectatalaretea,mascadereteasi

    DefaultGateway. I

    !AtentieIPulafisatpoatefidiferitdeIPulcucarecalculatorulseidentificapeinternet(IPul

    calculatoruluipoatesanufierutabil)

    >i pconf i g / sau >i pconf i g - ? afisazahelpul.

    Syntax

    I PCONFI G / al l Di spl ay f ul l conf i gur at i on i nf or mat i on.

    I PCONFI G / r el ease [ adapter]Rel ease t he I P addr ess f or t he speci f i ed adapt er .

    I PCONFI G / r enew [ adapter]Renew t he I P addr ess f or t he speci f i ed adapt er.

    I PCONFI G / f l ushdns Pur ge t he DNS Resol ver cache.

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    2/21

    I PCONFI G / r egi st erdns Ref r esh al l DHCP l eases and r e- r egi st er DNS names.

    I PCONFI G / di spl aydns Di spl ay t he cont ent s of t he DNS Resol ver Cache.

    I PCONFI G / showcl assi d adapt erDi spl ay al l t he DHCP cl ass I Ds al l owed f or adapt er .

    I PCONFI G / set cl assi d adapt er [ cl assi d]Modi f y t he dhcp cl ass i d.

    Exampl es:> i pconf i g . . . Show i nf or mat i on.> i pconf i g / al l . . . Show det ai l ed i nf or mat i on> i pconf i g / r enew . . . r enew al l adapt er s> i pconf i g / r enew EL* . . . r enew any connect i on t hat has i t s

    name st ar t i ng wi t h EL

    > i pconf i g / r el ease *Con* . . . r el ease al l mat chi ng connect i ons,eg. "Local Ar ea Connect i on 1" or

    "Local Ar ea Connect i on 2"

    > i pconf i g / set cl assi d "Local Ar ea Connect i on" TEST. . . set t he DHCP cl ass I D f or t he

    named adapt er t o = TEST

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    3/21

    ipconfig /all

    This option displays the same IP addressing information for each adapter as the default option.Additionally, it displays DNSand WINSsettings for each adapter.

    ipconfig /release

    This option terminates any active TCP/IP connections on all network adapters and releases thoseIP addresses for use by other applications. 'ipconfig /release" can be used with specific Windowsconnection names. In this case, the command will affect only the specified connections and not

    all. The command accepts either full connection names or wildcard names. Examples:ipconfig /release "Local Area Connection 1"ipconfig /release *Local*

    ipconfig /renew

    This option re-establishes TCP/IP connections on all network adapters. As with the releaseoption, ipconfig /renew takes an optional connection name specifier.

    Both /renew and /release options only work on clients configured for dynamic (DHCP)addressing.

    Note: The remaining options below are only available on Windows 2000 and newer versions ofWindows.

    ipconfig /showclassid, ipconfig /setclassid

    http://compnetworking.about.com/cs/domainnamesystem/g/bldef_dns.htmhttp://compnetworking.about.com/cs/windowsnetworkin1/g/bldef_wins.htmhttp://compnetworking.about.com/cs/protocolsdhcp/g/bldef_dhcp.htmhttp://compnetworking.about.com/cs/protocolsdhcp/g/bldef_dhcp.htmhttp://compnetworking.about.com/cs/windowsnetworkin1/g/bldef_wins.htmhttp://compnetworking.about.com/cs/domainnamesystem/g/bldef_dns.htm
  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    4/21

    These options manage DHCP class identifiers. DHCP classes can be defined by administratorson a DHCP server to apply different network settings to different types of clients. This is anadvanced feature of DHCP typically used in business networks, not home networks.

    ipconfig /displaydns, ipconfig /flushdns

    These options access a local DNS cache that Windows maintains. The /displaydns option printsthe contents of the cache, and the /flushdns option erases the contents.

    This DNS cache contains a list of remote server names and the IP addresses (if any) theycorrespond to. Entries in this cache come from DNS lookups that happen when attempting tovisit Web sites, named FTP servers, and other remote hosts. Windows uses this cache to improvethe performance of Internet Explorer and other Web-based applications.

    In home networking, these DNS options are sometimes useful for advanced troubleshooting. Ifthe information in your DNS cache becomes corrupted or outdated, you could face difficulty

    accessing certain sites on the Internet. Consider these two scenarios:

    The IP address of a Web site, email server or other server changes (rare occurence). Thename and address of this site normally stay in your cache for 24 hours after your lastvisit. You may need to clear your cache to access the server sooner.

    A Web site or other server was offline when you last visited it (hopefully a rareoccurence) but since has come back online. The cache will normally keep a record thatthe server is offline for 5 minutes afer your last visit. You may need to clear your cacheto access the server sooner.

    ipconfig /registerdns

    Similar to the above options, this option updates DNS settings on the Windows computer.Instead of merely accessing the local DNS cache, however, this option initiates communicationwith both the DNS server (and the DHCP server) to re-register with them.

    This option is useful in troubleshooting problems involving connection with the Internet serviceprovider, such as failure to obtain a dynamic IP address or failure to connect to the ISP DNSserver.

    Like the /release and /renew options, /registerdns optionally takes the name(s) of specific

    adapters to update. If no name parameter is specified, /registerdns updates all adapters.

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    5/21

    Netstat

    Afisaza conexiunile TCP active, porturile deschise, statistici Ethernet, tabela de rutare.

    >netstat

    Syntax

    netstat[-a] [-e] [-n] [-o] [-pProtocol] [-r] [-s] [Interval]

    Parameters

    -a : Displays all active TCP connections and the TCP and UDP ports on which the computer islistening.

    -e : Displays Ethernet statistics, such as the number of bytes and packets sent and received. Thisparameter can be combined with -s.

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    6/21

    -n : Displays active TCP connections, however, addresses and port numbers are expressednumerically and no attempt is made to determine names.

    -o : Displays active TCP connections and includes the process ID (PID) for each connection.You can find the application based on the PID on the Processestab in Windows Task Manager.

    This parameter can be combined with -a, -n, and -p.

    -p Protocol : Shows connections for the protocol specified by Protocol. In this case, theProtocolcan be tcp, udp, tcpv6, or udpv6. If this parameter is used with -sto display statisticsby protocol, Protocolcan be tcp, udp, icmp, ip, tcpv6, udpv6, icmpv6, or ipv6.

    -s : Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP,and IP protocols. If the IPv6 protocol for Windows XP is installed, statistics are shown for theTCP over IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols. The -pparameter can be used tospecify a set of protocols.

    -r : Displays the contents of the IP routing table. This is equivalent to the route printcommand.

    Interval : Redisplays the selected information everyIntervalseconds. Press CTRL+C to stopthe redisplay. If this parameter is omitted, netstatprints the selected information only once.

    /? : Displays help at the command prompt.

    Remarks

    This command is available only if the Internet Protocol (TCP/IP)protocol is installed

    as a component in the properties of a network adapter in Network Connections Netstatprovides statistics for the following:

    o Proto

    The name of the protocol (TCP or UDP).

    o Local Address

    The IP address of the local computer and the port number being used. The nameof the local computer that corresponds to the IP address and the name of the portis shown unless the -nparameter is specified. If the port is not yet established, the

    port number is shown as an asterisk (*).

    o Foreign Address

    The IP address and port number of the remote computer to which the socket isconnected. The names that corresponds to the IP address and the port are shownunless the -nparameter is specified. If the port is not yet established, the portnumber is shown as an asterisk (*).

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    7/21

    o (state)

    Indicates the state of a TCP connection. The possible states are as follows. Formore information about the states of a TCP connection, see RFC 793.

    FROM RFC 793:

    A connect i on pr ogr esses t hr ough a ser i es of st at es dur i ng i t sl i f et i me. The st ates are: LI STEN, SYN- SENT, SYN- RECEI VED,ESTABLI SHED, FI N- WAI T- 1, FI N- WAI T- 2, CLOSE- WAI T, CLOSI NG, LAST- ACK,TI ME- WAI T, and t he f i ct i onal st at e CLOSED. CLOSED i s f i ct i onalbecause i t r epr esent s t he st ate when t her e i s no TCB, and ther ef ore,no connect i on. Br i ef l y t he meani ngs of t he st at es ar e:

    LI STEN - r epr esent s wai t i ng f or a connect i on r equest f r om any remoteTCP and port .

    SYN- SENT - r epr esent s wai t i ng f or a matchi ng connect i on r equestaf t er havi ng sent a connect i on request .

    SYN- RECEI VED - r epr esent s wai t i ng f or a conf i r mi ng connect i onr equest acknowl edgment af t er havi ng bot h r ecei ved and sent aconnect i on r equest .

    ESTABLI SHED - r epr esent s an open connect i on, dat a r ecei ved can bedel i ver ed t o t he user . The nor mal st at e f or t he data t r ansf er phaseof t he connect i on.

    FI N- WAI T- 1 - r epr esent s wai t i ng f or a connect i on t er mi nati on requestf r om t he r emot e TCP, or an acknowl edgment of t he connect i ont er mi nat i on r equest pr evi ousl y sent .

    FI N- WAI T- 2 - r epr esent s wai t i ng f or a connect i on t er mi nati on requestf r om t he remote TCP.

    CLOSE- WAI T - r epr esent s wai t i ng f or a connect i on t ermi nat i on r equestf r om t he l ocal user .

    CLOSI NG - r epr esent s wai t i ng f or a connect i on t er mi nat i on r equestacknowl edgment f r om t he remot e TCP.

    LAST- ACK - r epr esent s wai t i ng f or an acknowl edgment of t heconnect i on t ermi nat i on r equest pr evi ousl y sent t o t he remote TCP( whi ch i ncl udes an acknowl edgment of i t s connect i on t ermi nat i onr equest ) .

    TI ME- WAI T - r epresent s wai t i ng f or enough t i me t o pass t o be sur e

    t he r emot e TCP recei ved t he acknowl edgment of i t s connect i ont er mi nat i on r equest .

    CLOSED - r epr esent s no connect i on st ate at al l .

    A TCP connect i on pr ogr esses f r omone st ate t o another i n response t oevent s. The event s are t he user cal l s, OPEN, SEND, RECEI VE, CLOSE,ABORT, and STATUS; t he i ncomi ng segment s, par t i cul ar l y t hosecont ai ni ng t he SYN, ACK, RST and FI N f l ags; and t i meout s.

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    8/21

    The st at e di agr am i n f i gur e 6 i l l ust r at es onl y st at e changes, t oget herwi t h the causi ng event s and resul t i ng act i ons, but addr esses nei t herer r or condi t i ons nor act i ons whi ch are not connect ed wi t h st atechanges. I n a l at er sect i on, mor e det ai l i s of f er ed wi t h r espect t ot he react i on of t he TCP t o event s.

    +- - - - - - - - - + - - - - - - - - - \ act i ve OPEN| CLOSED | \ - - - - - - - - - - -+- - - - - - - - - +| CLOSED |

    +- - - - - - - - - + +- - - - - - - - - +

    TCP Connect i on St at e Di agram

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    9/21

    Exemple:

    To display both the Ethernet statistics and the statistics for all protocols, type the followingcommand:

    netstat -e -s

    To display the statistics for only the TCP and UDP protocols, type the following command:

    netstat -s -p tcp udp

    To display active TCP connections and the process IDs every 5 seconds, type the followingcommand:

    nbtstat -o 5

    To display active TCP connections and the process IDs using numerical form, type the followingcommand:

    nbtstat -n -o

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    10/21

    Tracert

    Afisaza calea parcursa de pachete pana la destinatie trimitand mesaje: Internet Control MessageProtocol (ICMP) Echo Request catre destinatie incrementand succesiv valorile Time to Live(TTL). Lista afisata este lista interfetelor near-side routerelor de pe calea host ->destination.

    Un router are cel putin 2 interfete. Un pachet intra printr-o interfata si este routat catre o altainterfata. Interfata de intrare este cunoscuta sub numele de near-end interface.

    Syntax

    tracert [-d] [-hMaximumHops] [-jHostList] [-w Timeout][TargetName]

    Parameters

    -d : Prevents tracertfrom attempting to resolve the IP addresses of intermediate routers to theirnames. This can speed up the display of tracertresults.

    -h MaximumHops : Specifies the maximum number of hops in the path to search for thetarget (destination). The default is 30 hops.

    -j HostList : Specifies that Echo Request messages use the Loose Source Route option in theIP header with the set of intermediate destinations specified inHostList. With loose sourcerouting, successive intermediate destinations can be separated by one or multiple routers. Themaximum number of addresses or names in the host list is 9. TheHostListis a series of IPaddresses (in dotted decimal notation) separated by spaces.

    -w Timeout : Specifies the amount of time in milliseconds to wait for the ICMP Time

    Exceeded or Echo Reply message corresponding to a given Echo Request message to bereceived. If not received within the time-out, an asterisk (*) is displayed. The default time-out is4000 (4 seconds).

    TargetName : Specifies the destination, identified either by IP address or host name.

    -? : Displays help at the command prompt.

    Remarks

    This diagnostic tool determines the path taken to a destination by sending ICMP EchoRequest messages with varying Time to Live (TTL) values to the destination. Each routeralong the path is required to decrement the TTL in an IP packet by at least 1 beforeforwarding it. Effectively, the TTL is a maximum link counter. When the TTL on apacket reaches 0, the router is expected to return an ICMP Time Exceeded message to thesource computer. Tracert determines the path by sending the first Echo Request messagewith a TTL of 1 and incrementing the TTL by 1 on each subsequent transmission untilthe target responds or the maximum number of hops is reached. The maximum number ofhops is 30 by default and can be specified using the -hparameter. The path is determined

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    11/21

    by examining the ICMP Time Exceeded messages returned by intermediate routers andthe Echo Reply message returned by the destination. However, some routers do not returnTime Exceeded messages for packets with expired TTL values and are invisible to thetracert command. In this case, a row of asterisks (*) is displayed for that hop.

    To trace a path and provide network latency and packet loss for each router and link in

    the path, use the pathpingcommand. This command is available only if the Internet Protocol (TCP/IP)protocol is installed

    as a component in the properties of a network adapter in Network Connections

    Examples

    To trace the path to the host named corp7.microsoft.com, type:

    tracert corp7.microsoft.com

    To trace the path to the host named corp7.microsoft.com and prevent the resolution of each IPaddress to its name, type:

    tracert -d corp7.microsoft.com

    To trace the path to the host named corp7.microsoft.com and use the loose source route10.12.0.1-10.29.3.1-10.1.44.1, type:

    tracert -j 10.12.0.1 10.29.3.1 10.1.44.1 corp7.microsoft.com

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    12/21

    Ping

    Verifica conectivitatea la nivel de IP prin trimiterea unui mesaj de tipul Internet ControlMessage Protocol (ICMP) Echo Request. Se afisaza destinatarul impreuna cu un timp deraspuns.

    Ping este cea mai folosita comanda de diagnostic de retea.

    Syntax

    ping[-t] [-a] [-nCount] [-l Size] [-f] [-iTTL] [-vTOS] [-rCount] [-sCount] [{-jHostList| -kHostList}] [-wTimeout] [TargetName]

    Parameters

    -t : Specifies that ping continue sending Echo Request messages to the destination untilinterrupted. To interrupt and display statistics, press CTRL-BREAK. To interrupt and quit ping,press CTRL-C.

    -a : Specifies that reverse name resolution is performed on the destination IP address. If this issuccessful, ping displays the corresponding host name.

    -n Count : Specifies the number of Echo Request messages sent. The default is 4.

    -l Size : Specifies the length, in bytes, of the Data field in the Echo Request messages sent. Thedefault is 32. The maximum sizeis 65,527.

    -f : Specifies that Echo Request messages are sent with the Don't Fragment flag in the IP headerset to 1. The Echo Request message cannot be fragmented by routers in the path to thedestination. This parameter is useful for troubleshooting path Maximum Transmission Unit(PMTU) problems.

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    13/21

    -i TTL : Specifies the value of the TTL field in the IP header for Echo Request messages sent.The default is the default TTL value for the host. For Windows XP hosts, this is typically 128.The maximum TTLis 255.

    -v TOS : Specifies the value of the Type of Service (TOS) field in the IP header for Echo

    Request messages sent. The default is 0. TOSis specified as a decimal value from 0 to 255.

    -r Count : Specifies that the Record Route option in the IP header is used to record the pathtaken by the Echo Request message and corresponding Echo Reply message. Each hop in thepath uses an entry in the Record Route option. If possible, specify a Countthat is equal to orgreater than the number of hops between the source and destination. The Countmust be aminimum of 1 and a maximum of 9.

    -s Count : Specifies that the Internet Timestamp option in the IP header is used to record thetime of arrival for the Echo Request message and corresponding Echo Reply message for eachhop. The Countmust be a minimum of 1 and a maximum of 4.

    -j HostList : Specifies that the Echo Request messages use the Loose Source Route option inthe IP header with the set of intermediate destinations specified inHostList. With loose sourcerouting, successive intermediate destinations can be separated by one or multiple routers. Themaximum number of addresses or names in the host list is 9. The host list is a series of IPaddresses (in dotted decimal notation) separated by spaces.

    -k HostList : Specifies that the Echo Request messages use the Strict Source Route option inthe IP header with the set of intermediate destinations specified inHostList. With strict sourcerouting, the next intermediate destination must be directly reachable (it must be a neighbor on aninterface of the router). The maximum number of addresses or names in the host list is 9. The

    host list is a series of IP addresses (in dotted decimal notation) separated by spaces.

    -w Timeout : Specifies the amount of time, in milliseconds, to wait for the Echo Replymessage that corresponds to a given Echo Request message to be received. If the Echo Replymessage is not received within the time-out, the "Request timed out" error message is displayed.The default time-out is 4000 (4 seconds).

    TargetName : Specifies the destination, which is identified either by IP address or host name.

    /? : Displays help at the command prompt.

    Remarks

    You can use pingto test both the computer name and the IP address of the computer. Ifpinging the IP address is successful, but pinging the computer name is not, you mighthave a name resolution problem. In this case, ensure that the computer name you arespecifying can be resolved through the local Hosts file, by using Domain Name System(DNS) queries, or through NetBIOS name resolution techniques.

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    14/21

    This command is available only if the Internet Protocol (TCP/IP)protocol is installedas a component in the properties of a network adapter in Network Connections

    Examples

    The following example shows pingcommand output:

    C:\>ping example.microsoft.com

    Pinging example.microsoft.com [192.168.239.132] with 32 bytes of data:

    Reply from 192.168.239.132: bytes=32 time=101ms TTL=124

    Reply from 192.168.239.132: bytes=32 time=100ms TTL=124

    Reply from 192.168.239.132: bytes=32 time=120ms TTL=124

    Reply from 192.168.239.132: bytes=32 time=120ms TTL=124

    To ping the destination 10.0.99.221 and resolve 10.0.99.221 to its host name, type:

    ping -a 10.0.99.221

    To ping the destination 10.0.99.221 with 10 Echo Request messages, each of which has a Datafield of 1000 bytes, type:

    ping -n 10 -l 1000 10.0.99.221

    To ping the destination 10.0.99.221 and record the route for 4 hops, type:

    ping -r 4 10.0.99.221

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    15/21

    To ping the destination 10.0.99.221 and specify the loose source route of 10.12.0.1-10.29.3.1-10.1.44.1, type:

    ping -j 10.12.0.1 10.29.3.1 10.1.44.1 10.0.99.221

    Pentru a descoperi toti utilizatorii active din retea puteti utilize urmatorul cod:

    FOR /L %i IN (1,1,254) DO ping -n 1192.168.10.%i | FIND /i "Reply">>c:\ipaddresses.txt

    Reteaua data ca exemplu: 192.168.10.0

    Pathping

    Afisaza statistici despre parametri de network latency si network loss pentru routerele

    intermediare (hops) dintre sursa si destinatie.

    Comanda Pathpingtrimite mai multe mesaje de tip Echo Request catre fiecare router dintresursa si destinatie. In acest mod se pot determina rutele cu problem. Pathping identifica maiintai routerele intermediare si apoi trimite ping-uri intr-un interval de timp pentru a putea afisastatistici bazate pe timpii de raspuns.

    Syntax

    pathping [-n] [-hMaximumHops] [-gHostList] [-p Period] [-qNumQueries[-w Timeout] [-T][-R] [TargetName]

    Parameters

    -n : Prevents pathpingfrom attempting to resolve the IP addresses of intermediate routers totheir names. This might expedite the display of pathpingresults.

    -h MaximumHops : Specifies the maximum number of hops in the path to search for thetarget (destination). The default is 30 hops.

    -g HostList : Specifies that the Echo Request messages use the Loose Source Route option inthe IP header with the set of intermediate destinations specified inHostList. With loose source

    routing, successive intermediate destinations can be separated by one or multiple routers. Themaximum number of addresses or names in the host list is 9. TheHostListis a series of IPaddresses (in dotted decimal notation) separated by spaces.

    -p Period : Specifies the number of milliseconds to wait between consecutive pings. Thedefault is 250 milliseconds (1/4 second).

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    16/21

    -q NumQueries : Specifies the number of Echo Request messages sent to each router in thepath. The default is 100 queries.

    -w Timeout : Specifies the number of milliseconds to wait for each reply. The default is 3000milliseconds (3 seconds).

    -T : Attaches a layer-2 priority tag (for example, 802.1p) to the Echo Request messages that itsends to each of the network devices along the route. This helps to identify network devices thatdo not have layer-2 priority capability. This switch is used to test for Quality of Service (QoS)connectivity.

    -R : Determines whether each network device along the route supports the ResourceReservation Protocol (RSVP), which allows the host computer to reserve a specified amount ofbandwidth for a data stream. This switch is used to test for Quality of Service (QoS)connectivity.

    TargetName : Specifies the destination, which is identified either by IP address or host name.

    /? : Displays help at the command prompt.

    Remarks

    Pathping parameters are case-sensitive. To avoid network congestion, pings should be sent at a sufficiently slow pace. To minimize the effects of burst losses, do not send pings too frequently. When using the -pparameter, pings are sent individually to each intermediate hop.

    Because of this, the interval between two pings sent to the same hop isperiodmultiplied

    by the number of hops. When using the -wparameter, multiple pings can be sent in parallel. Because of this, the

    amount of time specified in the Timeoutparameter is not bounded by the amount of timespecified in the Periodparameter for waiting between pings.

    Using the -Tparameter

    Enabling layer-2 priority on the host computer allows packets to be sent with a layer-2priority tag, which can be used by layer-2 devices to assign a priority to the packet.Legacy devices that do not recognize layer-2 priority will discard these packets, sincethey appear to be malformed. This parameter helps identify network computer that arediscarding these packets.

    Using the -Rparameter

    An RSVP reservation message for a nonexistent session is sent to each network device onthe route. If the device does not support RSVP, it returns an Internet Control MessageProtocol (ICMP) Destination Unreachable-Protocol Unreachable message. If the devicedoes support RSVP, it returns an RSVP Reservation Error message. Some devices mightnot return either of these messages. If this occurs, a time-out message is displayed.

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    17/21

    This command is available only if the Internet Protocol (TCP/IP)protocol is installedas a component in the properties of a network adapter in Network Connections

    Examples

    >pathping 141.85.85.1

    The following example shows pathping command output:

    D: \ >pat hpi ng - n corp1Tr aci ng r out e t o cor p1 [ 10. 54. 1. 196]over a maxi mum of 30 hops:

    0 172. 16. 87. 351 172. 16. 87. 2182 192. 168. 52. 13 192. 168. 80. 14 10. 54. 247. 145 10. 54. 1. 196

    Comput i ng st at i st i cs f or 125 seconds. . .Sour ce t o Here Thi s Node/ Li nk

    Hop RTT Lost / Sent = Pct Lost / Sent = Pct Addr ess

    0 172. 16. 87. 350/ 100 = 0% |1 41ms 0/ 100 = 0% 0/ 100 = 0% 172. 16. 87. 218

    13/ 100 = 13% |2 22ms 16/ 100 = 16% 3/ 100 = 3% 192. 168. 52. 1

    0/ 100 = 0% |3 24ms 13/ 100 = 13% 0/ 100 = 0% 192. 168. 80. 1

    0/ 100 = 0% |4 21ms 14/ 100 = 14% 1/ 100 = 1% 10. 54. 247. 14

    0/ 100 = 0% |

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    18/21

    5 24ms 13/ 100 = 13% 0/ 100 = 0% 10. 54. 1. 196Tr ace compl et e.

    When pathpingis run, the first results list the path. This is the same path that is shown using thetracertcommand. Next, a busy message is displayed for approximately 90 seconds (the timevaries by hop count). During this time, information is gathered from all routers previously listedand from the links between them. At the end of this period, the test results are displayed.

    In the sample report above, the This Node/Link, Lost/Sent = Pctand Addresscolumns showthat the link between 172.16.87.218 and 192.168.52.1 is dropping 13 percent of the packets. Therouters at hops 2 and 4 also are dropping packets addressed to them, but this loss does not affecttheir ability to forward traffic that is not addressed to them.

    The loss rates displayed for the links, identified as a vertical bar (|) in the Addresscolumn,indicate link congestion that is causing the loss of packets that are being forwarded on the path.The loss rates displayed for routers (identified by their IP addresses) indicate that these routersmight be overloaded.

    Arp

    Afisaza si modifica intrarile din tabela Address Resolution Protocol (ARP), care contine adresede IP ale interfetelor conectate in retea si adresele de MAC corespunzatoare.

    Syntax

    arp[-a [InetAddr] [-NIfaceAddr]] [-g [InetAddr] [-NIfaceAddr]] [-dInetAddr [IfaceAddr]] [-sInetAddr EtherAddr [IfaceAddr]]

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    19/21

    Parameters

    -a[InetAddr] [-N IfaceAddr] : Displays current ARP cache tables for all interfaces. Todisplay the ARP cache entry for a specific IP address, use arp -awith theInetAddrparameter,whereInetAddris an IP address. To display the ARP cache table for a specific interface, use the -

    NIfaceAddrparameter whereIfaceAddris the IP address assigned to the interface. The -Nparameter is case-sensitive.

    -g[InetAddr] [-N IfaceAddr] : Identical to -a.

    -d InetAddr[IfaceAddr] : Deletes an entry with a specific IP address, whereInetAddris theIP address. To delete an entry in a table for a specific interface, use theIfaceAddrparameterwhereIfaceAddris the IP address assigned to the interface. To delete all entries, use the asterisk(*) wildcard character in place ofInetAddr.

    -s InetAddr EtherAddr [IfaceAddr] : Adds a static entry to the ARP cache that resolves the IP

    addressInetAddrto the physical addressEtherAddr. To add a static ARP cache entry to the tablefor a specific interface, use theIfaceAddrparameter whereIfaceAddris an IP address assigned tothe interface.

    /? : Displays help at the command prompt.

    Remarks

    The IP addresses forInetAddrandIfaceAddrare expressed in dotted decimal notation. The physical address forEtherAddrconsists of six bytes expressed in hexadecimal

    notation and separated by hyphens (for example, 00-AA-00-4F-2A-9C).

    Entries added with the -sparameter are static and do not time out of the ARP cache. Theentries are removed if the TCP/IP protocol is stopped and started. To create permanentstatic ARP cache entries, place the appropriate arpcommands in a batch file and useScheduled Tasksto run the batch file at startup.

    This command is available only if the Internet Protocol (TCP/IP)protocol is installedas a component in the properties of a network adapter in Network Connections

    Examples

    To display the ARP cache tables for all interfaces, type:

    arp -a

    To display the ARP cache table for the interface that is assigned the IP address 10.0.0.99, type:

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    20/21

    arp -a -N 10.0.0.99

    To add a static ARP cache entry that resolves the IP address 10.0.0.80 to the physical address 00-AA-00-4F-2A-9C, type:

    arp -s 10.0.0.80 00-AA-00-4F-2A-9C

    Getmac

    Returneaza adresa Media Access Control (MAC) si o lista a protocoalelor atasate acele adrese situturor adreselor din retea.

    Syntax

    getmac[.exe] [/sComputer[/uDomain\User[/pPassword]]] [/fo{TABLE|LIST|CSV}] [/nh] [/v]

    Parameters

    /s Computer : Specifies the name or IP address of a remote computer (do not use backslashes).The default is the local computer.

    /u Domain\User : Runs the command with the account permissions of the user specified byUserorDomain\User. The default is the permissions of the current logged on user on thecomputer issuing the command.

    /p Password : Specifies the password of the user account that is specified in the/uparameter.

    /fo{TABLE|LIST|CSV} : Specifies the format to use for the query output. Valid values are

    TABLE, LIST, and CSV. The default format for output is TABLE.

    /nh : Suppresses column header in output. Valid when the/foparameter is set to TABLEorCSV.

    /v : Specifies that the output display verbose information.

    /?: Displays help at the command prompt.

  • 8/10/2019 Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

    21/21

    Remarks

    Getmaccan be useful either when you want to enter the MAC address into a networkanalyzer or when you need to know what protocols are currently in use on each networkadapter in a computer.

    Examples

    The following examples show how you can use the getmaccommand:

    getmac /fo table /nh /vgetmac /s srvmaingetmac /s srvmain /u maindom\hiroplngetmac /s srvmain /u maindom\hiropln /p p@ssW23getmac /s srvmain /u maindom\hiropln /p p@ssW23 /fo list /vgetmac /s srvmain /u maindom\hiropln /p p@ssW23 /fo table /nh


Top Related