1、计算机网络实验二 在PC机上熟悉常用网络命令实验报告计算机网络实验二 在PC机上熟悉常用网络命令实验报告实验二 熟悉常用的网络命令实验报告姓名:陈津生班级:12级数字媒体技术2班学号:2012329700056指导教师:张芳1实验目的:学会使用常用ping ,ipconfig, nslookup, arp ,tracert等常用网络测试命令检测网络连通、了解网络的配置状态,跟踪路由诊断域名系统等相关网络问题。2实验环境:(1)运行windows 2000/2003/xp操作系统的PC一台(2)每台PC机具有一块网卡,通过双绞线与局域网网相连。(3)局域网能连接Internet3实验步骤:ftp
2、:/10.16.23.2用户名:1234567891234密码:01234561、ARP: 显示和修改IP地址与物理地址之间的转换表 C:Documents and SettingsligongARP -aInterface: 10.16.24.18 - 0x10003 Internet Address Physical Address Type 192.168.1.3 00-00-00-00-00-00 invalidC:Documents and SettingsligongARP -gInterface: 10.16.24.18 - 0x10003 Internet Address Ph
3、ysical Address Type 192.168.1.3 00-00-00-00-00-00 invalidC:Documents and SettingsligongARP -dC:Documents and SettingsligongARP -sDisplays and modifies the IP-to-Physical address translation tables used byaddress resolution protocol (ARP).ARP -s inet_addr eth_addr if_addrARP -d inet_addr if_addrARP -
4、a inet_addr -N if_addr -a Displays current ARP entries by interrogating the current protocol data. If inet_addr is specified, the IP and Physical addresses for only the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed. -g Same as
5、 -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 be wildcarded with * to delete all hosts. -s Adds the host and associates the Internet address inet_addr with th
6、e 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 the interface whose address translation table should be modified. If not p
7、resent, 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 o
8、kay, need password.Password:230 User logged in, proceed.ftp -vInvalid command.ftp ftp -vInvalid command.ftp ftp -vInvalid 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 Settingsl
9、igongipconfigWindows IP ConfigurationEthernet adapter 本地连接 2: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.1.119 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1C:Documents and Settingsligong4、Nbtstat.exeC:Documents a
10、nd Settingsligongnbtstat.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 machines name table given its name -A (Adapter status) Lists the remote machi
11、nes name table given its IP address. -c (cache) Lists NBTs 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 t
12、able with the destination IP addresses -s (sessions) Lists sessions table converting destination IP addresses to computer NETBIOS names. -RR (ReleaseRefresh) Sends Name Release packets to WINS and then, starts Refresh RemoteName Remote host machine name. IP address Dotted decimal representation of t
13、he IP address. interval Redisplays selected statistics, pausing interval seconds between each display. Press Ctrl+C to stop redisplaying statistics.C:Documents and Settingsligongnbtstat -CDisplays protocol statistics and current TCP/IP connections u(NetBIOS over TCP/IP).NBTSTAT -a RemoteName -A IP a
14、ddress -c -n -r -R -RR -s -S interval -a (adapter status) Lists the remote machines name table -A (Adapter status) Lists the remote machines name table IP address. -c (cache) Lists NBTs cache of remote machine addresses -n (names) Lists local NetBIOS names. -r (resolved) Lists names resolved by broa
15、dcast and -R (Reload) Purges and reloads the remote cache n -S (Sessions) Lists sessions table with the destina -s (sessions) Lists sessions table converting desti addresses to computer NETBIOS names. -RR (ReleaseRefresh) Sends Name Release packets to WINS anesh RemoteName Remote host machine name.
16、IP address Dotted decimal representation of the IP addres interval Redisplays selected statistics, pausing interv between each display. Press Ctrl+C to stop red statistics.C:Documents and Settingsligongnbtstat -n本地连接 2:Node IpAddress: 192.168.1.119 Scope Id: NetBIOS Local Name Table Name Type Status
17、 - H16 UNIQUE Registered H16 UNIQUE Registered 2HJF GROUP Registered 2HJF GROUP RegisteredC:Documents and Settingsligongnbtstat -s本地连接 2:Node IpAddress: 192.168.1.119 Scope Id: No Connections5、net:C:Documents and Settingsligongnet此命令的语法是:NET ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | H
18、ELP | HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION | SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW C:Documents and SettingsligongC:Documents and Settingsligongnet此命令的语法是:NET ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SH
19、ARE | START | STATISTICS | STOP | TIME | USEC:Documents and Settingsligongnetstat.exeActive Connections Proto Local Address Foreign Address TCP H16:1455 localhost:ftp TCP H16:2078 125.77.199.30:8000 TCP H16:2085 localhost:4809 TCP H16:2086 localhost:netbios-ss TCP H16:2088 localhost:netbios-ss TCP H
20、16:2090 localhost:netbios-ss TCP H16:2091 localhost:microsoft-C:Documents and Settingsligongnetstat -asIPv4 Statistics Packets Received = 188648 Received Header Errors = 0 Received Address Errors = 41385 Datagrams Forwarded = 0 Unknown Protocols Received = 0 Received Packets Discarded = 1636 Receive
21、d Packets Delivered = 158463 Output Requests = 11606 Routing Discards = 0 Discarded Output Packets = 0 Output Packet No Route = 0 Reassembly Required = 0 Reassembly Successful = 0 Reassembly Failures = 0 Datagrams Successfully Fragmented = 0 Datagrams Failing Fragmentation = 0 Fragments Created = 0I
22、CMPv4 Statistics Received Sent Messages 36 37 Errors 0 0 Destination Unreachable 3 4 Time Exceeded 0 0 Parameter Problems 0 0 Source Quenches 0 0 Redirects 0 0 Echos 31 2 Echo Replies 2 31 Timestamps 0 0 Timestamp Replies 0 0 Address Masks 0 0 Address Mask Replies 0 0TCP Statistics for IPv4 Active O
23、pens = 415 Passive Opens = 57 Failed Connection Attempts = 145 Reset Connections = 29 Current Connections = 3 Segments Received = 1888 Segments Sent = 2228 Segments Retransmitted = 276UDP Statistics for IPv4 Datagrams Received = 213179 No Ports = 4718 Receive Errors = 95 Datagrams Sent = 90466、Netst
24、at.exeC:Documents and Settingsligongnetstat.exeActive Connections Proto Local Address Foreign Address State TCP H16:1455 localhost:ftp CLOSE_WAIT TCP H16:2166 localhost:4809 SYN_SENT TCP H16:2167 125.77.199.30:8000 ESTABLISHED7、Ping.exeC:Documents and Settingsligongping.exeUsage: ping -t -a -n count
25、 -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.
26、-l size Send buffer size. -f Set Dont 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 i
27、n milliseconds to wait for each reply.8、Route.exeC:Documents and Settingsligongroute.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 is used in conjunction with one of t
28、he commands, the tables are cleared 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 preserved when the system is restarted. Ignored for all other commands, which always affect the appropriate persistent
29、routes. This option is not supported in Windows 95. command One of these: PRINT Prints a route ADD Adds a route DELETE Deletes a route CHANGE Modifies an existing route destination Specifies the host. MASK Specifies that the next parameter is the netmask value. netmask Specifies a subnet mask value
30、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 databasefile NETWORKS. The symbolic names for gateway are looked up in the host namedatabase file HOSTS.If the command is PRINT or DELETE. Destination or gateway can be a wildcard,(wildcard i