diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index b15db59b51..376f0b1655 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -551,6 +551,7 @@ ubiquiti_edgerouter_show_interfaces_ethernet_physical.textfsm, .*, ubiquiti_edge ubiquiti_edgerouter_show_dhcpv6_server_leases.textfsm, .*, ubiquiti_edgerouter, sh[[ow]] dhcpv6 server leases ubiquiti_edgerouter_show_ipv6_neighbors.textfsm, .*, ubiquiti_edgerouter, sh[[ow]] ipv6 neighbors ubiquiti_edgerouter_show_dhcp_leases.textfsm, .*, ubiquiti_edgerouter, sh[[ow]] dhcp leases +ubiquiti_edgerouter_show_ipv6_route.textfsm, .*, ubiquiti_edgerouter, show ipv6 route ubiquiti_edgerouter_show_version.textfsm, .*, ubiquiti_edgerouter, sh[[ow]] ve[[rsion]] ubiquiti_edgerouter_show_arp.textfsm, .*, ubiquiti_edgerouter, sh[[ow]] arp diff --git a/ntc_templates/templates/ubiquiti_edgerouter_show_ipv6_route.textfsm b/ntc_templates/templates/ubiquiti_edgerouter_show_ipv6_route.textfsm new file mode 100644 index 0000000000..df2083fb12 --- /dev/null +++ b/ntc_templates/templates/ubiquiti_edgerouter_show_ipv6_route.textfsm @@ -0,0 +1,16 @@ +Value Filldown CODE (\w{1,2}) +Value IP ([A-Za-z0-9:]+) +Value PREFIX_LENGTH (\d{1,3}) +Value DISTANCE (\d+) +Value METRIC (\d+) +Value NEXTHOP_IP ([A-F0-9:]+) +Value INTERFACE (\w+) +Value UPTIME (\d[\w:\.]+) + +Start + ^${CODE}\s+${IP}/${PREFIX_LENGTH}\s\[${DISTANCE}/${METRIC}\]\svia\s${NEXTHOP_IP},\s${INTERFACE},\s${UPTIME}\s* -> Record + ^${CODE}\s+${IP}/${PREFIX_LENGTH}\svia\s${NEXTHOP_IP},\s${INTERFACE},\s${UPTIME}\s* -> Record + ^\s* -> Clearall + ^. -> Error + +EOF diff --git a/tests/ubiquiti_edgerouter/show_ipv6_route/ubiquiti_edgerouter_show_ipv6_route.raw b/tests/ubiquiti_edgerouter/show_ipv6_route/ubiquiti_edgerouter_show_ipv6_route.raw new file mode 100644 index 0000000000..f2cf2596ce --- /dev/null +++ b/tests/ubiquiti_edgerouter/show_ipv6_route/ubiquiti_edgerouter_show_ipv6_route.raw @@ -0,0 +1,15 @@ +IPv6 Routing Table +Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, + IA - OSPF inter area, E1 - OSPF external type 1, + E2 - OSPF external type 2, N1 - OSPF NSSA external type 1, + N2 - OSPF NSSA external type 2, B - BGP +Timers: Uptime + +IP Route Table for VRF "default" +S ::/0 [50/0] via ::, pppoe4, 01w0d05h +C ::1/128 via ::, lo, 01w0d05h +C 2a05:b780:0:1d::/64 via ::, pppoe4, 01w0d05h +C 2a05:c100:1d::/64 via ::, eth1, 01:11:26 +C fe80::/10 via ::, pppoe4, 01w0d05h +C fe80::/64 via ::, eth1, 01:11:25 + diff --git a/tests/ubiquiti_edgerouter/show_ipv6_route/ubiquiti_edgerouter_show_ipv6_route.yml b/tests/ubiquiti_edgerouter/show_ipv6_route/ubiquiti_edgerouter_show_ipv6_route.yml new file mode 100644 index 0000000000..04e072285f --- /dev/null +++ b/tests/ubiquiti_edgerouter/show_ipv6_route/ubiquiti_edgerouter_show_ipv6_route.yml @@ -0,0 +1,50 @@ +--- +parsed_sample: + - code: "S" + ip: "::" + prefix_length: "0" + distance: "50" + metric: "0" + nexthop_ip: "::" + interface: "pppoe4" + uptime: "01w0d05h" + - code: "C" + ip: "::1" + prefix_length: "128" + distance: "" + metric: "" + nexthop_ip: "::" + interface: "lo" + uptime: "01w0d05h" + - code: "C" + ip: "2a05:b780:0:1d::" + prefix_length: "64" + distance: "" + metric: "" + nexthop_ip: "::" + interface: "pppoe4" + uptime: "01w0d05h" + - code: "C" + ip: "2a05:c100:1d::" + prefix_length: "64" + distance: "" + metric: "" + nexthop_ip: "::" + interface: "eth1" + uptime: "01:11:26" + - code: "C" + ip: "fe80::" + prefix_length: "10" + distance: "" + metric: "" + nexthop_ip: "::" + interface: "pppoe4" + uptime: "01w0d05h" + - code: "C" + ip: "fe80::" + prefix_length: "64" + distance: "" + metric: "" + nexthop_ip: "::" + interface: "eth1" + uptime: "01:11:25"