felix0012 最近的时间轴更新
felix0012

felix0012

V2EX 第 285186 号会员,加入于 2018-01-22 08:23:01 +08:00
felix0012 最近回复了
每个月 5000 工资不够花。为啥后面多一个 0 就够了呢~ 🐶
@wu67 如果做过嵌入式的开发大概就知道了。要调用或操作一个设备或者资源,总要有个指针指向它,这个指针就是句柄
@4Qd5zQCm26
银行卡 App 账单流水可以导出 Excel

用的哪家银行卡?
好像中行、招行都只能导出 PDF ,还很难用工具分析。
239 天前
回复了 392039757 创建的主题 随想 最近对很多事情都没有感觉了
单纯就是年纪大了吧,我也有同感。
现在晚上周末到了家大部分时间都在陪娃,然后发现小孩子真的非常容易快乐。有时候听到别人口误都能大笑半天。顺带的自己也觉得开心起来
一贴文字,缩进格式全没了……

Openwrt 路由器的 Advertise

DHCPv6
____Message_type:_Advertise_(2)
____Transaction_ID:_0x19f696
____Server_Identifier
________Option:_Server_Identifier_(2)
________Length:_10
________DUID:_0003000120769300a03c
________DUID_Type:_link-layer_address_(3)
________Hardware_type:_Ethernet_(1)
________Link-layer_address:_xxx
________Link-layer_address_(Ethernet):_xxx
____Client_Identifier
________Option:_Client_Identifier_(1)
________Length:_14
________DUID:_000100012b3dd50b507b9d730987
________DUID_Type:_link-layer_address_plus_time_(1)
________Hardware_type:_Ethernet_(1)
________DUID_Time:_Dec_28,_2022_00:08:43.000000000_中国标准时间
________Link-layer_address:_xxx
________Link-layer_address_(Ethernet):_xxx
____SOL_MAX_RT
________Option:_SOL_MAX_RT_(82)
________Length:_4
____DNS_recursive_name_server
________Option:_DNS_recursive_name_server_(23)
________Length:_16
_________1_DNS_server_address:_fd5c:1e:6cb0::1
____Identity_Association_for_Non-temporary_Address
________Option:_Identity_Association_for_Non-temporary_Address_(3)
________Length:_40
________IAID:_03e09467
________T1:_21600
________T2:_34560
________IA_Address
____________Option:_IA_Address_(5)
____________Length:_24
____________IPv6_address:_fd5c:1e:6cb0::7e8
____________Preferred_lifetime:_43200
____________Valid_lifetime:_43200


光猫的 Advertise

DHCPv6
____Message_type:_Advertise_(2)
____Transaction_ID:_0x19f696
____Client_Identifier
________Option:_Client_Identifier_(1)
________Length:_14
________DUID:_000100012b3dd50b507b9d730987
________DUID_Type:_link-layer_address_plus_time_(1)
________Hardware_type:_Ethernet_(1)
________DUID_Time:_Dec_28,_2022_00:08:43.000000000_中国标准时间
________Link-layer_address:_xxx
________Link-layer_address_(Ethernet):_xxx
____Server_Identifier
________Option:_Server_Identifier_(2)
________Length:_10
________DUID:_0003000628011c3da73f
________DUID_Type:_link-layer_address_(3)
________Hardware_type:_IEEE_802_(6)
________Link-layer_address:_xxx
________Link-layer_address_(Ethernet):_xxx
____Identity_Association_for_Non-temporary_Address
________Option:_Identity_Association_for_Non-temporary_Address_(3)
________Length:_40
________IAID:_03e09467
________T1:_26117
________T2:_41787
________IA_Address
____________Option:_IA_Address_(5)
____________Length:_24
____________IPv6_address:_240e:3af:e1a:2080:e294:67ff:fe0f:af4b
____________Preferred_lifetime:_52234
____________Valid_lifetime:_52234
____Preference
________Option:_Preference_(7)
________Length:_1
________Pref-value:_7
____DNS_recursive_name_server
________Option:_DNS_recursive_name_server_(23)
________Length:_16
_________1_DNS_server_address:_fe80::1
____Vendor-specific_Information
________Option:_Vendor-specific_Information_(17)
________Length:_25
________Enterprise_ID:_Reserved_(0)
Openwrt 路由器的 Advertise

DHCPv6
Message type: Advertise (2)
Transaction ID: 0x19f696
Server Identifier
Option: Server Identifier (2)
Length: 10
DUID: xxx
DUID Type: link-layer address (3)
Hardware type: Ethernet (1)
Link-layer address: xxx
Link-layer address (Ethernet): xxx
Client Identifier
Option: Client Identifier (1)
Length: 14
DUID: xxx
DUID Type: link-layer address plus time (1)
Hardware type: Ethernet (1)
DUID Time: Dec 28, 2022 00:08:43.000000000 中国标准时间
Link-layer address: xxx
Link-layer address (Ethernet): xxx
SOL_MAX_RT
Option: SOL_MAX_RT (82)
Length: 4
DNS recursive name server
Option: DNS recursive name server (23)
Length: 16
1 DNS server address: fd5c:1e:6cb0::1
Identity Association for Non-temporary Address
Option: Identity Association for Non-temporary Address (3)
Length: 40
IAID: 03e09467
T1: 21600
T2: 34560
IA Address
Option: IA Address (5)
Length: 24
IPv6 address: fd5c:1e:6cb0::7e8
Preferred lifetime: 43200
Valid lifetime: 43200

------------

光猫的 Advertise

DHCPv6
Message type: Advertise (2)
Transaction ID: 0x19f696
Client Identifier
Option: Client Identifier (1)
Length: 14
DUID: xxx
DUID Type: link-layer address plus time (1)
Hardware type: Ethernet (1)
DUID Time: Dec 28, 2022 00:08:43.000000000 中国标准时间
Link-layer address: xxx
Link-layer address (Ethernet): xxx
Server Identifier
Option: Server Identifier (2)
Length: 10
DUID: 0003000628011c3da73f
DUID Type: link-layer address (3)
Hardware type: IEEE 802 (6)
Link-layer address: xxx
Link-layer address (Ethernet): xxx
Identity Association for Non-temporary Address
Option: Identity Association for Non-temporary Address (3)
Length: 40
IAID: 03e09467
T1: 26117
T2: 41787
IA Address
Option: IA Address (5)
Length: 24
IPv6 address: 240e:3af:e1a:2080:e294:67ff:fe0f:af4b
Preferred lifetime: 52234
Valid lifetime: 52234
Preference
Option: Preference (7)
Length: 1
Pref-value: 7
DNS recursive name server
Option: DNS recursive name server (23)
Length: 16
1 DNS server address: fe80::1
Vendor-specific Information
Option: Vendor-specific Information (17)
Length: 25
Enterprise ID: Reserved (0)
@luoshengdu
>> 去找 fe80::1 是因为你没有告诉电脑找 fd5c 的 IP
这里没看懂,告诉电脑用哪个 IPv6 地址,这就是 DHCPv6 的工作呀
现在电脑发送了 Solicit 请求,路由和光猫都回复了 Advertise 。只是电脑挑选了光猫来进行接下来的协议。

>> 在 dhcp 服务器上配置 v6 dns 的信息下发
这一点也实现了,因为路由给出了 DHCPv6 Advertise ,其中包含了 DNS 。

>> IP 地址不存在优先级
刚才我找了下资料,确实是这样。
但是优先级现象是存在的。
问题出在 DHCPv6 协议的环节,当网络上存在多个 Advertise 时,电脑会做出倾向性选择
参考 https://blog.csdn.net/Kuaisen/article/details/118675607

我又仔细看了抓包记录里面的两个 Advertise ,光猫的带有 preference option 字段,openwrt 给出的没有这个 option 。我猜测电脑收到这两个 Advertise 后倾向于回复光猫就是因为他的带有 preference 。

然后我又找 openwrt 的 odhp 怎么能加入这个 preference option ,没找到有资料。

接下来我感觉解决方案有两类,一个是拿到光猫的超级用户密码,想办法禁止光猫的 DHCPv6 。再就是用带有 VLAN 的交换机或者增加一个路由器,向子网屏蔽光猫的 DHCPv6
@luoshengdu
我怀疑节点获得的多个 IPv6 地址中,FE80::的优先级比 FDxx::的优先级高,或者说 Link-local 地址的优先级比 ULA 的优先级高…
@luoshengdu
我看了一下 Wireshark 抓包记录,发现以下特点:

1) 网络中光猫分发的是 FE80::地址,自己是 FE80::1 ,这个地址好像叫做本地链接地址( Link-local )
2) openwrt 路由器分发的是 fd5c:001e:6cb0::/48 ,一个 ULA 地址。自己有两个地址,一个是自己的 fd5c:1e:6cb0::1 ,一个是从光猫获得的 fe80::2276:93ff:fe00:a03c
3) 节点( Windows 系统)执行 ipconfig /renew6 后,向网络发送了 DHCPv6 Solicit XID 请求,请求是通过 FE80::前缀的地址发出的
4) 光猫和 openwrt 路由器分别使用 FE80::地址的 DHCPv6 Advertise XID 回复了节点。回复中光猫和 Openwrt 各自声明 DNS 服务器是自己,分别是 FE80::1 和 fd5c:1e:6cb0::1 。这说明 Openwrt 路由器的 DHCPv6 是工作了的。
5 )节点只向光猫发送了 DHCPv6 Request XID ,并得到光猫的 DHCPv6 Reply XID
6) 节点 ipconfig /renew6 命令完成后,DNS 列表里只有光猫,没有 Openwrt 路由器
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5847 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 01:59 · PVG 09:59 · LAX 17:59 · JFK 20:59
Developed with CodeLauncher
♥ Do have faith in what you're doing.