当前位置:文档之家› 计算机网络实验二 在PC机上熟悉常用网络命令实验报告

计算机网络实验二 在PC机上熟悉常用网络命令实验报告

实验二熟悉常用的网络命令实验报告姓名:陈津生班级:12级数字媒体技术2班学号:2012329700056指导教师:张芳1.实验目的:学会使用常用ping ,ipconfig, nslookup, arp ,tracert等常用网络测试命令检测网络连通、了解网络的配置状态,跟踪路由诊断域名系统等相关网络问题。

2实验环境:(1)运行windows 2000/2003/xp操作系统的PC一台(2)每台PC机具有一块网卡,通过双绞线与局域网网相连。

(3)局域网能连接Internet3.实验步骤:ftp://10.16.23.2用户名:1234567891234密码:01234561、ARP: 显示和修改IP地址与物理地址之间的转换表C:\Documents and Settings\ligong>ARP -aInterface: 10.16.24.18 --- 0x10003Internet Address Physical Address Type192.168.1.3 00-00-00-00-00-00 invalidC:\Documents and Settings\ligong>ARP -gInterface: 10.16.24.18 --- 0x10003Internet Address Physical Address Type192.168.1.3 00-00-00-00-00-00 invalidC:\Documents and Settings\ligong>ARP -dC:\Documents and Settings\ligong>ARP -sDisplays and modifies the IP-to-Physical address translation tables used by address resolution protocol (ARP).ARP -s inet_addr eth_addr [if_addr]ARP -d inet_addr [if_addr]ARP -a [inet_addr] [-N if_addr]-a Displays current ARP entries by interrogating the currentprotocol data. If inet_addr is specified, the IP and Physical addresses for only the specified computer are displayed. Ifmore than one network interface uses ARP, entries for each ARP table are displayed.-g Same as -a.inet_addr Specifies an internet address.-N if_addr Displays the ARP entries for the network interface specified by if_addr.-d Deletes the host specified by inet_addr. inet_addr may bewildcarded with * to delete all hosts.-s Adds the host and associates the Internet address inet_addrwith the Physical address eth_addr. The Physical address is given as 6 hexadecimal bytes separated by hyphens. The entry is permanent.eth_addr Specifies a physical address.if_addr If present, this specifies the Internet address of theinterface whose address translation table should be modified. If not present, the first applicable interface will be used. Example:> arp -s 157.55.85.212 00-aa-00-62-c6-09 .... Adds a static entry.> arp -a .... Displays the arp table.2、ftp:(功能就不用描述了,请参看下面的具体用法)ftp> open 10.16.23.2Connected to 10.16.23.2.220 欢迎登陆计算机基础教研室FTP服务器User (10.16.23.2:(none)): 1234567891234331 User name okay, need password.Password:230 User logged in, proceed.ftp> -vInvalid command.ftp> ftp -vInvalid command.ftp> ftp [-v]Invalid command.ftp> cdRemote directory ftp !550 /ftp: No such file or directory.ftp> !Microsoft Windows XP [版本 5.1.2600](C) 版权所有 1985-2001 Microsoft Corp.3、IpconfigC:\Documents and Settings\ligong>ipconfigWindows IP ConfigurationEthernet adapter 本地连接 2:Connection-specific DNS Suffix . :IP Address. . . . . . . . . . . . : 192.168.1.119Subnet Mask . . . . . . . . . . . : 255.255.255.0Default Gateway . . . . . . . . . : 192.168.1.1C:\Documents and Settings\ligong>4、Nbtstat.exeC:\Documents and Settings\ligong>nbtstat.exeDisplays protocol statistics and current TCP/IP connections using NBT (NetBIOS over TCP/IP).NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n][-r] [-R] [-RR] [-s] [-S] [interval] ]-a (adapter status) Lists the remote machine's name table given its name-A (Adapter status) Lists the remote machine's name table given itsIP address.-c (cache) Lists NBT's cache of remote [machine] names and their IP addresses-n (names) Lists local NetBIOS names.-r (resolved) Lists names resolved by broadcast and via WINS-R (Reload) Purges and reloads the remote cache name table-S (Sessions) Lists sessions table with the destination IP addresses -s (sessions) Lists sessions table converting destination IPaddresses to computer NETBIOS names.-RR (ReleaseRefresh) Sends Name Release packets to WINS and then, starts Refr eshRemoteName Remote host machine name.IP address Dotted decimal representation of the IP address.interval Redisplays selected statistics, pausing interval secondsbetween each display. Press Ctrl+C to stop redisplayingstatistics.C:\Documents and Settings\ligong>nbtstat -CDisplays protocol statistics and current TCP/IP connections u(NetBIOS over TCP/IP).NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n][-r] [-R] [-RR] [-s] [-S] [interval] ]-a (adapter status) Lists the remote machine's name table-A (Adapter status) Lists the remote machine's name tableIP address.-c (cache) Lists NBT's cache of remote [machine]addresses-n (names) Lists local NetBIOS names.-r (resolved) Lists names resolved by broadcast and-R (Reload) Purges and reloads the remote cache n-S (Sessions) Lists sessions table with the destina-s (sessions) Lists sessions table converting destiaddresses to computer NETBIOS names.-RR (ReleaseRefresh) Sends Name Release packets to WINS aneshRemoteName Remote host machine name.IP address Dotted decimal representation of the IP addresinterval Redisplays selected statistics, pausing intervbetween each display. Press Ctrl+C to stop redstatistics.C:\Documents and Settings\ligong>nbtstat -n本地连接 2:Node IpAddress: [192.168.1.119] Scope Id: []NetBIOS Local Name TableName Type Status---------------------------------------------H16 <00> UNIQUE RegisteredH16 <20> UNIQUE Registered2HJF <00> GROUP Registered2HJF <1E> GROUP RegisteredC:\Documents and Settings\ligong>nbtstat -s本地连接 2:Node IpAddress: [192.168.1.119] Scope Id: []No Connections5、net:C:\Documents and Settings\ligong>net此命令的语法是:NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP | HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION | SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ] C:\Documents and Settings\ligong>C:\Documents and Settings\ligong>net此命令的语法是:NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILEHELPMSG | LOCALGROUP | NAME | PAUSE | PRINT |SHARE | START | STATISTICS | STOP | TIME | USEC:\Documents and Settings\ligong>netstat.exeActive ConnectionsProto Local Address Foreign AddressTCP H16:1455 localhost:ftpTCP H16:2078 125.77.199.30:8000 TCP H16:2085 localhost:4809TCP H16:2086 localhost:netbios-ss TCP H16:2088 localhost:netbios-ss TCP H16:2090 localhost:netbios-ss TCP H16:2091 localhost:microsoft-C:\Documents and Settings\ligong>netstat -asIPv4 StatisticsPackets Received = 188648Received Header Errors = 0Received Address Errors = 41385Datagrams Forwarded = 0Unknown Protocols Received = 0Received Packets Discarded = 1636Received Packets Delivered = 158463Output Requests = 11606Routing Discards = 0Discarded Output Packets = 0Output Packet No Route = 0Reassembly Required = 0Reassembly Successful = 0Reassembly Failures = 0Datagrams Successfully Fragmented = 0Datagrams Failing Fragmentation = 0Fragments Created = 0ICMPv4 StatisticsReceived SentMessages 36 37Errors 0 0Destination Unreachable 3 4Time Exceeded 0 0Parameter Problems 0 0Source Quenches 0 0Redirects 0 0Echos 31 2Echo Replies 2 31Timestamps 0 0Timestamp Replies 0 0Address Masks 0 0Address Mask Replies 0 0TCP Statistics for IPv4Active Opens = 415Passive Opens = 57Failed Connection Attempts = 145Reset Connections = 29Current Connections = 3Segments Received = 1888Segments Sent = 2228Segments Retransmitted = 276UDP Statistics for IPv4Datagrams Received = 213179No Ports = 4718Receive Errors = 95Datagrams Sent = 90466、Netstat.exeC:\Documents and Settings\ligong>netstat.exeActive ConnectionsProto Local Address Foreign Address StateTCP H16:1455 localhost:ftp CLOSE_WAITTCP H16:2166 localhost:4809 SYN_SENTTCP H16:2167 125.77.199.30:8000 ESTABLISHED7、Ping.exeC:\Documents and Settings\ligong>ping.exeUsage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS][-r count] [-s count] [[-j host-list] | [-k host-list]][-w timeout] target_nameOptions:-t Ping the specified host until stopped.To see statistics and continue - type Control-Break To stop - type Control-C.-a Resolve addresses to hostnames.-n count Number of echo requests to send.-l size Send buffer size.-f Set Don't Fragment flag in packet.-i TTL Time To Live.-v TOS Type Of Service.-r count Record route for count hops.-s count Timestamp for count hops.-j host-list Loose source route along host-list.-k host-list Strict source route along host-list.-w timeout Timeout in milliseconds to wait for each reply.8、Route.exeC:\Documents and Settings\ligong>route.exeManipulates network routing tables.ROUTE [-f] [-p] [command [destination][MASK netmask] [gateway] [METRIC metric] [IF interface]-f Clears the routing tables of all gateway entries. If this isused in conjunction with one of the commands, the tables arecleared prior to running the command.-p When used with the ADD command, makes a route persistent across boots of the system. By default, routes are not preservedwhen the system is restarted. Ignored for all other commands,which always affect the appropriate persistent routes. Thisoption is not supported in Windows 95.command One of these:PRINT Prints a routeADD Adds a routeDELETE Deletes a routeCHANGE Modifies an existing routedestination Specifies the host.MASK Specifies that the next parameter is the 'netmask' value.netmask Specifies a subnet mask value for this route entry.If not specified, it defaults to 255.255.255.255.gateway Specifies gateway.interface the interface number for the specified route.METRIC specifies the metric, ie. cost for the destination.All symbolic names used for destination are looked up in the network database file NETWORKS. The symbolic names for gateway are looked up in the host name database file HOSTS.If the command is PRINT or DELETE. Destination or gateway can be a wildcard, (wildcard is specified as a star '*'), or the gateway argument may be omitted.If Dest contains a * or ?, it is treated as a shell pattern, and onlymatching destination routes are printed. The '*' matches any string,and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*. Diagnostic Notes:Invalid MASK generates an error, that is when (DEST & MASK) != DEST.Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1The route addition failed: The specified mask parameter is invalid. (Destination & Mask) != Destination.Examples:> route PRINT> route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2destination^ ^mask ^gateway metric^ ^Interface^If IF is not given, it tries to find the best interface for a given gateway.> route PRINT> route PRINT 157* .... Only prints those matching 157*> route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2CHANGE is used to modify gateway and/or metric only.> route PRINT> route DELETE 157.0.0.0> route PRINTC:\Documents and Settings\ligong>9、Telnet.exe欢迎使用 Microsoft Telnet ClientEscape 字符是 'CTRL+]'Microsoft Telnet> displayEscape 字符是 'CTRL+]'将验证身份(NTLM Authentication)关闭本地回显新行模式 - return 键发送 CR 和 LF当前模式: 控制台Will 终端类型优选的终端类型为 ANSIMicrosoft Telnet> status没有连接Microsoft Telnet> ?/help命令可以缩写。

相关主题