TWI401922B - Cable modem and automatic country code assignment method thereof - Google Patents
Cable modem and automatic country code assignment method thereof Download PDFInfo
- Publication number
- TWI401922B TWI401922B TW99103395A TW99103395A TWI401922B TW I401922 B TWI401922 B TW I401922B TW 99103395 A TW99103395 A TW 99103395A TW 99103395 A TW99103395 A TW 99103395A TW I401922 B TWI401922 B TW I401922B
- Authority
- TW
- Taiwan
- Prior art keywords
- country
- protocol address
- internet protocol
- public
- cable modem
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 18
- 230000004044 response Effects 0.000 claims description 21
- 238000013507 mapping Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Telephonic Communication Services (AREA)
Description
本發明涉及網路通訊裝置,尤其涉及一種線纜數據機及其自動獲取國家代碼的方法。 The present invention relates to a network communication device, and more particularly to a cable data machine and a method for automatically acquiring a country code.
將線纜數據機從一個國家移動到另一個國家時,由於不同國家所使用的國家代碼不同,且不同國家代碼對應的多媒體終端適配器(Multimedia Terminal Adapter)的參數配置檔不相同,這將嚴重影響用戶利用線纜數據機撥打網路協定語音(Voice over Internet Protocol,VoIP)電話時的通話品質。 When moving a cable modem from one country to another, the country code of different countries is different, and the parameter configuration files of the multimedia terminal adapters corresponding to different country codes are different, which will seriously affect The quality of the call when a user dials a Voice over Internet Protocol (VoIP) call using a cable modem.
如果要提高通話品質,用戶則必須藉由手動方式在線纜數據機上更改MTA參數配置檔,使其與另一個國家的國家代碼相對應,這樣將給用戶帶來很大的不便,因此,需提供一種能自動獲取國家代碼的方法,以便於設置正確的多媒體終端適配器的參數配置檔,從而為用戶提供方便。 If the call quality is to be improved, the user must manually change the MTA parameter profile on the cable modem to correspond to the country code of another country, which will cause great inconvenience to the user. It is necessary to provide a method for automatically obtaining the country code, so as to set the parameter configuration file of the correct multimedia terminal adapter, thereby providing convenience for the user.
有鑒於此,需提供一種線纜數據機,能自動獲取國家代碼,以便於設置正確的多媒體終端適配器的參數配置檔。 In view of this, it is necessary to provide a cable data machine that can automatically obtain a country code to set a parameter configuration file of the correct multimedia terminal adapter.
另外,還需提供一種線纜數據機自動獲取國家代碼的方法,能自動獲取國家代碼,以便於設置正確的多媒體終端適配器的參數配置檔。 In addition, it is also necessary to provide a method for the cable data machine to automatically obtain the country code, and the country code can be automatically obtained, so as to set the parameter configuration file of the correct multimedia terminal adapter.
本發明實施方式中提供的線纜數據機,包括存儲媒介、發送模組、判斷模組、選擇模組、多媒體終端適配器模組及處理器,該線纜數據機藉由線纜數據機終端系統與網際網路通訊。該存儲媒介存儲有該線纜數據機在第一國家的公共網際網路協定位址,以及複數國家代碼與複數公共網際網路協定位址範圍的對照關係。該發送模組藉由該線纜數據機終端系統向該網際網路發送動態主機設定協定封包以請求獲取公共網際網路協定位址。該判斷模組判斷是否從該網際網路獲取到公共網際網路協定位址,以及在獲取到公共網際網路協定位址時,判斷所獲取的公共網際網路協定位址是否與該線纜數據機在該第一國家的公共網際網路協定位址相同以判斷該線纜數據機是否從該第一國家被移動至第二國家。該選擇模組在該線纜數據機從該第一國家被移動至該第二國家時,根據該複數國家代碼與複數公共網際網路協定位址範圍的對照關係確定所獲取的公共網際網路協定位址對應的國家代碼。該處理器用於執行該發送模組、該判斷模組以及該選擇模組以實現各自模組的功能。 The cable data machine provided in the embodiment of the present invention comprises a storage medium, a transmitting module, a determining module, a selecting module, a multimedia terminal adapter module and a processor, and the cable data machine is provided by a cable data machine terminal system Communicate with the Internet. The storage medium stores the public network protocol address of the cable modem in the first country, and the relationship between the plurality of country codes and the plurality of public internet protocol address ranges. The transmitting module sends a dynamic host setting protocol packet to the Internet by the cable modem terminal system to request to obtain a public internet protocol address. The determining module determines whether the public internet protocol address is obtained from the internet, and when the public internet protocol address is obtained, determining whether the obtained public internet protocol address is connected to the cable The data plane is the same in the first country's public internet protocol address to determine if the cable modem is moved from the first country to the second country. The selection module determines the obtained public internet network according to the relationship between the plurality of country codes and the plurality of public internet protocol address ranges when the cable data machine is moved from the first country to the second country. The country code corresponding to the agreement address. The processor is configured to execute the transmitting module, the determining module, and the selecting module to implement functions of respective modules.
本發明實施方式中提供的線纜數據機自動獲取國家代碼的方法,該線纜數據機藉由線纜數據機終端系統與網際網路通訊,該線纜數據機包括存儲媒介和處理器,該存儲媒介存儲有 該線纜數據機在第一國家的公共網際網路協定位址,以及複數國家代碼與複數公共網際網路協定位址範圍的對照關係,該方法包括以下步驟:藉由該線纜數據機終端系統向該網際網路發送動態主機設定協定封包以請求獲取公共網際網路協定位址;判斷是否從該網際網路中獲取到公共網際網路協定位址;若從該網際網路中獲取到公共網際網路協定位址,則判斷所獲取的公共網際網路協定位址是否與該線纜數據機在該第一國家的公共網際網路協定位址相同以判斷該線纜數據機是否從該第一國家被移動至第二國家;及若該線纜數據機從該第一國家被移動至該第二國家,則根據該複數國家代碼與複數公共網際網路協定位址範圍的對照關係確定所獲取的公共網際網路協定位址對應的國家代碼。 The cable data machine provided by the embodiment of the present invention automatically acquires a country code, and the cable data machine communicates with the Internet through a cable modem terminal system, where the cable data machine includes a storage medium and a processor, and the cable data machine includes a storage medium and a processor. Storage media storage The cable modem is in the first country's public internet protocol address, and the relationship between the plurality of country codes and the plurality of public internet protocol address ranges, the method comprising the steps of: The system sends a dynamic host setting protocol packet to the Internet to request access to a public internet protocol address; determining whether a public internet protocol address is obtained from the internet; if obtained from the internet The public internet protocol address determines whether the obtained public internet protocol address is the same as the public network protocol address of the cable data machine in the first country to determine whether the cable data machine is from the The first country is moved to the second country; and if the cable modem is moved from the first country to the second country, based on the comparison of the plurality of country codes with the plurality of public internet protocol address ranges Determine the country code corresponding to the obtained public internet protocol address.
藉由以下對具體實施方式詳細的描述結合附圖,將可輕易的瞭解上述內容及此項發明之諸多優點。 The above and many advantages of the invention will be readily apparent from the following detailed description of the preferred embodiments.
10‧‧‧用戶終端設備 10‧‧‧User terminal equipment
20‧‧‧線纜數據機 20‧‧‧Cable Data Machine
202‧‧‧處理器 202‧‧‧ processor
204‧‧‧存儲媒介 204‧‧‧Storage medium
206‧‧‧發送模組 206‧‧‧Transmission module
208‧‧‧判斷模組 208‧‧‧Judgement module
210‧‧‧選擇模組 210‧‧‧Selection module
212‧‧‧多媒體終端適配器模組 212‧‧‧Multimedia Terminal Adapter Module
300‧‧‧線纜數據機終端系統 300‧‧‧Cable Data Terminal System
302‧‧‧第一線纜數據機終端系統 302‧‧‧First cable modem terminal system
304 40 410 401 403 420 405 407‧‧‧第二線纜數據機終端系統 網際網路 路由器 第一路由器 第二路由器 DHCP伺服器 第一DHCP伺服器 第二DHCP伺服器 304 40 410 401 403 420 405 407‧‧‧Second cable modem terminal system Internet router First router Second router DHCP server First DHCP server Second DHCP server
圖1為本發明一實施方式中線纜數據機的應用環境示意圖。 FIG. 1 is a schematic diagram of an application environment of a cable data machine according to an embodiment of the present invention.
圖2為本發明一實施方式中線纜數據機的內部結構示意圖。 2 is a schematic diagram showing the internal structure of a cable data machine according to an embodiment of the present invention.
圖3為本發明一實施方式中線纜數據機的存儲媒介所存儲的公共IP位址範圍、國家代碼以及多媒體終端適配器的參數配置檔三者之間的對應關係圖。 3 is a diagram showing a correspondence relationship between a public IP address range, a country code, and a parameter configuration file of a multimedia terminal adapter stored in a storage medium of a cable data machine according to an embodiment of the present invention.
圖4為本發明一實施方式中線纜數據機自動獲取國家代碼的方法流程圖。 4 is a flow chart of a method for automatically acquiring a country code by a cable modem according to an embodiment of the present invention.
請參閱圖1,所示為本發明一實施方式中線纜數據機20的應用環境示意圖。在本發明一實施方式中,當線纜數據機20位於第一國家時,藉由第一線纜數據機終端系統(Cable Modem Termination Systems,CMTS)302連接到網際網路40,此時,用戶終端設備10可藉由線纜數據機20與第一線纜數據機終端系統302接入網際網路40。當線纜數據機20由第一國家移動到第二國家時,則藉由第二線纜數據機終端系統304連接到網際網路40,此時,用戶終端設備10可藉由線纜數據機20與第二線纜數據機終端系統304接入網際網路40,如圖1中的虛線部分所示。 Please refer to FIG. 1 , which is a schematic diagram of an application environment of a cable data machine 20 according to an embodiment of the present invention. In an embodiment of the present invention, when the cable modem 20 is located in the first country, it is connected to the Internet 40 by a first Cable Modem Termination Systems (CMTS) 302. At this time, the user The terminal device 10 can access the Internet 40 via the cable modem 20 and the first cable modem terminal system 302. When the cable modem 20 is moved from the first country to the second country, it is connected to the Internet 40 by the second cable modem terminal system 304. At this time, the user terminal device 10 can be connected by the cable modem. 20 and the second cable modem termination system 304 access the Internet 40, as shown by the dashed portion in FIG.
在本實施方式中,用戶終端設備10包括用戶電話機或者個人電腦(Personal Computer,PC)等終端設備。網際網路40包括第一動態主機設定協定(Dynamic Host Configuration Protocol,DHCP)伺服器405、第二DHCP伺服器407、至少一個第一路由器401以及至少一個第二路由器403。在第一國家中,第一線纜數據機終端系統302藉由至少一個第一路由器401與第一DHCP伺服器405通訊。在第二國家中,第二線纜數據機終端系統304藉由至少一個第二路由器403與第二DHCP伺服器407通訊。 In the present embodiment, the user terminal device 10 includes a terminal device such as a user's telephone or a personal computer (PC). The Internet 40 includes a first Dynamic Host Configuration Protocol (DHCP) server 405, a second DHCP server 407, at least one first router 401, and at least one second router 403. In the first country, the first cable modem terminal system 302 communicates with the first DHCP server 405 via at least one first router 401. In the second country, the second cable modem terminal system 304 communicates with the second DHCP server 407 via at least one second router 403.
在本發明一實施方式中,線纜數據機20先被放置於第一國家,當線纜數據機20首次開機時,會藉由第一線纜數據機終端系統302以廣播(Broadcast)的形式向網際網路40發送 DHCP封包。在網際網路40中該DHCP封包經過至少一個第一路由器401以到達第一DHCP伺服器405。第一DHCP伺服器405接收到該DHCP封包後,將根據自身公共網際網路協定(Internet Protocol,IP)位址資源的使用情況為線纜數據機20分配公共IP位址,並經由至少一個第一路由器401與第一線纜數據機終端系統302將所分配的公共IP位址發送至線纜數據機20。然後,線纜數據機20接收該分配的公共IP位址,並將該分配的公共IP位址存儲為其在第一國家的公共IP位址。 In an embodiment of the present invention, the cable modem 20 is first placed in the first country. When the cable modem 20 is powered on for the first time, it will be broadcasted by the first cable modem terminal system 302. Send to the Internet 40 DHCP packet. In the Internet 40, the DHCP packet passes through at least one first router 401 to reach the first DHCP server 405. After receiving the DHCP packet, the first DHCP server 405 allocates a public IP address to the cable modem 20 according to the usage of its own Internet Protocol (IP) address resource, and passes at least one A router 401 and the first cable modem terminal system 302 transmit the assigned public IP address to the cable modem 20. Cable modem 20 then receives the assigned public IP address and stores the assigned public IP address as its public IP address in the first country.
當線纜數據機20在第一國家再次開機時,線纜數據機20會以同樣的方式從網際網路40獲取公共IP位址,此時,線纜數據機20會判斷所獲取公共IP位址是否與所存儲的在第一國家的公共IP位址相同。由於線纜數據機20還在第一國家,所以所獲取的公共IP位址與所存儲的在第一國家的公共IP位址相同。然後,線纜數據機20根據所存儲的在第一國家的公共IP位址獲取與之相對應的多媒體終端適配器(Multimedia Terminal Adapter)的參數配置檔。 When the cable modem 20 is powered on again in the first country, the cable modem 20 will obtain the public IP address from the Internet 40 in the same manner. At this time, the cable modem 20 will determine the acquired public IP address. Whether the address is the same as the stored public IP address in the first country. Since the cable modem 20 is still in the first country, the acquired public IP address is the same as the stored public IP address in the first country. Then, the cable modem 20 obtains a parameter configuration file of the multimedia terminal adapter (Multimedia Terminal Adapter) corresponding thereto according to the stored public IP address in the first country.
當線纜數據機20從第一國家被移至第二國家時,線纜數據機20在開機後同樣以廣播的形式藉由第二線纜數據機終端系統304向網際網路40發送DHCP封包。在網際網路40中該DHCP封包經過至少一個第二路由器403以到達第二DHCP伺服器407。第二DHCP伺服器407接收到該DHCP封包後,會為線纜數據機20分配公共IP位址,並經由至少一個第二路由器403與第二 線纜數據機終端系統304將所分配的公共IP位址發送至線纜數據機20。然後,線纜數據機20接收所分配的公共IP位址,並判斷所接收的公共IP位址是否與所存儲的在第一國家的公共IP位址相同。由於線纜數據機20被移至第二國家,所以所獲取的公共IP位址與所存儲的在第一國家的公共IP位址不同。然後,線纜數據機20根據所獲取的公共IP位址查找對應的國家代碼,即第二國家的代碼,並根據對應的國家代碼查找對應的多媒體終端適配器的參數配置檔。同時,線纜數據機20刪除所存儲的在第一國家的公共IP位址,並將所獲取的公共IP位址存儲為其在第二國家的公共IP位址。 When the cable modem 20 is moved from the first country to the second country, the cable modem 20 also sends a DHCP packet to the Internet 40 via the second cable modem terminal system 304 in broadcast form after powering up. . In the Internet 40, the DHCP packet passes through at least one second router 403 to reach the second DHCP server 407. After receiving the DHCP packet, the second DHCP server 407 allocates a public IP address to the cable modem 20 via the at least one second router 403 and the second Cable modem terminal system 304 transmits the assigned public IP address to cable modem 20. The cable modem 20 then receives the assigned public IP address and determines if the received public IP address is the same as the stored public IP address in the first country. Since the cable modem 20 is moved to the second country, the acquired public IP address is different from the stored public IP address in the first country. Then, the cable data machine 20 searches for the corresponding country code, that is, the code of the second country, according to the obtained public IP address, and searches for the parameter configuration file of the corresponding multimedia terminal adapter according to the corresponding country code. At the same time, cable modem 20 deletes the stored public IP address in the first country and stores the acquired public IP address as its public IP address in the second country.
在本發明實施方式中,為了描述的方便及清楚,第一線纜數據機終端系統302與第二線纜數據機終端系統304統稱為線纜數據機終端系統300。第一路由器401與第二路由器403統稱為路由器410。第一DHCP伺服器405與第二DHCP伺服器407統稱為DHCP伺服器420。 In the embodiment of the present invention, for convenience and clarity of description, the first cable modem terminal system 302 and the second cable modem terminal system 304 are collectively referred to as a cable modem terminal system 300. The first router 401 and the second router 403 are collectively referred to as a router 410. The first DHCP server 405 and the second DHCP server 407 are collectively referred to as a DHCP server 420.
請參閱圖2,所示為本發明一實施方式中線纜數據機20的內部結構示意圖。在本實施方式中,線纜數據機20包括處理器202、存儲媒介204、發送模組206、判斷模組208、選擇模組210以及多媒體終端適配器模組212。 Please refer to FIG. 2, which is a schematic diagram showing the internal structure of the cable data machine 20 according to an embodiment of the present invention. In the present embodiment, the cable data machine 20 includes a processor 202, a storage medium 204, a transmitting module 206, a determining module 208, a selecting module 210, and a multimedia terminal adapter module 212.
處理器202執行模組206~212用以實現這些模組的功能。 The processor 202 executes the modules 206-212 to implement the functions of the modules.
存儲媒介204存儲有線纜數據機20在第一國家的公共IP位址。存儲媒介204還存儲有複數公共IP位址範圍、複數國家代 碼以及複數多媒體終端適配器的參數配置檔,且公共IP位址範圍、國家代碼以及多媒體終端適配器的參數配置檔三者之間為一一對應的關係,如圖3所示。 The storage medium 204 stores the public IP address of the cable modem 20 in the first country. The storage medium 204 also stores a plurality of public IP address ranges and a plurality of country generations. The code and the parameter configuration file of the plurality of multimedia terminal adapters have a one-to-one correspondence between the public IP address range, the country code, and the parameter configuration file of the multimedia terminal adapter, as shown in FIG.
請參閱圖3,所示為本發明一實施方式中線纜數據機20的存儲媒介204所存儲的公共IP位址範圍、國家代碼以及多媒體終端適配器的參數配置檔三者之間的對應關係圖。在本實施方式中,不同國家所使用的國家代碼不同,且每個國家所允許使用的公共IP位址範圍以及多媒體終端適配器的參數配置檔也不同,每個國家代碼對應一個唯一的公共IP位址範圍,每個國家代碼亦對應一個唯一的多媒體終端適配器的參數配置檔,每個多媒體終端適配器的參數配置檔包括對響鈴(Ringing)、音調(Tone)、頻率(Frequency)、掛機時間(Onhook time)以及摘機時間(Offhook time)等參數的設置。 Referring to FIG. 3, there is shown a correspondence diagram between a public IP address range, a country code, and a parameter configuration file of a multimedia terminal adapter stored in the storage medium 204 of the cable modem 20 according to an embodiment of the present invention. . In this embodiment, the country codes used in different countries are different, and the public IP address range allowed by each country and the parameter configuration file of the multimedia terminal adapter are different, and each country code corresponds to a unique public IP bit. The range of addresses, each country code also corresponds to a parameter configuration file of a unique multimedia terminal adapter, and the parameter configuration files of each multimedia terminal adapter include ringing, tone, frequency, and on-hook time. (Onhook time) and setting of parameters such as Offhook time.
請再次參閱圖2,發送模組206藉由線纜數據機終端系統300向網際網路40發送DHCP封包以獲取公共IP位址。在本實施方式中,發送模組206所發送的DHCP封包會經過至少一個路由器410以到達DHCP伺服器420,同時,網際網路40中的至少一個路由器410在接收到DHCP封包後會向線纜數據機20返回至少一個第一響應封包,網際網路40中的DHCP伺服器420在接收到DHCP封包後會向線纜數據機20返回至少一個第二響應封包。 Referring again to FIG. 2, the transmitting module 206 transmits a DHCP packet to the Internet 40 via the cable modem terminal system 300 to obtain a public IP address. In this embodiment, the DHCP packet sent by the sending module 206 passes through at least one router 410 to reach the DHCP server 420, and at least one router 410 in the Internet 40 sends the cable to the cable after receiving the DHCP packet. The data machine 20 returns at least one first response packet, and the DHCP server 420 in the Internet 40 returns at least one second response packet to the cable modem 20 upon receiving the DHCP packet.
在本發明一實施方式中,若線纜數據機20在第一國家未被移 動,則DHCP伺服器420、路由器410、線纜數據機終端系統300分別為第一DHCP伺服器405、第一路由器401、第一線纜數據機終端系統302。 In an embodiment of the invention, if the cable modem 20 is not moved in the first country The DHCP server 420, the router 410, and the cable modem terminal system 300 are the first DHCP server 405, the first router 401, and the first cable modem terminal system 302, respectively.
在本發明另一實施方式中,若線纜數據機20在第一國家被移動至第二國家,則DHCP伺服器420、路由器410、線纜數據機終端系統300分別為第二DHCP伺服器407、第二路由器403、第二線纜數據機終端系統304。 In another embodiment of the present invention, if the cable modem 20 is moved to the second country in the first country, the DHCP server 420, the router 410, and the cable modem terminal system 300 are respectively the second DHCP server 407. The second router 403 and the second cable modem terminal system 304.
判斷模組208判斷是否從網際網路40獲取到公共IP位址。在本實施方式中,DHCP伺服器420在接收到發送模組206所發送的DHCP封包後,會根據自身的公共IP位址的實際使用情況來分配公共IP位址,若存在多餘的公共IP位址則將其分配給線纜數據機20,若沒有多餘的公共IP位址則向線纜數據機20回覆不能分配公共IP位址的資訊。 The decision module 208 determines whether a public IP address is obtained from the Internet 40. In this embodiment, after receiving the DHCP packet sent by the sending module 206, the DHCP server 420 allocates a public IP address according to the actual usage of its public IP address, if there is an extra public IP address. The address is assigned to the cable modem 20, and if there is no redundant public IP address, the cable modem 20 is replied to the information that the public IP address cannot be assigned.
在本實施方式中,若從DHCP伺服器420中不能獲取到公共IP位址,即不能從第二響應封包獲取到公共IP位址,判斷模組208則從所接收到的第一響應封包中獲取公共IP位址。 In this embodiment, if the public IP address cannot be obtained from the DHCP server 420, that is, the public IP address cannot be obtained from the second response packet, the determining module 208 is from the received first response packet. Get the public IP address.
若從DHCP伺服器420可以獲取到公共IP位址,判斷模組208判斷所獲取的公共IP位址是否與線纜數據機20在第一國家的公共IP位址相同以判斷線纜數據機20是否從第一國家被移動至第二國家。 If the public IP address is available from the DHCP server 420, the determining module 208 determines whether the acquired public IP address is the same as the public IP address of the cable modem 20 in the first country to determine the cable modem 20. Whether it was moved from the first country to the second country.
在本實施方式中,若所獲取的公共IP位址與線纜數據機20在第一國家的公共IP位址相同,則表明線纜數據機20並未從第 一國家被移動至第二國家。若所獲取的公共IP位址與線纜數據機20存儲的在第一國家的公共IP位址不相同,則表明線纜數據機20從第一國家被移動至第二國家。 In this embodiment, if the acquired public IP address is the same as the public IP address of the cable modem 20 in the first country, it indicates that the cable modem 20 is not from the first A country was moved to a second country. If the acquired public IP address is not the same as the public IP address stored in the first country by the cable modem 20, it indicates that the cable modem 20 has been moved from the first country to the second country.
選擇模組210在線纜數據機20從第一國家被移動至第二國家時,根據複數國家代碼與複數公共IP位址範圍的對照關係確定所獲取的公共IP位址對應的國家代碼,即第二國家的代碼。 When the cable data machine 20 is moved from the first country to the second country, the selection module 210 determines the country code corresponding to the obtained public IP address according to the comparison relationship between the plurality of country codes and the plurality of public IP address ranges, that is, The code for the second country.
在本實施方式中,選擇模組210首先根據在存儲媒介204中所存儲的公共IP位址範圍確定所獲取的公共IP位址所屬的範圍,然後,根據圖3所示的對應關係在存儲媒介204中獲取與所屬的公共IP位址範圍相對應的國家代碼,最後,根據獲取到的國家代碼在存儲媒介204中查找與國家代碼相對應的多媒體終端適配器的參數配置檔。 In this embodiment, the selection module 210 first determines the range to which the acquired public IP address belongs according to the public IP address range stored in the storage medium 204, and then, according to the correspondence shown in FIG. 3, in the storage medium. The country code corresponding to the public IP address range to which it belongs is obtained 204, and finally, the parameter configuration file of the multimedia terminal adapter corresponding to the country code is searched for in the storage medium 204 according to the acquired country code.
多媒體終端適配器模組212在查找到與國家代碼相對應的多媒體終端適配器的參數配置檔時,更新線纜數據機20中的多媒體終端適配器的參數配置檔。 The multimedia terminal adapter module 212 updates the parameter configuration file of the multimedia terminal adapter in the cable data machine 20 when the parameter configuration file of the multimedia terminal adapter corresponding to the country code is found.
與此同時,存儲媒介204刪除所存儲的線纜數據機20在第一國家的公共IP位址,並將所獲取的公共IP位址存儲為線纜數據機20在第二國家的公共IP位址。 At the same time, the storage medium 204 deletes the stored public address of the cable modem 20 in the first country and stores the acquired public IP address as the public IP address of the cable modem 20 in the second country. site.
由於不同國家所使用的多媒體終端適配器的參數配置檔不一樣,當線纜數據機20由一個國家移動到另一個國家時,若不及時更新線纜數據機20中的多媒體終端適配器的參數配置檔 ,則用戶終端設備10藉由線纜數據機20撥打網路協定語音(Voice over Internet Protocol,VoIP)電話的通話品質會很差。在本實施方式中,則採取及時更新線纜數據機20中的多媒體終端適配器的參數配置檔的方式,使其與所在國家所使用的多媒體終端適配器的參數配置檔保持一致以便於提高VoIP電話的通話品質。 Since the parameter configuration file of the multimedia terminal adapter used in different countries is different, when the cable data machine 20 is moved from one country to another, if the parameter configuration file of the multimedia terminal adapter in the cable data machine 20 is not updated in time. The call quality of the voice over Internet Protocol (VoIP) call by the user terminal device 10 by the cable modem 20 may be poor. In this embodiment, the parameter configuration file of the multimedia terminal adapter in the cable data machine 20 is updated in time to make it consistent with the parameter configuration file of the multimedia terminal adapter used in the country to improve the VoIP phone. Call quality.
在本實施方式中,若所獲取的公共IP位址與線纜數據機20在第一國家的公共IP位址相同,則表明線纜數據機20並沒有由一個國家移動到另一個國家,此時,選擇模組210則直接根據所存儲的公共IP位址獲取與之相對應的多媒體終端適配器的參數配置檔。 In this embodiment, if the acquired public IP address is the same as the public IP address of the cable modem 20 in the first country, it indicates that the cable modem 20 has not been moved from one country to another. The selection module 210 obtains the parameter configuration file of the corresponding multimedia terminal adapter directly according to the stored public IP address.
請參閱圖4,所示為本發明一實施方式中線纜數據機20自動獲取國家代碼的方法流程圖。在本實施方式中,該方法藉由圖2所示的各個模組來實現。 Referring to FIG. 4, a flow chart of a method for automatically acquiring a country code by the cable data machine 20 according to an embodiment of the present invention is shown. In the present embodiment, the method is implemented by each module shown in FIG. 2.
在步驟S400中,發送模組206藉由線纜數據機終端系統300向網際網路40發送DHCP封包以獲取公共IP位址。在本實施方式中,發送模組206所發送的DHCP封包會經過至少一個路由器410以到達DHCP伺服器420,同時網際網路40中的至少一個路由器410在接收到DHCP封包後會向線纜數據機20返回至少一個第一響應封包,網際網路40中的DHCP伺服器420在接收到DHCP封包後會向線纜數據機20返回至少一個第二響應封包。 In step S400, the transmitting module 206 transmits a DHCP packet to the Internet 40 via the cable modem terminal system 300 to obtain a public IP address. In this embodiment, the DHCP packet sent by the sending module 206 passes through at least one router 410 to reach the DHCP server 420, and at least one router 410 in the Internet 40 sends the cable data to the cable after receiving the DHCP packet. The machine 20 returns at least one first response packet, and the DHCP server 420 in the Internet 40 returns at least one second response packet to the cable modem 20 after receiving the DHCP packet.
在步驟S402中,判斷模組208判斷是否從網際網路40中獲取 到公共IP位址。在本實施方式中,DHCP伺服器420在接收到發送模組206所發送的DHCP封包後,會根據自身的公共IP位址的實際使用情況來分配公共IP位址,若存在多餘的公共IP位址則將其分配給線纜數據機20,若沒有多餘的公共IP位址則向線纜數據機20回覆不能分配公共IP位址的資訊。 In step S402, the determining module 208 determines whether to obtain from the Internet 40. Go to the public IP address. In this embodiment, after receiving the DHCP packet sent by the sending module 206, the DHCP server 420 allocates a public IP address according to the actual usage of its public IP address, if there is an extra public IP address. The address is assigned to the cable modem 20, and if there is no redundant public IP address, the cable modem 20 is replied to the information that the public IP address cannot be assigned.
在步驟S404中,若不能從網際網路40中獲取到公共IP位址,判斷模組208則從線纜數據機20所接收到的響應封包中獲取公共IP位址。在本實施方式中,由於發送模組206向DHCP伺服器420發送的DHCP封包會經過網際網路40中的至少一個路由器410,其中每個路由器410在接收到DHCP封包後都會向線纜數據機20返回一個響應報文,即第一響應封包,並且每個響應報文均包含當前路由器410所使用的公共IP位址資訊,在本實施方式中,判斷模組208則從最先接收到的響應報文中獲取公共IP位址。 In step S404, if the public IP address cannot be obtained from the Internet 40, the determination module 208 obtains the public IP address from the response packet received by the cable modem 20. In this embodiment, the DHCP packet sent by the sending module 206 to the DHCP server 420 passes through at least one router 410 in the Internet 40, wherein each router 410 goes to the cable modem after receiving the DHCP packet. 20 returns a response message, that is, the first response packet, and each response message includes the public IP address information used by the current router 410. In this embodiment, the determining module 208 receives the first packet. Get the public IP address in the response message.
若從DHCP伺服器420可以獲取到公共IP位址,則在步驟S406中,判斷模組208判斷所獲取的公共IP位址是否與線纜數據機20存儲的第一國家的公共IP位址相同以判斷線纜數據機20是否從第一國家被移動至第二國家。 If the public IP address is available from the DHCP server 420, then in step S406, the determination module 208 determines whether the acquired public IP address is the same as the public IP address of the first country stored by the cable modem 20. To determine if the cable modem 20 has been moved from the first country to the second country.
在本實施方式中,若所獲取的公共IP位址與線纜數據機20存儲的第一國家的公共IP位址相同,則表明線纜數據機20並未從第一國家被移動至第二國家。若所獲取的公共IP位址與線纜數據機20存儲的第一國家的公共IP位址不相同,則表明線纜數據機20從第一國家被移動至第二國家。 In this embodiment, if the acquired public IP address is the same as the public IP address of the first country stored by the cable modem 20, it indicates that the cable modem 20 has not been moved from the first country to the second. country. If the acquired public IP address is not the same as the public IP address of the first country stored by the cable modem 20, it indicates that the cable modem 20 is moved from the first country to the second country.
在步驟S408中,若所獲取的公共IP位址與存儲媒介204中所存儲的公共IP位址不相同,選擇模組210則根據複數國家代碼與複數公共IP位址範圍的對照關係確定所獲取的公共IP位址對應的國家代碼。在本實施方式中,選擇模組210首先根據在存儲媒介204中所存儲的公共IP位址範圍確定所獲取的公共IP位址所屬的範圍,然後,根據圖3所示的對應關係在存儲媒介204中獲取與所屬的公共IP位址範圍相對應的國家代碼。 In step S408, if the acquired public IP address is different from the public IP address stored in the storage medium 204, the selection module 210 determines the acquired according to the comparison relationship between the complex country code and the complex public IP address range. The country code corresponding to the public IP address. In this embodiment, the selection module 210 first determines the range to which the acquired public IP address belongs according to the public IP address range stored in the storage medium 204, and then, according to the correspondence shown in FIG. 3, in the storage medium. In 204, a country code corresponding to the public IP address range to which it belongs is obtained.
在步驟S410中,根據獲取到的國家代碼在存儲媒介204中查找與國家代碼相對應的多媒體終端適配器的參數配置檔。在本實施方式中,存儲媒介204存儲有如圖3所示的公共IP位址範圍、國家代碼以及多媒體終端適配器的參數配置檔三者之間的對應關係,不同國家所使用的國家代碼不同,不同國家所使用的多媒體終端適配器的參數配置檔也是不同的。 In step S410, a parameter profile of the multimedia terminal adapter corresponding to the country code is searched for in the storage medium 204 based on the acquired country code. In this embodiment, the storage medium 204 stores the correspondence between the public IP address range, the country code, and the parameter configuration file of the multimedia terminal adapter as shown in FIG. 3, and the country codes used in different countries are different. The parameter profiles of the multimedia terminal adapters used by the country are also different.
在步驟S412中,若查找到與國家代碼相對應的多媒體終端適配器的參數配置檔,多媒體終端適配器模組212則更新線纜數據機20中的多媒體終端適配器的參數配置檔。同時,存儲媒介204刪除所存儲的線纜數據機20在第一國家的公共IP位址,並將所獲取的公共IP位址存儲為線纜數據機20在第二國家的公共IP位址。在本實施方式中,由於不同國家所使用的多媒體終端適配器的參數配置檔不一樣,當線纜數據機20由一個國家移動到另一個國家時,若不及時更新線纜數據機20中的多媒體終端適配器的參數配置檔,將嚴重影響用戶利用 線纜數據機撥打VoIP電話時的通話品質,在本實施方式中,則採取及時更新線纜數據機20中的多媒體終端適配器的參數配置檔的方式,使其與所在國家所使用的多媒體終端適配器的參數配置檔保持一致以提高用戶撥打VoIP電話時的通話品質。 In step S412, if the parameter configuration file of the multimedia terminal adapter corresponding to the country code is found, the multimedia terminal adapter module 212 updates the parameter configuration file of the multimedia terminal adapter in the cable data machine 20. At the same time, the storage medium 204 deletes the stored public address of the cable modem 20 in the first country and stores the acquired public IP address as the public IP address of the cable modem 20 in the second country. In this embodiment, since the parameter configuration files of the multimedia terminal adapters used in different countries are different, when the cable data machine 20 is moved from one country to another, if the multimedia in the cable data machine 20 is not updated in time. The parameter configuration file of the terminal adapter will seriously affect the user's utilization. In the present embodiment, the parameter configuration file of the multimedia terminal adapter in the cable data machine 20 is updated in time to make the multimedia terminal adapter used in the country. The parameter profile is consistent to improve the quality of the call when the user makes a VoIP call.
在步驟S414中,若所獲取的公共IP位址與存儲媒介204中所存儲的公共IP位址相同,選擇模組210則根據所存儲的第一國家的公共IP位址獲取與之相對應的多媒體終端適配器的參數配置檔。在本實施方式中,當所獲取的公共IP位址與存儲媒介204中所存儲的公共IP位址相同時,則表明線纜數據機20並沒有移動到其他國家,這時選擇模組210則直接根據所存儲的公共IP位址獲取與之相對應的多媒體終端適配器的參數配置檔。 In step S414, if the acquired public IP address is the same as the public IP address stored in the storage medium 204, the selection module 210 obtains the corresponding public IP address according to the stored first country. Parameter configuration file for the multimedia terminal adapter. In this embodiment, when the acquired public IP address is the same as the public IP address stored in the storage medium 204, it indicates that the cable data machine 20 has not moved to other countries, and the selection module 210 is directly A parameter configuration file of the corresponding multimedia terminal adapter is obtained according to the stored public IP address.
在本發明實施方式所提供的線纜數據機20及其自動獲取國家代碼的方法中,線纜數據機20從一個國家移動到另一個國家時,藉由所獲取的公共IP位址在存儲媒介204中查找其所屬的公共IP位址範圍,並由存儲的公共IP位址範圍查找對應的國家代碼,以及由國家代碼來獲取對應的多媒體終端適配器的參數配置檔,並自動更新多媒體終端適配器的參數配置檔以提高用戶撥打VoIP電話時的通話品質,同時省去了利用手動方式設置多媒體終端適配器的參數配置檔的繁瑣過程,從而為用戶提供方便。 In the cable data machine 20 provided by the embodiment of the present invention and the method for automatically acquiring the country code, when the cable data machine 20 is moved from one country to another, the obtained public IP address is in the storage medium. 204 searches for the public IP address range to which it belongs, and searches for the corresponding country code from the stored public IP address range, and obtains the parameter configuration file of the corresponding multimedia terminal adapter by the country code, and automatically updates the multimedia terminal adapter. The parameter configuration file improves the quality of the call when the user dials the VoIP call, and at the same time saves the cumbersome process of manually setting the parameter configuration file of the multimedia terminal adapter, thereby providing convenience for the user.
綜上所述,本發明符合發明專利要件,爰依法提出專利申請 。惟,以上所述僅為本發明之較佳實施例,舉凡熟悉本案技藝之人士,在爰依本案發明精神所作之等效修飾或變化,皆應包含於以下之申請專利範圍內。 In summary, the present invention complies with the requirements of the invention patent, and proposes a patent application according to law. . The above description is only the preferred embodiment of the present invention, and equivalent modifications or variations made by those skilled in the art will be included in the following claims.
20‧‧‧線纜數據機 20‧‧‧Cable Data Machine
202‧‧‧處理器 202‧‧‧ processor
204‧‧‧存儲媒介 204‧‧‧Storage medium
206‧‧‧發送模組 206‧‧‧Transmission module
208‧‧‧判斷模組 208‧‧‧Judgement module
210‧‧‧選擇模組 210‧‧‧Selection module
212‧‧‧多媒體終端適配器模組 212‧‧‧Multimedia Terminal Adapter Module
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW99103395A TWI401922B (en) | 2010-02-04 | 2010-02-04 | Cable modem and automatic country code assignment method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW99103395A TWI401922B (en) | 2010-02-04 | 2010-02-04 | Cable modem and automatic country code assignment method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW201129028A TW201129028A (en) | 2011-08-16 |
| TWI401922B true TWI401922B (en) | 2013-07-11 |
Family
ID=45025479
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW99103395A TWI401922B (en) | 2010-02-04 | 2010-02-04 | Cable modem and automatic country code assignment method thereof |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI401922B (en) |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW466853B (en) * | 1998-09-11 | 2001-12-01 | Digital Island Inc | Method and system for optimizing routing of data packets |
| TW484261B (en) * | 1999-10-15 | 2002-04-21 | Rf Waves Ltd | RF modem and communications transceiver utilizing saw device and pulse shaping |
| TW200522670A (en) * | 2003-12-23 | 2005-07-01 | Inventec Corp | Intelligent telephone dialing up system and its method |
| TWI239760B (en) * | 2002-09-24 | 2005-09-11 | Intel Corp | Optimistic caching for address translations |
| TWI282226B (en) * | 2004-12-30 | 2007-06-01 | Arcadyan Technology Corp | Method of configuring network device |
| US20080037520A1 (en) * | 2006-07-31 | 2008-02-14 | Robert C. Stein | Residential Gateway Translating Call Signaling Text Received With a Packet-Switched Telephony Call |
| TW200824348A (en) * | 2006-11-17 | 2008-06-01 | Inventec Appliances Corp | Internet service system and method thereof |
| CN100561947C (en) * | 2007-07-05 | 2009-11-18 | 中兴通讯股份有限公司 | System and method for business process processing based on code |
| CN100574324C (en) * | 2006-09-25 | 2009-12-23 | 北京启明星辰信息技术股份有限公司 | A kind of IP address is the method and system of location fast |
-
2010
- 2010-02-04 TW TW99103395A patent/TWI401922B/en not_active IP Right Cessation
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW466853B (en) * | 1998-09-11 | 2001-12-01 | Digital Island Inc | Method and system for optimizing routing of data packets |
| TW484261B (en) * | 1999-10-15 | 2002-04-21 | Rf Waves Ltd | RF modem and communications transceiver utilizing saw device and pulse shaping |
| TWI239760B (en) * | 2002-09-24 | 2005-09-11 | Intel Corp | Optimistic caching for address translations |
| TW200522670A (en) * | 2003-12-23 | 2005-07-01 | Inventec Corp | Intelligent telephone dialing up system and its method |
| TWI282226B (en) * | 2004-12-30 | 2007-06-01 | Arcadyan Technology Corp | Method of configuring network device |
| US20080037520A1 (en) * | 2006-07-31 | 2008-02-14 | Robert C. Stein | Residential Gateway Translating Call Signaling Text Received With a Packet-Switched Telephony Call |
| CN100574324C (en) * | 2006-09-25 | 2009-12-23 | 北京启明星辰信息技术股份有限公司 | A kind of IP address is the method and system of location fast |
| TW200824348A (en) * | 2006-11-17 | 2008-06-01 | Inventec Appliances Corp | Internet service system and method thereof |
| CN100561947C (en) * | 2007-07-05 | 2009-11-18 | 中兴通讯股份有限公司 | System and method for business process processing based on code |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201129028A (en) | 2011-08-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8787200B2 (en) | Device, system, and method for automatically configuring application terminals in home network | |
| KR101943843B1 (en) | Apparatus and method for transmitting/receiving ip information in a radio communication network | |
| CN101557414B (en) | Positioning method, equipment and system based on WLAN | |
| CN102148878B (en) | IP (internet protocol) address allocation method, system and device | |
| CN103516547B (en) | A kind of network parameter distribution method and device | |
| CN102143141B (en) | Cable modem and method for automatically obtaining country code | |
| RU2010118312A (en) | WIRELESS ACCESS MANAGEMENT | |
| US11190452B2 (en) | Virtual customer premises equipment, policy management server and service providing method | |
| WO2016008320A1 (en) | Method for acquiring identifier of terminal in network, management network element and storage medium | |
| CN101146047A (en) | A method, system and gateway for controlling quantity of network access terminal under routing mode | |
| CN102036422B (en) | Method, device and system for acquiring IP address | |
| CN104219401B (en) | The distribution method of a kind of phone number, Apparatus and system | |
| CN101771661A (en) | Method, device and system for determining clock source | |
| CN102263653A (en) | A management system and method for ubiquitous network equipment identification | |
| CN102025848A (en) | Gateway and method for processing packets by using gateway | |
| CN103582156A (en) | Method and device for establishing connection | |
| EP2426966A2 (en) | Wireless extension of broadband acces | |
| CN112217653B (en) | Strategy issuing method, device and system | |
| CN104969598B (en) | A method and device for communication using white spectrum | |
| US8811380B2 (en) | IP telephone device, IP telephone system, and setting confirmation method | |
| CN104506665B (en) | Distinguish method and system in a kind of IPv4/IPv6 addresses | |
| TWI401922B (en) | Cable modem and automatic country code assignment method thereof | |
| CN102685732A (en) | Method, terminal and system for connecting shake message terminal | |
| CN101834737B (en) | Discovery method and device of IP telephone and equipment | |
| CN101198102A (en) | Method, device and system for accessing terminal to network |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| MM4A | Annulment or lapse of patent due to non-payment of fees |