comenzi de retea pentru sitemul de operare windows folosite din linie de comanda

Download Comenzi de Retea Pentru Sitemul de Operare Windows Folosite Din Linie de Comanda

Post on 02-Jun-2018

216 views

Category:

Documents

0 download

Embed Size (px)

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 ese