Skip to content

Commit

Permalink
doc:add bgp for srv6 te policy
Browse files Browse the repository at this point in the history
Signed-off-by: guozhongfeng.gzf <[email protected]>
  • Loading branch information
guoguojia2021 committed Dec 6, 2024
1 parent 5152e85 commit 5195792
Show file tree
Hide file tree
Showing 21 changed files with 993 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/ce1/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
frr defaults traditional
!
hostname ce1
password zebra
!
log stdout notifications
log commands
log file bgpd.log
16 changes: 16 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/ce1/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
log file zebra.log
!
hostname ce1
!
interface eth0
ip address 192.168.1.2/24
ipv6 address 1001:1::2/64
!
ip forwarding
ipv6 forwarding
!
ip route 0.0.0.0/0 192.168.1.1
ipv6 route ::/0 1001:1::1
!
line vty
!
8 changes: 8 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/ce2/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
frr defaults traditional
!
hostname ce2
password zebra
!
log stdout notifications
log commands
log file bgpd.log
16 changes: 16 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/ce2/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
log file zebra.log
!
hostname ce2
!
interface eth0
ip address 192.168.2.2/24
ipv6 address 1001:2::2/64
!
ip forwarding
ipv6 forwarding
!
ip route 0.0.0.0/0 192.168.2.1
ipv6 route ::/0 1001:2::1
!
line vty
!
8 changes: 8 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/ce3/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
frr defaults traditional
!
hostname ce3
password zebra
!
log stdout notifications
log commands
log file bgpd.log
16 changes: 16 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/ce3/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
log file zebra.log
!
hostname ce3
!
interface eth0
ip address 192.168.3.2/24
ipv6 address 1001:3::2/64
!
ip forwarding
ipv6 forwarding
!
ip route 0.0.0.0/0 192.168.3.1
ipv6 route ::/0 1001:3::1
!
line vty
!
8 changes: 8 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/ce4/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
frr defaults traditional
!
hostname ce4
password zebra
!
log stdout notifications
log commands
log file bgpd.log
16 changes: 16 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/ce4/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
log file zebra.log
!
hostname ce4
!
interface eth0
ip address 192.168.4.2/24
ipv6 address 1001:4::2/64
!
ip forwarding
ipv6 forwarding
!
ip route 0.0.0.0/0 192.168.4.1
ipv6 route ::/0 1001:4::1
!
line vty
!
26 changes: 26 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/p1/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
frr defaults traditional
!
hostname p1
password zebra
!
log stdout notifications
log commands
log file bgpd.log
!
router bgp 3
bgp router-id 1.1.1.1
no bgp ebgp-requires-policy
!no bgp default ipv4-unicast
neighbor 2001:1::1 remote-as 1
neighbor 2001:1::1 timers 3 10
neighbor 2001:1::1 timers connect 1
neighbor 2002:1::1 remote-as 2
neighbor 2002:1::1 timers 3 10
neighbor 2002:1::1 timers connect 1
!
address-family ipv6 unicast
neighbor 2001:1::1 activate
neighbor 2002:1::1 activate
exit-address-family
!
!
32 changes: 32 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/p1/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
log file zebra.log
!
hostname p1
!
interface Loopback1
ipv6 address 3000::1/64
!
interface eth1
ipv6 address 2001:1::2/64
!
interface eth2
ipv6 address 2002:1::1/64
!
interface eth3
ipv6 address 2002:3::2/64
!
ip forwarding
ipv6 forwarding
!
segment-routing
srv6
locators
locator loc1
prefix 2001:db8:3:3::/64
!
!
!
ipv6 route 2001:db8:1:1::/64 2001:1::1
ipv6 route 2001:db8:2:2::/64 2002:1::2
ipv6 route 2001:db8:4:4::/64 2002:3::1
line vty
!
26 changes: 26 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/p2/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
frr defaults traditional
!
hostname p2
password zebra
!
log stdout notifications
log commands
log file bgpd.log
!
router bgp 4
bgp router-id 1.1.1.1
no bgp ebgp-requires-policy
!no bgp default ipv4-unicast
neighbor 2001:2::1 remote-as 1
neighbor 2001:2::1 timers 3 10
neighbor 2001:2::1 timers connect 1
neighbor 2002:2::2 remote-as 2
neighbor 2002:2::2 timers 3 10
neighbor 2002:2::2 timers connect 1
!
address-family ipv6 unicast
neighbor 2001:2::1 activate
neighbor 2002:1::1 activate
exit-address-family
!
!
33 changes: 33 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/p2/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
log file zebra.log
!
hostname p2
!
interface Loopback1
ipv6 address 4000::1/64
!
interface eth1
ipv6 address 2001:2::2/64
!
interface eth2
ipv6 address 2002:2::1/64
!
interface eth3
ipv6 address 2002:3::1/64
!
ip forwarding
ipv6 forwarding
!
segment-routing
srv6
locators
locator loc1
prefix 2001:db8:4:4::/64
!
!
!
!
ipv6 route 2001:db8:1:1::/64 2001:2::1
ipv6 route 2001:db8:2:2::/64 2002:2::2
ipv6 route 2001:db8:3:3::/64 2002:3::2
line vty
!
102 changes: 102 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/pe1/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
frr defaults traditional
!
bgp send-extra-data zebra
!
hostname pe1
password zebra
!
log stdout notifications
log commands
!
!debug bgp neighbor-events
!debug bgp zebra
!debug bgp update-groups
!debug bgp updates in
!debug bgp updates out
!debug bgp vpn label
!debug bgp vpn leak-from-vrf
!debug bgp vpn leak-to-vrf
!debug bgp vpn rmap-event
!
route-map color_v4 permit 10
set extcommunity color 01:100
!
route-map color_v6 permit 10
set extcommunity color 01:200
!
router bgp 1
bgp router-id 1.1.1.1
no bgp ebgp-requires-policy
!no bgp default ipv4-unicast
neighbor 2001:1::2 remote-as 3
neighbor 2001:1::2 timers 3 10
neighbor 2001:1::2 timers connect 1
neighbor 2001:2::2 remote-as 4
neighbor 2001:2::2 timers 3 10
neighbor 2001:2::2 timers connect 1
neighbor 2000::1 remote-as 1
neighbor 2000::1 timers 3 10
neighbor 2000::1 timers connect 1
neighbor 2000::1 ebgp-multihop
neighbor 2000::1 capability extended-nexthop
!
address-family ipv4 vpn
neighbor 2000::1 activate
neighbor 2000::1 route-map color_v4 out
exit-address-family
!
address-family ipv6 vpn
neighbor 2000::1 activate
neighbor 2000::1 route-map color_v6 out
exit-address-family
!
address-family ipv6 unicast
network 1000::1/64
neighbor 2001:1::2 activate
neighbor 2001:2::2 activate
exit-address-family

segment-routing srv6
locator loc1
!
!
router bgp 1 vrf vrf1
bgp router-id 1.1.1.1
no bgp ebgp-requires-policy
sid vpn per-vrf export auto
!
address-family ipv4 unicast
nexthop vpn export 2001::1
rd vpn export 1:10
rt vpn both 99:99
export vpn
redistribute connected
exit-address-family
!
address-family ipv6 unicast
rd vpn export 1:10
rt vpn both 99:99
export vpn
redistribute connected
exit-address-family
!
router bgp 1 vrf vrf2
bgp router-id 1.1.1.1
no bgp ebgp-requires-policy
sid vpn per-vrf export auto
!
address-family ipv4 unicast
nexthop vpn export 2001::1
rd vpn export 1:20
rt vpn both 88:88
export vpn
redistribute connected
exit-address-family
!
address-family ipv6 unicast
rd vpn export 1:20
rt vpn both 88:88
export vpn
redistribute connected
exit-address-family
!
10 changes: 10 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_srv6_te_policy/pe1/pathd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
log file pathd.log
!
hostname pe1
!
segment-routing
traffic-eng
segment-list a
index 10 ipv6-address 2001:db8:3:3::
index 20 ipv6-address 2001:db8:1:1::
!
Loading

0 comments on commit 5195792

Please sign in to comment.