zoukankan      html  css  js  c++  java
  • 网络层的一些附属协议

    网络层主要是IP协议。但是

    其他一些辅助进行包转发、路由和包安全的协议也算入了网络层。例如ICMP,EIGRP等

    ICMP is the Internet Control Message Protocol.

    ICMP is a complementary protocol to IP (Internet Protocol). Like IP, ICMP resides on the Network Layer of the OSI Model.

    ICMP is designed for sending control and test messages across IP networks.

    Unlike the Transport Layer protocols TCP(Transmission Control Protocol) and UDP(User Datagram Protocol) which operate on top of IP, ICMP exists alongside IP.

    The ability to understand ICMP is a requirement for any IP-compatible network device. However, many security devices such as firewalls block or disable all or part of ICMP functionality for security purposes.

    ICMP ICMP (Internet Control Message Protocol)

    ICMP Message Types

    ICMP operates by sending and receiving a limited number of messages types. The ICMP message types are defined in IANA ICMP Type Numbers.

    The most common ICMP message types are:

    TypeName
    0Echo Reply
    3Destination Unreachable
    4Source Quench
    5Redirect
    6Alternate Host Address
    8Echo
    9Router Advertisement
    10Router Solicitation
    11Time Exceeded
    12Parameter Problem
    13Timestamp
    14Timestamp Reply
    15Information Request
    16Information Reply
    17Address Mask Request
    18Address Mask Reply
    30Traceroute

    ICMP Echo Request and Echo Reply

    The two most important ICMP messages are Echo Request (8) and Echo Reply (0).

    Echo Request and Echo Reply are utilized by the `ping` command to test network connectivity.

    Here we use the `ping` command to send three 64-byte ICMP Echo Request messages to www.freebsd.org and receive three Echo Reply messages in response:

    bash-2.05a$ ping -c 3 www.freebsd.org 
    PING www.freebsd.org (216.136.204.117): 56 data bytes 
    64 bytes from 216.136.204.117: icmp_seq=0 ttl=55 time=63.708 ms 
    64 bytes from 216.136.204.117: icmp_seq=1 ttl=55 time=62.725 ms 
    64 bytes from 216.136.204.117: icmp_seq=2 ttl=55 time=62.618 ms

    — www.freebsd.org ping statistics — 
    3 packets transmitted, 3 packets received, 0% packet loss 
    round-trip min/avg/max/stddev = 62.618/63.017/63.708/0.491 ms

    This output tells us that network connectivity to www.freebsd.org is working. It also tells us the time each packet took to return.

    `ping` is an extremely useful tool for network troubleshooting.

    Additional Reading on ICMP

    ICMP is defined in RFC 792: Internet Control Message Protocol. 

  • 相关阅读:
    razor在App_Code中使用ActionLink无效的解决方案
    科技的进步会给人带来幸福么?
    C6000系列之C6455 DSP的EMIFA接口
    C6000系列之C6455DSP的GPIO模块
    C语言文件操作与例子
    C语言中fscanf函数读取double型浮点数的问题
    MATLAB读取CCS保存的数据
    CCS 3.3 操作C函数读写文件
    复数矩阵乘法C语言实现
    C6000系列之C6455DSP的中断系统
  • 原文地址:https://www.cnblogs.com/jjkv3/p/2497169.html
Copyright © 2011-2022 走看看