0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MetalLBとRTX1300によるBGPmode接続編

Last updated at Posted at 2024-05-22

前置き

一応動いてるけど、ほんとにいいのこれで?というのがとても不安
というか経路情報をルータに送り込めてなくね…ということで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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?