每次抄別人答案,總會有幾個小地方沒注意到,這時只好乖乖得拿出spec來翻了。
這次遇到的問題是DHCP server,我用的是 CNR 7.2 沒有給出 FQDN
在使用IPv4的時候是透過option12(Host Name),option15(Domain Name)來組成
PKT-SP-PROV1.5-I04-090624
8.3 DHCP Options 12 and 15
MTA FQDN MUST be sent to the E-MTA in Option-12 and Option-15. Option-12 MUST contain "Host Name"
part of the FQDN, and the Option-15 MUST contain "Domain Name" part of the FQDN.
For example, if MTA FQDN is "mta1.pclab.com", then Option-12 must contain "mta1" and Option-15 must contain
"pclab.com".
換到 IPv6 時,想依樣畫葫蘆,在 client 裡加入這兩個設定,但是 MTA 一直抱怨它無法解出 FQDN,那就打開 wireshark 來 debug 吧
先看一下 MTA 送出來的 Solicit
DHCPv6 Message type: Solicit (1) Transaction ID: 0x1e01e0 Option Request Option: Option Request (6) Length: **** Value: ************** Requested Option code: Fully Qualified Domain Name (39) Requested Option code: DNS recursive name server (23) Requested Option code: Vendor-specific Information (17) Requested Option code: ******************************* Requested Option code: ******************************* Vendor Class Option: Vendor Class (16) Length: 13 Value: 0000118b0007706b7463322e30 Enterprise ID: Cable Television Laboratories, Inc. (4491) vendor-class-data: pktc2.0 Vendor-specific Information Option: Vendor-specific Information (17) Length: **** Value: ***************************************** Enterprise ID: Cable Television Laboratories, Inc. (4491) Suboption: Device Type = (2)******** Suboption: Serial Number = (4)******** Suboption: Hardware Version = (5)******** Suboption: Software Version = (6)***************** Suboption: Boot ROM Version = (7)****** Suboption: Organization Unique Identifier = (8)****** Suboption: Model Number = (9)******** Suboption: Vendor Name = (10)********** Suboption: TLV5 = (35)****************************** Suboption: Device Identifier = (36)************ Suboption: CableLabs Correlation ID = (2172)****** Suboption: Option Request = (1) 32 33 34 2171 Fully Qualified Domain Name Option: Fully Qualified Domain Name (39) Length: 1 Value: 01 0000 0... = Reserved: 0x00 .... .0.. = N bit: Server should perform DNS updates .... ..0. = O bit: Server has not overridden client's S bit preference .... ...1 = S bit: Server should perform forward DNS updates Client Identifier Option: Client Identifier (1) Length: **** Value: **************** DUID: **************** DUID Type: link-layer address (3) Hardware type: Ethernet (1) Link-layer address: **************** Identity Association for Non-temporary Address Option: Identity Association for Non-temporary Address (3) Length: **** Value: **************** IAID: **************** T1: 0 T2: 0 ******************** Option: *********** (**) Length: ** Value: ************
再看一下 CNR 送出來的 Advertise
DHCPv6 Message type: Advertise (2) Transaction ID: 0x1e01e0 Client Identifier Option: Client Identifier (1) Length: **** Value: **************** DUID: **************** DUID Type: link-layer address (3) Hardware type: Ethernet (1) Link-layer address: **************** Server Identifier Option: Server Identifier (2) Length: **** Value: **************** DUID: **************** DUID Type: link-layer address plus time (1) Hardware type: Ethernet (1) DUID Time: **************** Link-layer address: **************** Identity Association for Non-temporary Address Option: Identity Association for Non-temporary Address (3) Length: **** Value: ******************************** IAID: **************** T1: **************** T2: **************** IA Address Option: IA Address (5) Length: 24 Value: ******************************** IPv6 address: ******************************** Preferred lifetime: **************** Valid lifetime: **************** Fully Qualified Domain Name Option: Fully Qualified Domain Name (39) Length: 1 Value: 06 0000 0... = Reserved: 0x00 .... .1.. = N bit: Server should not perform DNS updates .... ..1. = O bit: Server has overridden client's S bit preference .... ...0 = S bit: Server should not perform forward DNS updates DNS recursive name server Option: DNS recursive name server (23) Length: 16 Value: **************** DNS server address: **************** Vendor-specific Information Option: Vendor-specific Information (17) Length: **** Value: ******************************** Enterprise ID: Cable Television Laboratories, Inc. (4491) Suboption: CableLabs Client Configuration IPv6 : (2171) (**** bytes) Suboption: TFTP Server Addresses : (32) IPv6 address: **************** Suboption: Configuration File Name = (33)**************** Suboption: Syslog Servers : (34) IPv6 address: **************** Suboption: Time Protocol Servers : (37) IPv6 address: **************** Suboption: Time Offset = ****************比對一下 spec PKT-SP-EUE-PROV-C01-140314 對 Solicit 的規範
看起來 MTA 該發的訊息都有發出來,沒有問題,問題應該出在 Server 沒設定好6.3.4.3 IP Configuration Retrieval Using DHCPv6 eUE-1 DHCPv6 SOLICIT Message The eUE MUST send a multicast DHCPv6 SOLICIT message that includes the following options: - OPTION_CLIENTID(1) containing the DUID (DHCP Unique Identifier) for the eUE, as specified by [RFC 3315]. The eUE can choose any one of the rules to construct the DUID according to [RFC 3315], section 9.1; - OPTION_ IA_NA(3) (Identity Association for Non-temporary Addresses) to obtain an IPv6 address assignment. - OPTION_FQDN(39) (Client FQDN Option as per [RFC 4704]) containing an empty "domain name" field, and containing a "flags" field with flag values S=1, N=0, O=0. - OPTION_ORO(6) requesting the following standard options from the server: - OPTION_FQDN(39), [RFC 4704]) - OPTION_DNS_SERVERS(23)OPTION_VENDOR_OPTS(17) - OPTION_VENDOR_CLASS (16) containing enterprise number 4491 and the string "pktc2.0". - OPTION_VENDOR_OPTS (17) containing enterprise number 4491, and further containing the following CableLabs vendor options: - CL_OPTION_DEVICE_TYPE(2) with the name identifying the EUE device as defined in [CANN-DHCP-Reg]. - CL_OPTION_DEVICE_SERIAL_NUMBER(4) with the EUE embedded device serial number as defined in [CANN-DHCP-Reg]. - CL_OPTION_HARDWARE_VERSION_NUMBER(5) as defined in [CANN-DHCP-Reg]. - CL_OPTION_SOFTWARE_VERSION_NUMBER(6) as defined in [CANN-DHCP-Reg]. - CL_OPTION_BOOT_ROM_VERSION(7) as defined in [CANN-DHCP-Reg]. - CL_OPTION_VENDOR_OUI(8) as defined in [CANN-DHCP-Reg]. - CL_OPTION_MODEL_NUMBER(9) as defined in [CANN-DHCP-Reg]. - CL_OPTION_VENDOR_NAME(10) as defined in [CANN-DHCP-Reg]. - CL_OPTION_MODEM_CAPABILITIES(35), with the formatting specified in [CANN-DHCP-Reg] and the content specified in the Section 6.6.1 of this document. - CL_OPTION_DEVICE_ID(36) containing eUE MAC address CL_OPTION_CORRELATION_ID(2172) containing correlation ID - CL_OPTION_ORO(1) requesting the following vendor specific options from the server: - CL_OPTION_TFTP_SERVERS(32) as defined in [CANN-DHCP-Reg] - CL_OPTION_CONFIG_FILE_NAME(33) as defined in [CANN-DHCP-Reg] - CL_OPTION_SYSLOG_SERVERS(34) as defined in [CANN-DHCP-Reg] - CL_OPTION_CCCV6(2171) as defined in [CANN-DHCP-Reg]
Server 沒有給出 FQDN,然後 MTA 和 Server 就不斷重複這兩個封包,在 Server 上設定 client 的 Host Name, Domain Name ,Server 不發 FQDN
接著把這組 IP 保留給 MTA 並在 DNS 上加入正解,Server 還是不發 FQDN,那就去看一下這個 option 39 在做什麼。
這個 Option 訂在 RFC4704
MTA 的設定是 S=1, N=0, O=0
符合 5.2 Client Desires Server to Do DNS Updates 的設定
MTA 要 DHCP server 做 DNS update,但我沒設定 DNS update,所以 Server 回 Advertise 時 Option 這樣設 S=0, N=0, O=1
因為沒有設定 DNS update,S bit 設成 0,N bit 不變,因為有改過S bit,O bit 設成 1。
就這個原因造成這兩個封包丟來丟去,所以只要把 DNS 設定好應該就可以了。
CNR IPv6 的 DNS update 和 IPv4 的設定差不多,CISCO 詳細設定去問一下那個翹著腿坐在沙發上的男人就可以了
設定好 DNS update 後,再試一次,這次 Server 回的封包就有帶 FQDN 了
DHCPv6 Message type: Advertise (2) Transaction ID: 0x59d28c Client Identifier Option: Client Identifier (1) Length: ** Value: **************** DUID: **************** DUID Type: link-layer address (3) Hardware type: Ethernet (1) Link-layer address: **************** Server Identifier Option: Server Identifier (2) Length: **** Value: **************** DUID: **************** DUID Type: link-layer address plus time (1) Hardware type: Ethernet (1) DUID Time: **************** Link-layer address: **************** Identity Association for Non-temporary Address Option: Identity Association for Non-temporary Address (3) Length: **** Value: ************************************************ IAID: **************** T1: **************** T2: **************** IA Address Option: IA Address (5) Length: 24 Value: **************** IPv6 address: **************** Preferred lifetime: **************** Valid lifetime: **************** Fully Qualified Domain Name Option: Fully Qualified Domain Name (39) Length: **** Value: ******************************** 0000 0... = Reserved: 0x00 .... .0.. = N bit: Server should perform DNS updates .... ..1. = O bit: Server has overridden client's S bit preference .... ...0 = S bit: Server should not perform forward DNS updates Domain: ******************************** DNS recursive name server Option: DNS recursive name server (23) Length: 16 Value: ******************************** DNS server address: ******************************** Vendor-specific Information Option: Vendor-specific Information (17) Length: **** Value: **************** Enterprise ID: Cable Television Laboratories, Inc. (4491) Suboption: CableLabs Client Configuration IPv6 : (2171) (** bytes) Suboption: TFTP Server Addresses : (32) IPv6 address: **************** Suboption: Configuration File Name = (33) **************** Suboption: Syslog Servers : (34) IPv6 address: **************** Suboption: Time Protocol Servers : (37) IPv6 address: ****************
這樣 FQDN 就乖乖得跑出來了,下一步就是玩玩看怎麼用 TCL 去控制 hostname 了,CNR 內建的 hostname 命名方式我不希歡。
IPv6 provisioning 過了後也可以把之前玩過的 HYBRID Server 更新成支援 2.0 和 IPv6了。
請問你是使用什麼SIP server
回覆刪除我用Brekeke 會有489 Bad Event 錯誤
我用 Asterisk
刪除