ãªãã¨ãªãEVPNç解
EVPNãç¥ã£ã¦å®éã«åããã¦ã¿ã¾ãããè¨é²ã§ãã
Â
Â
ããããã£ããæ¸ãã¨ã·ã³ãã«ãªL2VPNãå®ç¾ããæè¡ã§ãã
åºåã¤ã¼ãµãµã¼ãã¹ãDCã®layer2 networkã§æ´»èºãããããã§ãã
EVPNã®ä»çµã¿ã¨ãã¦ãã£ã¦ããã¨ã¯ã©ãããBGPã§MACã¢ãã¬ã¹ãåºå ±ãããããã§ãããã£BGPã§â¦ï¼
Â
Â
MP-BGP(Multi Protocol BGP)ã¨ã¯
Â
é常ã®BGP-4(é常ã®BGPã®äºãæã)ã§ã¯MACã¢ãã¬ã¹ãªãã¦çµè·¯åºå ±åºæ¥ã¾ãããBGP-4ã¯IPv4 onlyã§ãã
ããã§ç»å ´ããã®ãMP-BGPãMP(Multi Protocol)ã¨ãããã¨ã¯IPv4 unicastã ãã§ã¯ããã¾ãããæ±ãããã®ãIPv4-vpn-unicastãIPv6é¢é£ã ã£ããã¨ããããå¢ãã¾ããã
ãã®æ±ããä¸ã«EVPNãããã¨ãããã¨ã«ãªãã¾ãã
ãããã¸ãã®è©±ãæ°ã«ãªãæ¹ã¯ãã®RFCã®ä¸ã®AFI/SAFIãè¦ã¦ã¿ãã¨å¹¸ãã«ãªãã¾ãã
BGPã«ã¨ã£ã¦ã¯çµæ§éè¦ãªãã®ã§ãããã¨ä¸ã¤è¦ãã¦ããã¨ããã®ã¯BGP-4, BGP4+(MP-BGPã®äºãæã)ã§ãOPEN ã¡ãã»ã¼ã¸ã®ããã¨ãã§ããã´ã·ã¨ã¼ã·ã§ã³ããããã«ãã®èå¥åã¯ä½¿ããã¦ãã¾ãããã±ãããè¦ã¦ã¿ãã®ãè¯ãããããã¾ããã
Â
BGP4+ã¯ããã ãã§ã¯ããã¾ããããã£ã¨æ¡å¼µããã¦ãã¾ãã
ãªãã¨BGP PathAttributeãæ¹é ããã¦ãã¾ãããã±ãããBGP-4ãBGP4+ã¨æ¯è¼ãã¦è¦ã¦ããã¾ãã
Â
ãããBGP4+
ãã£ã¡ãBGP4
å ¨ç¶éããã¨ãåããã¨æãã¾ãããªããªãBGP4+ã®Path Attributeã«æ°å ¥ããæ¥ã¦ãã¾ãã
Â
MP_REACH_NLRIã¨ã¯
Â
BGP4+ã§è¿½å ãããPath Attributeã§ãããã¯BGP4ã«ãNLRIããã¾ãããBGP4+ã§ã¯æ¡å¼µãããNLRIã¨ããæ±ãã«ãªã£ã¦ãã¾ããAFI/SAFIãNext hop addr length RD RT labelã¨ãã£ãæ å ±ãå«ã¾ãã¦ãã¾ã
Â
ããããNLRIã¯BGP4ã§ã¯PathAttributeã§ã¯ããã¾ãããBGP4ã§ã¯ä¸èº«ãçµè·¯åºå ±ãããprefixãããã ãã®ãã®ã§ããã
ã¡ãªã¿ã«å ç¨èª¬æããAFI/SAFIã®æ å ±ãå ¥ã£ã¦ãã¾ããä»ãã£ãã¯èª¬æãã¦ãªãã£ãã®ã§ããçµã¿åããã決ã¾ã£ã¦ãã以ä¸ã®ãããªçµã¿åããã«ãªã£ã¦ãã¾ã
ã¡ãªã¿ã«EVPNã§ã¯
AFI = 25 SFAI = 70 ã¨ããå½¢ã«ãªã£ã¦ãã¾ãã
Â
RD RT ã«ã¤ãã¦ã¯VRFã¨ããåå¨ãç¥ããã¨ã«ãªãã¾ãããªã«ããã¦ããã®ãã¨ããã¨äºãã«å¤ãåãã ã£ããäºãã«åãã«ã¼ãã£ã³ã°ãã¼ãã«ãå ±æãã¦ããã¨ããèãã§ã¨ããããã¯ããã¨æã£ã¦ãã¾ããã¡ãã£ã¨ããã¯EVPNã§èããã¨å°ããããããã®ã§ã¾ãæ°ãã«è¿½å ããã¦ããlabelæè¡ã使ã£ãL3VPNã®MPLS-VPNãªã©ã使ç¨ãã¦ã¿ãã¨ç解åºæ¥ãã¨æãã¾ãã
Â
BGP4+ã§ã¯ã©ã®ããã«MACã¢ãã¬ã¹ãåãè¾¼ã¾ãã¦ãããã¨è¨ãã¨ãMP_REACH_NLRIã®ä¸ã®NLRIã«BGP4+å°ç¨ã®çµè·¯åºå ±ç¨MACã¢ãã¬ã¹ãã©ã¼ããããç¨æãã¦ããã¦ãã¾ãã
éä¿¡ãã¦ãããæé ãç´¹ä»ããæã§ã次ã¯ãã±ãããé£ã°ãããããç°å¢ã¥ããã§ãã
Â
Vxlanã¨ã¯
Â
ãããã·ã³ãã«ã«æ¸ãã¨ãã£ã¦ãããã¨ã¯L3ã®ãããã¯ã¼ã¯ã§L2ã®ãããã¯ã¼ã¯ãå±éåºæ¥ãã¨ãããã®ã§ãã
VNIã¨ããèå¥åãå ã«éä¿¡ãè¡ããVTEPã¨ããåºå£ãç®æ¨ã«Vxlanã®ãã³ãã«ãç¯ãã¦ãã¾ãã
Â
ããã¾ã§ã®æé ãç¨ãã¦EVPNã¯å®æãã¾ããããã¤ãä½ã£ã¦ãããã¨ã§BGP4+ã¨Vxlanãçµã¿åããããã¨ã§å¤§è¦æ¨¡ãªãããã¯ã¼ã¯ã®L2VPNãEVPNãå®æããã¨ãããã¨ã«ãªã£ã¦ãã¾ãã
EVPNã®æ§æã®ä»æ¹ã¨ãã¦ãã¼ã¿ãã¬ã¼ã³ã¨ã³ã³ããã¼ã«ãã¬ã¼ã³ã¨ããæ¦å¿µã«ããããã¦ãã
BGP4+ãã©ã®ããã«ãã¼ã¿ãããåããããã決ããã³ã³ããã¼ã«ãã¬ã¼ã³ã§
Vxlanããã¼ã¿ãæµããã¼ã¿ãã¬ã¼ã³ã¨ãããã¨ã«ãªã£ã¦ãã¾ãã
ãã¼ã¿ãã¬ã¼ã³ã¯Vxlanã ãã§ã¯ããã¾ãããMPLSã§ãã£ãããPBBãåå¨ãã¾ãã
ãããã®ãã¼ã¿ãã¬ã¼ã³ã¯ä½¿ç¨ç¨éã«ãã£ã¦å¤ãã£ãããã¾ãã
Â
ããããè¸ã¾ããä¸ã§æ¤è¨¼ãã¦ããã¾ã
Â
FRRoutingãå©ç¨ããEVPN+Vxlanã®æ¤è¨¼
Â
ä»åã®æ¤è¨¼ã§ã¯FRRãç¨ãããããã¯ã¼ã¯ãæ§ç¯ããããã«TINETã¨ããã½ããã¦ã§ã¢ã使ç¨ãã¾ãã
Â
ãã¡ãã®ã½ããã¦ã§ã¢ã¯yamlãã¡ã¤ã«ãæ¸ãã ãã§FRRåºæºã®ãããã¯ã¼ã¯ãæ§ç¯ãããã¨ãåºæ¥ã¾ããã¨ã£ã¨ã便å©ã§ãã
Â
æ¤è¨¼ç¨ãããã¸ã¼
Â
TINET config
nodes:
- name: R0
image: slankdev/frr
interfaces:
- { name: net0, type: direct, args: R1#net0 }
- name: R1
image: slankdev/frr- name: R2
image: slankdev/frr
interfaces:
- { name: net0, type: direct, args: R1#net1 }
- { name: net1, type: direct, args: R3#net0 }
- name: R3
image: slankdev/frr
interfaces:
- { name: net0, type: direct, args: R2#net1 }
- { name: net1, type: direct, args: R4#net0 }
- name: R4
image: slankdev/frr
interfaces:
- { name: net0, type: direct, args: R3#net1 }
node_configs:
- name: R0
cmds:
- cmd: ip addr add 192.168.0.1/24 dev net0
- cmd: ip link set net0 address 52:54:00:bb:02:00
- name: R1
cmds:
- cmd: /usr/lib/frr/frr start
- cmd: ip addr add 10.0.1.1/24 dev net1
- cmd: ip link set net0 address 52:54:00:aa:01:01
- cmd: ip link set net1 address 52:54:00:aa:01:02
- cmd: ip link add br100 type bridge
- cmd: ip link set dev br100 up
- cmd: >-
ip link add vxlan100 type vxlan id 100
dstport 4789
- cmd: ip addr add 192.168.0.2/24 dev br100
- cmd: ip link set dev net0 master br100
- cmd: ip link set dev net0 promisc on
- cmd: ip link set dev net0 up
- cmd: ip link set dev vxlan100 master br100
- cmd: ip link set dev vxlan100 promisc on
- cmd: ip link set dev vxlan100 up
- cmd: >-
vtysh -c "conf t"
-c "interface lo"
-c "ip address 1.1.1.1/32"
-c "router ospf"
-c "network 1.1.1.1/24 area 0"
-c "network 10.0.1.0/24 area 0"
-c "router bgp 65000"
-c "neighbor 3.3.3.3 remote-as internal"
-c "neighbor 3.3.3.3 update-source 1.1.1.1"
-c "address-family l2vpn evpn"
-c "neighbor 3.3.3.3 activate"
-c "advertise-all-vni"
-c "exit-address-family"
- name: R2
cmds:
- cmd: /usr/lib/frr/frr start
- cmd: ip addr add 10.0.1.2/24 dev net0
- cmd: ip addr add 10.0.2.1/24 dev net1
- cmd: ip link set net0 address 52:54:00:cc:01:01
- cmd: ip link set net1 address 52:54:00:cc:02:01
- cmd: >-
vtysh -c "conf t"
-c "interface lo"
-c "ip address 2.2.2.2/32"
-c "router ospf"
-c "network 10.0.1.0/24 area 0"
-c "network 10.0.2.0/24 area 0"
-c "network 2.2.2.2/24 area 0"
- name: R3
cmds:
- cmd: /usr/lib/frr/frr start
- cmd: ip addr add 10.0.2.2/24 dev net0
- cmd: ip link set net0 address 52:54:00:aa:02:00
- cmd: ip link set net1 address 52:54:00:aa:02:01
- cmd: ip link add br100 type bridge
- cmd: ip link set dev br100 up
- cmd: ip addr add 192.168.0.3/24 dev br100
- cmd: >-
ip link add vxlan100 type vxlan id 100
dstport 4789
- cmd: ip link set dev net1 master br100
- cmd: ip link set dev net1 promisc on
- cmd: ip link set dev net1 up
- cmd: ip link set dev vxlan100 master br100
- cmd: ip link set dev vxlan100 promisc on
- cmd: ip link set dev vxlan100 up
- cmd: >-
vtysh -c "conf t"
-c "interface lo"
-c "ip address 3.3.3.3/32"
-c "router ospf"
-c "network 3.3.3.3/24 area 0"
-c "network 10.0.2.0/24 area 0"
-c "router bgp 65000"
-c "neighbor 1.1.1.1 remote-as internal"
-c "neighbor 1.1.1.1 update-source 3.3.3.3"
-c "address-family l2vpn evpn"
-c "neighbor 1.1.1.1 activate"
-c "advertise-all-vni"
-c "exit-address-family"
- name: R4
cmds:
- cmd: ip addr add 192.168.0.4/24 dev net0
- cmd: ip link set net0 address 52:54:00:bb:04:00
interfaces:
- { name: net0, type: direct, args: R0#net0 }
- { name: net1, type: direct, args: R2#net0 }
 config解説
R1ãR3ã«
- cmd: ip link add br100 type bridge
- cmd: ip link set dev br100 up
- cmd: >-
ip link add vxlan100 type vxlan id 100
dstport 4789
- cmd: ip addr add 192.168.0.2/24 dev br100
- cmd: ip link set dev net0 master br100
- cmd: ip link set dev net0 promisc on
- cmd: ip link set dev net0 up
- cmd: ip link set dev vxlan100 master br100
- cmd: ip link set dev vxlan100 promisc on
- cmd: ip link set dev vxlan100 up
 ãã®ãããªconfigãããã¨æãã¾ãã
Vxlanã¤ã³ã¿ã¼ãã§ã¼ã¹ããã®ããã«ããªãã¸ã®ã°ã«ã¼ãã«æå±ãã¦ããããã¨ã§L2VPNã¨ãã¦ã®åããè¦ããäºãåºæ¥ã¾ããå対å´ã®ã«ã¼ã¿ã¼ã¨åãVNIï¼ããã§ã¯vxlan id 100ã¨ããå¤ï¼ãè¦ã¦ãã¦ãããã®ãBGP4+ã®å½¹ç®ã¨ãªã£ã¦ãã¾ãã
ã¡ãªã¿ã«å対å´ã®R0ãR4ãããã¬ã¼ã ãããããã¨ã«ãªã£ã¦ããã®ã§net0ãããªãã¸ã®ã°ã«ã¼ãã«æå±ããã¦ãã¾ãããã¨IPã¯é£¾ãã§ã¤ãã¦ãä»ããªãã¦ãããã§ãã
ãã®configã®ä»æ¹ã¯iproute2ç¬èªã®ããæ¹ã¨ãªã£ã¦ãã¾ãã
Â
R1ãR2ãR3ã®æåã®åãã¨ãã¦OSPFã§PEã«ã¼ã¿ã¼ãPã«ã¼ã¿ã¼ãPEã«ã¼ã¿ã¼ã®çµè·¯æ å ±ã交æãã¾ãã
Â
R1ãR3ãIBGPã§ã¤ãªãã¾ãã
-c "router bgp 65000"
-c "neighbor 3.3.3.3 remote-as internal"
-c "neighbor 3.3.3.3 update-source 1.1.1.1"
-c "address-family l2vpn evpn"
-c "neighbor 3.3.3.3 activate"
-c "advertise-all-vni"
-c "exit-address-family"
address-family l2vpn evpn
ãããååã§èª¬æããBGP4+ç¹æã®èå¥åï¼ã¢ãã¬ã¹ãã¡ããªï¼ã§ãã
advertise-all-vni
EVPNã®æ©è½ãæå¹ã«ããè¨å®ã§ãã
Â
å®éã«åããã¾ãã
Â
R0(192.168.0.1)ããR4(192.168.0.4)ãpingãéãã®ã確èªãã¾ãã
R1ã§summaryã確èªãã¦ã¿ãã¨ãState/PfxRcdã«å¤ãããã¾ãã
Â
R1ã§ã«ã¼ãã確èªãã¦ã¿ãã¨
Â
R4ã®MACã¢ãã¬ã¹ãå¦ç¿åºæ¥ã¦ãã¾ãã
Â
ã¾ã¨ã
EVPNã®æ§æããå®éã«åããæã¾ã§ããã£ããã¨æ¸ãã¦ã¿ã¾ããã
ããä½ãããããªé¨åãªã©ãããã°ãææã©ãã©ããé¡ããã¾ãã
Â