Skip to content
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

Fix for PXE Vlan #99

Merged
merged 6 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Config struct {
LoopbackIP string `required:"false" default:"10.0.0.11" desc:"set the loopback ip address that is used with BGP unnumbered" split_words:"true"`
ASN string `required:"false" default:"420000011" desc:"set the ASN that is used with BGP"`
SpineUplinks []string `required:"false" default:"swp31,swp32" desc:"set the ports that are connected to spines" envconfig:"spine_uplinks"`
ManagementGateway string `required:"false" default:"192.168.0.1" desc:"the default gateway for the management network" split_words:"true"`
ManagementGateway string `required:"false" default:"" desc:"the default gateway for the management network" split_words:"true"`
ReconfigureSwitch bool `required:"false" default:"false" desc:"let metal-core reconfigure the switch" split_words:"true"`
ReconfigureSwitchInterval time.Duration `required:"false" default:"10s" desc:"pull interval to fetch and apply switch configuration" split_words:"true"`
AdditionalBridgeVIDs []string `required:"false" desc:"additional vlan ids that should be configured at the vlan-aware bridge" envconfig:"additional_bridge_vids"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ router bgp 4200000010
neighbor swp3 interface peer-group FIREWALL
!
address-family ipv4 unicast
redistribute connected route-map LOOPBACKS
redistribute connected route-map DENY_MGMT
neighbor FIREWALL allowas-in 2
neighbor swp3 route-map fw-swp3-in in
exit-address-family
Expand All @@ -67,8 +67,9 @@ router bgp 4200000010
neighbor swp3 route-map fw-swp3-vni out
exit-address-family
!
route-map LOOPBACKS permit 10
match interface Loopback0
route-map DENY_MGMT deny 10
match interface eth0
route-map DENY_MGMT permit 20
!
# route-maps for firewall@swp3
ip prefix-list fw-swp3-in-prefixes permit 10.0.2.1/32 le 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ router bgp 4200000010
neighbor swp3 interface peer-group FIREWALL
!
address-family ipv4 unicast
redistribute connected route-map LOOPBACKS
redistribute connected route-map DENY_MGMT
neighbor FIREWALL allowas-in 2
neighbor swp3 route-map fw-swp3-in in
exit-address-family
Expand All @@ -67,8 +67,9 @@ router bgp 4200000010
neighbor swp3 route-map fw-swp3-vni out
exit-address-family
!
route-map LOOPBACKS permit 10
match interface Loopback0
route-map DENY_MGMT deny 10
match interface eth0
route-map DENY_MGMT permit 20
!
# route-maps for firewall@swp3
ip prefix-list fw-swp3-in-prefixes permit 10.0.2.1/32 le 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ router bgp 4200000010
neighbor FIREWALL timers 2 8
!
address-family ipv4 unicast
redistribute connected route-map LOOPBACKS
redistribute connected route-map DENY_MGMT
neighbor FIREWALL allowas-in 2
exit-address-family
!
Expand All @@ -48,8 +48,9 @@ router bgp 4200000010
neighbor FIREWALL allowas-in 2
exit-address-family
!
route-map LOOPBACKS permit 10
match interface Loopback0
route-map DENY_MGMT deny 10
match interface eth0
route-map DENY_MGMT permit 20
!
ip route 0.0.0.0/0 192.168.0.254 nexthop-vrf mgmt
!
Expand Down
7 changes: 4 additions & 3 deletions cmd/internal/switcher/templates/tpl/sonic_frr.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ router bgp {{ $ASN }}
{{- end }}
!
address-family ipv4 unicast
redistribute connected route-map LOOPBACKS
redistribute connected route-map DENY_MGMT
neighbor FIREWALL allowas-in 2
{{- range $k, $f := .Ports.Firewalls }}
neighbor {{ $f.Port }} route-map fw-{{ $k }}-in in
Expand All @@ -76,8 +76,9 @@ router bgp {{ $ASN }}
{{- end }}
exit-address-family
!
route-map LOOPBACKS permit 10
match interface Loopback0
route-map DENY_MGMT deny 10
match interface eth0
route-map DENY_MGMT permit 20
!
{{- range $k, $f := .Ports.Firewalls }}
# route-maps for firewall@{{ $k }}
Expand Down
Loading