TANET 路由聚合所造成之路由劣化
親愛的 TANET NOC ,您好
我於 2022年6月7日 週二 下午2:19 回報的,相比於其他大學,交通大學/中央大學所發生之國際路由的繞路/高延遲問題,您回復「中央大學及交通大學之設置,需煩請您向該校網路管理設置單位洽詢」以後,便無下文。出於無奈之舉,只得再次回報相同的問題
學術網路蓋覽
首先,根據這份 PDF 第8頁所示,學術網路的架構大致可由下圖表達
https://noc.tanet.edu.tw/index.php/download/seminar/seminar-1090825?download=758:2-bgp
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
我們對圖片稍作簡化。如下圖2
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
根據這張圖片,可以知道在最初的規劃中,如果外國訪客想要訪問中央大學的網路,會由以下路徑抵達
首先抵達 Cogent(AS174) → MOECC(AS17717) → TANET(AS1659) → 中央大學(AS18420)
發生原因分析
但是隨著網路架構的更迭,各校除了TANET 集中的出口,也有一定的網路自主性,自購了國際出口。
在這個情況下,圖中的路由聚合會造成大量的繞路現象,以及頻寬浪費的情形發生
其發生原因,正是因為路由聚合
因為選擇路由時,不管其他bgp屬性,首先比較的就是精確性,越精確的永遠越優先
然而路由聚合會降低精確性,因此沒被聚合的路由永遠優先
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
圖中,TANET 四所大學的 /16 在AS1659內部被路由聚合成 /12 路由,降低了精確性,也降低了優先性
The root cause
並且,關於您回信中提及的「中央大學及交通大學之設置,需煩請您向該校網路管理設置單位洽詢」,我想表達一下自己的看法。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
我們可以從圖片中看到,路由聚合發生在 AS1659(TANET) 內部,並不在交通大學/中央大學的管轄區域內。學校網管對此表達無能為力,只能請 AS1659(TANET) 解決
三倍國際頻寬
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
我們可以看到圖片,其他上游和教育部電算中心(AS17717),同時收到 Telstra(AS4637) 發來沒被聚合過的路由,又收到TANET(A1659S)發來被聚合過的路由。
因為路由聚合會降低精確性
根據路由選路的原則,對於同一個IP,精確性作為最優先匹配項。超過其他全部路由屬性的優先設定
因此選擇了沒有聚合過的 Telstra,也就是右上角,由 Telstra 美國送過來,綠色箭頭的路由
於是有了封包已經進入教育部電算中心(MOECC)裡面了,卻又被送出國的現象
從圖片中可以看到,封包經過三次國際頻寬,不僅浪費3倍國際頻寬流量(藍紫色文字),還額外繞路了一圈美國,增加延遲的同時和降低連線品質。可謂是三輸的局面
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
流量被教育部電算中心(AS17717)送去美國以後,再經由交大/中大自購的國際頻寬回台,再浪費一倍頻寬,總計浪費3倍珍貴的國際頻寬
同樣的現象,同時發生在台大/清大/交大/中央的身上。
作為中央大學的學生,懇請教育部學術網路重視這個問題,關閉AS1659內的路由聚合,以改善國內這四所學校的出國連線品質,同時節省TANET國際頻寬
(1個封包要經過三遍國際出口,也更浪費頻寬)
症狀復現
這份 traceroute 可以佐證上面的推測,起點位於 Cogent 德國
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
這份路由可由 Cogent 的 looking-glass 復現
https://www.cogentco.com/en/looking-glass
打開網頁以後,選擇IPv4 trace 模式,並選擇德國節點。目標IP輸入 140.115.1.1
繞路情況分析
Cogent 和 Telstra 是教育部直接的的國際網路供應商,這兩家網路公司去教育部理論上不應該存在繞路
我們從 Cogent Traceroute 和 Telstra Traceroute 來觀察路由情況:
從 Cogent 台灣節點開始追蹤
元智大學的路由:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
中央大學的路由:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
元智大學非常快,3毫秒就到了
中央大學的路由就繞路了,台灣->美國->日本->台灣->中央大學,花了 140毫秒才抵達,慢非常多
從 Telstra 台灣節點開始追蹤
元智大學的路由:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
中央大學的路由:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
和 Cogent 的結果一樣,元智大學非常快,4毫秒就到了
中央大學一樣大繞路,花了 140 毫秒
解決方案建議
我認為,其中一個解決方案就是不要聚合路由。限制聚合的程度,最多聚合到 /16 ,不再往上聚合了
這樣子 AS1659 對 AS17717 以及上游提供商宣告路由的時候,就會新增宣告以下路由
因為只有這四所學校使用 IP Transit 模式額外採購網路頻寬
只要新增宣告上述4條路由,就可以讓全球路由表拿到正確的 prefix ,大幅降低頻寬的浪費以及延遲
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
由於所有的路由都沒被聚合,prefix_len 相同,優先性相同。
根據路由表的最初資料結構設計,只有在此條件下,local perf
/path_len
之類的bgp選路機制才能正常運作
不但繞路現象解決了,延遲縮短了,三倍國際頻寬浪費的情形也不會發生了
謹此
中央大學 胡峻愷 謹上
2023/02/10 更新
我最初的 2022年6月7日 週二 下午2:19 的回報,還有 2022年9月1日的第二次回報
最後一次回信的 2022/9/7 ,已經將近半年過去了
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
截至目前為止,TANET 對上游和互聯實體的廣播路由中,受影響的學校(台交清央)仍然沒有變化
和以前一樣,只有這麼一條路由
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
並未看到這些應該要有的路由
如果能在 1659 看到上述四條路由,四所學校的網路問題便能迎刃而解