-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add vrrp topology. #2
Open
Paul-weqe
wants to merge
2
commits into
master
Choose a base branch
from
vrrp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,37 @@ | ||
zebra=yes | ||
bgpd=no | ||
ospfd=no | ||
vrrpd=yes | ||
ospf6d=no | ||
ripd=no | ||
ripngd=no | ||
isisd=no | ||
pimd=no | ||
ldpd=no | ||
nhrpd=no | ||
eigrpd=no | ||
babeld=no | ||
sharpd=no | ||
staticd=no | ||
pbrd=no | ||
bfdd=no | ||
fabricd=no | ||
|
||
vtysh_enable=yes | ||
zebra_options=" -s 90000000 --daemon -A 127.0.0.1" | ||
bgpd_options=" --daemon -A 127.0.0.1" | ||
ospfd_options=" --daemon -A 127.0.0.1" | ||
ospf6d_options=" --daemon -A ::1" | ||
ripd_options=" --daemon -A 127.0.0.1" | ||
ripngd_options=" --daemon -A ::1" | ||
isisd_options=" --daemon -A 127.0.0.1" | ||
pimd_options=" --daemon -A 127.0.0.1" | ||
ldpd_options=" --daemon -A 127.0.0.1" | ||
nhrpd_options=" --daemon -A 127.0.0.1" | ||
eigrpd_options=" --daemon -A 127.0.0.1" | ||
babeld_options=" --daemon -A 127.0.0.1" | ||
sharpd_options=" --daemon -A 127.0.0.1" | ||
staticd_options=" --daemon -A 127.0.0.1" | ||
pbrd_options=" --daemon -A 127.0.0.1" | ||
bfdd_options=" --daemon -A 127.0.0.1" | ||
fabricd_options=" --daemon -A 127.0.0.1" |
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 @@ | ||
#!/bin/sh | ||
|
||
# waiting for the daemons to start | ||
sleep 2 | ||
|
||
|
||
# Wait for the daemons to start | ||
sleep 5 | ||
|
||
if command -v /usr/lib/frr/zebra; then | ||
ip link add vrrp4-51 link eth-sw1 type macvlan mode bridge | ||
ip link set dev vrrp4-51 address 00:00:5e:00:01:33 | ||
ip addr add 10.0.1.5/24 dev vrrp4-51 | ||
ip link set dev vrrp4-51 up | ||
fi |
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,11 @@ | ||
hostname rt-1 | ||
! | ||
interface eth-sw1 | ||
vrrp 51 version 2 | ||
vrrp 51 priority 10 | ||
vrrp 51 advertisement-interval 1000 | ||
vrrp 51 ip 10.0.1.5 | ||
! | ||
! | ||
line vty | ||
! |
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,11 @@ | ||
hostname rt-2 | ||
! | ||
interface eth-sw1 | ||
vrrp 51 version 2 | ||
vrrp 51 priority 20 | ||
vrrp 51 advertisement-interval 1000 | ||
vrrp 51 ip 10.0.1.5 | ||
! | ||
! | ||
line vty | ||
! |
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,10 @@ | ||
! | ||
interfaces interface eth-sw1 | ||
type iana-if-type:ethernetCsmacd | ||
ipv4 | ||
! | ||
ipv4 vrrp vrrp-instance 51 | ||
priority 10 | ||
! | ||
virtual-ipv4-addresses virtual-ipv4-address 10.0.1.5 | ||
! |
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,10 @@ | ||
! | ||
interfaces interface eth-sw1 | ||
type iana-if-type:ethernetCsmacd | ||
ipv4 | ||
! | ||
ipv4 vrrp vrrp-instance 51 | ||
priority 20 | ||
! | ||
virtual-ipv4-addresses virtual-ipv4-address 10.0.1.5 | ||
! |
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,11 @@ | ||
auto lo | ||
auto eth-sw1 | ||
|
||
iface lo inet static | ||
address 1.1.1.1 | ||
netmask 255.255.255.255 | ||
|
||
iface eth-sw1 inet static | ||
address 10.0.1.1 | ||
netmask 255.255.255.0 | ||
mtu 1500 |
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,11 @@ | ||
auto lo | ||
auto eth-sw1 | ||
|
||
iface lo inet static | ||
address 2.2.2.2 | ||
netmask 255.255.255.255 | ||
|
||
iface eth-sw1 inet static | ||
address 10.0.1.2 | ||
netmask 255.255.255.0 | ||
mtu 1500 |
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,84 @@ | ||
# +-------+ | ||
# | | | ||
# | h1 | | ||
# | | | ||
# +-------+ | ||
# | sw-host | ||
# | 10.0.1.3/24 | ||
# | | ||
# | | ||
# | | ||
# | | ||
# +---------+ | ||
# | | | ||
# +--------------------| sw |-------------------+ | ||
# | | | | | ||
# | +---------+ | | ||
# | | | ||
# | | | ||
# | | | ||
# | | | ||
# | eth-sw1 | eth-sw1 | ||
# | 10.0.1.1/24 | 10.0.1.2/24 | ||
# +-------------+ +----------+ +------------+ | ||
# | | | | | | | ||
# | RT-1 | | Virtual | | RT-2 | | ||
# | 1.1.1.1 |==============| Router |=============| 2.2.2.2 | | ||
# | | | 10.0.1.5| | | | ||
# +-------------+ +----------+ +------------+ | ||
# | ||
# KEY: | ||
# ----- physical link | ||
# ===== virtual link | ||
|
||
name: vrrp | ||
|
||
topology: | ||
defaults: | ||
binds: | ||
- ../scripts/start.sh:/start.sh | ||
- frr/frr-setup.sh:/frr-setup.sh | ||
- frr/daemons:/etc/frr/daemons | ||
exec: | ||
- "/start.sh" | ||
- "/frr-setup.sh" | ||
|
||
nodes: | ||
|
||
sw1: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use "br1" to be consistent with the other topologies. Similarly, please use "rt1" instead of "rt-1". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do. |
||
kind: bridge | ||
|
||
rt-1: | ||
kind: linux | ||
|
||
# ---- holod image ---- | ||
image: local-holo:latest | ||
|
||
# ---- frr image ---- | ||
# image: quay.io/frrouting/frr:9.0.2 | ||
|
||
binds: | ||
- interfaces/rt-1:/etc/network/interfaces | ||
- holo/rt-1.conf:/etc/holo.startup | ||
- frr/rt-1.conf:/etc/frr/frr.startup | ||
|
||
rt-2: | ||
kind: linux | ||
|
||
# ---- holod image ---- | ||
image: local-holo:latest | ||
|
||
# ---- frr image ---- | ||
# image: quay.io/frrouting/frr:9.0.2 | ||
|
||
binds: | ||
- interfaces/rt-2:/etc/network/interfaces | ||
- holo/rt-2.conf:/etc/holo.startup | ||
- frr/rt-2.conf:/etc/frr/frr.startup | ||
|
||
links: | ||
# 10.0.1.0/24 | ||
- endpoints: ["host:sw-host", "sw1:eth-h1"] | ||
- endpoints: ["rt-1:eth-sw1", "sw1:eth-rt1"] | ||
- endpoints: ["rt-2:eth-sw1", "sw1:eth-rt2"] | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we have two "sleep" lines that could be combined into one.