Examples
This commit is contained in:
parent
f1d2e242d8
commit
312347df94
|
@ -5,7 +5,6 @@ RUN apk add --no-cache --update-cache frr wireguard-tools tini
|
|||
RUN mkdir -p /var/run/frr
|
||||
RUN chown -R frr:frr /etc/frr /var/run/frr
|
||||
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
|
|
@ -2,7 +2,7 @@ version: "3.9"
|
|||
|
||||
services:
|
||||
backbone:
|
||||
build: .
|
||||
build: ../..
|
||||
container_name: backbone
|
||||
ports:
|
||||
- 13231:13231/udp
|
28
examples/two-nodes/docker-compose.yaml
Normal file
28
examples/two-nodes/docker-compose.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
version: "3.9"
|
||||
|
||||
services:
|
||||
node1:
|
||||
build: ../..
|
||||
container_name: backbone-1
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- CAP_SYS_ADMIN
|
||||
sysctls:
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv4.ip_forward=1
|
||||
volumes:
|
||||
- ./node-1/frr:/etc/frr
|
||||
- ./node-1/wireguard:/etc/wireguard
|
||||
|
||||
node2:
|
||||
build: ../..
|
||||
container_name: backbone-2
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- CAP_SYS_ADMIN
|
||||
sysctls:
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv4.ip_forward=1
|
||||
volumes:
|
||||
- ./node-2/frr:/etc/frr
|
||||
- ./node-2/wireguard:/etc/wireguard
|
1
examples/two-nodes/node-1/frr/daemons
Normal file
1
examples/two-nodes/node-1/frr/daemons
Normal file
|
@ -0,0 +1 @@
|
|||
ospfd=yes
|
7
examples/two-nodes/node-1/frr/ospfd.conf
Normal file
7
examples/two-nodes/node-1/frr/ospfd.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
interface wg0
|
||||
ip ospf area 0.0.0.0
|
||||
ip ospf network point-to-point
|
||||
|
||||
router ospf
|
||||
redistribute connected
|
||||
redistribute kernel
|
0
examples/two-nodes/node-1/frr/staticd.conf
Normal file
0
examples/two-nodes/node-1/frr/staticd.conf
Normal file
2
examples/two-nodes/node-1/frr/zebra.conf
Normal file
2
examples/two-nodes/node-1/frr/zebra.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
interface wg0
|
||||
ip address 192.168.0.1/30
|
10
examples/two-nodes/node-1/wireguard/wg0.conf
Normal file
10
examples/two-nodes/node-1/wireguard/wg0.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Interface]
|
||||
Address = 192.168.0.1/30
|
||||
PrivateKey = WEInQueTh6I/mv6hBgVRITBF8O4xMf3wUSyfylu7Slg=
|
||||
ListenPort = 13231
|
||||
Table = off
|
||||
|
||||
[Peer]
|
||||
PublicKey = LDy/c6erjyfsnoETop4aKEWfdFqFiNSx5KPwij+VPk8=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = node2:13231
|
1
examples/two-nodes/node-2/frr/daemons
Normal file
1
examples/two-nodes/node-2/frr/daemons
Normal file
|
@ -0,0 +1 @@
|
|||
ospfd=yes
|
7
examples/two-nodes/node-2/frr/ospfd.conf
Normal file
7
examples/two-nodes/node-2/frr/ospfd.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
interface wg0
|
||||
ip ospf area 0.0.0.0
|
||||
ip ospf network point-to-point
|
||||
|
||||
router ospf
|
||||
redistribute connected
|
||||
redistribute kernel
|
0
examples/two-nodes/node-2/frr/staticd.conf
Normal file
0
examples/two-nodes/node-2/frr/staticd.conf
Normal file
2
examples/two-nodes/node-2/frr/zebra.conf
Normal file
2
examples/two-nodes/node-2/frr/zebra.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
interface wg0
|
||||
ip address 192.168.0.2/30
|
10
examples/two-nodes/node-2/wireguard/wg0.conf
Normal file
10
examples/two-nodes/node-2/wireguard/wg0.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Interface]
|
||||
Address = 192.168.0.2/30
|
||||
PrivateKey = CIvfcNMV8n3e40Rk+wjDCm6CPyhqPPCUFcEdfBgIq2Y=
|
||||
ListenPort = 13231
|
||||
Table = off
|
||||
|
||||
[Peer]
|
||||
PublicKey = M7Qgt2mHJI4gyq2rLb+6julDjG5Mtfg/vUGEOYts+zk=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = node1:13231
|
Loading…
Reference in New Issue
Block a user