]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Add tests to rip and ripngd to show func works
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 19 Mar 2020 02:29:00 +0000 (22:29 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 8 Apr 2020 14:18:31 +0000 (10:18 -0400)
Add some basic tests to show that network and passive-interface
commands work with interface names in rip and ripngd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
19 files changed:
tests/topotests/rip-topo1/r1/rip_status.ref
tests/topotests/rip-topo1/r1/ripd.conf
tests/topotests/rip-topo1/r1/show_ip_rip.ref
tests/topotests/rip-topo1/r1/zebra.conf
tests/topotests/rip-topo1/r2/rip_status.ref
tests/topotests/rip-topo1/r2/show_ip_rip.ref
tests/topotests/rip-topo1/r2/show_ip_route.ref
tests/topotests/rip-topo1/r3/show_ip_rip.ref
tests/topotests/rip-topo1/r3/show_ip_route.ref
tests/topotests/rip-topo1/test_rip_topo1.py
tests/topotests/ripng-topo1/r1/ripng_status.ref
tests/topotests/ripng-topo1/r1/ripngd.conf
tests/topotests/ripng-topo1/r1/show_ipv6_ripng.ref
tests/topotests/ripng-topo1/r1/zebra.conf
tests/topotests/ripng-topo1/r2/show_ipv6_ripng.ref
tests/topotests/ripng-topo1/r2/show_ipv6_route.ref
tests/topotests/ripng-topo1/r3/show_ipv6_ripng.ref
tests/topotests/ripng-topo1/r3/show_ipv6_route.ref
tests/topotests/ripng-topo1/test_ripng_topo1.py

index d75fbe85bbb3ae2a3b9445fe8e54632a71ce190c..31ad46ab2ecafbfe2bc062351af3f5f56be35a9b 100644 (file)
@@ -8,8 +8,14 @@ Routing Protocol is "rip"
   Default version control: send version 2, receive version 2 
     Interface        Send  Recv   Key-chain
     r1-eth1          2     2      
+    r1-eth2          2     2      
+    r1-eth3          2     2      
   Routing for Networks:
     193.1.1.0/26
+    r1-eth2
+    r1-eth3
+  Passive Interface(s):
+    r1-eth3
   Routing Information Sources:
     Gateway          BadPackets BadRoutes  Distance Last Update
     193.1.1.2                0         0       120   XX:XX:XX
index 935ec312e5826fa68397c964e6892c94eb2b27e9..54f1774214a477ecef2114c59055209db4e4a92e 100644 (file)
@@ -4,6 +4,9 @@ router rip
  timers basic 5 180 5
  version 2
  network 193.1.1.0/26
+ network r1-eth2
+ network r1-eth3
+ passive-interface r1-eth3
 !
 line vty
 !
index 561560f23067939c9853c7f4d97b5779cb354702..a0b77c886e3bde927472ef15d1f576facc6f6d6d 100644 (file)
@@ -6,5 +6,7 @@ Sub-codes:
      Network            Next Hop         Metric From            Tag Time
 R(n) 192.168.2.0/24     193.1.1.2             3 193.1.1.2         0 XX:XX
 R(n) 192.168.3.0/24     193.1.1.2             3 193.1.1.2         0 XX:XX
+C(i) 192.168.98.0/24    0.0.0.0               1 self              0
+C(i) 192.168.99.0/24    0.0.0.0               1 self              0
 C(i) 193.1.1.0/26       0.0.0.0               1 self              0
 R(n) 193.1.2.0/24       193.1.1.2             2 193.1.1.2         0 XX:XX
index 8537f6dd80edadc79aa35b5c5165b5035f94ad89..7c8f2c502b1e9e8b8301d78fe542b1b278b713e8 100644 (file)
@@ -5,6 +5,13 @@ hostname r1
 interface r1-eth0
  ip address 192.168.1.1/24
 !
+interface r1-eth2
+ ip address 192.168.99.1/24
+!
+interface r1-eth3
+ ip address 192.168.98.1/24
+!
+
 interface r1-eth1
  description to sw2 - RIPv2 interface
  ip address 193.1.1.1/26
index da1abd041ad5a9adf3e2d5034c8754b089a2efc4..99841a62b0ed921d7378a70fc425834d660a9af1 100644 (file)
@@ -14,5 +14,6 @@ Routing Protocol is "rip"
     193.1.2.0/24
   Routing Information Sources:
     Gateway          BadPackets BadRoutes  Distance Last Update
+    193.1.1.1                0         0       120   XX:XX:XX
     193.1.2.2                0         0       120   XX:XX:XX
   Distance: (default is 120)
index 58ab0521604641275e16bea351d5d58817e41fa3..b61fb45eac5b47e524fa34553d9a674174deefab 100644 (file)
@@ -6,5 +6,7 @@ Sub-codes:
      Network            Next Hop         Metric From            Tag Time
 R(n) 192.168.2.0/24     193.1.2.2             2 193.1.2.2         0 XX:XX
 R(n) 192.168.3.0/24     193.1.2.2             2 193.1.2.2         0 XX:XX
+R(n) 192.168.98.0/24    193.1.1.1             2 193.1.1.1         0 XX:XX
+R(n) 192.168.99.0/24    193.1.1.1             2 193.1.1.1         0 XX:XX
 C(i) 193.1.1.0/26       0.0.0.0               1 self              0
 C(i) 193.1.2.0/24       0.0.0.0               1 self              0
index 22afbee385aa560ffe62f97bce8fdd5ddb0a9353..80f51a92c70d437b43f520c594c012099da24639 100644 (file)
@@ -1,2 +1,4 @@
 R>* 192.168.2.0/24 [120/2] via 193.1.2.2, r2-eth1, weight 1
 R>* 192.168.3.0/24 [120/2] via 193.1.2.2, r2-eth1, weight 1
+R>* 192.168.98.0/24 [120/2] via 193.1.1.1, r2-eth0, weight 1
+R>* 192.168.99.0/24 [120/2] via 193.1.1.1, r2-eth0, weight 1
index cf672712a8ac54ba3cc07ba7c998bfd06be63279..1df299b5e650b24c92ce8e5f5c653bf3ef998f14 100644 (file)
@@ -6,5 +6,7 @@ Sub-codes:
      Network            Next Hop         Metric From            Tag Time
 S(r) 192.168.2.0/24     192.168.3.10          1 self              0
 C(r) 192.168.3.0/24     0.0.0.0               1 self              0
+R(n) 192.168.98.0/24    193.1.2.1             3 193.1.2.1         0 XX:XX
+R(n) 192.168.99.0/24    193.1.2.1             3 193.1.2.1         0 XX:XX
 R(n) 193.1.1.0/26       193.1.2.1             2 193.1.2.1         0 XX:XX
 C(i) 193.1.2.0/24       0.0.0.0               1 self              0
index 995b6d7da96241d7fce5942307d677c0b3f8c918..2b739f048966dcfc21c4df8a5a4b73306c910e5f 100644 (file)
@@ -1 +1,3 @@
+R>* 192.168.98.0/24 [120/3] via 193.1.2.1, r3-eth1, weight 1
+R>* 192.168.99.0/24 [120/3] via 193.1.2.1, r3-eth1, weight 1
 R>* 193.1.1.0/26 [120/2] via 193.1.2.1, r3-eth1, weight 1
index 132d38c2e5a2002c67784f95177c2e5f977cb3ff..3098812a24c4269d9abb5d9e408d246db537e4b3 100755 (executable)
@@ -91,6 +91,12 @@ class NetworkTopo(Topo):
         switch[4] = self.addSwitch("sw4", cls=topotest.LegacySwitch)
         self.addLink(switch[4], router[3], intfName2="r3-eth0")
 
+       switch[5] = self.addSwitch("sw5", cls=topotest.LegacySwitch)
+       self.addLink(switch[5], router[1], intfName2="r1-eth2")
+
+       switch[6] = self.addSwitch("sw6", cls=topotest.LegacySwitch)
+       self.addLink(switch[6], router[1], intfName2="r1-eth3")
+
 
 #####################################################
 ##
index e6197f179b238b52c1ccb6e90d0787f109e31127..b02cc69d0e214c87a68317dce75e4e1f3df8cab2 100644 (file)
@@ -8,8 +8,12 @@ Routing Protocol is "RIPng"
   Default version control: send version 1, receive version 1 
     Interface        Send  Recv
     r1-eth1          1     1  
+    r1-eth2          1     1  
+    r1-eth3          1     1  
   Routing for Networks:
     fc00:5::/64
+    r1-eth2
+    r1-eth3
   Routing Information Sources:
     Gateway          BadPackets BadRoutes  Distance Last Update
     fe80::XXXX:XXXX:XXXX:XXXX 
index dd54c43557fd44106aca30e808d9e79da89675a1..07ed7296d998e71269ce7f5d3051419994fc5d6c 100644 (file)
@@ -7,6 +7,9 @@ debug ripng zebra
 router ripng
  timers basic 5 180 5
  network fc00:5::/64
+ network r1-eth2
+ network r1-eth3
+ passive-interface r1-eth3
 !
 line vty
 !
index 18d026a8fd26703c4139f8dd9e521e768b6f4e5a..30d0f31e18f69e079b463d8ff6844ecbf6db868a 100644 (file)
@@ -12,3 +12,7 @@ R(n) fc00:7::/64
                   fe80::XXXX:XXXX:XXXX:XXXX   r1-eth1    3    0  XX:XX
 R(n) fc00:7:1111::/64
                   fe80::XXXX:XXXX:XXXX:XXXX   r1-eth1    3    0  XX:XX
+C(i) fc00:98:0:1::/64
+                  ::                          self       1    0
+C(i) fc00:99:0:1::/64
+                  ::                          self       1    0
index 1a103430445e54fea59298cd666448c3453fd3c3..11c1cdc5b908d70c8ac6df8983cfc96db6973180 100644 (file)
@@ -10,6 +10,12 @@ interface r1-eth1
  ipv6 address fc00:5::1/64
  no link-detect
 !
+interface r1-eth2
+ ipv6 address fc00:99:0:1::1/64
+!
+interface r1-eth3
+ ipv6 address fc00:98:0:1::1/64
+!
 ip forwarding
 ipv6 forwarding
 !
index 765efd07a2f4381fdde2e4f27bd3466ff24f2945..fe5bcc8b310f71ba8c4d606ae8a181ecb960e2b1 100644 (file)
@@ -12,3 +12,7 @@ R(n) fc00:7::/64
                   fe80::XXXX:XXXX:XXXX:XXXX   r2-eth1    2    0  XX:XX
 R(n) fc00:7:1111::/64
                   fe80::XXXX:XXXX:XXXX:XXXX   r2-eth1    2    0  XX:XX
+R(n) fc00:98:0:1::/64
+                  fe80::XXXX:XXXX:XXXX:XXXX   r2-eth0    2    0  XX:XX
+R(n) fc00:99:0:1::/64
+                  fe80::XXXX:XXXX:XXXX:XXXX   r2-eth0    2    0  XX:XX
index 8c98b7a67bd4dea6e86108d4eade1eb88b07a373..72e1f926a2ca70ccb266b6819b8e3b4e8fef46ca 100644 (file)
@@ -1,2 +1,4 @@
 R>* fc00:7::/64 [120/2] via fe80::XXXX:XXXX:XXXX:XXXX, r2-eth1, weight 1
 R>* fc00:7:1111::/64 [120/2] via fe80::XXXX:XXXX:XXXX:XXXX, r2-eth1, weight 1
+R>* fc00:98:0:1::/64 [120/2] via fe80::XXXX:XXXX:XXXX:XXXX, r2-eth0, weight 1
+R>* fc00:99:0:1::/64 [120/2] via fe80::XXXX:XXXX:XXXX:XXXX, r2-eth0, weight 1
index 81e76b97a66aa0b14cebdf7cc03641c988f04b20..909ad663baebea8da8e9c83751d3fa79b537ddeb 100644 (file)
@@ -12,3 +12,7 @@ C(r) fc00:7::/64
                   ::                          self       1    0
 S(r) fc00:7:1111::/64
                   ::                          self       1    0
+R(n) fc00:98:0:1::/64
+                  fe80::XXXX:XXXX:XXXX:XXXX   r3-eth1    3    0  XX:XX
+R(n) fc00:99:0:1::/64
+                  fe80::XXXX:XXXX:XXXX:XXXX   r3-eth1    3    0  XX:XX
index 2e9de88db5a5a452e629a01f6ec981e5be200d01..25a7440111c2175f400a662f845640cb75a54d25 100644 (file)
@@ -1 +1,3 @@
 R>* fc00:5::/64 [120/2] via fe80::XXXX:XXXX:XXXX:XXXX, r3-eth1, weight 1
+R>* fc00:98:0:1::/64 [120/3] via fe80::XXXX:XXXX:XXXX:XXXX, r3-eth1, weight 1
+R>* fc00:99:0:1::/64 [120/3] via fe80::XXXX:XXXX:XXXX:XXXX, r3-eth1, weight 1
index 51f7fb6fb1d2e075fb24cbfd6f1f63cba49dfe61..23e689235c50e5940dd44b83702cc1a82a9454c2 100755 (executable)
@@ -92,6 +92,11 @@ class NetworkTopo(Topo):
         switch[4] = self.addSwitch("sw4", cls=topotest.LegacySwitch)
         self.addLink(switch[4], router[3], intfName2="r3-eth0")
 
+        switch[5] = self.addSwitch("sw5", cls=topotest.LegacySwitch)
+        self.addLink(switch[5], router[1], intfName2="r1-eth2")
+        switch[6] = self.addSwitch("sw6", cls=topotest.LegacySwitch)
+        self.addLink(switch[6], router[1], intfName2="r1-eth3")
+
 
 #####################################################
 ##