Open4
ネットワーク勉強の続き - 3?
ピン留めされたアイテム
ネットワーク勉強まとめのスクラップ:
スパイン/リーフ型ネットワーク
参考:
やること
これの簡単版を作る
参考: https://github.com/tinynetwork/tinet/tree/master/examples/basic_clos
簡単版:
- めんどいのでスパイン/リーフは2つだけ
- Top of Rack(TOR)も2つだけ
- TORにぶら下がるサーバーは2台ずつ
- OSPFとかBGPはまだわからないので普通にstatic routeで設定する
構成
量が多くてzennだと描画できないので↓のmarmaidをライブエディタ( https://mermaid.live/ ) で描画させてる
marmaid
flowchart LR
hostnetwork --- internet{internet}
subgraph host: net.ipv4.ip_forward=1
hostnetwork
veth0["veth0: 203.0.113.254"]
veth1["veth1: 203.0.114.254"]
end
spine0-veth0 --- 203.0.113.0/24([203.0.113.0/24]) --- veth0
spine1-veth0 --- 203.0.114.0/24([203.0.113.0/24]) --- veth1
subgraph spine0: net.ipv4.ip_forward=1
spine0-veth0["spine0-veth0: 203.0.113.1"]
spine0-leaf0-veth1["spine0-leaf0-veth1: 172.16.0.254"]
spine0-leaf1-veth1["spine0-leaf1-veth1: 172.16.1.254"]
end
subgraph spine1: net.ipv4.ip_forward=1
spine1-veth0["spine1-veth0: 203.0.113.2"]
spine1-leaf0-veth1["spine1-leaf0-veth1: 172.16.100.254"]
spine1-leaf1-veth1["spine1-leaf1-veth1: 172.16.101.254"]
end
spine0-leaf0-veth0 --- 172.16.0.0/24([172.16.0.0/24]) --- spine0-leaf0-veth1
spine0-leaf1-veth0 --- 172.16.1.0/24([172.16.1.0/24]) --- spine0-leaf1-veth1
spine1-leaf0-veth0 --- 172.16.100.0/24([172.16.100.0/24]) --- spine1-leaf0-veth1
spine1-leaf1-veth0 --- 172.16.101.0/24([172.16.101.0/24]) --- spine1-leaf1-veth1
subgraph leaf0: net.ipv4.ip_forward=1
spine0-leaf0-veth0["spine0-leaf0-veth0: 172.16.0.1"]
spine1-leaf0-veth0["spine1-leaf0-veth0: 172.16.100.1"]
leaf0-tor0-veth1["leaf0-tor0-veth1: 172.24.0.254"]
leaf0-tor1-veth1["leaf0-tor1-veth1: 172.24.1.254"]
end
subgraph leaf1: net.ipv4.ip_forward=1
spine0-leaf1-veth0["spine0-leaf1-veth0: 172.16.1.1"]
spine1-leaf1-veth0["spine1-leaf1-veth0: 172.16.101.2"]
leaf1-tor0-veth1["leaf1-tor0-veth1: 172.24.100.254"]
leaf1-tor1-veth1["leaf1-tor1-veth1: 172.24.101.254"]
end
leaf0-tor-router0-veth0 --- 172.24.0.0/24([172.24.0.0/24]) --- leaf0-tor0-veth1
leaf0-tor-router1-veth0 --- 172.24.1.0/24([172.24.1.0/24]) --- leaf0-tor1-veth1
leaf1-tor-router0-veth0 --- 172.24.100.0/24([172.24.100.0/24]) --- leaf1-tor0-veth1
leaf1-tor-router1-veth0 --- 172.24.101.0/24([172.24.101.0/24]) --- leaf1-tor1-veth1
subgraph tor0
subgraph tor-router0["tor-router0: net.ipv4.ip_forward=1"]
leaf0-tor-router0-veth0["leaf0-tor-router0-veth0: 172.24.0.1"]
leaf1-tor-router0-veth0["leaf1-tor-router0-veth0: 172.24.100.1"]
tor-switch-router0-veth1["tor-switch-router0-veth1: 192.168.0.254"]
end
tor-switch-router0-veth0 --- tor-switch-router0-veth1
subgraph tor-switch0["tor-switch0: [bridge vlan_filtering 1]"]
tor-switch-router0-veth0
tor-switch0-svr0-br0
tor-switch0-svr1-br0
end
end
subgraph tor1
subgraph tor-router1["tor-router1: net.ipv4.ip_forward=1"]
leaf0-tor-router1-veth0["leaf0-tor-router1-veth0: 172.24.1.1"]
leaf1-tor-router1-veth0["leaf1-tor-router1-veth0: 172.24.101.1"]
tor-switch-router1-veth1["tor-switch-router1-veth1: 192.168.1.254"]
end
tor-switch-router1-veth0 --- tor-switch-router1-veth1
subgraph tor-switch1["tor-switch1: [bridge vlan_filtering 1]"]
tor-switch-router1-veth0
tor-switch1-svr0-br0
tor-switch1-svr1-br0
end
end
tor-switch0-svr0-veth0 --- tor-switch0-svr0-br0
tor-switch0-svr1-veth0 --- tor-switch0-svr1-br0
tor-switch1-svr0-veth0 --- tor-switch1-svr0-br0
tor-switch1-svr1-veth0 --- tor-switch1-svr1-br0
subgraph tor0-svr0
tor-switch0-svr0-veth0["tor-switch0-svr0-veth0: 192.168.0.1"]
end
subgraph tor0-svr1
tor-switch0-svr1-veth0["tor-switch0-svr0-veth0: 192.168.0.2"]
end
subgraph tor1-svr0
tor-switch1-svr0-veth0["tor-switch1-svr0-veth0: 192.168.1.1"]
end
subgraph tor1-svr1
tor-switch1-svr1-veth0["tor-switch1-svr1-veth0: 192.168.1.2"]
end
ルートの冗長化はOSPFとか使わないと難しいのかも
TODO
OSPF & FRR(FRRouting)の勉強
参考:
基本的には上記
network namespaceで遊ぶ - OSPF
の記事の内容を写経しながらNetwork NamespaceでOSPFとOSPFを実現するためのfrrについて学習するだけ