[ Pobierz całość w formacie PDF ]
.Route add is used to add routes to the table, androute delete is used to delete routes from the table.Note that routes added tothe table are not made persistent unless the -p switch is specified.Non-persistent routes only last until the computer is rebooted.In order for two hosts to exchange IP datagrams, they must both have a route toeach other, or use a default gateway that knows of a route.Normally, routersexchange information with each other using a protocol such as RoutingInformation Protocol (RIP) or Open Shortest Path First (OSPF).Windows NT 3.5xdid not include support for either of these routing protocols, so when thesecomputers are used as routers it is often necessary to manually add routes.Microsoft is working on RIP and OSPF support for Windows NT.NetstatNetstat displays protocol statistics and current TCP/IP connections.Netstat -adisplays all connections, and netstat -r displays the route table, plus activeconnections.The -n switch tells netstat not to convert addresses and portnumbers to names.The -e switch displays Ethernet statistics, and may becombined with the -s switch which shows protocol statistics.Sample output isshown below:C:\>netstat -eInterface StatisticsReceived SentBytes 3995837940 47224622Unicast packets 120099 131015Non-unicast packets 7579544 3823Discards 0 0Errors 0 0Unknown protocols 363054211C:\>netstat -aActive ConnectionsProto Local Address Foreign Address StateTCP davemac1:1572 10.57.13.152:nbsession ESTABLISHEDTCP davemac1:1589 10.57.9.147:nbsession ESTABLISHEDTCP davemac1:1606 11.1.105.245:nbsession ESTABLISHEDTCP davemac1:1632 10.57.9.213:nbsession ESTABLISHEDTCP davemac1:1659 10.55.86.169:nbsession ESTABLISHEDTCP davemac1:1714 10.55.80.203:nbsession ESTABLISHEDTCP davemac1:1719 10.54.67.36:nbsession ESTABLISHEDTCP davemac1:1241 10.57.9.101:nbsession ESTABLISHEDUDP davemac1:1025 *:*UDP davemac1:snmp *:*UDP davemac1:nbname *:*UDP davemac1:nbdatagram *:*UDP davemac1:nbname *:*UDP davemac1:nbdatagram *:*C:\>netstat -sIP StatisticsPackets Received = 5378528Received Header Errors = 738854Received Address Errors = 23150Datagrams Forwarded = 0Unknown Protocols Received = 0Received Packets Discarded = 0Received Packets Delivered = 4616524Output Requests = 132702Routing Discards = 157Discarded Output Packets = 0Output Packet No Route = 0Reassembly Required = 0Reassembly Successful = 0Reassembly Failures = 0Datagrams Successfully Fragmented = 0Datagrams Failing Fragmentation = 0Fragments Created = 0ICMP StatisticsReceived SentMessages 693 4Errors 0 0Destination Unreachable 685 0Time Exceeded 0 0Parameter Problems 0 0Source Quenchs 0 0Redirects 0 0Echos 4 0Echo Replies 0 4Timestamps 0 0Timestamp Replies 0 0Address Masks 0 0Address Mask Replies 0 0TCP StatisticsActive Opens = 597Passive Opens = 135Failed Connection Attempts = 107Reset Connections = 91Current Connections = 8Segments Received = 106770Segments Sent = 118431Segments Retransmitted = 461UDP StatisticsDatagrams Received = 4157136No Ports = 351928Receive Errors = 2Datagrams Sent = 13809NBTStatNBTStat is a useful tool for troubleshooting NetBIOS name resolution problems.NBTStat -n displays the names that were registered locally on the system byapplications, such as the server and redirector.NBTStat -c shows the NetBIOSname cache, which contains name-to-address mappings for other computers.NBTStat -R purges the name cache and reloads it from the LMHOSTS file.NBTStat-a performs a NetBIOS adapter status command against the computerspecified by name.The adapter status command returns the local NetBIOS nametable for that computer plus the MAC address of the adapter card.NBTStat -Slists the current NetBIOS sessions and their status, including statistics, asshown:NetBIOS Connection TableLocal Name State In/Out Remote Host Input Output------------------------------------------------------------------DAVEMAC1 Connected Out CNSSUP1 6MB 5MBDAVEMAC1 Connected Out CNSPRINT 108KB 116KBDAVEMAC1 Connected Out CNSSRC1 299KB 19KBDAVEMAC1 Connected Out STH2NT 324KB 19KBDAVEMAC1 ListeningNslookupNslookup was added in Windows NT 4.0 and is a very useful tool fortroubleshooting DNS problems, such as hostname resolution.When nslookup isstarted, it will show the hostname and IP address of the DNS server that isconfigured for the local system, then display a “>” prompt.Typing “?” willshow the different commands that are available.To look up the IP address of ahost using the DNS, type the hostname and press ENTER.Nslookup will default tousing the DNS server that is configured for the computer it is running on, butyou can focus it on a different DNS server by typing “server ” where nameis the hostname of the server you want to use for future lookups.Oneespecially useful troubleshooting feature is debug mode, which can be invokedby typing “set debug”, or for even greater detail, “set d2.” When in debugmode, nslookup details the steps being taken to complete its commands, as shownin the example:C:\>nslookup(null) davemac3.cswatcp.microsoft.comAddress: 10.57.8.190> set d2> rain-city(null) davemac3.cswatcp.microsoft.comAddress: 10.57.8.190------------SendRequest(), len 49HEADER:opcode = QUERY, id = 2, rcode = NOERRORheader flags: query, want recursionquestions = 1, answers = 0, authority records = 0, additional = 0QUESTIONS:rain-city.cswatcp.microsoft.com, type = A, class = IN------------------------Got answer (108 bytes):HEADER:opcode = QUERY, id = 2, rcode = NOERRORheader flags: response, auth.answer, want recursion, recursion avail.questions = 1, answers = 2, authority records = 0, additional = 0QUESTIONS:rain-city.cswatcp.microsoft.com, type = A, class = INANSWERS:-> rain-city.cswatcp.microsoft.comtype = CNAME, class = IN, dlen = 31canonical name = seattle.cswatcp
[ Pobierz całość w formacie PDF ]
Darmowy hosting zapewnia PRV.PL