-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add Topotests for Flexible-Algorithm implementation in OSPFv2
This commit adds topotests for Flexible-Algorithm implementation in OSPFv2. Signed-off-by: Pushpasis Sarkar <[email protected]>
- Loading branch information
Showing
146 changed files
with
21,332 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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,27 @@ | ||
password 1 | ||
hostname rt1 | ||
log file ospfd.log | ||
log syslog debugging | ||
! | ||
debug ospf sr | ||
! debug ospf te | ||
! debug ospf event | ||
! debug ospf lsa | ||
debug ospf lsa generate | ||
! debug ospf zebra | ||
! | ||
interface lo | ||
ip ospf area 0.0.0.0 | ||
ip ospf passive | ||
! | ||
interface eth-rt1-1 | ||
ip ospf area 0.0.0.0 | ||
! | ||
interface eth-rt1-2 | ||
ip ospf area 0.0.0.0 | ||
! | ||
router ospf | ||
ospf router-id 1.1.1.1 | ||
capability opaque | ||
router-info area 0.0.0.0 | ||
! |
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 @@ | ||
password 1 | ||
hostname rt1 | ||
log file ospfd.log | ||
log syslog debugging | ||
! | ||
debug ospf sr | ||
! debug ospf te | ||
! debug ospf event | ||
! debug ospf lsa | ||
debug ospf lsa generate | ||
! debug ospf zebra | ||
! | ||
interface lo | ||
ip ospf area 0.0.0.0 | ||
! | ||
interface eth-rt1-1 | ||
ip ospf area 0.0.0.0 | ||
! | ||
interface eth-rt1-2 | ||
ip ospf area 0.0.0.0 | ||
! | ||
router ospf | ||
ospf router-id 1.1.1.1 | ||
capability opaque | ||
router-info area 0.0.0.0 | ||
flexible-algorithm 128 metric-type igp | ||
flexible-algorithm 128 calculation-type spf | ||
flexible-algorithm 128 priority 10 | ||
flexible-algorithm 128 exclude-admin-group 30 | ||
flexible-algorithm 128 include-all-admin-group 20 | ||
flexible-algorithm 128 include-any-admin-group 60 | ||
flexible-algorithm 128 include-any-admin-group 70 | ||
flexible-algorithm 128 exclude-srlg 10 | ||
flexible-algorithm 128 flags 10 | ||
flexible-algorithm 128 prefix-advertise-metric 100 | ||
passive-interface lo | ||
! |
286 changes: 286 additions & 0 deletions
286
tests/topotests/ospf_flexalgo_topo1/rt1/step1/show_ip_ospf_database_opaque.ref
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,286 @@ | ||
{ | ||
"routerId": "1.1.1.1", | ||
"areaLocalOpaqueLsa": { | ||
"areas": { | ||
"0.0.0.0": [ | ||
{ | ||
"options": "*|O|-|-|-|-|E|-", | ||
"lsaType": "Area-Local Opaque-LSA", | ||
"linkStateId": "4.0.0.0", | ||
"advertisingRouter": "1.1.1.1", | ||
"length": 80, | ||
"opaqueType": "Router Information LSA", | ||
"opaqueId": 0, | ||
"opaqueDataLength": 60, | ||
"opaqueDataLengthValid": true, | ||
"tlvs": [ | ||
{ | ||
"name": "Router Capabilities TLV", | ||
"type": 1, | ||
"length": 4, | ||
"capabilities": "0x10000000" | ||
}, | ||
{ | ||
"name": "Flexible Algorithm Defintion TLV", | ||
"type": 16, | ||
"length": 48, | ||
"algorithmId": 128, | ||
"priority": 10, | ||
"metricType": "igp", | ||
"caculationType": "spf", | ||
"subTLVs": [ | ||
{ | ||
"name": "Exclude Admin Groups SubTLV", | ||
"type": 1, | ||
"length": 4, | ||
"adminGroups": [ 30 ] | ||
}, | ||
{ | ||
"name": "Include-Any Admin Groups SubTLV", | ||
"type": 2, | ||
"length": 8, | ||
"adminGroups": [ 60, 70 ] | ||
}, | ||
{ | ||
"name": "Include-All Admin Groups SubTLV", | ||
"type": 3, | ||
"length": 4, | ||
"adminGroups": [ 20 ] | ||
}, | ||
{ | ||
"name": "Flexible-Algo Flags SubTLV", | ||
"type": 4, | ||
"length": 4, | ||
"flags": [ 10 ] | ||
}, | ||
{ | ||
"name": "Exclude SRLGs SubTLV", | ||
"type": 5, | ||
"length": 4, | ||
"srlgs": [ 10 ] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"options": "*|O|-|-|-|-|E|-", | ||
"lsaType": "Area-Local Opaque-LSA", | ||
"linkStateId": "4.0.0.0", | ||
"advertisingRouter": "2.2.2.2", | ||
"length": 28, | ||
"opaqueType": "Router Information LSA", | ||
"opaqueId": 0, | ||
"opaqueDataLength": 8, | ||
"opaqueDataLengthValid": true, | ||
"tlvs": [ | ||
{ | ||
"name": "Router Capabilities TLV", | ||
"type": 1, | ||
"length": 4, | ||
"capabilities": "0x10000000" | ||
} | ||
] | ||
}, | ||
{ | ||
"options": "*|O|-|-|-|-|E|-", | ||
"lsaType": "Area-Local Opaque-LSA", | ||
"linkStateId": "4.0.0.0", | ||
"advertisingRouter": "3.3.3.3", | ||
"length": 28, | ||
"opaqueType": "Router Information LSA", | ||
"opaqueId": 0, | ||
"opaqueDataLength": 8, | ||
"opaqueDataLengthValid": true, | ||
"tlvs": [ | ||
{ | ||
"name": "Router Capabilities TLV", | ||
"type": 1, | ||
"length": 4, | ||
"capabilities": "0x10000000" | ||
} | ||
] | ||
}, | ||
{ | ||
"options": "*|O|-|-|-|-|E|-", | ||
"lsaType": "Area-Local Opaque-LSA", | ||
"linkStateId": "4.0.0.0", | ||
"advertisingRouter": "4.4.4.4", | ||
"length": 80, | ||
"opaqueType": "Router Information LSA", | ||
"opaqueId": 0, | ||
"opaqueDataLength": 60, | ||
"opaqueDataLengthValid": true, | ||
"tlvs": [ | ||
{ | ||
"name": "Router Capabilities TLV", | ||
"type": 1, | ||
"length": 4, | ||
"capabilities": "0x10000000" | ||
}, | ||
{ | ||
"name": "Flexible Algorithm Defintion TLV", | ||
"type": 16, | ||
"length": 48, | ||
"algorithmId": 128, | ||
"priority": 10, | ||
"metricType": "igp", | ||
"caculationType": "spf", | ||
"subTLVs": [ | ||
{ | ||
"name": "Exclude Admin Groups SubTLV", | ||
"type": 1, | ||
"length": 4, | ||
"adminGroups": [ 30 ] | ||
}, | ||
{ | ||
"name": "Include-Any Admin Groups SubTLV", | ||
"type": 2, | ||
"length": 4, | ||
"adminGroups": [ 70 ] | ||
}, | ||
{ | ||
"name": "Include-All Admin Groups SubTLV", | ||
"type": 3, | ||
"length": 8, | ||
"adminGroups": [ 20, 60 ] | ||
}, | ||
{ | ||
"name": "Flexible-Algo Flags SubTLV", | ||
"type": 4, | ||
"length": 4, | ||
"flags": [ 10 ] | ||
}, | ||
{ | ||
"name": "Exclude SRLGs SubTLV", | ||
"type": 5, | ||
"length": 4, | ||
"srlgs": [ 10 ] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"options": "*|O|-|-|-|-|E|-", | ||
"lsaType": "Area-Local Opaque-LSA", | ||
"linkStateId": "7.0.0.1", | ||
"advertisingRouter": "1.1.1.1", | ||
"length": 44, | ||
"opaqueType": "Extended Prefix Opaque LSA", | ||
"opaqueId": 1, | ||
"opaqueDataLength": 24, | ||
"opaqueDataLengthValid": true, | ||
"tlvs": [ | ||
{ | ||
"name": "Extended Prefix TLV", | ||
"type": 1, | ||
"length": 20, | ||
"prefixAddress": "1.1.1.1", | ||
"prefixLength": 32, | ||
"routeType": 1, | ||
"addressFamily": 0, | ||
"subTLVs": [ | ||
{ | ||
"name": "Flex-Algo Prefix Metric (FAPM) SubTLV", | ||
"type": 3, | ||
"length": 8, | ||
"algotithmId": 128, | ||
"flags": 0, | ||
"metric": 100 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"options": "*|O|-|-|-|-|E|-", | ||
"lsaType": "Area-Local Opaque-LSA", | ||
"linkStateId": "7.0.0.1", | ||
"advertisingRouter": "4.4.4.4", | ||
"length": 44, | ||
"opaqueType": "Extended Prefix Opaque LSA", | ||
"opaqueId": 1, | ||
"opaqueDataLength": 24, | ||
"opaqueDataLengthValid": true, | ||
"tlvs": [ | ||
{ | ||
"name": "Extended Prefix TLV", | ||
"type": 1, | ||
"length": 20, | ||
"prefixAddress": "4.4.4.4", | ||
"prefixLength": 32, | ||
"routeType": 1, | ||
"addressFamily": 0, | ||
"subTLVs": [ | ||
{ | ||
"name": "Flex-Algo Prefix Metric (FAPM) SubTLV", | ||
"type": 3, | ||
"length": 8, | ||
"algotithmId": 128, | ||
"flags": 0, | ||
"metric": 10 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"options": "*|O|-|-|-|-|E|-", | ||
"lsaType": "Area-Local Opaque-LSA", | ||
"linkStateId": "11.0.0.0", | ||
"advertisingRouter": "1.1.1.1", | ||
"length": 40, | ||
"opaqueType": "Extended Inter-Area ASBR Opaque LSA", | ||
"opaqueId": 0, | ||
"opaqueDataLength": 20, | ||
"opaqueDataLengthValid": true, | ||
"tlvs": [ | ||
{ | ||
"name": "Extended Inter-Area ASBR TLV", | ||
"type": 1, | ||
"length": 16, | ||
"asbrRouterId": "1.1.1.1", | ||
"subTLVs": [ | ||
{ | ||
"name": "Flex-Algo ASBR Metric (FAAM) SubTLV", | ||
"type": 1, | ||
"length": 8, | ||
"algorithmId": 128, | ||
"metric": 100 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"options": "*|O|-|-|-|-|E|-", | ||
"lsaType": "Area-Local Opaque-LSA", | ||
"linkStateId": "11.0.0.0", | ||
"advertisingRouter": "4.4.4.4", | ||
"length": 40, | ||
"opaqueType": "Extended Inter-Area ASBR Opaque LSA", | ||
"opaqueId": 0, | ||
"opaqueDataLength": 20, | ||
"opaqueDataLengthValid": true, | ||
"tlvs": [ { | ||
"name": "Extended Inter-Area ASBR TLV", | ||
"type": 1, | ||
"length": 16, | ||
"asbrRouterId": "4.4.4.4", | ||
"subTLVs": [ | ||
{ | ||
"name": "Flex-Algo ASBR Metric (FAAM) SubTLV", | ||
"type": 1, | ||
"length": 8, | ||
"algorithmId": 128, | ||
"metric": 10 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/topotests/ospf_flexalgo_topo1/rt1/step1/show_ip_ospf_flexalgo.ref
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,17 @@ | ||
--- Flexible-Algorithm parameters --- | ||
Flexible-Algorithm: 128 | ||
Metric-Type: igp | ||
Calculation-Type: spf | ||
Priority: 10 | ||
Prefix-Advt-Metric: 100 | ||
Exclude-Admin-Groups: | ||
- 30 | ||
Include-Any-Admin-Groups: | ||
- 60 | ||
- 70 | ||
Include-All-Admin-Groups: | ||
- 20 | ||
Exclude-SRLGs: | ||
- 10 | ||
Flags: | ||
- 10 |
Oops, something went wrong.