IPv6HappyEyeballs朱彥如中華電信研究所2011.1117/2IPv4/IPv6Fallback(1/2)許多作業系統及應用程式,在啟動dual-stack狀態下,會優先選擇選擇IPv6連線,如果失敗,再嘗試IPv4連線(Fallback)相較於IPv4,目前IPv6網路品質尚未十分穩定DNSserver包含未更新的資訊Broken6to4orTeredotunnelsBrokenIPv6peering…啟動IPv6的用戶會比IPv4-only用戶經歷更多的連線延遲,造成啟動IPv6之意願降低Vista/Win7在僅有6to4IPv6位址的狀況下,會先選用IPv4連線,以改善TCPfallback問題217/3IPv4/IPv6Fallback(2/2)資料來源:IETF17/4ExamplesofIPv4/IPv6Fallback(1/3)2001:ca0:1:100:11c4:7e56:6a58:cbb3202.39.142.150DaulStackDualStack:180:3::7202.39.224.717/5ExamplesofIPv4/IPv6Fallback(2/3)MozillaFirefox7.01約21秒17/6ExamplesofIPv4/IPv6Fallback(3/3)IE9.01約21秒17/7何為HappyEyeballs?HappyeyeballsAlgorithm嘗試解決使用者轉移到雙堆疊時可能面臨的連線延遲Keepsyoureyeballshappy目前正在IETFv6ops工作小組討論中HappyEyeballs:SuccesswithDual-StackHosts,draft-ietf-v6ops-happy-eyeballs-0517/8PossibleSolutionsDNSwhitelistScalability不好numberofDNSserversnumberofcontentproviders無法及時反應網路瞬斷ICPs選擇性開放其IPv6服務由應用程式自行嘗試改善:Happy-eyeballsalgorithmMoreaggressivelymakingconnectionsonIPv6andIPv4增加的traffic不可造成網路/伺服器的服務品質大幅降低Thehost'saddresspreferencemustbehonoredRequirementsforthealgorithmsarespecified17/9GoogleDNSWhitelistforIPv6資料來源:Google17/10GoalsofaHappyEyeballsAlgorithmProvidesfastconnectionforusers先嘗試以IPv6連線,若短時間內不成功,則轉用IPv4連線Avoidsthrashingthenetwork避免老是同時嘗試IPv6及IPv4連線Client端必須判斷IPv6或/及IPv4連線是否成功,並保留相關訊息,以避免多餘的連線嘗試17/11SuggestedHappyEyeballsAlgorithms(1/3)AIPv6-BrokencaseTheclient同時透過IPv6/IPv4發送TCPSYNsTheclient會獲悉目的地的IPv4及IPv6連線是否成功,並保留此訊息以避免後續再進行多餘的連線嘗試17/12SuggestedHappyEyeballsAlgorithms(2/3)AIPv6-WorkingCase17/13SuggestedHappyEyeballsAlgorithms(3/3)如果IPv4/IPv6的選擇僅取決於連線速度,IPv4load仍會持續加重ImplementationsMUSTpreferthefirstIPAFreturnedbythehost'saddresspreferencepolicy,unlessimplementingaastatefulstatefulalgorithmalgorithm一般會優先選用IPv6,不過可以透過設定來更改Ifthehost'spolicyisunknownornotattainable,implementationsMUSTpreferIPv6overIPv4Thestatefulalgorithm-會記住IPv6連線或某些prefixes的IPv6連線老是失敗後續連線可以透過成功的協定來進行必須偶而切回原先喜好的協定進行連線17/14ExamplealgorithmsInGoogleChromeandMozillaFirefox1.Callgetaddinfo(),whichreturnsalistofIPaddressessortedbythehost'saddresspreferencepolicy.2.Initiateaconnectionattemptwiththefirstaddressinthatlist(e.g.,IPv6).3.Ifthatconnectiondoesnotcompletewithinashortperiodoftime(e.g.,200-300ms),initiateaconnectionattemptwiththefirstaddressbelongingtotheotheraddressfamily(e.g.,IPv4)4.Thefirstconnectionthatisestablishedisused.Theotherconnectionisdiscarded.17/15Happy-EyeballsofChrome為了配合WorldIPv6Day活動,Chrome11開始加入相關機制Chrome14.0.8.35.2020.3秒17/16觀察與結論HappyeyeballsAlgorithm嘗試解決使用者轉移到雙堆疊時可能面臨的連線延遲,同時仍讓IPv6保有優先連線權為支援HappyEyeballs,應用軟體必須配合做修改,目前僅知ChromeWebBrowser支援Happyeyeballsalgorithm多少還是會增加網路及伺服器的負擔,尤其當preferredAF(一般為IPv6)無法快速完成時為了網路維運(如debugging及troubleshooting),支援軟體可以提供關掉HappyEyeballs的機制預期只要網際網路仍有雙堆疊用戶,甚至IPv4-only伺服器,HappyEyeballsalgorithm將會繼續運作17/17ThankYouQ&A