Router Solicitation Message

Source Address An IP address assigned to the sending interface, or the unspecified address if no address is assigned to the sending interface.

Destination Address Typically the all-routers multicast address.

源IPv6地址:在lwip中,要么是链路本地地址,要么是任意地址IP6_ADDR_ANY6,也就是全零地址。

目的IPv6地址:所有路由器多播地址,FF02::2(多播地址FF::/8,第一个02表示scope是链路本地,第二个02是所有路由器)

Router Advertisement Message

      0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cur Hop Limit |M|O| Reserved | Router Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reachable Time |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Retrans Timer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options ...
+-+-+-+-+-+-+-+-+-+-+-+-

Source Address MUST be the link-local address assigned to the interface from which this message is sent.

Destination Address Typically the Source Address of an invoking Router Solicitation or the all-nodes multicast address.

Hop Limit 255

源IPv6地址:必须是链路本地地址

目的IPv6地址:rs包的源地址或者所有节点多播地址,FF02::1(第二个02是所有节点)

跳数限制:255

Cur Hop Limit 8-bit unsigned integer. The default value that should be placed in the Hop Count field of the IP header for outgoing IP packets. A value of zero means unspecified (by this router).

当前跳数限制:直接填0,未定义。

M 1-bit "Managed address configuration" flag. When set, it indicates that addresses are available via Dynamic Host Configuration Protocol [DHCPv6]. If the M flag is set, the O flag is redundant and can be ignored because DHCPv6 will return all available configuration information.

M,管理的地址配置,若为1,则表示由DHCPv6完成地址配置。此处设置为0,不由DHCPv6配置。

O 1-bit "Other configuration" flag. When set, it indicates that other configuration information is available via DHCPv6. Examples of such information are DNS-related information or information on other servers within the network.

O,其它配置,比如DNS。此处设置为0。

Router Lifetime 16-bit unsigned integer. The lifetime associated with the default router in units of seconds. The field can contain values up to 65535 and receivers should handle any value, while the sending rules in Section 6 limit the lifetime to 9000 seconds. A Lifetime of 0 indicates that the router is not a default router and SHOULD NOT appear on the default router list. The Router Lifetime applies only to the router's usefulness as a default router; it does not apply to information contained in other message fields or options. Options that need time limits for their information include their own lifetime fields.

路由器生存时间,暂时设置为0,会导致不出现在默认路由器列表上,会有什么影响吗?似乎没影响,对于host,可以设置默认netif。

Reachable Time 32-bit unsigned integer. The time, in milliseconds, that a node assumes a neighbor is reachable after having received a reachability confirmation. Used by the Neighbor Unreachability Detection algorithm (see Section 7.3). A value of zero means unspecified (by this router).

可达时间,用于邻居不可达检测,设置为0,未定义。

Retrans Timer 32-bit unsigned integer. The time, in milliseconds, between retransmitted Neighbor Solicitation messages. Used by address resolution and the Neighbor Unreachability Detection algorithm (see Sections 7.2 and 7.3). A value of zero means unspecified (by this router).

重传时间,NS重传时间,用于地址解析(arp)和邻居不可达检测,设置为0,未定义。

Prefix option

       0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | Prefix Length |L|A| Reserved1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Valid Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Preferred Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ Prefix +
| |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type 3

Length 4

Prefix Length 8-bit unsigned integer. The number of leading bits in the Prefix that are valid. The value ranges from 0 to 128. The prefix length field provides necessary information for on-link determination (when combined with the L flag in the prefix information option). It also assists with address autoconfiguration as specified in [ADDRCONF], for which there may be more restrictions on the prefix length.

前缀长度,用64

L 1-bit on-link flag. When set, indicates that this prefix can be used for on-link determination. When not set the advertisement makes no statement about on-link or off-link properties of the prefix. In other words, if the L flag is not set a host MUST NOT conclude that an address derived from the prefix is off-link. That is, it MUST NOT update a previous indication that the address is on-link.

是否在链路上,设置为1

A 1-bit autonomous address-configuration flag. When set indicates that this prefix can be used for stateless address configuration as specified in [ADDRCONF].

是否自动地址配置,设置为1

Valid Lifetime 32-bit unsigned integer. The length of time in seconds (relative to the time the packet is sent) that the prefix is valid for the purpose of on-link determination. A value of all one bits (0xffffffff) represents infinity. The Valid Lifetime is also used by [ADDRCONF].

有效时间,可以直接设置为全1,即为无限时间,直到断链。

Preferred Lifetime 32-bit unsigned integer. The length of time in seconds (relative to the time the packet is sent) that addresses generated from the prefix via stateless address autoconfiguration remain preferred [ADDRCONF]. A value of all one bits (0xffffffff) represents infinity. See [ADDRCONF]. Note that the value of this field MUST NOT exceed the Valid Lifetime field to avoid preferring addresses that are no longer valid.

优先时间,利用该前缀自动生成的地址优选时间,可以直接设置为全1,即为无限时间,直到断链。

几个结构体:

Destination Cache - A set of entries about destinations to which traffic has been sent recently. The Destination Cache includes both on-link and off-link destinations and provides a level of indirection into the Neighbor Cache; the Destination Cache maps a destination IP address to the IP address of the next-hop neighbor. This cache is updated with information learned from Redirect messages. Implementations may find it convenient to store additional information not directly related to Neighbor Discovery in Destination Cache entries, such as the Path MTU (PMTU) and round-trip timers maintained by transport protocols.

目的缓存——由重定向消息更新。

RFC笔记—Neighbor Discovery for IP version 6 (IPv6)的更多相关文章

  1. RFC笔记—IP Version 6 Addressing Architecture

    IP Version 6 Addressing Architecture,RFC4291 It includes the basic formats for the various types of ...

  2. Neighbor Discovery Protocol Address Resolution Protocol

    https://en.wikipedia.org/wiki/Address_Resolution_Protocol The Address Resolution Protocol (ARP) is a ...

  3. IPv6 neighbor discovery

    IPv6 neighbor discovery By stretch | Thursday, August 28, 2008 at 5:03 a.m. UTC Neighbor Discovery P ...

  4. 读书笔记——《图解TCP/IP》(1/4)

    读书笔记——<图解TCP/IP>(1/4) 经典摘抄 第一章 网络基础知识 1.独立模式:计算机未连接到网络,各自独立使用的方式. 2.广域网 WAN 局域网 LAN 城域网 MAN 3. ...

  5. Unix网络编程学习笔记之第12章 IPv4与IPv6的互操作性

    一. 简单介绍 如果我们本章讨论的主机都是支持双栈的,即支持IPv4地址.也支持Ipv6地址. 我们本次讨论的点:client与server端使用的是不同类型的地址.由于同样类型的地址没什么可讲的. ...

  6. 《TCP/IP详解 卷一》读书笔记-----第三章 IP

    1.Network byte order:数据在网络中的传输是按照大端模式来的,即如果需要传递一个四个字节的int变量,先传递最高的字节,然后依次类推.因此无论主机存储数据用的是大端模式还是小端模式, ...

  7. 【计算机网络】 一个小白的网络层学习笔记:总结下IP,NAT和DHCP

    前言:这篇文章是学习网络层协议时候总结的笔记,前面的主要部分介绍的都是IP协议, 后半部分介绍NAT协议和DHCP协议 参考书籍 <计算机网络-自顶向下>       作者 James F ...

  8. 网络编程学习笔记-全零网络IP地址0.0.0.0详谈

    RFC: - Addresses in this block refer to source hosts on "this" network. Address may be use ...

  9. HCIA SWITCHING&ROUTTING 笔记——第一章 TCP/IP基础知识(2)

    视频地址:https://ilearningx.huawei.com/courses/course-v1:HuaweiX+EBGTC00000336+Self-paced/courseware/abb ...

随机推荐

  1. python暴力破解压缩包密码

    啥也不说,直接上代码 #-*-coding:utf-8-*- import zipfile #生成1-999999的数字密码表, 要是有别的密码类型,对密码表改造一下就可以了,也可以上网下载某些类型的 ...

  2. 【C_Language】---队列和栈的C程序实现

    这几天总结了C语言的队列,栈的实现方法,在此总结一下:一.栈 首先从栈开始,诚然,相信学习过数据结构的你,肯定应该知道栈是什么东西了,如果不知道也没事每一句话我就可以帮你总结--数据只在栈顶进行插入和 ...

  3. java main 方法

    public static void main(String[] args) { BigDecimal b1 = new BigDecimal(0.01000000); BigDecimal b2 = ...

  4. Ubuntu 设置中文输入法

    环境:新安装的Ubuntu 16.04 LTS 本来打算使用sogou拼音,但是在输入后的提示框中内容为乱码,因此尝试重新安装. 1.sudo apt-get remove sogoupinyin & ...

  5. 7.Java帝国的诞生

    1972年,C诞生,而Java是1995年诞生的.它贴近硬件,有汇编语言的特性,运行极快,效率极高.早期,用在操作系统.编译器.数据库.网络系统等.但它有两把沉重的枷锁一直在程序员身上,那就是指针和内 ...

  6. [bzoj4872] [洛谷P3750] [六省联考2017] 分手是祝愿

    Description Zeit und Raum trennen dich und mich. 时空将你我分开. \(B\) 君在玩一个游戏,这个游戏由 \(n\) 个灯和 \(n\) 个开关组成, ...

  7. ubuntu文件操作mkdir cp mv rm ln

    pwd:显示当前目录 date:显示当前日期 cal:显示日历 ls:列出目录内容 cd:改变当前工作目录 ‘.’:代表工作目录 ‘..’:代表工作目录父目录 进入当前目录的父目录:cd /home ...

  8. C++中虚析构的作用

    为了当用一个基类的指针删除一个派生类的对象时,派生类的析构函数会被调用. 基本概念: 析构函数是用来回收对象的: 虚析构函数是析构函数的一种: 基类是一类对象共有属性的抽象.比如,猫和狗都是动物,都会 ...

  9. 图像矫正技术深入探讨(opencv)

    刚进入实验室导师就交给我一个任务,就是让我设计算法给图像进行矫正.哎呀,我不太会图像这块啊,不过还是接下来了,硬着头皮开干吧! 那什么是图像的矫正呢?举个例子就好明白了. 我的好朋友小明给我拍了这几张 ...

  10. MVC 记录

    ASP.NET MVC框架提供了一个帮助我们构造Html元素的类:TagBuilder ps url cnblogs.com/yibinboy/articles/5187682.html HttpRu ...