Skip to content

Commit

Permalink
topotests:Add test fo bgp l3vpn over srv6 te policy
Browse files Browse the repository at this point in the history
Signed-off-by: guozhongfeng.gzf <guozhongfeng.gzf@alibaba-inc.com>
  • Loading branch information
guoguojia2021 committed Dec 19, 2024
1 parent 5c1a8a1 commit ec2f4f9
Show file tree
Hide file tree
Showing 21 changed files with 1,378 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_te_policy/ce1/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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
!
14 changes: 14 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_te_policy/ce2/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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
!
14 changes: 14 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_te_policy/ce3/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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
!
14 changes: 14 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_te_policy/ce4/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
hostname ce2
!
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
!
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"1:10":{
"prefix":"192.168.1.0/24",
"version":1,
"advertisedTo":{
"1000::1":{
"hostname":"pe1"
}
},
"paths":[
{
"aspath":{
"string":"65501",
"segments":[
{
"type":"as-sequence",
"list":[
65501
]
}
],
"length":1
},
"origin":"incomplete",
"metric":0,
"valid":true,
"version":1,
"bestpath":{
"overall":true,
"selectionReason":"First path received"
},
"extendedCommunity":{
"string":"RT:99:99 Color:01:100"
},
"remoteLabel":"*",
"remoteSid":"2001:db8:1:1::",
"lastUpdate":{
"epoch":"*",
"string":"*"
},
"nexthops":[
{
"ip":"0.0.0.0",
"hostname":"pe1",
"afi":"ipv4",
"metric":0,
"accessible":true,
"used":true
}
],
"peer":{
"peerId":"1000::1",
"routerId":"1.1.1.1",
"hostname":"pe1",
"type":"external"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"1:20":{
"prefix":"192.168.2.0/24",
"version":1,
"advertisedTo":{
"1000::1":{
"hostname":"pe1"
}
},
"paths":[
{
"aspath":{
"string":"65501",
"segments":[
{
"type":"as-sequence",
"list":[
65501
]
}
],
"length":1
},
"origin":"incomplete",
"metric":0,
"valid":true,
"version":1,
"bestpath":{
"overall":true,
"selectionReason":"First path received"
},
"extendedCommunity":{
"string":"RT:88:88 Color:01:200"
},
"remoteLabel":"*",
"remoteSid":"2001:db8:1:1::",
"lastUpdate":{
"epoch":"*",
"string":"*"
},
"nexthops":[
{
"ip":"0.0.0.0",
"hostname":"pe1",
"afi":"ipv4",
"metric":0,
"accessible":true,
"used":true
}
],
"peer":{
"peerId":"1000::1",
"routerId":"1.1.1.1",
"hostname":"pe1",
"type":"external"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"1:10":{
"prefix":"1001:1::/64",
"version":1,
"advertisedTo":{
"1000::1":{
"hostname":"pe1"
}
},
"paths":[
{
"aspath":{
"string":"65501",
"segments":[
{
"type":"as-sequence",
"list":[
65501
]
}
],
"length":1
},
"origin":"incomplete",
"metric":0,
"valid":true,
"version":1,
"bestpath":{
"overall":true,
"selectionReason":"First path received"
},
"extendedCommunity":{
"string":"RT:99:99 Color:01:100"
},
"remoteLabel":"*",
"remoteSid":"2001:db8:1:1::",
"lastUpdate":{
"epoch":"*",
"string":"*"
},
"nexthops":[
{
"ip":"1000::1",
"hostname":"pe1",
"afi":"ipv6",
"scope":"global",
"metric":0,
"accessible":true,
"used":true
}
],
"peer":{
"peerId":"1000::1",
"routerId":"1.1.1.1",
"hostname":"pe1",
"type":"external"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"1:20":{
"prefix":"1001:2::/64",
"version":1,
"advertisedTo":{
"1000::1":{
"hostname":"pe1"
}
},
"paths":[
{
"aspath":{
"string":"65501",
"segments":[
{
"type":"as-sequence",
"list":[
65501
]
}
],
"length":1
},
"origin":"incomplete",
"metric":0,
"valid":true,
"version":1,
"bestpath":{
"overall":true,
"selectionReason":"First path received"
},
"extendedCommunity":{
"string":"RT:88:88 Color:01:200"
},
"remoteLabel":"*",
"remoteSid":"2001:db8:1:1::",
"lastUpdate":{
"epoch":"*",
"string":"*"
},
"nexthops":[
{
"ip":"1000::1",
"hostname":"pe1",
"afi":"ipv6",
"scope":"global",
"metric":0,
"accessible":true,
"used":true
}
],
"peer":{
"peerId":"1000::1",
"routerId":"1.1.1.1",
"hostname":"pe1",
"type":"external"
}
}
]
}
}
67 changes: 67 additions & 0 deletions tests/topotests/bgp_srv6l3vpn_te_policy/json/vrf1_ipv4_route.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"192.168.1.0/24":[
{
"prefix":"192.168.1.0/24",
"prefixLen":24,
"protocol":"bgp",
"vrfId":"*",
"vrfName":"vrf1",
"selected":true,
"destSelected":true,
"distance":20,
"metric":0,
"installed":true,
"table":1,
"internalStatus":16,
"internalFlags":9,
"internalNextHopNum":"*",
"internalNextHopActiveNum":"*",
"nexthopGroupId":"*",
"installedNexthopGroupId":"*",
"uptime":"*",
"nexthops":[
{
"flags":5,
"ip":"1000::1",
"afi":"ipv6",
"vrf":"default",
"active":true,
"recursive":true,
"labels":"*",
"weight":1,
"seg6local":{
"action":"unspec"
},
"seg6localContext":{
"unknown":true
},
"seg6":{
"segs":"2001:db8:1:1:1::"
}
},
{
"flags":3,
"fib":true,
"ip":"*",
"afi":"ipv6",
"interfaceIndex":"*",
"interfaceName":"eth1",
"resolver":true,
"vrf":"default",
"active":true,
"labels":"*",
"weight":1,
"seg6local":{
"action":"unspec"
},
"seg6localContext":{
"unknown":true
},
"seg6":{
"segs":"2001:db8:1:1:1::"
}
}
]
}
]
}
Loading

0 comments on commit ec2f4f9

Please sign in to comment.