取自ONOS SDN-IP Use Case
Data Plane
- 負責在外部BGP與內部BGP Speaker交換路由
- 不同的AS間傳遞資訊
Controller Plane
- SDN-IP 透過 iBGP來接收BGP Speaker送過來的路由訊息加入至ONOS flowEntry中
- SDN-IP只負責接收BGP訊息,不會發送也不會與其他的SDN-IP相互交換
- SDN-IP default BGP port number is 2000
HA機制
- 內部iBGP可以有許多拓墣選擇
- 可以有多個SDN-IP運行但只會有一個SDN-IP Leader負責統一接收iBGP
- 當Leader發生問題,其餘的SDN-IP之一會接手位置
當前限制
- Peering新增/刪除等修改只能在ONOS未運行狀態
- SDN-IP default BGP port number is 2000 非預設的 179,因為port小於1023需要root權限
- SDN-IP 非採用load balance方式而是如上提到的Leader形式,一次只有一個instance負責
- 目前無明確的設定,SDN-IP預設將會接收所有BGP訊息
- 因框架限制,1.0.0版本中最多可以處理15000個routers
Toturial
以quagga模擬五個端點的router
BGP 為內部的BGP Speaker 負責peering R1~R4 以及轉送路由給ONOS
R1~R4 為外部網路的邊界路由器
在R1~R4之外分別各有一個mininet的host h1~h4
這些host接在各Router之下,ONOS最多只能看見OVS的下一層host 故在拓墣上看不見
h1~h4
- IP分別為192.168.1-4.1/24
- 分別接在R1~4另一端
bgp
- IP分別為10.0.1-4.101/24
- 其另一端還有接一個host – root 用來接收iBGP
下面檔案是用來設定sdnip peering資訊
放置於onos/tools/package/config/ 下
Before ONOS 1.2 (address.json and sdnip.json)
address.json (對proxyarp的設定 若設定錯誤quagga會收不到peer的eBGP)
{ "addresses" : [ { "dpid" : "00:00:00:00:00:00:00:a1", "port" : "1", "ips" : ["10.0.1.101/24"], "mac" : "00:00:00:00:00:01" }, { "dpid" : "00:00:00:00:00:00:00:a2", "port" : "1", "ips" : ["10.0.2.101/24"], "mac" : "00:00:00:00:00:01" }, { "dpid" : "00:00:00:00:00:00:00:a5", "port" : "1", "ips" : ["10.0.3.101/24"], "mac" : "00:00:00:00:00:01" }, { "dpid" : "00:00:00:00:00:00:00:a6", "port" : "1", "ips" : ["10.0.4.101/24"], "mac" : "00:00:00:00:00:01" } ] }
- IP MAC 為proxy目標
- dpid port 為需要proxy的來源
sdnip.json
{ "bgpPeers" : [ { "attachmentDpid" : "00:00:00:00:00:00:00:a1", "attachmentPort" : "1", "ipAddress" : "10.0.1.1" }, { "attachmentDpid" : "00:00:00:00:00:00:00:a2", "attachmentPort" : "1", "ipAddress" : "10.0.2.1" }, { "attachmentDpid" : "00:00:00:00:00:00:00:a5", "attachmentPort" : "1", "ipAddress" : "10.0.3.1" }, { "attachmentDpid" : "00:00:00:00:00:00:00:a6", "attachmentPort" : "1", "ipAddress" : "10.0.4.1" } ], "bgpSpeakers" : [ { "name" : "bgp", "attachmentDpid" : "00:00:00:00:00:00:00:a3", "attachmentPort" : "1", "macAddress" : "00:00:00:00:00:01", "interfaceAddresses" : [ { "interfaceDpid" : "00:00:00:00:00:00:00:a1", "interfacePort" : "1", "ipAddress" : "10.0.1.101" }, { "interfaceDpid" : "00:00:00:00:00:00:00:a2", "interfacePort" : "1", "ipAddress" : "10.0.2.101" }, { "interfaceDpid" : "00:00:00:00:00:00:00:a5", "interfacePort" : "1", "ipAddress" : "10.0.3.101" }, { "interfaceDpid" : "00:00:00:00:00:00:00:a6", "interfacePort" : "1", "ipAddress" : "10.0.4.101" } ] } ] }
bgppeers
- attachmentDpid與port 是SDN內部對接的OF switch (同上address.json部分)
- ipaddress則為 peer方的IP
bgpSpeakers
- 上半部定義內部BGP Speaker的資訊 如 對接的OF Switch dpid and IP (Single-point to single-point intents)
- 下半部定義 peering 所使用的IP 以及 對外的OF SWITCH (Multi-point to single-point intents)
After ONOS 1.3 (network-cfg.json)
network-cfg.json
{ "ports" : { "of:00000000000000a1/1" : { "interfaces" : [ { "ips" : [ "10.0.1.101/24" ], "mac" : "00:0C:29:C3:B1:0C" } ] }, "of:00000000000000a2/1" : { "interfaces" : [ { "ips" : [ "10.0.2.102/24" ], "mac" : "00:0C:29:48:0F:0C" } ] } }, "apps" : { "org.onosproject.router" : { "bgp" : { "bgpSpeakers" : [ { "name" : "quagga1", "connectPoint" : "of:00000000000000a4/3", "peers" : [ "10.0.1.1" ] }, { "name" : "quagga2", "connectPoint" : "of:00000000000000a3/3", "peers" : [ "10.0.2.1" ] } ] } } } }
上半部Ports部分
- DPID填入外部對接的OF Switch 斜線後為ports
- IP與MAC填內部BGP Speaker
下半部apps部分
- connectPoint則為內部BGP Speaker對接的OF Switch
- peers為對方peering IP
onos apps active(fwd not need)
onos> app active org.onosproject.proxyarp onos> app active org.onosproject.sdnip
實驗部分
因計畫要求故修改範例成如下拓墣
- Quagga1、2互相備援 內部與ONOS三方交換iBGP
- Quagga1、2各有兩個interface 分別為10.10.10.x與10.0.1-2.x 此處UI看不出來
- 因三者之間有放一個SW,預設ONOS無法L2 Forward故需要active ONOS fwd功能
- Peering兩個不同的AS
在此範例VM中新增/刪減AS需要修改下列檔案
- onos/tools/package/config/address.json與sdnip.json
- /home/sdnip/config/quagga1-2.conf 與quagga-sdn.conf 來指定neighbor交換BGP訊息
- 此處若增加備援quagga記得quagga1-2也要新增反向的peer資訊
- BGP狀況可以透過以下來確認有無成功連結
- mininet> bgp lxterminal
- #telnet localhost 2605
- bgp> sh ip bgp summary
- /home/sdnip/sdnip/tutorial.py 來修改mininet拓樸
測試結果
- 當quagga1或2其中之一link down的時候仍然保持路由
- 若橫向連線down 而縱向up路由會失效,無法透過quagga1-2之間向上路由(Out of Band)
- quagga1-2間可以互相peer或只各自對SDN-IP 兩者皆可
- 當路由建立完成,h1 ping h2會直接透過OF Switch傳達並不會再經過 BGP Speaker轉送
- 使用ONOS Cluster 當leader掛了 h1 to h2仍然維持連線
- onos> leader可以觀察當前的leader
搶先發佈留言