-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1096 from chonty/ios-non-exact-route-lookup
Allow non-exact route lookup in IOS
- Loading branch information
Showing
11 changed files
with
106 additions
and
6 deletions.
There are no files selected for viewing
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
44 changes: 44 additions & 0 deletions
44
test/ios/mocked_data/test_get_route_to/non_exact/expected_result.json
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,44 @@ | ||
{ | ||
"1.0.4.0/24": [ | ||
{ | ||
"protocol": "bgp", | ||
"outgoing_interface": "", | ||
"age": 98, | ||
"current_active": true, | ||
"routing_table": "CustB", | ||
"last_active": true, | ||
"protocol_attributes": { | ||
"as_path": "Local", | ||
"remote_address": "169.254.255.1", | ||
"communities": [], | ||
"local_preference": 100, | ||
"local_as": 1, | ||
"remote_as": 1 | ||
}, | ||
"next_hop": "169.254.255.1", | ||
"selected_next_hop": true, | ||
"inactive_reason": "", | ||
"preference": 0 | ||
}, | ||
{ | ||
"protocol": "bgp", | ||
"outgoing_interface": "", | ||
"age": 62, | ||
"current_active": true, | ||
"routing_table": "default", | ||
"last_active": true, | ||
"protocol_attributes": { | ||
"as_path": "3 3 3 3", | ||
"remote_address": "200.200.200.1", | ||
"communities": [], | ||
"local_preference": 100, | ||
"local_as": 1, | ||
"remote_as": 3 | ||
}, | ||
"next_hop": "200.200.200.1", | ||
"selected_next_hop": true, | ||
"inactive_reason": "", | ||
"preference": 0 | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
test/ios/mocked_data/test_get_route_to/non_exact/show_ip_bgp_1_0_4_0_24.txt
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,9 @@ | ||
BGP routing table entry for 1.0.4.0/24, version 2 | ||
Paths: (1 available, best #1, table default) | ||
Advertised to update-groups: | ||
2 | ||
Refresh Epoch 1 | ||
3 3 3 3 | ||
200.200.200.1 from 200.200.200.1 (1.1.1.1) | ||
Origin IGP, metric 0, localpref 100, valid, external, best | ||
rx pathid: 0, tx pathid: 0x0 |
1 change: 1 addition & 0 deletions
1
...ked_data/test_get_route_to/non_exact/show_ip_bgp_neighbors___include_is_200_200_200_1.txt
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 @@ | ||
BGP neighbor is 200.200.200.1, remote AS 3, local AS 2 no-prepend replace-as, external link |
8 changes: 8 additions & 0 deletions
8
test/ios/mocked_data/test_get_route_to/non_exact/show_ip_bgp_vpnv4_vrf_CustB_1_0_4_0_24.txt
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,8 @@ | ||
BGP routing table entry for 3:3:1.0.4.0/24, version 3 | ||
Paths: (1 available, best #1, table CustB) | ||
Not advertised to any peer | ||
Refresh Epoch 1 | ||
Local | ||
169.254.255.1 (via vrf CustB) from 169.254.255.1 (1.1.1.1) | ||
Origin IGP, metric 0, localpref 100, valid, internal, best | ||
rx pathid: 0, tx pathid: 0x0 |
1 change: 1 addition & 0 deletions
1
...t_route_to/non_exact/show_ip_bgp_vpnv4_vrf_CustB_neighbors___include_is_169_254_255_1.txt
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 @@ | ||
BGP neighbor is 169.254.255.1, vrf CustB, remote AS 1, internal link |
1 change: 1 addition & 0 deletions
1
test/ios/mocked_data/test_get_route_to/non_exact/show_ip_protocols___include_bgp.txt
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 @@ | ||
Routing Protocol is "bgp 1" |
10 changes: 10 additions & 0 deletions
10
test/ios/mocked_data/test_get_route_to/non_exact/show_ip_route_1_0_4_0_255_255_255_0.txt
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,10 @@ | ||
Routing entry for 1.0.4.0/24 | ||
Known via "bgp 1", distance 20, metric 0 | ||
Tag 3, type external | ||
Last update from 200.200.200.1 00:01:02 ago | ||
Routing Descriptor Blocks: | ||
* 200.200.200.1, from 200.200.200.1, 00:01:02 ago | ||
Route metric is 0, traffic share count is 1 | ||
AS Hops 4 | ||
Route tag 3 | ||
MPLS label: none |
1 change: 1 addition & 0 deletions
1
...mocked_data/test_get_route_to/non_exact/show_ip_route_vrf_CustA_1_0_4_0_255_255_255_0.txt
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 @@ | ||
% Network not in table |
10 changes: 10 additions & 0 deletions
10
...mocked_data/test_get_route_to/non_exact/show_ip_route_vrf_CustB_1_0_4_0_255_255_255_0.txt
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,10 @@ | ||
|
||
Routing Table: CustB | ||
Routing entry for 1.0.4.0/24 | ||
Known via "bgp 1", distance 200, metric 0, type internal | ||
Last update from 169.254.255.1 00:01:38 ago | ||
Routing Descriptor Blocks: | ||
* 169.254.255.1, from 169.254.255.1, 00:01:38 ago | ||
Route metric is 0, traffic share count is 1 | ||
AS Hops 0 | ||
MPLS label: none |
3 changes: 3 additions & 0 deletions
3
test/ios/mocked_data/test_get_route_to/non_exact/show_vrf.txt
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,3 @@ | ||
Name Default RD Protocols Interfaces | ||
CustA 2:2 ipv4 Et0/1 | ||
CustB 3:3 ipv4 Et0/2 |