VxLAN 사용하여 L3 장비들로 하나의 L2스위치처럼 동작하기
기본 config 먼저 하기
feature ospf
feature pim
router ospf 1
router-id 10.1.1.1
interface eth1/1
description ~~
no switchport
mtu 9216
ip address 1.1.13.1/30
ip router ospf 1 area 0
ip ospf network point-to-point
ip pim sparse-mode // 멀티캐스트 통신위해 필수
no shut
interface eth1/2
description ~~
no switchport
mtu 9216
ip address 1.1.14.1/30
ip router ospf 1 area 0
ip ospf network point-to-point
ip pim sparse-mode
no shut
interface loopback 0
ip address 10.1.1.1/32
ip router ospf 1 area 0
ip pim sparse-mode
feature ospf
feature pim
feature nv overlay // VTEP 동작/ NVE interface 생성
feature vn-segment-vlan-based // vlan-xvlan bridge
feature interface-vlan //SVI
router ospf 1
router-id 10.1.1.3
interface eth1/1
description ~~
no switchport
mtu 9216
ip address 1.1.13.2/30
ip router ospf 1 area 0
ip ospf network point-to-point
ip pim sparse-mode
no shut
interface eth1/2
description ~~
no switchport
mtu 9216
ip address 1.1.23.2/30
ip router ospf 1 area 0
ip ospf network point-to-point
ip pim sparse-mode
no shut
interface loopback 0
ip address 10.1.1.3/32
ip router ospf 1 area 0
ip pim sparse-mode
ip pim rp-address 10.1.1.10 group-list 225.0.0.0/24 // 225.0.0.0/24 내의 주소들 랑데뷰 포인트 10.1.1.10으로 동작
ip pim anycast-rp 10.1.1.10 10.1.1.1 // 10.1.1.1이 10.1.1.10으로 동작(spine1)
ip pim anycast-rp 10.1.1.10 10.1.1.2 // 10.1.1.2가 10.1.1.10으로 동작(spine2)
-> 2중화 구성
interface loopback 1
description ~~
ip address 10.1.1.10/32
ip router ospf 1 area 0
ip ospf network point-to-point
ip pim sparse-mode
ip pim rp-address 10.1.1.10 // 랑데뷰 포인트 10.1.1.10으로 인식
vlan 11
vn-segment 10011 // overlay에서 사용하는 Vxlan (vlan 11을 Vxlan 10011으로 변경)
vlan 20
vn-segment 10020
interface nve 1
no shut
source-interface loopback 0 // VTEP IP = Outer IP Header
// nve 인터페이스에는 IP주소 적용 불가해서 source-interface 명령어로 IP 부여
member vni 10011
mcast-group 225.0.0.10
member vni 10020
mcast-group 225.0.0.20
interface e1/6
switchport mode access
switchport access vlan 11
no shutdown
PC끼리 통신 시도하기
만약 통신 안되면 PC에서 서로에게 핑 동시에 보내보기
#show ip route ospf
#show ip pim neighbor
#show nve peers
#show macc address-table
L3로 연결되어있는 PC의 MAC address를 배워옴