-Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP
-Sub-codes:
- (n) - normal, (s) - static, (d) - default, (r) - redistribute,
- (i) - interface
- 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) 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
+EIGRP Topology Table for AS(1)/ID(193.1.1.1)
+
+Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply
+ r - reply Status, s - sia Status
+
+P 193.1.1.0/26, 1 successors, FD is 28160, serno: 0
+ via Connected, r1-eth1
+P 193.1.2.0/24, 1 successors, FD is 30720, serno: 0
+ via 193.1.1.2 (30720/28160), r1-eth1
-R>* 192.168.2.0/24 [120/3] via 193.1.1.2, r1-eth1
-R>* 192.168.3.0/24 [120/3] via 193.1.1.2, r1-eth1
-R>* 193.1.2.0/24 [120/2] via 193.1.1.2, r1-eth1
+Codes: K - kernel route, C - connected, S - static, R - RIP,
+ O - OSPF, I - IS-IS, B - BGP, P - PIM, E - EIGRP, N - NHRP,
+ T - Table, v - VNC, V - VNC-Direct, A - Babel,
+ > - selected route, * - FIB route
+
+C>* 192.168.1.0/24 is directly connected, r1-eth0
+E 193.1.1.0/26 [0/0] is directly connected, r1-eth1
+C>* 193.1.1.0/26 is directly connected, r1-eth1
+E>* 193.1.2.0/24 [0/0] via 193.1.1.2, r1-eth1
-R>* 192.168.2.0/24 [120/2] via 193.1.2.2, r2-eth1
-R>* 192.168.3.0/24 [120/2] via 193.1.2.2, r2-eth1
+Codes: K - kernel route, C - connected, S - static, R - RIP,
+ O - OSPF, I - IS-IS, B - BGP, P - PIM, E - EIGRP, N - NHRP,
+ T - Table, v - VNC, V - VNC-Direct, A - Babel,
+ > - selected route, * - FIB route
+
+E 193.1.1.0/26 [0/0] is directly connected, r2-eth0
+C>* 193.1.1.0/26 is directly connected, r2-eth0
+E 193.1.2.0/24 [0/0] is directly connected, r2-eth1
+C>* 193.1.2.0/24 is directly connected, r2-eth1
-R>* 193.1.1.0/26 [120/2] via 193.1.2.1, r3-eth1
+Codes: K - kernel route, C - connected, S - static, R - RIP,
+ O - OSPF, I - IS-IS, B - BGP, P - PIM, E - EIGRP, N - NHRP,
+ T - Table, v - VNC, V - VNC-Direct, A - Babel,
+ > - selected route, * - FIB route
+
+S>* 192.168.2.0/24 [1/0] via 192.168.3.10, r3-eth0
+C>* 192.168.3.0/24 is directly connected, r3-eth0
+E>* 193.1.1.0/26 [0/0] via 193.1.2.1, r3-eth1
+E 193.1.2.0/24 [0/0] is directly connected, r3-eth1
+C>* 193.1.2.0/24 is directly connected, r3-eth1
net['r%s' % i].startRouter()
# For debugging after starting Quagga/FRR daemons, uncomment the next line
- CLI(net)
+ # CLI(net)
def teardown_module(module):
print("******************************************\n")
# Not really implemented yet - just sleep 60 secs for now
- sleep(60)
-
- # Make sure that all daemons are still running
- for i in range(1, 4):
- fatal_error = net['r%s' % i].checkRouterRunning()
- assert fatal_error == "", fatal_error
-
- # For debugging after starting FRR/Quagga daemons, uncomment the next line
- # CLI(net)
-
-
-def test_eigrp_status():
- global fatal_error
- global net
-
- # Skip if previous fatal error condition is raised
- if (fatal_error != ""):
- pytest.skip(fatal_error)
-
- thisDir = os.path.dirname(os.path.realpath(__file__))
-
- # Verify EIGRP Status
- print("\n\n** Verifing EIGRP status")
- print("******************************************\n")
- failures = 0
- for i in range(1, 4):
- refTableFile = '%s/r%s/eigrp_status.ref' % (thisDir, i)
- if os.path.isfile(refTableFile):
- # Read expected result from file
- expected = open(refTableFile).read().rstrip()
- # Fix newlines (make them all the same)
- expected = ('\n'.join(expected.splitlines()) + '\n').splitlines(1)
-
- # Actual output from router
- actual = net['r%s' % i].cmd('vtysh -c "show ip eigrp topo" 2> /dev/null').rstrip()
- # Drop time in next due
- actual = re.sub(r"in [0-9]+ seconds", "in XX seconds", actual)
- # Drop time in last update
- actual = re.sub(r" [0-2][0-9]:[0-5][0-9]:[0-5][0-9]", " XX:XX:XX", actual)
- # Fix newlines (make them all the same)
- actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1)
-
- # Generate Diff
- diff = ''.join(difflib.context_diff(actual, expected,
- fromfile="actual IP EIGRP status",
- tofile="expected IP EIGRP status"))
-
- # Empty string if it matches, otherwise diff contains unified diff
- if diff:
- sys.stderr.write('r%s failed IP EIGRP status check:\n%s\n' % (i, diff))
- failures += 1
- else:
- print("r%s ok" % i)
-
- assert failures == 0, "IP EIGRP status failed for router r%s:\n%s" % (i, diff)
+ sleep(5)
# Make sure that all daemons are still running
for i in range(1, 4):
expected = ('\n'.join(expected.splitlines()) + '\n').splitlines(1)
# Actual output from router
- actual = net['r%s' % i].cmd('vtysh -c "show ip eigrp" 2> /dev/null').rstrip()
+ actual = net['r%s' % i].cmd('vtysh -c "show ip eigrp topo" 2> /dev/null').rstrip()
# Drop Time
actual = re.sub(r"[0-9][0-9]:[0-5][0-9]", "XX:XX", actual)
# Fix newlines (make them all the same)
expected = ('\n'.join(expected.splitlines()) + '\n').splitlines(1)
# Actual output from router
- actual = net['r%s' % i].cmd('vtysh -c "show ip route" 2> /dev/null | grep "^R"').rstrip()
- # Drop timers on end of line (older Quagga Versions)
- actual = re.sub(r", [0-2][0-9]:[0-5][0-9]:[0-5][0-9]", "", actual)
+ actual = net['r%s' % i].cmd('vtysh -c "show ip route"').rstrip()
# Fix newlines (make them all the same)
actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1)