TCP/IP 详解 卷1 ch6 ICMP

1. ICMP message is a query message or an error message.

 

2. 所有ICMP报文的开始4个字节格式是一样的,其余的不同

 

3. unreachable error: the source port number can be used by the system receiving the ICMP error to associate the error with a particular user process. for example, dest port is 161 (snmp)

 

4. use netstat cmd to check system packet info.

 

/home/a/j/nomad2:netstat -s RAWIP rawipInDatagrams = 2000 rawipInErrors = 0 rawipInCksumErrs = 0 rawipOutDatagrams = 2049 rawipOutErrors = 0 UDP udpInDatagrams = 48193 udpInErrors = 0 udpOutDatagrams = 49449 udpOutErrors = 0 TCP tcpRtoAlgorithm = 4 tcpRtoMin = 400 tcpRtoMax = 60000 tcpMaxConn = -1 tcpActiveOpens =608091 tcpPassiveOpens = 22634 tcpAttemptFails =164074 tcpEstabResets = 34856 tcpCurrEstab = 7 tcpOutSegs =117994499 tcpOutDataSegs =93064520 tcpOutDataBytes =2959834214 tcpRetransSegs =834149 tcpRetransBytes =1033412423 tcpOutAck =45819590 tcpOutAckDelayed =4941894 tcpOutUrg = 36 tcpOutWinUpdate = 256 tcpOutWinProbe = 592 tcpOutControl =1242865 tcpOutRsts =166791 tcpOutFastRetrans = 76904 tcpInSegs =127080586 tcpInAckSegs =57051613 tcpInAckBytes =2943908363 tcpInDupAck =4229909 tcpInAckUnsent = 170 tcpInInorderSegs =113091394 tcpInInorderBytes =1142380036 tcpInUnorderSegs =873777 tcpInUnorderBytes =945234571 tcpInDupSegs =241409 tcpInDupBytes =38376683 tcpInPartDupSegs = 16240 tcpInPartDupBytes =9126744 tcpInPastWinSegs = 1 tcpInPastWinBytes =5354433 tcpInWinProbe = 0 tcpInWinUpdate = 4 tcpInClosed = 106 tcpRttNoUpdate =7339831 tcpRttUpdate =49515417 tcpTimRetrans =1175463 tcpTimRetransDrop = 854 tcpTimKeepalive = 25303 tcpTimKeepaliveProbe= 20696 tcpTimKeepaliveDrop = 1495 tcpListenDrop = 0 tcpListenDropQ0 = 0 tcpHalfOpenDrop = 0 tcpOutSackRetrans =462586 IPv4 ipForwarding = 2 ipDefaultTTL = 255 ipInReceives =154692252 ipInHdrErrors = 3 ipInAddrErrors = 16 ipInCksumErrs = 0 ipForwDatagrams = 0 ipForwProhibits =406533 ipInUnknownProtos = 0 ipInDiscards = 5 ipInDelivers =624721 ipOutRequests =140554556 ipOutDiscards = 0 ipOutNoRoutes = 16 ipReasmTimeout = 60 ipReasmReqds = 0 ipReasmOKs = 0 ipReasmFails = 0 ipReasmDuplicates = 0 ipReasmPartDups = 0 ipFragOKs = 0 ipFragFails = 0 ipFragCreates = 0 ipRoutingDiscards = 0 tcpInErrs = 60 udpNoPorts =122385 udpInCksumErrs = 0 udpInOverflows = 0 rawipInOverflows = 0 ipsecInSucceeded = 0 ipsecInFailed = 0 ipInIPv6 = 0 ipOutIPv6 = 19 ipOutSwitchIPv6 = 0 IPv6 ipv6Forwarding = 2 ipv6DefaultHopLimit = 0 ipv6InReceives = 0 ipv6InHdrErrors = 0 ipv6InTooBigErrors = 0 ipv6InNoRoutes = 0 ipv6InAddrErrors = 0 ipv6InUnknownProtos = 0 ipv6InTruncatedPkts = 0 ipv6InDiscards = 0 ipv6InDelivers = 850 ipv6OutForwDatagrams= 0 ipv6OutRequests = 869 ipv6OutDiscards = 2 ipv6OutNoRoutes = 0 ipv6OutFragOKs = 0 ipv6OutFragFails = 0 ipv6OutFragCreates = 0 ipv6ReasmReqds = 0 ipv6ReasmOKs = 0 ipv6ReasmFails = 0 ipv6InMcastPkts = 0 ipv6OutMcastPkts = 26 ipv6ReasmDuplicates = 0 ipv6ReasmPartDups = 0 ipv6ForwProhibits = 0 udpInCksumErrs = 0 udpInOverflows = 0 rawipInOverflows = 0 ipv6InIPv4 = 0 ipv6OutIPv4 = 0 ipv6OutSwitchIPv4 = 0 ICMPv4 icmpInMsgs = 5873 icmpInErrors = 0 icmpInCksumErrs = 1 icmpInUnknowns = 0 icmpInDestUnreachs = 929 icmpInTimeExcds = 35 icmpInParmProbs = 0 icmpInSrcQuenchs = 0 icmpInRedirects = 0 icmpInBadRedirects = 0 icmpInEchos = 2918 icmpInEchoReps = 1990 icmpInTimestamps = 0 icmpInTimestampReps = 0 icmpInAddrMasks = 0 icmpInAddrMaskReps = 0 icmpInFragNeeded = 7 icmpOutMsgs = 3950 icmpOutDrops = 0 icmpOutErrors = 0 icmpOutDestUnreachs = 1032 icmpOutTimeExcds = 0 icmpOutParmProbs = 0 icmpOutSrcQuenchs = 0 icmpOutRedirects = 0 icmpOutEchos = 0 icmpOutEchoReps = 2918 icmpOutTimestamps = 0 icmpOutTimestampReps= 0 icmpOutAddrMasks = 0 icmpOutAddrMaskReps = 0 icmpOutFragNeeded = 0 icmpInOverflows = 0 ICMPv6 icmp6InMsgs = 2 icmp6InErrors = 0 icmp6InDestUnreachs = 0 icmp6InAdminProhibs = 0 icmp6InTimeExcds = 0 icmp6InParmProblems = 0 icmp6InPktTooBigs = 0 icmp6InEchos = 1 icmp6InEchoReplies = 1 icmp6InRouterSols = 0 icmp6InRouterAds = 0 icmp6InNeighborSols = 0 icmp6InNeighborAds = 0 icmp6InRedirects = 0 icmp6InBadRedirects = 0 icmp6InGroupQueries = 0 icmp6InGroupResps = 0 icmp6InGroupReds = 0 icmp6InOverflows = 0 icmp6OutMsgs = 13 icmp6OutErrors = 0 icmp6OutDestUnreachs= 0 icmp6OutAdminProhibs= 0 icmp6OutTimeExcds = 0 icmp6OutParmProblems= 0 icmp6OutPktTooBigs = 0 icmp6OutEchos = 1 icmp6OutEchoReplies = 1 icmp6OutRouterSols = 3 icmp6OutRouterAds = 0 icmp6OutNeighborSols= 2 icmp6OutNeighborAds = 0 icmp6OutRedirects = 0 icmp6OutGroupQueries= 0 icmp6OutGroupResps = 6 icmp6OutGroupReds = 0 IGMP: 0 messages received 0 messages received with too few bytes 0 messages received with bad checksum 0 membership queries received 0 membership queries received with invalid field(s) 0 membership reports received 0 membership reports received with invalid field(s) 0 membership reports received for groups to which we belong 0 membership reports sent SCTP sctpRtoAlgorithm = vanj sctpRtoMin = 1000 sctpRtoMax = 60000 sctpRtoInitial = 3000 sctpMaxAssocs = -1 sctpValCookieLife = 60000 sctpMaxInitRetr = 8 sctpCurrEstab = 0 sctpActiveEstab = 10 sctpPassiveEstab = 10 sctpAborted = 0 sctpShutdowns = 20 sctpOutOfBlue = 0 sctpChecksumError = 0 sctpOutCtrlChunks = 81 sctpOutOrderChunks = 19 sctpOutUnorderChunks= 0 sctpRetransChunks = 0 sctpOutAck = 9 sctpOutAckDelayed = 0 sctpOutWinUpdate = 0 sctpOutFastRetrans = 0 sctpOutWinProbe = 0 sctpInCtrlChunks = 80 sctpInOrderChunks = 19 sctpInUnorderChunks = 0 sctpInAck = 19 sctpInDupAck = 2 sctpInAckUnsent = 0 sctpFragUsrMsgs = 0 sctpReasmUsrMsgs = 0 sctpOutSCTPPkts = 99 sctpInSCTPPkts = 99 sctpInInvalidCookie = 0 sctpTimRetrans = 0 sctpTimRetransDrop = 0 sctpTimHearBeatProbe= 0 sctpTimHearBeatDrop = 0 sctpListenDrop = 0 sctpInClosed = 1

你可能感兴趣的:(TCP/IP 详解 卷1 ch6 ICMP)