]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Make ospf convergence predictable by setting if priority 7593/head
authorMartin Winter <mwinter@opensourcerouting.org>
Mon, 23 Nov 2020 22:34:51 +0000 (23:34 +0100)
committerMartin Winter <mwinter@opensourcerouting.org>
Thu, 26 Nov 2020 03:10:05 +0000 (04:10 +0100)
Added OSPF priorities to force a predictable DR/Backup router selection

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
32 files changed:
tests/topotests/bgp_features/r1/ospf6d.conf
tests/topotests/bgp_features/r1/ospf_neighbor.json
tests/topotests/bgp_features/r1/ospfd.conf
tests/topotests/bgp_features/r2/ospf6d.conf
tests/topotests/bgp_features/r2/ospf_neighbor.json
tests/topotests/bgp_features/r2/ospfd.conf
tests/topotests/bgp_features/r3/ospf6d.conf
tests/topotests/bgp_features/r3/ospf_neighbor.json
tests/topotests/bgp_features/r3/ospfd.conf
tests/topotests/ldp-oc-acl-topo1/r1/ospfd.conf
tests/topotests/ldp-oc-acl-topo1/r1/show_ip_ospf_neighbor.json
tests/topotests/ldp-oc-acl-topo1/r2/ospfd.conf
tests/topotests/ldp-oc-acl-topo1/r2/show_ip_ospf_neighbor.json
tests/topotests/ldp-oc-acl-topo1/r3/ospfd.conf
tests/topotests/ldp-oc-acl-topo1/r3/show_ip_ospf_neighbor.json
tests/topotests/ldp-oc-acl-topo1/r4/ospfd.conf
tests/topotests/ldp-oc-acl-topo1/r4/show_ip_ospf_neighbor.json
tests/topotests/ldp-oc-topo1/r1/ospfd.conf
tests/topotests/ldp-oc-topo1/r1/show_ip_ospf_neighbor.json
tests/topotests/ldp-oc-topo1/r2/ospfd.conf
tests/topotests/ldp-oc-topo1/r2/show_ip_ospf_neighbor.json
tests/topotests/ldp-oc-topo1/r3/ospfd.conf
tests/topotests/ldp-oc-topo1/r3/show_ip_ospf_neighbor.json
tests/topotests/ldp-oc-topo1/r4/ospfd.conf
tests/topotests/ldp-oc-topo1/r4/show_ip_ospf_neighbor.json
tests/topotests/ldp-vpls-topo1/r1/ospfd.conf
tests/topotests/ldp-vpls-topo1/r1/show_ip_ospf_neighbor.json
tests/topotests/ldp-vpls-topo1/r2/ospfd.conf
tests/topotests/ldp-vpls-topo1/r2/show_ip_ospf_neighbor.json
tests/topotests/ldp-vpls-topo1/r3/ospfd.conf
tests/topotests/ldp-vpls-topo1/r3/show_ip_ospf_neighbor.json
tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.pdf

index 532da39fb73c906a1dd50489f5217883068b77f2..a38e4b862a8842abd06134182cf0bf310cadee02 100644 (file)
@@ -4,17 +4,16 @@ debug ospf6 neighbor
 !
 interface r1-lo
 !
-interface r1-eth0
-!
 interface r1-eth1
+ ipv6 ospf6 priority 10
 !
 interface r1-eth2
+ ipv6 ospf6 priority 10
 !
 router ospf6
  ospf6 router-id 192.168.0.1
  log-adjacency-changes
  interface r1-lo area 0.0.0.0
- interface r1-eth0 area 0.0.0.0
  interface r1-eth1 area 0.0.0.0
  interface r1-eth2 area 0.0.0.0
 !
index ecb97d8d7412ac1b92d59d291bcffcaed7097ca7..e742c119dadd23d42038874e5a204cf557ae6300 100644 (file)
@@ -2,14 +2,14 @@
   "neighbors":{
     "192.168.0.2":[
       {
-        "priority":1,
-        "state":"Full\/DR"
+        "priority":5,
+        "state":"Full\/Backup"
       }
     ],
     "192.168.0.3":[
       {
-        "priority":1,
-        "state":"Full\/DR"
+        "priority":5,
+        "state":"Full\/Backup"
       }
     ]
   }
index 8f1711db7b762e61b2b8502de58fcbb2d13ed02f..68a1bb5c75673c8463d5de0f1dd85ef96154f00f 100644 (file)
@@ -3,6 +3,16 @@ log file ospfd.log
 debug ospf event
 debug ospf zebra
 !
+interface r1-eth1
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 10
+!
+interface r1-eth2
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 10
+!
 router ospf
  ospf router-id 192.168.0.1
  log-adjacency-changes
@@ -13,11 +23,4 @@ router ospf
  refresh timer 10
 !
 line vty
-interface r1-eth1
- ip ospf hello-interval 2
- ip ospf dead-interval 10
-!
-interface r1-eth2
- ip ospf hello-interval 2
- ip ospf dead-interval 10
 !
index 283d20548913cade7dfcbf210b093a8db68a17e5..47bd5a99cc266c05751d4ec8d3810527ed764acf 100644 (file)
@@ -4,17 +4,16 @@ debug ospf6 neighbor
 !
 interface r2-lo
 !
-interface r2-eth0
-!
 interface r2-eth1
+ ipv6 ospf6 priority 5
 !
 interface r2-eth2
+ ipv6 ospf6 priority 10
 !
 router ospf6
  ospf6 router-id 192.168.0.2
  log-adjacency-changes
  interface r2-lo area 0.0.0.0
- interface r2-eth0 area 0.0.0.0
  interface r2-eth1 area 0.0.0.0
  interface r2-eth2 area 0.0.0.0
 !
index 5fcbd82ee1707fcba571036f26269524b43957cb..2fd589ae25d63d2f6de2dc60554e05cfa51530ea 100644 (file)
@@ -2,14 +2,14 @@
   "neighbors":{
     "192.168.0.1":[
       {
-        "priority":1,
-        "state":"Full\/Backup"
+        "priority":10,
+        "state":"Full\/DR"
       }
     ],
     "192.168.0.3":[
       {
-        "priority":1,
-        "state":"Full\/DR"
+        "priority":5,
+        "state":"Full\/Backup"
       }
     ]
   }
index 2174fddb11567c10037ac614c28bbf95ad9d7f0a..6f608e454bdb9546ef8cf1698ee9a425133b1668 100644 (file)
@@ -3,6 +3,16 @@ log file ospfd.log
 debug ospf event
 debug ospf zebra
 !
+int r2-eth1
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 5
+!
+int r2-eth2
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 10
+!
 router ospf
  ospf router-id 192.168.0.2
  log-adjacency-changes
@@ -12,12 +22,5 @@ router ospf
  timers throttle lsa all 0
  refresh timer 10
 !
-int r2-eth1
- ip ospf hello-interval 2
- ip ospf dead-interval 10
-int r2-eth2
- ip ospf hello-interval 2
- ip ospf dead-interval 10
-!
 line vty
 !
index 7a6623f9794ed4a7be22f77b02da8a51cbd7e3c1..eb74901ba1fdd434b60caff2cf9bd776db7b4ee3 100644 (file)
@@ -4,17 +4,16 @@ debug ospf6 neighbor
 !
 interface r3-lo
 !
-interface r3-eth0
-!
 interface r3-eth1
+ ipv6 ospf6 priority 5
 !
 interface r3-eth2
+ ipv6 ospf6 priority 5
 !
 router ospf6
  ospf6 router-id 192.168.0.3
  log-adjacency-changes
  interface r3-lo area 0.0.0.0
- interface r3-eth0 area 0.0.0.0
  interface r3-eth1 area 0.0.0.0
  interface r3-eth2 area 0.0.0.0
 !
index e90a70a8f6fa6e83a780c955832f9fedca2fdc49..80fc92c3bcd3f526a2f1c530e902098b6bfcf753 100644 (file)
@@ -2,14 +2,14 @@
   "neighbors":{
     "192.168.0.1":[
       {
-        "priority":1,
-        "state":"Full\/Backup"
+        "priority":10,
+        "state":"Full\/DR"
       }
     ],
     "192.168.0.2":[
       {
-        "priority":1,
-        "state":"Full\/Backup"
+        "priority":10,
+        "state":"Full\/DR"
       }
     ]
   }
index 795344fbe66d064967633e4beb1cbfdf15961a23..71e4f1e1dfc260ccc2ce82da400ef85aa8c750be 100644 (file)
@@ -3,6 +3,16 @@ log file ospfd.log
 debug ospf event
 debug ospf zebra
 !
+int r3-eth1
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 5
+!
+int r3-eth2
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 5
+!
 router ospf
  ospf router-id 192.168.0.3
  log-adjacency-changes
@@ -12,12 +22,5 @@ router ospf
  timers throttle lsa all 0
  refresh timer 10
 !
-int r3-eth1
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-int r3-eth2
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-!
 line vty
 !
index 87d5703d9e38c5e3a76ce804200094244cfa1fb7..877e14ff36d57291ec298499bab08f0f90a6b3e7 100644 (file)
@@ -8,4 +8,5 @@ router ospf
 int r1-eth0
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 1
 !
index 2c493173f51d1fa713acd9a1cdaa31e761808746..aa3f74fc5f12e96cee05f51aa12d192127c6bb6c 100644 (file)
@@ -2,7 +2,7 @@
   "neighbors":{
     "2.2.2.2":[
       {
-        "priority":1,
+        "priority":2,
         "state":"Full\/DR",
         "address":"10.0.1.2",
         "ifaceName":"r1-eth0:10.0.1.1"
index 51317202bb7bdcdc6050e48c2bfcd70a469db72d..8cba1529e8bee613585539b2d67e23484ffd767f 100644 (file)
@@ -8,8 +8,10 @@ router ospf
 int r2-eth0
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 2
 !
 int r2-eth1
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 1
 !
index 55f12359e51143adc3ed09e6966af2b7faf237f6..aa68198957b610ec89acfcd1ec9df63c5b3d692a 100644 (file)
@@ -5,15 +5,12 @@
         "priority":1,
         "state":"Full\/Backup",
         "address":"10.0.1.1",
-        "ifaceName":"r2-eth0:10.0.1.2",
-        "retransmitCounter":0,
-        "requestCounter":0,
-        "dbSummaryCounter":0
+        "ifaceName":"r2-eth0:10.0.1.2"
       }
     ],
     "3.3.3.3":[
       {
-        "priority":1,
+        "priority":2,
         "state":"Full\/Backup",
         "address":"10.0.2.3",
         "ifaceName":"r2-eth1:10.0.2.2"
@@ -21,7 +18,7 @@
     ],
     "4.4.4.4":[
       {
-        "priority":1,
+        "priority":3,
         "state":"Full\/DR",
         "address":"10.0.2.4",
         "ifaceName":"r2-eth1:10.0.2.2"
index 4566976b7b315826abcd5dab722bc0184966057a..0d3a74c4ac260af94914ad8ca5a8171091832bf8 100644 (file)
@@ -9,4 +9,5 @@ router ospf
 int r3-eth0
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 2
 !
index 24502ed81334bad729af77186268915c59b89e09..905774fc466ad5ae6637077561a54a379f99a422 100644 (file)
@@ -10,7 +10,7 @@
     ],
     "4.4.4.4":[
       {
-        "priority":1,
+        "priority":3,
         "state":"Full\/DR",
         "address":"10.0.2.4",
         "ifaceName":"r3-eth0:10.0.2.3"
index 5aae885a1248fd88578755d46535bdf5c4e64de5..7bbd228d024b61d62c2e79b7bc18f11086c2eb48 100644 (file)
@@ -8,4 +8,5 @@ router ospf
 int r4-eth0
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 3
 !
index 794410522dfb9cd55d1a63c14df3aa03702ff5b5..67593952cae13d737e0c3944f4b185029501f223 100644 (file)
@@ -11,7 +11,7 @@
     ],
     "3.3.3.3":[
       {
-        "priority":1,
+        "priority":2,
         "state":"Full\/Backup",
         "address":"10.0.2.3",
         "ifaceName":"r4-eth0:10.0.2.4"
index 87d5703d9e38c5e3a76ce804200094244cfa1fb7..877e14ff36d57291ec298499bab08f0f90a6b3e7 100644 (file)
@@ -8,4 +8,5 @@ router ospf
 int r1-eth0
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 1
 !
index 2c493173f51d1fa713acd9a1cdaa31e761808746..aa3f74fc5f12e96cee05f51aa12d192127c6bb6c 100644 (file)
@@ -2,7 +2,7 @@
   "neighbors":{
     "2.2.2.2":[
       {
-        "priority":1,
+        "priority":2,
         "state":"Full\/DR",
         "address":"10.0.1.2",
         "ifaceName":"r1-eth0:10.0.1.1"
index 51317202bb7bdcdc6050e48c2bfcd70a469db72d..8cba1529e8bee613585539b2d67e23484ffd767f 100644 (file)
@@ -8,8 +8,10 @@ router ospf
 int r2-eth0
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 2
 !
 int r2-eth1
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 1
 !
index 55f12359e51143adc3ed09e6966af2b7faf237f6..aa68198957b610ec89acfcd1ec9df63c5b3d692a 100644 (file)
@@ -5,15 +5,12 @@
         "priority":1,
         "state":"Full\/Backup",
         "address":"10.0.1.1",
-        "ifaceName":"r2-eth0:10.0.1.2",
-        "retransmitCounter":0,
-        "requestCounter":0,
-        "dbSummaryCounter":0
+        "ifaceName":"r2-eth0:10.0.1.2"
       }
     ],
     "3.3.3.3":[
       {
-        "priority":1,
+        "priority":2,
         "state":"Full\/Backup",
         "address":"10.0.2.3",
         "ifaceName":"r2-eth1:10.0.2.2"
@@ -21,7 +18,7 @@
     ],
     "4.4.4.4":[
       {
-        "priority":1,
+        "priority":3,
         "state":"Full\/DR",
         "address":"10.0.2.4",
         "ifaceName":"r2-eth1:10.0.2.2"
index 4566976b7b315826abcd5dab722bc0184966057a..0d3a74c4ac260af94914ad8ca5a8171091832bf8 100644 (file)
@@ -9,4 +9,5 @@ router ospf
 int r3-eth0
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 2
 !
index 24502ed81334bad729af77186268915c59b89e09..905774fc466ad5ae6637077561a54a379f99a422 100644 (file)
@@ -10,7 +10,7 @@
     ],
     "4.4.4.4":[
       {
-        "priority":1,
+        "priority":3,
         "state":"Full\/DR",
         "address":"10.0.2.4",
         "ifaceName":"r3-eth0:10.0.2.3"
index 5aae885a1248fd88578755d46535bdf5c4e64de5..7bbd228d024b61d62c2e79b7bc18f11086c2eb48 100644 (file)
@@ -8,4 +8,5 @@ router ospf
 int r4-eth0
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 3
 !
index 794410522dfb9cd55d1a63c14df3aa03702ff5b5..67593952cae13d737e0c3944f4b185029501f223 100644 (file)
@@ -11,7 +11,7 @@
     ],
     "3.3.3.3":[
       {
-        "priority":1,
+        "priority":2,
         "state":"Full\/Backup",
         "address":"10.0.2.3",
         "ifaceName":"r4-eth0:10.0.2.4"
index 76ea32fb61285a15711d38862df634fb22c4f2bb..a66fb92ba3753b4b83c1ccd255ee9117644254ff 100644 (file)
@@ -8,8 +8,10 @@ router ospf
 int r1-eth1
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 1
 !
 int r1-eth2
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 1
 !
index 6e6c3c8cb805422686f38faded1e903717bab0e5..7e281abb5fd43128ea29e8879a7a84010669479f 100644 (file)
@@ -4,8 +4,8 @@
       {
         "dbSummaryCounter": 0,
         "retransmitCounter": 0,
-        "priority": 1,
-        "state": "Full/DR",
+        "priority": 2,
+        "state": "Full\/DR",
         "address": "10.0.1.2",
         "ifaceName": "r1-eth1:10.0.1.1",
         "requestCounter": 0
@@ -15,8 +15,8 @@
       {
         "dbSummaryCounter": 0,
         "retransmitCounter": 0,
-        "priority": 1,
-        "state": "Full/DR",
+        "priority": 2,
+        "state": "Full\/DR",
         "address": "10.0.2.3",
         "ifaceName": "r1-eth2:10.0.2.1",
         "requestCounter": 0
index 7b3ddfe371bef394542696cdd2c8f41908eabd47..b4692feec857841f7a8f07c2972b84336fe21b75 100644 (file)
@@ -8,8 +8,10 @@ router ospf
 int r2-eth1
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 2
 !
 int r2-eth2
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 1
 !
index b5b10cc5350f4214432c115793a4045adf7d6fd4..22fd98f519c38d703ffe05f91de859a8eec88aaf 100644 (file)
@@ -3,7 +3,7 @@
     "1.1.1.1": [
       {
         "priority":1,
-        "state":"Full/Backup",
+        "state":"Full\/Backup",
         "address":"10.0.1.1",
         "ifaceName":"r2-eth1:10.0.1.2",
         "retransmitCounter":0,
@@ -13,8 +13,8 @@
     ],
     "3.3.3.3": [
       {
-        "priority":1,
-        "state":"Full/DR",
+        "priority":2,
+        "state":"Full\/DR",
         "address":"10.0.3.3",
         "ifaceName":"r2-eth2:10.0.3.2",
         "retransmitCounter":0,
index b424f2e1086af5ceca734df56b0340d1d90aa601..2413bfa9d5be912ba02c5d7265ebbb68d5b54908 100644 (file)
@@ -8,8 +8,10 @@ router ospf
 int r3-eth1
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 2
 !
 int r3-eth2
  ip ospf hello-interval 2
  ip ospf dead-interval 10
+ ip ospf priority 2
 !
index bc7bb1e8944431fe0e7183911a62a6840931cf6c..970eb2fc1d72f7a640bcef535e595564ce711d19 100644 (file)
@@ -3,7 +3,7 @@
     "1.1.1.1": [
       {
         "priority":1,
-        "state":"Full/Backup",
+        "state":"Full\/Backup",
         "address":"10.0.2.1",
         "ifaceName":"r3-eth1:10.0.2.3",
         "retransmitCounter":0,
@@ -14,7 +14,7 @@
     "2.2.2.2": [
       {
         "priority":1,
-        "state":"Full/Backup",
+        "state":"Full\/Backup",
         "address":"10.0.3.2",
         "ifaceName":"r3-eth2:10.0.3.3",
         "retransmitCounter":0,
index dd7c6f74d05f98c9437e8ef15d431ca57bdbd3a6..4d26732ea7c54efdb47023e8a056fb7d1a8cbf20 100644 (file)
Binary files a/tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.pdf and b/tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.pdf differ