前置き
一応動いてるけど、ほんとにいいのこれで?というのがとても不安
というか経路情報をルータに送り込めてなくね…ということでip route書いてます…
けどstatic route書くとちゃんとルータ配下のPCからアクセスできるんよね…
なので一応OKかなと…
FRRモードのMetalLB
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.5/config/manifests/metallb-frr.yaml
RTX1300側のconfig
ip route 192.168.101.0/24 gateway 192.168.100.150
bgp use on
bgp autonomous-system 64512
bgp neighbor 2 64513 192.168.100.150 ignore-capability=on
bgp router id 192.168.100.1
MetalLB側のconfig
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: default
namespace: metallb-system
spec:
addresses:
- 192.168.101.0/24
avoidBuggyIPs: true
---
apiVersion: metallb.io/v1beta1
kind: BGPAdvertisement
metadata:
name: default
namespace: metallb-system
spec:
ipAddressPools:
- default
aggregationLength: 24
#---
#apiVersion: metallb.io/v1beta1
#kind: L2Advertisement
#metadata:
# name: default
# namespace: metallb-system
#spec:
# ipAddressPools:
# - default
---
apiVersion: metallb.io/v1beta1
kind: BFDProfile
metadata:
name: default
namespace: metallb-system
spec:
receiveInterval: 380
transmitInterval: 270
---
apiVersion: metallb.io/v1beta2
kind: BGPPeer
metadata:
name: default
namespace: metallb-system
spec:
myASN: 64513
peerASN: 64512
peerAddress: 192.168.100.1
peerPort: 179
sourceAddress: 192.168.100.150
routerID: 192.168.100.150
bfdProfile: default
動作状況
# show status bgp neighbor
BGP neighbor is 192.168.100.150, remote AS 64513, local AS 64512, external link
BGP version 4, remote router ID 192.168.100.150
BGP state = Established, up for 00:00:50
Last read 00:00:20, hold time is 90, keepalive interval is 30 seconds
Received 2 messages, 0 notifications, 0 in queue
Sent 5 messages, 0 notifications, 0 in queue
Connection established 1; dropped 0
Last reset never
Local host: 192.168.100.1, Local port: 179
Foreign host: 192.168.100.150, Foreign port: 39433