-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97814d5
commit 44792de
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
FROM alpine | ||
|
||
RUN apk add --update nano \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
RUN mkdir /opt/gobgp | ||
|
||
WORKDIR /opt/gobgp | ||
|
||
RUN wget https://github.com/osrg/gobgp/releases/download/v3.21.0/gobgp_3.21.0_linux_amd64.tar.gz -O /tmp/gobgp.tar.gz \ | ||
&& tar -zxf /tmp/gobgp.tar.gz --directory /tmp/ \ | ||
&& mv /tmp/gobgp /tmp/gobgpd /usr/local/bin/ \ | ||
&& rm -rf /tmp/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# gobgp container in VyOS | ||
|
||
Build container | ||
```shell | ||
sudo podman build --net host --tag gobgp:one -f ./Dockerfile | ||
``` | ||
|
||
VyOS configuration: | ||
```shell | ||
set container name gobgp image 'localhost/gobgp:one' | ||
set container name gobgp network NET01 address '10.0.0.2' | ||
set container name gobgp volume gobgp destination '/opt/gobgp' | ||
set container name gobgp volume gobgp source '/config/containers/gobgp' | ||
|
||
set protocols bgp system-as '65001' | ||
set protocols bgp address-family ipv4-unicast network 100.64.0.0/24 | ||
set protocols bgp neighbor 10.0.0.2 address-family ipv4-flowspec | ||
set protocols bgp neighbor 10.0.0.2 address-family ipv4-unicast | ||
set protocols bgp neighbor 10.0.0.2 remote-as '65001' | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[global.config] | ||
as = 65001 | ||
router-id = "10.0.0.2" | ||
|
||
[[neighbors]] | ||
[neighbors.config] | ||
neighbor-address = "10.0.0.1" | ||
peer-as = 65001 |