diff options
82 files changed, 2993 insertions, 2139 deletions
@@ -39,7 +39,6 @@ interface_definitions: $(config_xml_obj) rm -f $(TMPL_DIR)/firewall/node.def rm -f $(TMPL_DIR)/interfaces/node.def rm -f $(TMPL_DIR)/protocols/node.def - rm -rf $(TMPL_DIR)/protocols/nbgp rm -f $(TMPL_DIR)/protocols/static/node.def rm -f $(TMPL_DIR)/policy/node.def rm -f $(TMPL_DIR)/system/node.def diff --git a/data/templates/firewall/nftables-nat.tmpl b/data/templates/firewall/nftables-nat.tmpl index 8769c2384..770a24a95 100644 --- a/data/templates/firewall/nftables-nat.tmpl +++ b/data/templates/firewall/nftables-nat.tmpl @@ -1,87 +1,87 @@ #!/usr/sbin/nft -f {% macro nat_rule(rule, config, chain) %} -{% set comment = "" %} -{% set base_log = "" %} -{% set src_addr = "ip saddr " + config.source.address if config.source is defined and config.source.address is defined and config.source.address is not none %} -{% set dst_addr = "ip daddr " + config.destination.address if config.destination is defined and config.destination.address is defined and config.destination.address is not none %} +{% set comment = '' %} +{% set base_log = '' %} +{% set src_addr = 'ip saddr ' + config.source.address.replace('!','!= ') if config.source is defined and config.source.address is defined and config.source.address is not none %} +{% set dst_addr = 'ip daddr ' + config.destination.address.replace('!','!= ') if config.destination is defined and config.destination.address is defined and config.destination.address is not none %} {# negated port groups need special treatment, move != in front of { } group #} {% if config.source is defined and config.source.port is defined and config.source.port is not none and config.source.port.startswith('!=') %} -{% set src_port = "sport != { " + config.source.port.replace('!=','') +" }" %} +{% set src_port = 'sport != { ' + config.source.port.replace('!=','') + ' }' %} {% else %} -{% set src_port = "sport { " + config.source.port +" }" if config.source is defined and config.source.port is defined and config.source.port is not none %} +{% set src_port = 'sport { ' + config.source.port + ' }' if config.source is defined and config.source.port is defined and config.source.port is not none %} {% endif %} {# negated port groups need special treatment, move != in front of { } group #} {% if config.destination is defined and config.destination.port is defined and config.destination.port is not none and config.destination.port.startswith('!=') %} -{% set dst_port = "dport != { " + config.destination.port.replace('!=','') +" }" %} +{% set dst_port = 'dport != { ' + config.destination.port.replace('!=','') + ' }' %} {% else %} -{% set dst_port = "dport { " + config.destination.port +" }" if config.destination is defined and config.destination.port is defined and config.destination.port is not none %} -{% endif %} -{% if chain == "PREROUTING" %} -{% set comment = "DST-NAT-" + rule %} -{% set base_log = "[NAT-DST-" + rule %} -{% set interface = " iifname \"" + config.inbound_interface + "\"" if config.inbound_interface is defined and config.inbound_interface != 'any' else '' %} -{% set trns_addr = "dnat to " + config.translation.address if config.translation is defined and config.translation.address is defined and config.translation.address is not none %} -{% elif chain == "POSTROUTING" %} -{% set comment = "SRC-NAT-" + rule %} -{% set base_log = "[NAT-SRC-" + rule %} -{% set interface = " oifname \"" + config.outbound_interface + "\"" if config.outbound_interface is defined and config.outbound_interface != 'any' else '' %} +{% set dst_port = 'dport { ' + config.destination.port + ' }' if config.destination is defined and config.destination.port is defined and config.destination.port is not none %} +{% endif %} +{% if chain == 'PREROUTING' %} +{% set comment = 'DST-NAT-' + rule %} +{% set base_log = '[NAT-DST-' + rule %} +{% set interface = ' iifname "' + config.inbound_interface + '"' if config.inbound_interface is defined and config.inbound_interface != 'any' else '' %} +{% set trns_addr = 'dnat to ' + config.translation.address if config.translation is defined and config.translation.address is defined and config.translation.address is not none %} +{% elif chain == 'POSTROUTING' %} +{% set comment = 'SRC-NAT-' + rule %} +{% set base_log = '[NAT-SRC-' + rule %} +{% set interface = ' oifname "' + config.outbound_interface + '"' if config.outbound_interface is defined and config.outbound_interface != 'any' else '' %} {% if config.translation is defined and config.translation.address is defined and config.translation.address == 'masquerade' %} {% set trns_addr = config.translation.address %} {% if config.translation.port is defined and config.translation.port is not none %} -{% set trns_addr = trns_addr + " to " %} +{% set trns_addr = trns_addr + ' to ' %} {% endif %} {% else %} -{% set trns_addr = "snat to " + config.translation.address if config.translation is defined and config.translation.address is defined and config.translation.address is not none %} +{% set trns_addr = 'snat to ' + config.translation.address if config.translation is defined and config.translation.address is defined and config.translation.address is not none %} {% endif %} {% endif %} -{% set trns_port = ":" + config.translation.port if config.translation is defined and config.translation.port is defined and config.translation.port is not none %} +{% set trns_port = ':' + config.translation.port if config.translation is defined and config.translation.port is defined and config.translation.port is not none %} {# protocol has a default value thus it is always present #} -{% if config.protocol == "tcp_udp" %} -{% set protocol = "tcp" %} -{% set comment = comment + " tcp_udp" %} +{% if config.protocol == 'tcp_udp' %} +{% set protocol = 'tcp' %} +{% set comment = comment + ' tcp_udp' %} {% else %} {% set protocol = config.protocol %} {% endif %} {% if config.log is defined %} {% if config.exclude is defined %} -{% set log = base_log + "-EXCL]" %} +{% set log = base_log + '-EXCL]' %} {% elif config.translation is defined and config.translation.address is defined and config.translation.address == 'masquerade' %} -{% set log = base_log + "-MASQ]" %} +{% set log = base_log +'-MASQ]' %} {% else %} -{% set log = base_log + "]" %} +{% set log = base_log + ']' %} {% endif %} {% endif %} {% if config.exclude is defined %} -{# rule has been marked as "exclude" thus we simply return here #} -{% set trns_addr = "return" %} -{% set trns_port = "" %} +{# rule has been marked as 'exclude' thus we simply return here #} +{% set trns_addr = 'return' %} +{% set trns_port = '' %} {% endif %} -{% set output = "add rule ip nat " + chain + interface %} -{% if protocol != "all" %} -{% set output = output + " ip protocol " + protocol %} +{% set output = 'add rule ip nat ' + chain + interface %} +{% if protocol != 'all' %} +{% set output = output + ' ip protocol ' + protocol %} {% endif %} {% if src_addr %} -{% set output = output + " " + src_addr %} +{% set output = output + ' ' + src_addr %} {% endif %} {% if src_port %} -{% set output = output + " " + protocol + " " + src_port %} +{% set output = output + ' ' + protocol + ' ' + src_port %} {% endif %} {% if dst_addr %} -{% set output = output + " " + dst_addr %} +{% set output = output + ' ' + dst_addr %} {% endif %} {% if dst_port %} -{% set output = output + " " + protocol + " " + dst_port %} +{% set output = output + ' ' + protocol + ' ' + dst_port %} {% endif %} {# Count packets #} -{% set output = output + " counter" %} +{% set output = output + ' counter' %} {# Special handling of log option, we must repeat the entire rule before the #} {# NAT translation options are added, this is essential #} {% if log %} -{% set log_output = output + " log prefix \"" + log + "\" comment \"" + comment + "\"" %} +{% set log_output = output + ' log prefix "' + log + '" comment "' + comment + '"' %} {% endif %} {% if trns_addr %} -{% set output = output + " " + trns_addr %} +{% set output = output + ' ' + trns_addr %} {% endif %} {% if trns_port %} {# Do not add a whitespace here, translation port must be directly added after IP address #} @@ -89,15 +89,15 @@ {% set output = output + trns_port %} {% endif %} {% if comment %} -{% set output = output + " comment \"" + comment + "\"" %} +{% set output = output + ' comment "' + comment + '"' %} {% endif %} {{ log_output if log_output }} {{ output }} {# Special handling if protocol is tcp_udp, we must repeat the entire rule with udp as protocol #} -{% if config.protocol == "tcp_udp" %} +{% if config.protocol == 'tcp_udp' %} {# Beware of trailing whitespace, without it the comment tcp_udp will be changed to udp_udp #} -{{ log_output | replace("tcp ", "udp ") if log_output }} -{{ output | replace("tcp ", "udp ") }} +{{ log_output | replace('tcp ', 'udp ') if log_output }} +{{ output | replace('tcp ', 'udp ') }} {% endif %} {% endmacro %} @@ -105,7 +105,7 @@ flush table nat {% if helper_functions == 'remove' %} {# NAT if going to be disabled - remove rules and targets from nftables #} -{% set base_command = "delete rule ip raw" %} +{% set base_command = 'delete rule ip raw' %} {{ base_command }} PREROUTING handle {{ pre_ct_ignore }} {{ base_command }} OUTPUT handle {{ out_ct_ignore }} {{ base_command }} PREROUTING handle {{ pre_ct_conntrack }} @@ -117,7 +117,7 @@ delete chain ip raw NAT_CONNTRACK {# NAT if enabled - add targets to nftables #} add chain ip raw NAT_CONNTRACK add rule ip raw NAT_CONNTRACK counter accept -{% set base_command = "add rule ip raw" %} +{% set base_command = 'add rule ip raw' %} {{ base_command }} PREROUTING position {{ pre_ct_ignore }} counter jump VYATTA_CT_HELPER {{ base_command }} OUTPUT position {{ out_ct_ignore }} counter jump VYATTA_CT_HELPER {{ base_command }} PREROUTING position {{ pre_ct_conntrack }} counter jump NAT_CONNTRACK diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl index 16355a1e5..74a9b8c30 100644 --- a/data/templates/frr/bgp.frr.tmpl +++ b/data/templates/frr/bgp.frr.tmpl @@ -24,7 +24,7 @@ neighbor {{ neighbor }} description {{ config.description }} {% endif %} {% if config.disable_capability_negotiation is defined %} - neighbor {{ neighbor }} disable-capability-negotiation + neighbor {{ neighbor }} dont-capability-negotiate {% endif %} {% if config.ebgp_multihop is defined and config.ebgp_multihop is not none %} neighbor {{ neighbor }} ebgp-multihop {{ config.ebgp_multihop }} @@ -133,7 +133,6 @@ {% endmacro %} ! router bgp {{ asn }} - no bgp default ipv4-unicast {% if address_family is defined and address_family is not none %} {% for af in address_family %} ! @@ -152,7 +151,11 @@ router bgp {{ asn }} {% if protocol == 'table' %} redistribute table {{ address_family[af].redistribute[protocol].table }} {% else %} - redistribute {{ protocol }}{% if address_family[af].redistribute[protocol].metric is defined %} metric {{ address_family[af].redistribute[protocol].metric }}{% endif %}{% if address_family[af].redistribute[protocol].route_map is defined %} route-map {{ address_family[af].redistribute[protocol].route_map }}{% endif %} +{% set redistribution_protocol = protocol %} +{% if protocol == 'ospfv3' %} +{% set redistribution_protocol = 'ospf6' %} +{% endif %} + redistribute {{ redistribution_protocol }}{% if address_family[af].redistribute[protocol].metric is defined %} metric {{ address_family[af].redistribute[protocol].metric }}{% endif %}{% if address_family[af].redistribute[protocol].route_map is defined %} route-map {{ address_family[af].redistribute[protocol].route_map }}{% endif %} {####### we need this blank line!! #######} {% endif %} @@ -237,7 +240,6 @@ router bgp {{ asn }} bgp default local-preference {{ parameters.default.local_pref }} {% endif %} {% if parameters.default.no_ipv4_unicast is defined %} -{# We use this is parameter as default in template (5-th string) #} no bgp default ipv4-unicast {% endif %} {% endif %} diff --git a/data/templates/frr/isis.frr.tmpl b/data/templates/frr/isis.frr.tmpl index 0477f2599..4460ab3b5 100644 --- a/data/templates/frr/isis.frr.tmpl +++ b/data/templates/frr/isis.frr.tmpl @@ -168,8 +168,8 @@ interface {{ iface }} {% if iface_config.psnp_interval is defined and iface_config.psnp_interval is not none %} isis psnp-interval {{ iface_config.psnp_interval }} {% endif %} -{% if iface_config.three_way_handshake is defined %} - isis three-way-handshake +{% if iface_config.no_three_way_handshake is defined %} + no isis three-way-handshake {% endif %} {% endfor %} {% endif %} diff --git a/data/templates/ntp/ntp.conf.tmpl b/data/templates/ntp/ntp.conf.tmpl index 3f319c89b..2b56b53c3 100644 --- a/data/templates/ntp/ntp.conf.tmpl +++ b/data/templates/ntp/ntp.conf.tmpl @@ -36,10 +36,4 @@ interface ignore wildcard {% for address in listen_address %} interface listen {{ address }} {% endfor %} -interface listen 127.0.0.1 -interface listen ::1 -{% else %} -interface ignore wildcard -interface listen 127.0.0.1 -interface listen ::1 {% endif %} diff --git a/data/templates/ntp/override.conf.tmpl b/data/templates/ntp/override.conf.tmpl index 466638e5a..e0b947686 100644 --- a/data/templates/ntp/override.conf.tmpl +++ b/data/templates/ntp/override.conf.tmpl @@ -1,4 +1,4 @@ -{% set vrf_command = '/sbin/ip vrf exec ' + vrf + ' ' if vrf is defined else '' %} +{% set vrf_command = 'ip vrf exec ' + vrf + ' ' if vrf is defined else '' %} [Unit] StartLimitIntervalSec=0 After=vyos-router.service @@ -6,6 +6,6 @@ After=vyos-router.service [Service] ExecStart= ExecStart={{vrf_command}}/usr/lib/ntp/ntp-systemd-wrapper -Restart=on-failure +Restart=always RestartSec=10 diff --git a/data/templates/openvpn/client.conf.tmpl b/data/templates/openvpn/client.conf.tmpl index 62387ef7c..e6e15b6ad 100644 --- a/data/templates/openvpn/client.conf.tmpl +++ b/data/templates/openvpn/client.conf.tmpl @@ -23,7 +23,7 @@ ifconfig-ipv6-push {{ ipv6_ip[0] }} {{ ipv6_remote }} push "route-ipv6 {{ route6 }}" {% endfor %} {% for net6 in ipv6_subnet %} -iroute {{ net6 }} +iroute-ipv6 {{ net6 }} {% endfor %} {% endif %} {% if disable is defined %} diff --git a/data/templates/salt-minion/minion.tmpl b/data/templates/salt-minion/minion.tmpl index 405fb9131..99749b57a 100644 --- a/data/templates/salt-minion/minion.tmpl +++ b/data/templates/salt-minion/minion.tmpl @@ -21,7 +21,9 @@ hash_type: {{ hash }} # location. Remote logging works best when configured to use rsyslogd(8) (e.g.: # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI # format is: <file|udp|tcp>://<host|socketpath>:<port-if-required>/<log-facility> -log_file: file:///dev/log +# log_file: file:///dev/log +# +log_file: /var/log/salt/minion # The level of messages to send to the console. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. diff --git a/data/templates/snmp/override.conf.tmpl b/data/templates/snmp/override.conf.tmpl index e6302a9e1..68f5fd931 100644 --- a/data/templates/snmp/override.conf.tmpl +++ b/data/templates/snmp/override.conf.tmpl @@ -1,4 +1,4 @@ -{% set vrf_command = '/sbin/ip vrf exec ' + vrf + ' ' if vrf is defined else '' %} +{% set vrf_command = 'ip vrf exec ' + vrf + ' ' if vrf is defined else '' %} [Unit] StartLimitIntervalSec=0 After=vyos-router.service @@ -8,6 +8,6 @@ Environment= Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" ExecStart= ExecStart={{vrf_command}}/usr/sbin/snmpd -LS0-5d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -ipCidrRouteTable,inetCidrRouteTable -f -p /run/snmpd.pid -Restart=on-failure +Restart=always RestartSec=10 diff --git a/data/templates/ssh/override.conf.tmpl b/data/templates/ssh/override.conf.tmpl index 843aa927b..0abde6248 100644 --- a/data/templates/ssh/override.conf.tmpl +++ b/data/templates/ssh/override.conf.tmpl @@ -1,4 +1,4 @@ -{% set vrf_command = '/sbin/ip vrf exec ' + vrf + ' ' if vrf is defined else '' %} +{% set vrf_command = 'ip vrf exec ' + vrf + ' ' if vrf is defined else '' %} [Unit] StartLimitIntervalSec=0 After=vyos-router.service @@ -7,5 +7,6 @@ ConditionPathExists={{config_file}} [Service] ExecStart= ExecStart={{vrf_command}}/usr/sbin/sshd -f {{config_file}} -D $SSHD_OPTS +Restart=always RestartSec=10 - +RuntimeDirectoryPreserve=yes diff --git a/data/templates/ssh/sshd_config.tmpl b/data/templates/ssh/sshd_config.tmpl index 7d7257cae..2f2b78a66 100644 --- a/data/templates/ssh/sshd_config.tmpl +++ b/data/templates/ssh/sshd_config.tmpl @@ -28,6 +28,7 @@ Subsystem sftp /usr/lib/openssh/sftp-server UsePAM yes PermitRootLogin no PidFile /run/sshd/sshd.pid +AddressFamily any # # User configurable section diff --git a/interface-definitions/include/accel-mtu-128-16384.xml.i b/interface-definitions/include/accel-mtu-128-16384.xml.i index 7ee483056..6bd089823 100644 --- a/interface-definitions/include/accel-mtu-128-16384.xml.i +++ b/interface-definitions/include/accel-mtu-128-16384.xml.i @@ -1,9 +1,11 @@ - <leafNode name="mtu"> - <properties> - <help>Maximum Transmission Unit (MTU) - default 1492</help> - <constraint> - <validator name="numeric" argument="--range 128-16384"/> - </constraint> - </properties> - <defaultValue>1492</defaultValue> - </leafNode> +<!-- included start from accel-mtu-128-16384.xml.i --> +<leafNode name="mtu"> + <properties> + <help>Maximum Transmission Unit (MTU) - default 1492</help> + <constraint> + <validator name="numeric" argument="--range 128-16384"/> + </constraint> + </properties> + <defaultValue>1492</defaultValue> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-capability-orf.xml.i b/interface-definitions/include/bgp-afi-capability-orf.xml.i new file mode 100644 index 000000000..9bd265f93 --- /dev/null +++ b/interface-definitions/include/bgp-afi-capability-orf.xml.i @@ -0,0 +1,28 @@ +<!-- included start from bgp-afi-capability-orf.xml.i --> +<node name="orf"> + <properties> + <help>Advertise ORF capability to this peer</help> + </properties> + <children> + <node name="prefix-list"> + <properties> + <help>Advertise prefix-list ORF capability to this peer</help> + </properties> + <children> + <leafNode name="receive"> + <properties> + <help>Capability to receive the ORF</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="send"> + <properties> + <help>Capability to send the ORF</help> + <valueless/> + </properties> + </leafNode> + </children> + </node> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-common.xml.i b/interface-definitions/include/bgp-afi-common.xml.i new file mode 100644 index 000000000..ea4eea591 --- /dev/null +++ b/interface-definitions/include/bgp-afi-common.xml.i @@ -0,0 +1,243 @@ +<!-- included start from bgp-afi-common.xml.i --> +<node name="allowas-in"> + <properties> + <help>Accept route that contains the local-as in the as-path</help> + </properties> + <children> + <leafNode name="number"> + <properties> + <help>Number of occurrences of AS number</help> + <valueHelp> + <format>u32:1-10</format> + <description>Number of times AS is allowed in path</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-10"/> + </constraint> + </properties> + </leafNode> + </children> +</node> +<leafNode name="as-override"> + <properties> + <help>AS for routes sent to this peer to be the local AS</help> + <valueless/> + </properties> +</leafNode> +<node name="attribute-unchanged"> + <properties> + <help>BGP attributes are sent unchanged</help> + </properties> + <children> + <leafNode name="as-path"> + <properties> + <help>Send AS path unchanged</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="med"> + <properties> + <help>Send multi-exit discriminator unchanged</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="next-hop"> + <properties> + <help>Send nexthop unchanged</help> + <valueless/> + </properties> + </leafNode> + </children> +</node> +<node name="disable-send-community"> + <properties> + <help>Disable sending community attributes to this peer</help> + </properties> + <children> + <leafNode name="extended"> + <properties> + <help>Disable sending extended community attributes to this peer</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="standard"> + <properties> + <help>Disable sending standard community attributes to this peer</help> + <valueless/> + </properties> + </leafNode> + </children> +</node> +<node name="default-originate"> + <properties> + <help>Originate default route to this peer</help> + </properties> + <children> + <leafNode name="route-map"> + <properties> + <help>route-map to specify criteria of the default route</help> + <completionHelp> + <path>policy route-map</path> + </completionHelp> + </properties> + </leafNode> + </children> +</node> +<node name="distribute-list"> + <properties> + <help>Access-list to filter route updates to/from this peer-group</help> + </properties> + <children> + <leafNode name="export"> + <properties> + <help>Access-list to filter outgoing route updates to this peer-group</help> + <completionHelp> + <path>policy access-list</path> + </completionHelp> + <valueHelp> + <format>u32:1-65535</format> + <description>Access-list to filter outgoing route updates to this peer-group</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-65535"/> + </constraint> + </properties> + </leafNode> + <leafNode name="import"> + <properties> + <help>Access-list to filter incoming route updates from this peer-group</help> + <completionHelp> + <path>policy access-list</path> + </completionHelp> + <valueHelp> + <format>u32:1-65535</format> + <description>Access-list to filter incoming route updates from this peer-group</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-65535"/> + </constraint> + </properties> + </leafNode> + </children> +</node> +<node name="filter-list"> + <properties> + <help>as-path-list to filter route updates to/from this peer</help> + </properties> + <children> + <leafNode name="export"> + <properties> + <help>As-path-list to filter outgoing route updates to this peer</help> + <completionHelp> + <path>policy as-path-list</path> + </completionHelp> + </properties> + </leafNode> + <leafNode name="import"> + <properties> + <help>As-path-list to filter incoming route updates from this peer</help> + <completionHelp> + <path>policy as-path-list</path> + </completionHelp> + </properties> + </leafNode> + </children> +</node> +<leafNode name="maximum-prefix"> + <properties> + <help>Maximum number of prefixes to accept from this peer</help> + <valueHelp> + <format>u32:1-4294967295</format> + <description>Prefix limit</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-4294967295"/> + </constraint> + </properties> +</leafNode> +<node name="nexthop-self"> + <properties> + <help>Disable the next hop calculation for this peer</help> + </properties> + <children> + <leafNode name="force"> + <properties> + <help>Set the next hop to self for reflected routes</help> + <valueless/> + </properties> + </leafNode> + </children> +</node> +<leafNode name="remove-private-as"> + <properties> + <help>Remove private AS numbers from AS path in outbound route updates</help> + <valueless/> + </properties> +</leafNode> +<node name="route-map"> + <properties> + <help>Route-map to filter route updates to/from this peer</help> + </properties> + <children> + <leafNode name="export"> + <properties> + <help>Route-map to filter outgoing route updates</help> + <completionHelp> + <path>policy route-map</path> + </completionHelp> + </properties> + </leafNode> + <leafNode name="import"> + <properties> + <help>Route-map to filter incoming route updates</help> + <completionHelp> + <path>policy route-map</path> + </completionHelp> + </properties> + </leafNode> + </children> +</node> +<leafNode name="route-reflector-client"> + <properties> + <help>Peer is a route reflector client</help> + <valueless/> + </properties> +</leafNode> +<leafNode name="route-server-client"> + <properties> + <help>Peer is a route server client</help> + <valueless/> + </properties> +</leafNode> +<node name="soft-reconfiguration"> + <properties> + <help>Soft reconfiguration for peer</help> + </properties> + <children> + <leafNode name="inbound"> + <properties> + <help>Enable inbound soft reconfiguration</help> + <valueless/> + </properties> + </leafNode> + </children> +</node> +<leafNode name="unsuppress-map"> + <properties> + <help>Route-map to selectively unsuppress suppressed routes</help> + <valueless/> + </properties> +</leafNode> +<leafNode name="weight"> + <properties> + <help>Default weight for routes from this peer</help> + <valueHelp> + <format>u32:1-65535</format> + <description>Default weight</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-65535"/> + </constraint> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-ipv4-prefix-list.xml.i b/interface-definitions/include/bgp-afi-ipv4-prefix-list.xml.i new file mode 100644 index 000000000..bbbada6bd --- /dev/null +++ b/interface-definitions/include/bgp-afi-ipv4-prefix-list.xml.i @@ -0,0 +1,25 @@ +<!-- included start from bgp-afi-ipv4-prefix-list.xml.i --> +<node name="prefix-list"> + <properties> + <help>IPv4-Prefix-list to filter route updates to/from this peer</help> + </properties> + <children> + <leafNode name="export"> + <properties> + <help>IPv4-Prefix-list to filter outgoing route updates to this peer</help> + <completionHelp> + <path>policy prefix-list</path> + </completionHelp> + </properties> + </leafNode> + <leafNode name="import"> + <properties> + <help>IPv4-Prefix-list to filter incoming route updates from this peer</help> + <completionHelp> + <path>policy prefix-list</path> + </completionHelp> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-ipv6-nexthop-local.xml.i b/interface-definitions/include/bgp-afi-ipv6-nexthop-local.xml.i new file mode 100644 index 000000000..4778b392f --- /dev/null +++ b/interface-definitions/include/bgp-afi-ipv6-nexthop-local.xml.i @@ -0,0 +1,15 @@ +<!-- included start from bgp-afi-ipv6-nexthop-local.xml.i --> + <node name="nexthop-local"> + <properties> + <help>Nexthop attributes</help> + </properties> + <children> + <leafNode name="unchanged"> + <properties> + <help>Leave link-local nexthop unchanged for this peer</help> + <valueless/> + </properties> + </leafNode> + </children> + </node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-ipv6-prefix-list.xml.i b/interface-definitions/include/bgp-afi-ipv6-prefix-list.xml.i new file mode 100644 index 000000000..8ae7837e9 --- /dev/null +++ b/interface-definitions/include/bgp-afi-ipv6-prefix-list.xml.i @@ -0,0 +1,25 @@ +<!-- included start from bgp-afi-ipv6-prefix-list.xml.i --> +<node name="prefix-list"> + <properties> + <help>Prefix-list to filter route updates to/from this peer</help> + </properties> + <children> + <leafNode name="export"> + <properties> + <help>Prefix-list to filter outgoing route updates to this peer</help> + <completionHelp> + <path>policy prefix-list6</path> + </completionHelp> + </properties> + </leafNode> + <leafNode name="import"> + <properties> + <help>Prefix-list to filter incoming route updates from this peer</help> + <completionHelp> + <path>policy prefix-list6</path> + </completionHelp> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-afi-peer-group.xml.i b/interface-definitions/include/bgp-afi-peer-group.xml.i new file mode 100644 index 000000000..c98a91030 --- /dev/null +++ b/interface-definitions/include/bgp-afi-peer-group.xml.i @@ -0,0 +1,7 @@ +<!-- included start from bgp-afi-peer-group.xml.i --> +<leafNode name="peer-group"> + <properties> + <help>Peer group used for this neighbor</help> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-bfd.xml.i b/interface-definitions/include/bgp-bfd.xml.i new file mode 100644 index 000000000..fe52b12f2 --- /dev/null +++ b/interface-definitions/include/bgp-bfd.xml.i @@ -0,0 +1,15 @@ +<!-- included start from bgp-bfd.xml.i --> +<node name="bfd"> + <properties> + <help>Enable Bidirectional Forwarding Detection (BFD) support</help> + </properties> + <children> + <leafNode name="check-control-plane-failure"> + <properties> + <help>Allow to write CBIT independence in BFD outgoing packets and read both C-BIT value of BFD and lookup BGP peer status</help> + <valueless/> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-capability-dynamic.xml.i b/interface-definitions/include/bgp-capability-dynamic.xml.i new file mode 100644 index 000000000..3cf300156 --- /dev/null +++ b/interface-definitions/include/bgp-capability-dynamic.xml.i @@ -0,0 +1,9 @@ +<!-- included start from bgp-capability-dynamic.xml.i --> +<!-- Capability dynamic in the afi ipv6 does nothing T3037 --> +<leafNode name="dynamic"> + <properties> + <help>Advertise dynamic capability to this neighbor</help> + <valueless/> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-capability.xml.i b/interface-definitions/include/bgp-capability.xml.i new file mode 100644 index 000000000..5940e46e4 --- /dev/null +++ b/interface-definitions/include/bgp-capability.xml.i @@ -0,0 +1,16 @@ +<!-- included start from bgp-capability.xml.i --> +<node name="capability"> + <properties> + <help>Advertise capabilities to this peer-group</help> + </properties> + <children> + #include <include/bgp-capability-dynamic.xml.i> + <leafNode name="extended-nexthop"> + <properties> + <help>Advertise extended-nexthop capability to this neighbor</help> + <valueless/> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-description.xml.i b/interface-definitions/include/bgp-description.xml.i new file mode 100644 index 000000000..e1766cb9f --- /dev/null +++ b/interface-definitions/include/bgp-description.xml.i @@ -0,0 +1,7 @@ +<!-- included start from bgp-description.xml.i --> +<leafNode name="description"> + <properties> + <help>Neighbor specific description</help> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-disable-capability-negotiation.xml.i b/interface-definitions/include/bgp-disable-capability-negotiation.xml.i new file mode 100644 index 000000000..a43c6e8b9 --- /dev/null +++ b/interface-definitions/include/bgp-disable-capability-negotiation.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp-disable-capability-negotiation.xml.i --> +<leafNode name="disable-capability-negotiation"> + <properties> + <help>Disable capability negotiation with this neighbor</help> + <valueless/> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-disable-connected-check.xml.i b/interface-definitions/include/bgp-disable-connected-check.xml.i new file mode 100644 index 000000000..bb9098bf6 --- /dev/null +++ b/interface-definitions/include/bgp-disable-connected-check.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp-disable-connected-check.xml.i --> +<leafNode name="disable-connected-check"> + <properties> + <help>Disable check to see if eBGP peer address is a connected route</help> + <valueless/> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-ebgp-multihop.xml.i b/interface-definitions/include/bgp-ebgp-multihop.xml.i new file mode 100644 index 000000000..6459fcf47 --- /dev/null +++ b/interface-definitions/include/bgp-ebgp-multihop.xml.i @@ -0,0 +1,14 @@ +<!-- included start from bgp-ebgp-multihop.xml.i --> +<leafNode name="ebgp-multihop"> + <properties> + <help>Allow this EBGP neighbor to not be on a directly connected network</help> + <valueHelp> + <format>u32:1-255</format> + <description>Number of hops</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-255"/> + </constraint> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-local-as.xml.i b/interface-definitions/include/bgp-local-as.xml.i new file mode 100644 index 000000000..cf55ce476 --- /dev/null +++ b/interface-definitions/include/bgp-local-as.xml.i @@ -0,0 +1,22 @@ +<!-- included start from bgp-local-as.xml.i --> +<tagNode name="local-as"> + <properties> + <help>Local AS number [REQUIRED]</help> + <valueHelp> + <format>u32:1-4294967294</format> + <description>Local AS number</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-4294967294"/> + </constraint> + </properties> + <children> + <leafNode name="no-prepend"> + <properties> + <help>Disable prepending local-as to updates from EBGP peers</help> + <valueless/> + </properties> + </leafNode> + </children> +</tagNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-neighbor-afi-ipv4-unicast.xml.i b/interface-definitions/include/bgp-neighbor-afi-ipv4-unicast.xml.i index c5a83f045..03a859271 100644 --- a/interface-definitions/include/bgp-neighbor-afi-ipv4-unicast.xml.i +++ b/interface-definitions/include/bgp-neighbor-afi-ipv4-unicast.xml.i @@ -4,283 +4,18 @@ <help>IPv4 BGP neighbor parameters</help> </properties> <children> - <node name="allowas-in"> - <properties> - <help>Accept a IPv4-route that contains the local-AS in the as-path</help> - </properties> - <children> - <leafNode name="number"> - <properties> - <help>Number of occurrences of AS number</help> - <valueHelp> - <format>u32:1-10</format> - <description>Number of times AS is allowed in path</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-10"/> - </constraint> - </properties> - </leafNode> - </children> - </node> - <leafNode name="as-override"> - <properties> - <help>AS for routes sent to this neighbor to be the local AS</help> - <valueless/> - </properties> - </leafNode> - <node name="attribute-unchanged"> - <properties> - <help>BGP attributes are sent unchanged (IPv4)</help> - </properties> - <children> - <leafNode name="as-path"> - <properties> - <help>Send AS path unchanged (IPv4)</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="med"> - <properties> - <help>Send multi-exit discriminator unchanged (IPv4)</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="next-hop"> - <properties> - <help>Send nexthop unchanged (IPv4)</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> <node name="capability"> <properties> <help>Advertise capabilities to this neighbor (IPv4)</help> </properties> <children> - <node name="orf"> - <properties> - <help>Advertise ORF capability to this neighbor</help> - </properties> - <children> - <node name="prefix-list"> - <properties> - <help>Advertise prefix-list ORF capability to this neighbor</help> - </properties> - <children> - <leafNode name="receive"> - <properties> - <help>Capability to receive the ORF</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="send"> - <properties> - <help>Capability to send the ORF</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - </children> - </node> - </children> - </node> - <node name="default-originate"> - <properties> - <help>Send default IPv4-route to this neighbor</help> - </properties> - <children> - <leafNode name="route-map"> - <properties> - <help>IPv4-Route-map to specify criteria of the default</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <node name="distribute-list"> - <properties> - <help>Access-list to filter IPv4-route updates to/from this neighbor</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Access-list to filter outgoing IPv4-route updates to this neighbor</help> - <completionHelp> - <path>policy access-list</path> - </completionHelp> - <valueHelp> - <format>u32:1-65535</format> - <description>Access-list to filter outgoing IPv4-route updates to this neighbor</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Access-list to filter incoming IPv4-route updates from this neighbor</help> - <completionHelp> - <path>policy access-list</path> - </completionHelp> - <valueHelp> - <format>u32:1-65535</format> - <description>Access-list to filter incoming IPv4-route updates from this neighbor</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> + #include <include/bgp-afi-capability-orf.xml.i> + #include <include/bgp-capability-dynamic.xml.i> </children> </node> - <node name="filter-list"> - <properties> - <help>As-path-list to filter IPv4-route updates to/from this neighbor</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>As-path-list to filter outgoing IPv4-route updates to this neighbor</help> - <completionHelp> - <path>policy as-path-list</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>As-path-list to filter incoming IPv4-route updates from this neighbor</help> - <completionHelp> - <path>policy as-path-list</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="maximum-prefix"> - <properties> - <help>Maximum number of IPv4-prefixes to accept from this neighbor</help> - <valueHelp> - <format>u32:1-4294967295</format> - <description>Prefix limit</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967295"/> - </constraint> - </properties> - </leafNode> - <node name="nexthop-self"> - <properties> - <help>Nexthop for IPv4-routes sent to this neighbor to be the local router</help> - </properties> - <children> - <leafNode name="force"> - <properties> - <help>Set the next hop to self for reflected routes</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="prefix-list"> - <properties> - <help>IPv4-Prefix-list to filter route updates to/from this neighbor</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>IPv4-Prefix-list to filter outgoing route updates to this neighbor</help> - <completionHelp> - <path>policy prefix-list</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>IPv4-Prefix-list to filter incoming route updates from this neighbor</help> - <completionHelp> - <path>policy prefix-list</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="remove-private-as"> - <properties> - <help>Remove private AS numbers from AS path in outbound IPv4-route updates</help> - <valueless/> - </properties> - </leafNode> - <node name="route-map"> - <properties> - <help>Route-map to filter IPv4-route updates to/from this neighbor</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>IPv4-Route-map to filter outgoing route updates to this neighbor</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>IPv4-Route-map to filter incoming route updates from this neighbor</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="route-reflector-client"> - <properties> - <help>Neighbor as a IPv4-route reflector client</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="route-server-client"> - <properties> - <help>Neighbor is IPv4-route server client</help> - <valueless/> - </properties> - </leafNode> - <node name="soft-reconfiguration"> - <properties> - <help>Soft reconfiguration for neighbor (IPv4)</help> - </properties> - <children> - <leafNode name="inbound"> - <properties> - <help>Inbound soft reconfiguration for this neighbor [REQUIRED]</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <leafNode name="unsuppress-map"> - <properties> - <help>Route-map to selectively unsuppress suppressed IPv4-routes</help> - </properties> - </leafNode> - <leafNode name="weight"> - <properties> - <help>Default weight for routes from this neighbor</help> - <valueHelp> - <format>u32:1-65535</format> - <description>Weight for routes from this neighbor</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> + #include <include/bgp-afi-peer-group.xml.i> + #include <include/bgp-afi-ipv4-prefix-list.xml.i> + #include <include/bgp-afi-common.xml.i> </children> </node> <!-- included end --> diff --git a/interface-definitions/include/bgp-neighbor-afi-ipv6-unicast.xml.i b/interface-definitions/include/bgp-neighbor-afi-ipv6-unicast.xml.i index 61cdc6a1c..e9ba23408 100644 --- a/interface-definitions/include/bgp-neighbor-afi-ipv6-unicast.xml.i +++ b/interface-definitions/include/bgp-neighbor-afi-ipv6-unicast.xml.i @@ -4,328 +4,19 @@ <help>IPv6 BGP neighbor parameters</help> </properties> <children> - <node name="allowas-in"> - <properties> - <help>Accept a IPv6-route that contains the local-AS in the as-path</help> - </properties> - <children> - <leafNode name="number"> - <properties> - <help>Number of occurrences of AS number</help> - <valueHelp> - <format>u32:1-10</format> - <description>Number of times AS is allowed in path</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-10"/> - </constraint> - </properties> - </leafNode> - </children> - </node> - <leafNode name="as-override"> - <properties> - <help>AS for routes sent to this neighbor to be the local AS</help> - <valueless/> - </properties> - </leafNode> - <node name="attribute-unchanged"> - <properties> - <help>BGP attributes are sent unchanged</help> - </properties> - <children> - <leafNode name="as-path"> - <properties> - <help>Send AS path unchanged</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="med"> - <properties> - <help>Send multi-exit discriminator unchanged</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="next-hop"> - <properties> - <help>Send nexthop unchanged</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> <node name="capability"> <properties> <help>Advertise capabilities to this neighbor (IPv6)</help> </properties> <children> - <!-- Capability dynamic in the afi ipv6 does nothing T3037 --> - <leafNode name="dynamic"> - <properties> - <help>Advertise dynamic capability to this neighbor</help> - <valueless/> - </properties> - </leafNode> - <node name="orf"> - <properties> - <help>Advertise ORF capability to this neighbor</help> - </properties> - <children> - <node name="prefix-list"> - <properties> - <help>Advertise prefix-list ORF capability to this neighbor</help> - </properties> - <children> - <leafNode name="receive"> - <properties> - <help>Capability to receive the ORF</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="send"> - <properties> - <help>Capability to send the ORF</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - </children> - </node> - </children> - </node> - <node name="default-originate"> - <properties> - <help>Send default IPv6-route to this neighbor</help> - </properties> - <children> - <leafNode name="route-map"> - <properties> - <help>Route-map to specify criteria of the default</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <node name="disable-send-community"> - <properties> - <help>Disable sending community attributes to this neighbor</help> - </properties> - <children> - <leafNode name="extended"> - <properties> - <help>Disable sending extended community attributes to this neighbor</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="standard"> - <properties> - <help>Disable sending standard community attributes to this neighbor</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="distribute-list"> - <properties> - <help>Access-list to filter route updates to/from this neighbor</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Access-list to filter outgoing route updates to this neighbor</help> - <completionHelp> - <path>policy access-list6</path> - </completionHelp> - <valueHelp> - <format>u32:1-65535</format> - <description>Access-list to filter outgoing route updates to this neighbor</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Access-list to filter incoming route updates from this neighbor</help> - <completionHelp> - <path>policy access-list6</path> - </completionHelp> - <valueHelp> - <format>u32:1-65535</format> - <description>Access-list to filter incoming route updates from this neighbor</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> + #include <include/bgp-afi-capability-orf.xml.i> + #include <include/bgp-capability-dynamic.xml.i> </children> </node> - <node name="filter-list"> - <properties> - <help>As-path-list to filter route updates to/from this neighbor</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>As-path-list to filter outgoing route updates to this neighbor</help> - <completionHelp> - <path>policy as-path-list</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>As-path-list to filter incoming route updates from this neighbor</help> - <completionHelp> - <path>policy as-path-list</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="maximum-prefix"> - <properties> - <help>Maximum number of prefixes to accept from this neighbor</help> - <valueHelp> - <format>u32:1-4294967295</format> - <description>Prefix limit</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967295"/> - </constraint> - </properties> - </leafNode> - <node name="nexthop-local"> - <properties> - <help>Nexthop attributes</help> - </properties> - <children> - <leafNode name="unchanged"> - <properties> - <help>Leave link-local nexthop unchanged for this peer</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="nexthop-self"> - <properties> - <help>Nexthop for IPv6-routes sent to this neighbor to be the local router</help> - </properties> - <children> - <leafNode name="force"> - <properties> - <help>Set the next hop to self for reflected routes</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <leafNode name="peer-group"> - <properties> - <help>IPv6 peer group for this peer</help> - </properties> - </leafNode> - <node name="prefix-list"> - <properties> - <help>Prefix-list to filter route updates to/from this neighbor</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Prefix-list to filter outgoing route updates to this neighbor</help> - <completionHelp> - <path>policy prefix-list6</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Prefix-list to filter incoming route updates from this neighbor</help> - <completionHelp> - <path>policy prefix-list6</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="remove-private-as"> - <properties> - <help>Remove private AS numbers from AS path in outbound route updates</help> - <valueless/> - </properties> - </leafNode> - <node name="route-map"> - <properties> - <help>Route-map to filter route updates to/from this neighbor</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Route-map to filter outgoing route updates to this neighbor</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Route-map to filter incoming route updates from this neighbor</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="route-reflector-client"> - <properties> - <help>Neighbor as a IPv6-route reflector client</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="route-server-client"> - <properties> - <help>Neighbor is IPv6-route server client</help> - <valueless/> - </properties> - </leafNode> - <node name="soft-reconfiguration"> - <properties> - <help>Soft reconfiguration for neighbor (IPv6)</help> - </properties> - <children> - <leafNode name="inbound"> - <properties> - <help>Inbound soft reconfiguration for this neighbor [REQUIRED]</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <leafNode name="unsuppress-map"> - <properties> - <help>Route-map to selectively unsuppress suppressed IPv6-routes</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="weight"> - <properties> - <help>Default weight for routes from this neighbor</help> - <valueHelp> - <format>u32:1-65535</format> - <description>Weight for routes from this neighbor</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> + #include <include/bgp-afi-peer-group.xml.i> + #include <include/bgp-afi-ipv6-nexthop-local.xml.i> + #include <include/bgp-afi-ipv6-prefix-list.xml.i> + #include <include/bgp-afi-common.xml.i> </children> </node> <!-- included end --> diff --git a/interface-definitions/include/bgp-override-capability.xml.i b/interface-definitions/include/bgp-override-capability.xml.i new file mode 100644 index 000000000..88c277c8b --- /dev/null +++ b/interface-definitions/include/bgp-override-capability.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp-override-capability.xml.i --> +<leafNode name="override-capability"> + <properties> + <help>Ignore capability negotiation with specified neighbor</help> + <valueless/> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-passive.xml.i b/interface-definitions/include/bgp-passive.xml.i new file mode 100644 index 000000000..ada961866 --- /dev/null +++ b/interface-definitions/include/bgp-passive.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp-passive.xml.i --> +<leafNode name="passive"> + <properties> + <help>Do not initiate a session with this neighbor</help> + <valueless/> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-password.xml.i b/interface-definitions/include/bgp-password.xml.i new file mode 100644 index 000000000..5b68a2d71 --- /dev/null +++ b/interface-definitions/include/bgp-password.xml.i @@ -0,0 +1,7 @@ +<!-- included start from bgp-password.xml.i --> +<leafNode name="password"> + <properties> + <help>BGP MD5 password</help> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-peer-group-afi-ipv4-unicast.xml.i b/interface-definitions/include/bgp-peer-group-afi-ipv4-unicast.xml.i deleted file mode 100644 index e34d9f774..000000000 --- a/interface-definitions/include/bgp-peer-group-afi-ipv4-unicast.xml.i +++ /dev/null @@ -1,303 +0,0 @@ -<!-- included start from bgp-peer-group-afi-ipv4-unicast.xml.i --> -<node name="ipv4-unicast"> - <properties> - <help>IPv4 BGP peer group parameters</help> - </properties> - <children> - <node name="allowas-in"> - <properties> - <help>Accept a route that contains the local-AS in the as-path</help> - </properties> - <children> - <leafNode name="number"> - <properties> - <help>Number of occurrences of AS number</help> - <valueHelp> - <format>u32:1-10</format> - <description>Number of times AS is allowed in path</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-10"/> - </constraint> - </properties> - </leafNode> - </children> - </node> - <node name="attribute-unchanged"> - <properties> - <help>BGP attributes are sent unchanged</help> - </properties> - <children> - <leafNode name="as-path"> - <properties> - <help>Send AS path unchanged</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="med"> - <properties> - <help>Send multi-exit discriminator unchanged</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="next-hop"> - <properties> - <help>Send nexthop unchanged</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="capability"> - <properties> - <help>Advertise capabilities to this peer-group</help> - </properties> - <children> - <leafNode name="dynamic"> - <properties> - <help>Advertise dynamic capability to this peer-group</help> - <valueless/> - </properties> - </leafNode> - <node name="orf"> - <properties> - <help>Advertise ORF capability to this peer-group</help> - </properties> - <children> - <node name="prefix-list"> - <properties> - <help>Advertise prefix-list ORF capability to this peer-group</help> - </properties> - <children> - <leafNode name="receive"> - <properties> - <help>Capability to receive the ORF</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="send"> - <properties> - <help>Capability to send the ORF</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - </children> - </node> - </children> - </node> - <node name="default-originate"> - <properties> - <help>Send default route to this peer-group</help> - </properties> - <children> - <leafNode name="route-map"> - <properties> - <help>Route-map to specify criteria of the default</help> - </properties> - </leafNode> - </children> - </node> - <node name="disable-send-community"> - <properties> - <help>Disable sending community attributes to this peer-group</help> - </properties> - <children> - <leafNode name="extended"> - <properties> - <help>Disable sending extended community attributes to this peer-group</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="standard"> - <properties> - <help>Disable sending standard community attributes to this peer-group</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="distribute-list"> - <properties> - <help>Access-list to filter route updates to/from this peer-group</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Access-list to filter outgoing route updates to this peer-group</help> - <completionHelp> - <path>policy access-list</path> - </completionHelp> - <valueHelp> - <format>u32:1-65535</format> - <description>Access-list to filter outgoing route updates to this peer-group</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Access-list to filter incoming route updates from this peer-group</help> - <completionHelp> - <path>policy access-list</path> - </completionHelp> - <valueHelp> - <format>u32:1-65535</format> - <description>Access-list to filter incoming route updates from this peer-group</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> - </children> - </node> - <node name="filter-list"> - <properties> - <help>As-path-list to filter route updates to/from this peer-group</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>As-path-list to filter outgoing route updates to this peer-group</help> - <completionHelp> - <path>policy as-path-list</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>As-path-list to filter incoming route updates from this peer-group</help> - <completionHelp> - <path>policy as-path-list</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="maximum-prefix"> - <properties> - <help>Maximum number of prefixes to accept from this peer-group</help> - <valueHelp> - <format>u32:1-4294967295</format> - <description>Prefix limit</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967295"/> - </constraint> - </properties> - </leafNode> - <node name="nexthop-self"> - <properties> - <help>Nexthop for routes sent to this peer-group to be the local router</help> - </properties> - <children> - <leafNode name="force"> - <properties> - <help>Set the next hop to self for reflected routes</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="prefix-list"> - <properties> - <help>Prefix-list to filter route updates to/from this peer-group</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Prefix-list to filter outgoing route updates to this peer-group</help> - <completionHelp> - <path>policy prefix-list</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Prefix-list to filter incoming route updates from this peer-group</help> - <completionHelp> - <path>policy prefix-list</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="remove-private-as"> - <properties> - <help>Remove private AS numbers from AS path in outbound route updates</help> - <valueless/> - </properties> - </leafNode> - <node name="route-map"> - <properties> - <help>Route-map to filter route updates to/from this peer-group</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Route-map to filter outgoing route updates to this peer-group</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Route-map to filter incoming route updates from this peer-group</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="route-reflector-client"> - <properties> - <help>Peer-group as a route reflector client</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="route-server-client"> - <properties> - <help>Peer-group as route server client</help> - <valueless/> - </properties> - </leafNode> - <node name="soft-reconfiguration"> - <properties> - <help>Soft reconfiguration for peer-group</help> - </properties> - <children> - <leafNode name="inbound"> - <properties> - <help>Inbound soft reconfiguration for this peer-group [REQUIRED]</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <leafNode name="unsuppress-map"> - <properties> - <help>Route-map to selectively unsuppress suppressed routes</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="weight"> - <properties> - <help>Default weight for routes from this peer-group</help> - <valueHelp> - <format>u32:1-65535</format> - <description>Weight for routes from this peer-group</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> - </children> -</node> -<!-- included end --> diff --git a/interface-definitions/include/bgp-peer-group-afi-ipv6-unicast.xml.i b/interface-definitions/include/bgp-peer-group-afi-ipv6-unicast.xml.i deleted file mode 100644 index 400193b7b..000000000 --- a/interface-definitions/include/bgp-peer-group-afi-ipv6-unicast.xml.i +++ /dev/null @@ -1,319 +0,0 @@ -<!-- included start from bgp-peer-group-afi-ipv6-unicast.xml.i --> -<node name="ipv6-unicast"> - <properties> - <help>IPv6 BGP neighbor parameters</help> - </properties> - <children> - <node name="allowas-in"> - <properties> - <help>Accept a IPv6-route that contains the local-AS in the as-path</help> - </properties> - <children> - <leafNode name="number"> - <properties> - <help>Number of occurrences of AS number</help> - <valueHelp> - <format>u32:1-10</format> - <description>Number of times AS is allowed in path</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-10"/> - </constraint> - </properties> - </leafNode> - </children> - </node> - <node name="attribute-unchanged"> - <properties> - <help>BGP attributes are sent unchanged</help> - </properties> - <children> - <leafNode name="as-path"> - <properties> - <help>Send AS path unchanged</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="med"> - <properties> - <help>Send multi-exit discriminator unchanged</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="next-hop"> - <properties> - <help>Send nexthop unchanged</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="capability"> - <properties> - <help>Advertise capabilities to this peer-group</help> - </properties> - <children> - <leafNode name="dynamic"> - <properties> - <help>Advertise dynamic capability to this peer-group</help> - <valueless/> - </properties> - </leafNode> - <node name="orf"> - <properties> - <help>Advertise ORF capability to this peer-group</help> - </properties> - <children> - <node name="prefix-list"> - <properties> - <help>Advertise prefix-list ORF capability to this peer-group</help> - </properties> - <children> - <leafNode name="receive"> - <properties> - <help>Capability to receive the ORF</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="send"> - <properties> - <help>Capability to send the ORF</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - </children> - </node> - </children> - </node> - <node name="default-originate"> - <properties> - <help>Send default route to this peer-group</help> - </properties> - <children> - <leafNode name="route-map"> - <properties> - <help>Route-map to specify criteria of the default</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <node name="disable-send-community"> - <properties> - <help>Disable sending community attributes to this peer-group</help> - </properties> - <children> - <leafNode name="extended"> - <properties> - <help>Disable sending extended community attributes to this peer-group</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="standard"> - <properties> - <help>Disable sending standard community attributes to this peer-group</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="distribute-list"> - <properties> - <help>Access-list to filter route updates to/from this peer-group</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Access-list to filter outgoing route updates to this peer-group</help> - <completionHelp> - <path>policy access-list6</path> - </completionHelp> - <valueHelp> - <format>u32:1-65535</format> - <description>Access-list to filter outgoing route updates to this peer-group</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Access-list to filter incoming route updates from this peer-group</help> - <completionHelp> - <path>policy access-list6</path> - </completionHelp> - <valueHelp> - <format>u32:1-65535</format> - <description>Access-list to filter incoming route updates from this peer-group</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> - </children> - </node> - <node name="filter-list"> - <properties> - <help>As-path-list to filter route updates to/from this peer-group</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>As-path-list to filter outgoing route updates to this peer-group</help> - <completionHelp> - <path>policy as-path-list</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>As-path-list to filter incoming route updates from this peer-group</help> - <completionHelp> - <path>policy as-path-list</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="maximum-prefix"> - <properties> - <help>Maximum number of prefixes to accept from this peer-group</help> - <valueHelp> - <format>u32:1-4294967295</format> - <description>Prefix limit</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967295"/> - </constraint> - </properties> - </leafNode> - <node name="nexthop-local"> - <properties> - <help>Nexthop attributes</help> - </properties> - <children> - <leafNode name="unchanged"> - <properties> - <help>Leave link-local nexthop unchanged for this peer</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="nexthop-self"> - <properties> - <help>Nexthop for routes sent to this peer-group to be the local router</help> - </properties> - <children> - <leafNode name="force"> - <properties> - <help>Set the next hop to self for reflected routes</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="prefix-list"> - <properties> - <help>Prefix-list to filter route updates to/from this peer-group</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Prefix-list to filter outgoing route updates to this peer-group</help> - <completionHelp> - <path>policy prefix-list6</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Prefix-list to filter incoming route updates from this peer-group</help> - <completionHelp> - <path>policy prefix-list6</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="remove-private-as"> - <properties> - <help>Remove private AS numbers from AS path in outbound route updates</help> - <valueless/> - </properties> - </leafNode> - <node name="route-map"> - <properties> - <help>Route-map to filter route updates to/from this peer-group</help> - </properties> - <children> - <leafNode name="export"> - <properties> - <help>Route-map to filter outgoing route updates to this peer-group</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - <leafNode name="import"> - <properties> - <help>Route-map to filter incoming route updates from this peer-group</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> - </children> - </node> - <leafNode name="route-reflector-client"> - <properties> - <help>Peer-group as a route reflector client</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="route-server-client"> - <properties> - <help>Peer-group as route server client</help> - <valueless/> - </properties> - </leafNode> - <node name="soft-reconfiguration"> - <properties> - <help>Soft reconfiguration for peer-group</help> - </properties> - <children> - <leafNode name="inbound"> - <properties> - <help>Inbound soft reconfiguration for this peer-group [REQUIRED]</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <leafNode name="unsuppress-map"> - <properties> - <help>Route-map to selectively unsuppress suppressed routes</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="weight"> - <properties> - <help>Default weight for routes from this peer-group</help> - <valueHelp> - <format>u32:1-65535</format> - <description>Weight for routes from this peer-group</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> - </children> -</node> -<!-- included end --> diff --git a/interface-definitions/include/bgp-peer-group.xml.i b/interface-definitions/include/bgp-peer-group.xml.i new file mode 100644 index 000000000..24585c1ce --- /dev/null +++ b/interface-definitions/include/bgp-peer-group.xml.i @@ -0,0 +1,7 @@ +<!-- included start from bgp-peer-group.xml.i --> +<leafNode name="peer-group"> + <properties> + <help>Peer group for this peer</help> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-remote-as.xml.i b/interface-definitions/include/bgp-remote-as.xml.i new file mode 100644 index 000000000..de3f4d2ad --- /dev/null +++ b/interface-definitions/include/bgp-remote-as.xml.i @@ -0,0 +1,27 @@ +<!-- included start from bgp-remote-as.xml.i --> +<leafNode name="remote-as"> + <properties> + <help>Neighbor BGP AS number [REQUIRED]</help> + <completionHelp> + <list>external internal</list> + </completionHelp> + <valueHelp> + <format>u32:1-4294967294</format> + <description>Neighbor AS number</description> + </valueHelp> + <valueHelp> + <format>external</format> + <description>Any AS different from the local AS</description> + </valueHelp> + <valueHelp> + <format>internal</format> + <description>Neighbor AS number</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-4294967294"/> + <regex>^(external|internal)$</regex> + </constraint> + <constraintErrorMessage>Invalid AS number</constraintErrorMessage> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-route-map.xml.i b/interface-definitions/include/bgp-route-map.xml.i new file mode 100644 index 000000000..18b092354 --- /dev/null +++ b/interface-definitions/include/bgp-route-map.xml.i @@ -0,0 +1,10 @@ +<!-- included start from bgp-route-map.xml.i --> +<leafNode name="route-map"> + <properties> + <help>Route-map to modify route attributes</help> + <completionHelp> + <path>policy route-map</path> + </completionHelp> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-shutdown.xml.i b/interface-definitions/include/bgp-shutdown.xml.i new file mode 100644 index 000000000..330120bba --- /dev/null +++ b/interface-definitions/include/bgp-shutdown.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp-shutdown.xml.i --> +<leafNode name="shutdown"> + <properties> + <help>Administratively shut down peer-group</help> + <valueless/> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-timers-holdtime.xml.i b/interface-definitions/include/bgp-timers-holdtime.xml.i new file mode 100644 index 000000000..09924574b --- /dev/null +++ b/interface-definitions/include/bgp-timers-holdtime.xml.i @@ -0,0 +1,18 @@ +<!-- included start from bgp-timers-holdtime.xml.i --> +<leafNode name="holdtime"> + <properties> + <help>BGP hold timer for this neighbor</help> + <valueHelp> + <format>u32:1-65535</format> + <description>Hold timer in seconds</description> + </valueHelp> + <valueHelp> + <format>0</format> + <description>Hold timer disabled</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 0-65535"/> + </constraint> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-timers-keepalive.xml.i b/interface-definitions/include/bgp-timers-keepalive.xml.i new file mode 100644 index 000000000..7d294c9d6 --- /dev/null +++ b/interface-definitions/include/bgp-timers-keepalive.xml.i @@ -0,0 +1,14 @@ +<!-- included start from bgp-timers-keepalive.xml.i --> +<leafNode name="keepalive"> + <properties> + <help>BGP keepalive interval for this neighbor</help> + <valueHelp> + <format>u32:1-65535</format> + <description>Keepalive interval in seconds (default 60)</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-65535"/> + </constraint> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/include/bgp-ttl-security.xml.i b/interface-definitions/include/bgp-ttl-security.xml.i new file mode 100644 index 000000000..3f4d1786d --- /dev/null +++ b/interface-definitions/include/bgp-ttl-security.xml.i @@ -0,0 +1,21 @@ +<!-- included start from bgp-ttl-security.xml.i --> +<node name="ttl-security"> + <properties> + <help>Ttl security mechanism</help> + </properties> + <children> + <leafNode name="hops"> + <properties> + <help>Number of the maximum number of hops to the BGP peer</help> + <valueHelp> + <format>u32:1-254</format> + <description>Number of hops</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-254"/> + </constraint> + </properties> + </leafNode> + </children> +</node> +<!-- included end --> diff --git a/interface-definitions/include/bgp-update-source.xml.i b/interface-definitions/include/bgp-update-source.xml.i new file mode 100644 index 000000000..c1db2e2c1 --- /dev/null +++ b/interface-definitions/include/bgp-update-source.xml.i @@ -0,0 +1,28 @@ +<!-- included start from bgp-update-source.xml.i --> +<leafNode name="update-source"> + <!-- Need to check format interfaces --> + <properties> + <help>Source IP of routing updates</help> + <completionHelp> + <script>${vyos_completion_dir}/list_local_ips.sh --both</script> + </completionHelp> + <valueHelp> + <format>ipv4</format> + <description>IPv4 address of route source</description> + </valueHelp> + <valueHelp> + <format>ipv6</format> + <description>IPv6 address of route source</description> + </valueHelp> + <valueHelp> + <format>txt</format> + <description>Interface as route source</description> + </valueHelp> + <constraint> + <validator name="ipv4-address"/> + <validator name="ipv6-address"/> + <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex> + </constraint> + </properties> +</leafNode> +<!-- included end --> diff --git a/interface-definitions/ntp.xml.in b/interface-definitions/ntp.xml.in index b939d9dc6..d244b56bb 100644 --- a/interface-definitions/ntp.xml.in +++ b/interface-definitions/ntp.xml.in @@ -5,8 +5,8 @@ <children> <node name="ntp" owner="${vyos_conf_scripts_dir}/ntp.py"> <properties> - <priority>400</priority> <help>Network Time Protocol (NTP) configuration</help> + <priority>900</priority> </properties> <children> <tagNode name="server"> diff --git a/interface-definitions/protocols-bgp.xml.in b/interface-definitions/protocols-bgp.xml.in index 27cbc919a..61bc6ce86 100644 --- a/interface-definitions/protocols-bgp.xml.in +++ b/interface-definitions/protocols-bgp.xml.in @@ -3,7 +3,7 @@ <interfaceDefinition> <node name="protocols"> <children> - <tagNode name="nbgp" owner="${vyos_conf_scripts_dir}/protocols_bgp.py"> + <tagNode name="bgp" owner="${vyos_conf_scripts_dir}/protocols_bgp.py"> <properties> <help>Border Gateway Protocol (BGP) parameters</help> <valueHelp> @@ -59,14 +59,7 @@ <valueless/> </properties> </leafNode> - <leafNode name="route-map"> - <properties> - <help>Route-map to modify route attributes</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> + #include <include/bgp-route-map.xml.i> </children> </tagNode> <node name="redistribute"> @@ -167,14 +160,7 @@ </constraint> </properties> </leafNode> - <leafNode name="route-map"> - <properties> - <help>Route-map to modify route attributes</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> + #include <include/bgp-route-map.xml.i> </children> </tagNode> <node name="redistribute"> @@ -198,17 +184,17 @@ #include <include/bgp-afi-redistribute-metric-route-map.xml.i> </children> </node> - <node name="ospf"> + <node name="ospfv3"> <properties> - <help>Redistribute OSPF routes into BGP</help> + <help>Redistribute OSPFv3 routes into BGP</help> </properties> <children> #include <include/bgp-afi-redistribute-metric-route-map.xml.i> </children> </node> - <node name="rip"> + <node name="ripng"> <properties> - <help>Redistribute RIP routes into BGP</help> + <help>Redistribute RIPng routes into BGP</help> </properties> <children> #include <include/bgp-afi-redistribute-metric-route-map.xml.i> @@ -282,7 +268,7 @@ <constraint> <validator name="ipv4-address"/> <validator name="ipv6-address"/> - <regex>(br|bond|dum|en|eth|gnv|lo|peth|tun|vti|vxlan|wg|wlan)[0-9]+</regex> + <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex> </constraint> </properties> <children> @@ -307,55 +293,11 @@ </constraint> </properties> </leafNode> - <node name="bfd"> - <properties> - <help>Enable Bidirectional Forwarding Detection (BFD) support</help> - </properties> - <children> - <leafNode name="check-control-plane-failure"> - <properties> - <help>Allow to write CBIT independence in BFD outgoing packets and read both C-BIT value of BFD and lookup BGP peer status</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <node name="capability"> - <properties> - <help>Advertise capabilities to this neighbor</help> - </properties> - <children> - <leafNode name="dynamic"> - <properties> - <help>Advertise dynamic capability to this neighbor</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="extended-nexthop"> - <properties> - <help>Advertise extended-nexthop capability to this neighbor</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <leafNode name="description"> - <properties> - <help>Description for this neighbor</help> - </properties> - </leafNode> - <leafNode name="disable-capability-negotiation"> - <properties> - <help>Disable capability negotiation with this neighbor</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="disable-connected-check"> - <properties> - <help>Disable check to see if eBGP peer address is a connected route</help> - <valueless/> - </properties> - </leafNode> + #include <include/bgp-bfd.xml.i> + #include <include/bgp-capability.xml.i> + #include <include/bgp-description.xml.i> + #include <include/bgp-disable-capability-negotiation.xml.i> + #include <include/bgp-disable-connected-check.xml.i> <node name="disable-send-community"> <properties> <help>Disable sending community attributes to this neighbor (IPv4)</help> @@ -375,134 +317,30 @@ </leafNode> </children> </node> - <leafNode name="ebgp-multihop"> - <properties> - <help>Allow this EBGP neighbor to not be on a directly connected network</help> - <valueHelp> - <format>u32:1-255</format> - <description>Number of hops</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-255"/> - </constraint> - </properties> - </leafNode> + #include <include/bgp-ebgp-multihop.xml.i> <node name="interface"> <properties> <help>Interface parameters</help> </properties> <children> - <leafNode name="peer-group"> - <properties> - <help>Peer group for this peer</help> - </properties> - </leafNode> - <leafNode name="remote-as"> - <properties> - <help>Neighbor BGP AS number [REQUIRED]</help> - <completionHelp> - <list>external internal</list> - </completionHelp> - <valueHelp> - <format>u32:1-4294967294</format> - <description>Neighbor AS number</description> - </valueHelp> - <valueHelp> - <format>external</format> - <description>Any AS different from the local AS</description> - </valueHelp> - <valueHelp> - <format>internal</format> - <description>Neighbor AS number</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967294"/> - <regex>(external|internal)</regex> - </constraint> - <constraintErrorMessage>Invalid ASN value</constraintErrorMessage> - </properties> - </leafNode> + #include <include/bgp-peer-group.xml.i> + #include <include/bgp-remote-as.xml.i> <node name="v6only"> <properties> <help>Enable BGP with v6 link-local only</help> </properties> <children> - <leafNode name="peer-group"> - <properties> - <help>Peer group for this peer</help> - </properties> - </leafNode> - <leafNode name="remote-as"> - <properties> - <help>Neighbor BGP AS number [REQUIRED]</help> - <completionHelp> - <list>external internal</list> - </completionHelp> - <valueHelp> - <format>u32:1-4294967294</format> - <description>Neighbor AS number</description> - </valueHelp> - <valueHelp> - <format>external</format> - <description>Any AS different from the local AS</description> - </valueHelp> - <valueHelp> - <format>internal</format> - <description>Neighbor AS number</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967294"/> - <regex>(external|internal)</regex> - </constraint> - <constraintErrorMessage>Invalid ASN value</constraintErrorMessage> - </properties> - </leafNode> + #include <include/bgp-peer-group.xml.i> + #include <include/bgp-remote-as.xml.i> </children> </node> </children> </node> - <tagNode name="local-as"> - <properties> - <help>Local AS number</help> - <valueHelp> - <format>u32:1-4294967294</format> - <description>Local AS number</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967294"/> - </constraint> - </properties> - <children> - <leafNode name="no-prepend"> - <properties> - <help>Disable prepending local-as to updates from EBGP peers</help> - <valueless/> - </properties> - </leafNode> - </children> - </tagNode> - <leafNode name="override-capability"> - <properties> - <help>Ignore capability negotiation with specified neighbor</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="passive"> - <properties> - <help>Do not initiate a session with this neighbor</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="password"> - <properties> - <help>BGP MD5 password</help> - </properties> - </leafNode> - <leafNode name="peer-group"> - <properties> - <help>IPv4 peer group for this peer</help> - </properties> - </leafNode> + #include <include/bgp-local-as.xml.i> + #include <include/bgp-override-capability.xml.i> + #include <include/bgp-passive.xml.i> + #include <include/bgp-password.xml.i> + #include <include/bgp-peer-group.xml.i> <leafNode name="port"> <properties> <help>Neighbor BGP port</help> @@ -515,37 +353,8 @@ </constraint> </properties> </leafNode> - <leafNode name="remote-as"> - <properties> - <help>Neighbor BGP AS number [REQUIRED]</help> - <completionHelp> - <list>external internal</list> - </completionHelp> - <valueHelp> - <format>u32:1-4294967294</format> - <description>Neighbor AS number</description> - </valueHelp> - <valueHelp> - <format>external</format> - <description>Any AS different from the local AS</description> - </valueHelp> - <valueHelp> - <format>internal</format> - <description>Neighbor AS number</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967294"/> - <regex>(external|internal)</regex> - </constraint> - <constraintErrorMessage>Invalid ASN value</constraintErrorMessage> - </properties> - </leafNode> - <leafNode name="shutdown"> - <properties> - <help>Administratively shut down neighbor</help> - <valueless/> - </properties> - </leafNode> + #include <include/bgp-remote-as.xml.i> + #include <include/bgp-shutdown.xml.i> <leafNode name="strict-capability-match"> <properties> <help>Enable strict capability negotiation</help> @@ -573,78 +382,12 @@ </constraint> </properties> </leafNode> - <leafNode name="holdtime"> - <properties> - <help>BGP hold timer for this neighbor</help> - <valueHelp> - <format>u32:1-65535</format> - <description>Hold timer in seconds</description> - </valueHelp> - <valueHelp> - <format>0</format> - <description>Hold timer disabled</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 0-65535"/> - </constraint> - </properties> - </leafNode> - <leafNode name="keepalive"> - <properties> - <help>BGP keepalive interval for this neighbor</help> - <valueHelp> - <format>u32:1-65535</format> - <description>Keepalive interval in seconds (default 60)</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> + #include <include/bgp-timers-holdtime.xml.i> + #include <include/bgp-timers-keepalive.xml.i> </children> </node> - <node name="ttl-security"> - <properties> - <help>Ttl security mechanism for this BGP peer</help> - </properties> - <children> - <leafNode name="hops"> - <properties> - <help>Number of the maximum number of hops to the BGP peer</help> - <valueHelp> - <format>u32:1-254</format> - <description>Number of hops</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-254"/> - </constraint> - </properties> - </leafNode> - </children> - </node> - <leafNode name="update-source"> - <!-- Need to check format interfaces --> - <properties> - <help>Source IP of routing updates</help> - <valueHelp> - <format>ipv4</format> - <description>IPv4 address of route source</description> - </valueHelp> - <valueHelp> - <format>ipv6</format> - <description>IPv6 address of route source</description> - </valueHelp> - <valueHelp> - <format>txt</format> - <description>Interface as route source</description> - </valueHelp> - <constraint> - <validator name="ipv4-address"/> - <validator name="ipv6-address"/> - <regex>(br|bond|dum|en|eth|gnv|lo|peth|tun|vti|vxlan|wg|wlan)[0-9]+</regex> - </constraint> - </properties> - </leafNode> + #include <include/bgp-ttl-security.xml.i> + #include <include/bgp-update-source.xml.i> </children> </tagNode> <node name="parameters"> @@ -987,218 +730,34 @@ <help>BGP peer-group address-family parameters</help> </properties> <children> - #include <include/bgp-peer-group-afi-ipv4-unicast.xml.i> - #include <include/bgp-peer-group-afi-ipv6-unicast.xml.i> - </children> - </node> - <leafNode name="bfd"> - <properties> - <help>Enable Bidirectional Forwarding Detection (BFD) support</help> - <valueless/> - </properties> - </leafNode> - <node name="capability"> - <properties> - <help>Advertise capabilities to this peer-group</help> - </properties> - <children> - <leafNode name="dynamic"> - <properties> - <help>Advertise dynamic capability to this peer-group</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="extended-nexthop"> - <properties> - <help>Advertise extended-nexthop capability to this neighbor</help> - <valueless/> - </properties> - </leafNode> - </children> - </node> - <leafNode name="description"> - <properties> - <help>Description for this peer-group</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="disable-capability-negotiation"> - <properties> - <help>Disable capability negotiation with this peer-group</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="disable-connected-check"> - <properties> - <help>Disable check to see if eBGP peer address is a connected route</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="ebgp-multihop"> - <properties> - <help>Allow this EBGP peer-group to not be on a directly connected network</help> - <valueHelp> - <format>u32:1-255</format> - <description>Number of hops</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-255"/> - </constraint> - </properties> - </leafNode> - <tagNode name="local-as"> - <properties> - <help>Local AS number [REQUIRED]</help> - <valueHelp> - <format>u32:1-4294967294</format> - <description>Local AS number</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967294"/> - </constraint> - </properties> - <children> - <leafNode name="no-prepend"> - <properties> - <help>Disable prepending local-as to updates from EBGP peers</help> - <valueless/> - </properties> - </leafNode> - </children> - </tagNode> - <leafNode name="override-capability"> - <properties> - <help>Ignore capability negotiation with specified peer-group</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="passive"> - <properties> - <help>Do not intiate a session with this peer-group</help> - <valueless/> - </properties> - </leafNode> - <leafNode name="password"> - <properties> - <help>BGP MD5 password</help> - </properties> - </leafNode> - <leafNode name="remote-as"> - <properties> - <help>Neighbor BGP AS number [REQUIRED]</help> - <completionHelp> - <list>external internal</list> - </completionHelp> - <valueHelp> - <format>u32:1-4294967294</format> - <description>Neighbor AS number</description> - </valueHelp> - <valueHelp> - <format>external</format> - <description>Any AS different from the local AS</description> - </valueHelp> - <valueHelp> - <format>internal</format> - <description>Neighbor AS number</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-4294967294"/> - <regex>(external|internal)</regex> - </constraint> - <constraintErrorMessage>Invalid ASN value</constraintErrorMessage> - </properties> - </leafNode> - <leafNode name="shutdown"> - <properties> - <help>Administratively shut down peer-group</help> - <valueless/> - </properties> - </leafNode> - <node name="ttl-security"> - <properties> - <help>Ttl security mechanism</help> - </properties> - <children> - <leafNode name="hops"> - <properties> - <help>Number of the maximum number of hops to the BGP peer</help> - <valueHelp> - <format>u32:1-254</format> - <description>Number of hops</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-254"/> - </constraint> - </properties> - </leafNode> + #include <include/bgp-neighbor-afi-ipv4-unicast.xml.i> + #include <include/bgp-neighbor-afi-ipv6-unicast.xml.i> </children> </node> - <leafNode name="update-source"> - <!-- Need to check format interfaces --> - <properties> - <help>Source IP of routing updates</help> - <valueHelp> - <format>ipv4</format> - <description>IPv4 address of route source</description> - </valueHelp> - <valueHelp> - <format>ipv6</format> - <description>IPv6 address of route source</description> - </valueHelp> - <valueHelp> - <format>txt</format> - <description>Interface as route source</description> - </valueHelp> - <constraint> - <validator name="ipv4-address"/> - <validator name="ipv6-address"/> - <regex>(br|bond|dum|en|eth|gnv|lo|peth|tun|vti|vxlan|wg|wlan)[0-9]+</regex> - </constraint> - </properties> - </leafNode> + #include <include/bgp-bfd.xml.i> + #include <include/bgp-capability.xml.i> + #include <include/bgp-description.xml.i> + #include <include/bgp-disable-capability-negotiation.xml.i> + #include <include/bgp-disable-connected-check.xml.i> + #include <include/bgp-ebgp-multihop.xml.i> + #include <include/bgp-local-as.xml.i> + #include <include/bgp-override-capability.xml.i> + #include <include/bgp-passive.xml.i> + #include <include/bgp-password.xml.i> + #include <include/bgp-remote-as.xml.i> + #include <include/bgp-shutdown.xml.i> + #include <include/bgp-ttl-security.xml.i> + #include <include/bgp-update-source.xml.i> </children> </tagNode> - <leafNode name="route-map"> - <properties> - <help>Filter routes installed in local route map</help> - <completionHelp> - <path>policy route-map</path> - </completionHelp> - </properties> - </leafNode> + #include <include/bgp-route-map.xml.i> <node name="timers"> <properties> <help>BGP protocol timers</help> </properties> <children> - <leafNode name="holdtime"> - <properties> - <help>BGP holdtime interval</help> - <valueHelp> - <format>u32:4-65535</format> - <description>Hold-time in seconds (default 180)</description> - </valueHelp> - <valueHelp> - <format>0</format> - <description>Do not hold routes</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 0-65535"/> - </constraint> - </properties> - </leafNode> - <leafNode name="keepalive"> - <properties> - <help>Keepalive interval</help> - <valueHelp> - <format>u32:1-65535</format> - <description>Keep-alive time in seconds (default 60)</description> - </valueHelp> - <constraint> - <validator name="numeric" argument="--range 1-65535"/> - </constraint> - </properties> - </leafNode> + #include <include/bgp-timers-holdtime.xml.i> + #include <include/bgp-timers-keepalive.xml.i> </children> </node> </children> diff --git a/interface-definitions/protocols-isis.xml.in b/interface-definitions/protocols-isis.xml.in index 2340079a6..8c5691ecf 100644 --- a/interface-definitions/protocols-isis.xml.in +++ b/interface-definitions/protocols-isis.xml.in @@ -758,9 +758,9 @@ </constraint> </properties> </leafNode> - <leafNode name="three-way-handshake"> + <leafNode name="no-three-way-handshake"> <properties> - <help>Enable/Disable three-way handshake</help> + <help>Disable three-way handshake</help> <valueless/> </properties> </leafNode> diff --git a/interface-definitions/snmp.xml.in b/interface-definitions/snmp.xml.in index 0a0a29f4d..3a993ec9c 100644 --- a/interface-definitions/snmp.xml.in +++ b/interface-definitions/snmp.xml.in @@ -6,7 +6,7 @@ <node name="snmp" owner="${vyos_conf_scripts_dir}/snmp.py"> <properties> <help>Simple Network Management Protocol (SNMP)</help> - <priority>980</priority> + <priority>900</priority> </properties> <children> <tagNode name="community"> diff --git a/interface-definitions/ssh.xml.in b/interface-definitions/ssh.xml.in index d94e29427..a2ce3c1c9 100644 --- a/interface-definitions/ssh.xml.in +++ b/interface-definitions/ssh.xml.in @@ -6,7 +6,7 @@ <node name="ssh" owner="${vyos_conf_scripts_dir}/ssh.py"> <properties> <help>Secure Shell (SSH)</help> - <priority>500</priority> + <priority>1000</priority> </properties> <children> <node name="access-control"> diff --git a/interface-definitions/vrf.xml.in b/interface-definitions/vrf.xml.in index 159f4ea3e..06923971d 100644 --- a/interface-definitions/vrf.xml.in +++ b/interface-definitions/vrf.xml.in @@ -4,7 +4,7 @@ <properties> <help>Virtual Routing and Forwarding</help> <!-- must be before any interface creation --> - <priority>60</priority> + <priority>10</priority> </properties> <children> <leafNode name="bind-to-all"> diff --git a/op-mode-definitions/include/monitor-background.xml.i b/op-mode-definitions/include/monitor-background.xml.i new file mode 100644 index 000000000..9931127e3 --- /dev/null +++ b/op-mode-definitions/include/monitor-background.xml.i @@ -0,0 +1,21 @@ +<!-- included start from monitor-background.xml.i --> +<node name="background"> + <properties> + <help>Monitor in background</help> + </properties> + <children> + <node name="start"> + <properties> + <help>Start background monitoring</help> + </properties> + <command>${vyatta_bindir}/vyatta-monitor-background ${3^^} ${3}</command> + </node> + <node name="stop"> + <properties> + <help>Stop background monitoring</help> + </properties> + <command>${vyatta_bindir}/vyatta-monitor-background-stop ${3^^}</command> + </node> + </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/include/monitor-no-ospf-packet-detail.xml.i b/op-mode-definitions/include/monitor-no-ospf-packet-detail.xml.i new file mode 100644 index 000000000..8dbb5acea --- /dev/null +++ b/op-mode-definitions/include/monitor-no-ospf-packet-detail.xml.i @@ -0,0 +1,36 @@ +<!-- included start from monitor-ospf-packet-detail.xml.i --> +<node name="detail"> + <properties> + <help>Disable detailed OSPF packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:3}"</command> +</node> +<node name="recv"> + <properties> + <help>Disable OSPF recv packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:3}"</command> + <children> + <node name="detail"> + <properties> + <help>Disable detailed OSPF recv packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:3}"</command> + </node> + </children> +</node> +<node name="send"> + <properties> + <help>Disable OSPF send packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:3}"</command> + <children> + <node name="detail"> + <properties> + <help>Disable detailed OSPF send packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:3}"</command> + </node> + </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/include/monitor-ospf-packet-detail.xml.i b/op-mode-definitions/include/monitor-ospf-packet-detail.xml.i new file mode 100644 index 000000000..a4bd33673 --- /dev/null +++ b/op-mode-definitions/include/monitor-ospf-packet-detail.xml.i @@ -0,0 +1,36 @@ +<!-- included start from monitor-ospf-packet-detail.xml.i --> +<node name="detail"> + <properties> + <help>Enable detailed OSPF packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:3}"</command> +</node> +<node name="recv"> + <properties> + <help>Enable OSPF recv packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:3}"</command> + <children> + <node name="detail"> + <properties> + <help>Enable detailed OSPF recv packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:3}"</command> + </node> + </children> +</node> +<node name="send"> + <properties> + <help>Enable OSPF send packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:3}"</command> + <children> + <node name="detail"> + <properties> + <help>Enable detailed OSPF send packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:3}"</command> + </node> + </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/include/ospfv3-adv-router-id-node-tag.xml.i b/op-mode-definitions/include/ospfv3-adv-router-id-node-tag.xml.i index b6a64c52a..312ce2a4f 100644 --- a/op-mode-definitions/include/ospfv3-adv-router-id-node-tag.xml.i +++ b/op-mode-definitions/include/ospfv3-adv-router-id-node-tag.xml.i @@ -6,7 +6,8 @@ <list><x.x.x.x></list> </completionHelp> </properties> - <command>vtysh -c "show ipv6 ospf6 database * $6 $7"</command> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> <children> #include <include/ospfv3-detail.xml.i> #include <include/ospfv3-dump.xml.i> diff --git a/op-mode-definitions/include/ospfv3-adv-router.xml.i b/op-mode-definitions/include/ospfv3-adv-router.xml.i index 6330c0a72..d17538d4d 100644 --- a/op-mode-definitions/include/ospfv3-adv-router.xml.i +++ b/op-mode-definitions/include/ospfv3-adv-router.xml.i @@ -7,6 +7,9 @@ </completionHelp> </properties> <children> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> #include <include/ospfv3-linkstate-id.xml.i> </children> </tagNode> diff --git a/op-mode-definitions/include/ospfv3-linkstate-id-node-tag.xml.i b/op-mode-definitions/include/ospfv3-linkstate-id-node-tag.xml.i new file mode 100644 index 000000000..24b549d28 --- /dev/null +++ b/op-mode-definitions/include/ospfv3-linkstate-id-node-tag.xml.i @@ -0,0 +1,18 @@ +<!-- included start from ospfv3-linkstate-id-node-tag.xml.i --> +<node name="node.tag"> + <properties> + <help>Search by Link state ID</help> + <completionHelp> + <list><x.x.x.x></list> + </completionHelp> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/include/ospfv3-self-originated.xml.i b/op-mode-definitions/include/ospfv3-self-originated.xml.i index 76054757b..180bca6f6 100644 --- a/op-mode-definitions/include/ospfv3-self-originated.xml.i +++ b/op-mode-definitions/include/ospfv3-self-originated.xml.i @@ -3,7 +3,8 @@ <properties> <help>Show Self-originated LSAs</help> </properties> - <command>vtysh -c "show ipv6 ospf6 database as-external $6 self-originated"</command> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> <children> #include <include/ospfv3-detail.xml.i> #include <include/ospfv3-dump.xml.i> diff --git a/op-mode-definitions/ipv6-route.xml.in b/op-mode-definitions/ipv6-route.xml.in index fbf6489ba..28f5b1aad 100644 --- a/op-mode-definitions/ipv6-route.xml.in +++ b/op-mode-definitions/ipv6-route.xml.in @@ -24,44 +24,6 @@ <command>ip -f inet6 neigh list</command> </leafNode> - <node name="route"> - <properties> - <help>Show IPv6 routes</help> - </properties> - <children> - <node name="cache"> - <properties> - <help>Show kernel IPv6 route cache</help> - </properties> - <command>ip -s -f inet6 route list cache</command> - </node> - <tagNode name="cache"> - <properties> - <help>Show kernel IPv6 route cache for a given route</help> - <completionHelp> - <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> - </completionHelp> - </properties> - <command>ip -s -f inet6 route list cache $5</command> - </tagNode> - <node name="forward"> - <properties> - <help>Show kernel IPv6 route table</help> - </properties> - <command>ip -f inet6 route list</command> - </node> - <tagNode name="forward"> - <properties> - <help>Show kernel IPv6 route table for a given route</help> - <completionHelp> - <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> - </completionHelp> - </properties> - <command>ip -s -f inet6 route list $5</command> - </tagNode> - </children> - </node> - </children> </node> </children> diff --git a/op-mode-definitions/monitor-protocol.xml.in b/op-mode-definitions/monitor-protocol.xml.in new file mode 100644 index 000000000..6a6bd50f3 --- /dev/null +++ b/op-mode-definitions/monitor-protocol.xml.in @@ -0,0 +1,1542 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="monitor"> + <children> + <node name="protocol"> + <properties> + <help>Monitor routing protocols</help> + </properties> + <children> + <node name="bgp"> + <properties> + <help>Monitor the Border Gateway Protocol (BGP)</help> + </properties> + <children> + #include <include/monitor-background.xml.i> + <node name="disable"> + <properties> + <help>Disable Border Gateway Protocol (BGP) debugging</help> + </properties> + <children> + <node name="all"> + <properties> + <help>Disable all BGP debugging</help> + </properties> + <command>vtysh -c "no debug bgp"</command> + </node> + <node name="allow-martians"> + <properties> + <help>Disable BGP martians next hops debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="as4"> + <properties> + <help>Disable BGP allow AS4 actions debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="bestpath"> + <properties> + <help>Disable BGP allow best path debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <tagNode name="bestpath"> + <properties> + <help>Disable BGP bestpath IPv4 IPv6</help> + <completionHelp> + <list><x.x.x.x/x> <h:h:h:h:h:h:h:h/h></list> + </completionHelp> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </tagNode> + <node name="flowspec"> + <properties> + <help>Disable BGP allow flowspec debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="keepalives"> + <properties> + <help>Disable BGP keepalives debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="labelpool"> + <properties> + <help>Disable BGP label pool debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="neighbor-events"> + <properties> + <help>Disable BGP Neighbor events debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="nht"> + <properties> + <help>Disable BGP next hop tracking debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="pbr"> + <properties> + <help>Disable BGP policy based routing debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="rib"> + <properties> + <help>Disable BGP rib debugging</help> + </properties> + <command>vtysh -c "no debug bgp zebra"</command> + </node> + <node name="update-groups"> + <properties> + <help>Disable BGP update groups debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="updates"> + <properties> + <help>Disable BGP updates debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="vnc"> + <properties> + <help>Disable BGP VNC debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + <children> + <node name="import-bi-attach"> + <properties> + <help>Disable BGP vnc import BI attachment debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="import-del-remote"> + <properties> + <help>Disable BGP vnc import/delete remote routes debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="rfapi-query"> + <properties> + <help>Disable BGP vnc rfapi query debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + <node name="verbose"> + <properties> + <help>Disable BGP vnc verbose logging debugging</help> + </properties> + <command>vtysh -c "no debug bgp ${@:5}"</command> + </node> + </children> + </node> + </children> + </node> + <node name="enable"> + <properties> + <help>Enable Border Gateway Protocol (BGP) debugging</help> + </properties> + <children> + <node name="allow-martians"> + <properties> + <help>Enable BGP martians next hops debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="as4"> + <properties> + <help>Enable BGP allow AS4 actions debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="bestpath"> + <properties> + <help>Enable BGP allow best path debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <tagNode name="bestpath"> + <properties> + <help>Debug bestpath IPv4 IPv6</help> + <completionHelp> + <list><x.x.x.x/x> <h:h:h:h:h:h:h:h/h></list> + </completionHelp> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </tagNode> + <node name="flowspec"> + <properties> + <help>Enable BGP allow flowspec debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="keepalives"> + <properties> + <help>Enable BGP keepalives debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="labelpool"> + <properties> + <help>Enable BGP label pool debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="neighbor-events"> + <properties> + <help>Enable BGP Neighbor events debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="nht"> + <properties> + <help>Enable BGP next hop tracking debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="pbr"> + <properties> + <help>Enable BGP policy based routing debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="rib"> + <properties> + <help>Enable BGP rib debugging</help> + </properties> + <command>vtysh -c "debug bgp zebra"</command> + </node> + <node name="update-groups"> + <properties> + <help>Enable BGP update groups debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="updates"> + <properties> + <help>Enable BGP updates debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="vnc"> + <properties> + <help>Enable BGP VNC debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + <children> + <node name="import-bi-attach"> + <properties> + <help>Enable BGP vnc import BI attachment debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="import-del-remote"> + <properties> + <help>Enable BGP vnc import/delete remote routes debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="rfapi-query"> + <properties> + <help>Enable BGP vnc rfapi query debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + <node name="verbose"> + <properties> + <help>Enable BGP vnc verbose logging debugging</help> + </properties> + <command>vtysh -c "debug bgp ${@:5}"</command> + </node> + </children> + </node> + </children> + </node> + </children> + </node> + <node name="ospf"> + <properties> + <help>Monitor the Open Shortest Path First (OSPF) protocol</help> + </properties> + <children> + #include <include/monitor-background.xml.i> + + + <node name="disable"> + <children> + <node name="event"> + <properties> + <help>Disable OSPF debugging</help> + </properties> + <command>vtysh -c "no debug ospf"</command> + </node> + <node name="event"> + <properties> + <help>Disable OSPF event debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + <node name="ism"> + <properties> + <help>Disable OSPF ism debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + <node name="events"> + <properties> + <help>Disable OSPF ism events debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + <node name="status"> + <properties> + <help>Disable OSPF ism status debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + <node name="timers"> + <properties> + <help>Disable OSPF ism timers debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + </children> + </node> + <node name="lsa"> + <properties> + <help>Disable OSPF lsa debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + <node name="flooding"> + <properties> + <help>Disable OSPF lsa flooding debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + <node name="generate"> + <properties> + <help>Disable OSPF lsa generate debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + <node name="install"> + <properties> + <help>Disable OSPF lsa install debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + <node name="refresh"> + <properties> + <help>Disable OSPF lsa refresh debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + </children> + </node> + <node name="nsm"> + <properties> + <help>Disable OSPF nsm debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + <node name="events"> + <properties> + <help>Disable OSPF nsm events debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + <node name="status"> + <properties> + <help>Disable OSPF nsm status debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + <node name="timers"> + <properties> + <help>Disable OSPF nsm timers debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + </children> + </node> + <node name="nssa"> + <properties> + <help>Disable OSPF nssa debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + </node> + <node name="packet"> + <properties> + <help>Disable OSPF packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + <node name="all"> + <properties> + <help>Disable OSPF all packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + #include <include/monitor-no-ospf-packet-detail.xml.i> + </children> + </node> + <node name="dd"> + <properties> + <help>Disable OSPF dd packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + #include <include/monitor-no-ospf-packet-detail.xml.i> + </children> + </node> + <node name="hello"> + <properties> + <help>Disable OSPF hello packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + #include <include/monitor-no-ospf-packet-detail.xml.i> + </children> + </node> + <node name="ls-ack"> + <properties> + <help>Disable OSPF ls-ack packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + #include <include/monitor-no-ospf-packet-detail.xml.i> + </children> + </node> + <node name="ls-request"> + <properties> + <help>Disable OSPF ls-request packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + #include <include/monitor-no-ospf-packet-detail.xml.i> + </children> + </node> + <node name="ls-update"> + <properties> + <help>Disable OSPF ls-update packet debugging</help> + </properties> + <command>vtysh -c "no debug ospf ${@:5}"</command> + <children> + #include <include/monitor-no-ospf-packet-detail.xml.i> + </children> + </node> + </children> + </node> + <node name="rib"> + <properties> + <help>Disable OSPF rib debugging</help> + </properties> + <command>vtysh -c "no debug ospf zebra"</command> + <children> + <node name="interface"> + <properties> + <help>Disable OSPF rib interface debugging</help> + </properties> + <command>vtysh -c "no debug ospf zebra interface"</command> + </node> + <node name="redistribute"> + <properties> + <help>Disable OSPF rib redistribute debugging</help> + </properties> + <command>vtysh -c "no debug ospf zebra redistribute"</command> + </node> + </children> + </node> + </children> + </node> + <node name="enable"> + <children> + <node name="event"> + <properties> + <help>Enable OSPF event debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + <node name="ism"> + <properties> + <help>Enable OSPF ism debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + <node name="events"> + <properties> + <help>Enable OSPF ism events debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + <node name="status"> + <properties> + <help>Enable OSPF ism status debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + <node name="timers"> + <properties> + <help>Enable OSPF ism timers debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + </children> + </node> + <node name="lsa"> + <properties> + <help>Enable OSPF lsa debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + <node name="flooding"> + <properties> + <help>Enable OSPF lsa flooding debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + <node name="generate"> + <properties> + <help>Enable OSPF lsa generate debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + <node name="install"> + <properties> + <help>Enable OSPF lsa install debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + <node name="refresh"> + <properties> + <help>Enable OSPF lsa refresh debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + </children> + </node> + <node name="nsm"> + <properties> + <help>Enable OSPF nsm debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + <node name="events"> + <properties> + <help>Enable OSPF nsm events debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + <node name="status"> + <properties> + <help>Enable OSPF nsm status debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + <node name="timers"> + <properties> + <help>Enable OSPF nsm timers debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + </children> + </node> + <node name="nssa"> + <properties> + <help>Enable OSPF nssa debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + </node> + <node name="packet"> + <properties> + <help>Enable OSPF packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + <node name="all"> + <properties> + <help>Enable OSPF all packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + #include <include/monitor-ospf-packet-detail.xml.i> + </children> + </node> + <node name="dd"> + <properties> + <help>Enable OSPF dd packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + #include <include/monitor-ospf-packet-detail.xml.i> + </children> + </node> + <node name="hello"> + <properties> + <help>Enable OSPF hello packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + #include <include/monitor-ospf-packet-detail.xml.i> + </children> + </node> + <node name="ls-ack"> + <properties> + <help>Enable OSPF ls-ack packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + #include <include/monitor-ospf-packet-detail.xml.i> + </children> + </node> + <node name="ls-request"> + <properties> + <help>Enable OSPF ls-request packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + #include <include/monitor-ospf-packet-detail.xml.i> + </children> + </node> + <node name="ls-update"> + <properties> + <help>Enable OSPF ls-update packet debugging</help> + </properties> + <command>vtysh -c "debug ospf ${@:5}"</command> + <children> + #include <include/monitor-ospf-packet-detail.xml.i> + </children> + </node> + </children> + </node> + <node name="rib"> + <properties> + <help>Enable OSPF rib debugging</help> + </properties> + <command>vtysh -c "debug ospf zebra"</command> + <children> + <node name="interface"> + <properties> + <help>Enable OSPF rib interface debugging</help> + </properties> + <command>vtysh -c "debug ospf zebra interface"</command> + </node> + <node name="redistribute"> + <properties> + <help>Enable OSPF rib redistribute debugging</help> + </properties> + <command>vtysh -c "debug ospf zebra redistribute"</command> + </node> + </children> + </node> + </children> + </node> + </children> + </node> + <node name="ospfv3"> + <properties> + <help>Monitor the IPv6 Open Shortest Path First (OSPFv3) protocol</help> + </properties> + <children> + <node name="background"> + <properties> + <help>Monitor in background</help> + </properties> + <children> + <node name="start"> + <properties> + <help>Start background monitoring</help> + </properties> + <command>${vyatta_bindir}/vyatta-monitor-background OSPFv3 ospf6</command> + </node> + <node name="stop"> + <properties> + <help>Stop background monitoring</help> + </properties> + <command>${vyatta_bindir}/vyatta-monitor-background-stop OSPFv3</command> + </node> + </children> + </node> + <node name="disable"> + <properties> + <help>Disable IPv6 Open Shortest Path First (OSPFv3) protocol debugging</help> + </properties> + <children> + <node name="abr"> + <properties> + <help>Disable all OSPFv3 debugging</help> + </properties> + <command>vtysh -c "no debug ospf6"</command> + </node> + <node name="abr"> + <properties> + <help>Disable OSPFv3 ABR debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="asbr"> + <properties> + <help>Disable OSPFv3 ASBR debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="border-routers"> + <properties> + <help>Disable OSPFv3 border router debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + <children> + <node name="area-id"> + <properties> + <help>Disable debug border routers in specific Area</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="router-id"> + <properties> + <help>Disable debug specific border router</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="flooding"> + <properties> + <help>Disable OSPFv3 flooding debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="interface"> + <properties> + <help>Disable OSPFv3 Interface debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="lsa"> + <properties> + <help>Disable OSPFv3 Link State Advertisments debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + <children> + <node name="as-external"> + <properties> + <help>Display As-External LSAs</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="inter-prefix"> + <properties> + <help>Display Inter-Area-Prefix LSAs</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="inter-router"> + <properties> + <help>Display Inter-Router LSAs</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="intra-prefix"> + <properties> + <help>Display Intra-Area-Prefix LSAs</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="link"> + <properties> + <help>Display Link LSAs</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="network"> + <properties> + <help>Display Network LSAs</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="router"> + <properties> + <help>Display Router LSAs</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="unknown"> + <properties> + <help>Display LSAs of unknown origin</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="message"> + <properties> + <help>Disable OSPFv3 message debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + <children> + <node name="all"> + <properties> + <help>Debug All message</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="dbdesc"> + <properties> + <help>Debug Database Description message</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="hello"> + <properties> + <help>Debug Hello message</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="lsack"> + <properties> + <help>Debug Link State Acknowledgement message</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="lsreq"> + <properties> + <help>Debug Link State Request message</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="lsupdate"> + <properties> + <help>Debug Link State Update message</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="unknown"> + <properties> + <help>Debug Unknown message</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="neighbor"> + <properties> + <help>Disable OSPFv3 Neighbor debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + <children> + <node name="event"> + <properties> + <help>Debug OSPFv3 Neighbor Event</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="state"> + <properties> + <help>Debug OSPFv3 Neighbor State Change</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="rib"> + <properties> + <help>Disable OSPFv3 connection to RIB debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + <children> + <node name="recv"> + <properties> + <help>Debug receiving zebra</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="send"> + <properties> + <help>Debug sending zebra</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="route"> + <properties> + <help>Disable OSPFv3 route table calculation debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + <children> + <node name="inter-area"> + <properties> + <help>Debug inter-area route calculation</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="intra-area"> + <properties> + <help>Debug intra-area route calculation</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="memory"> + <properties> + <help>Debug route memory use</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="table"> + <properties> + <help>Debug route table calculation</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="spf"> + <properties> + <help>Disable OSPFv3 SPF calculation debugging</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + <children> + <node name="database"> + <properties> + <help>Log number of LSAs at SPF Calculation time</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="process"> + <properties> + <help>Debug Detailed SPF Process</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + <node name="time"> + <properties> + <help>Measure time taken by SPF Calculation</help> + </properties> + <command>vtysh -c "no debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + </children> + </node> + <node name="enable"> + <properties> + <help>Enable IPv6 Open Shortest Path First (OSPFv3) protocol debugging</help> + </properties> + <children> + <node name="abr"> + <properties> + <help>Enable OSPFv3 ABR debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="asbr"> + <properties> + <help>Enable OSPFv3 ASBR debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="border-routers"> + <properties> + <help>Enable OSPFv3 border router debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + <children> + <node name="area-id"> + <properties> + <help>Debug border routers in specific Area</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="router-id"> + <properties> + <help>Debug specific border router</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="flooding"> + <properties> + <help>Enable OSPFv3 flooding debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="interface"> + <properties> + <help>Enable OSPFv3 Interface debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="lsa"> + <properties> + <help>Enable OSPFv3 Link State Advertisments debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + <children> + <node name="as-external"> + <properties> + <help>Display As-External LSAs</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="inter-prefix"> + <properties> + <help>Display Inter-Area-Prefix LSAs</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="inter-router"> + <properties> + <help>Display Inter-Router LSAs</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="intra-prefix"> + <properties> + <help>Display Intra-Area-Prefix LSAs</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="link"> + <properties> + <help>Display Link LSAs</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="network"> + <properties> + <help>Display Network LSAs</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="router"> + <properties> + <help>Display Router LSAs</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="unknown"> + <properties> + <help>Display LSAs of unknown origin</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="message"> + <properties> + <help>Enable OSPFv3 message debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + <children> + <node name="all"> + <properties> + <help>Debug All message</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="dbdesc"> + <properties> + <help>Debug Database Description message</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="hello"> + <properties> + <help>Debug Hello message</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="lsack"> + <properties> + <help>Debug Link State Acknowledgement message</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="lsreq"> + <properties> + <help>Debug Link State Request message</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="lsupdate"> + <properties> + <help>Debug Link State Update message</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="unknown"> + <properties> + <help>Debug Unknown message</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="neighbor"> + <properties> + <help>Enable OSPFv3 Neighbor debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + <children> + <node name="event"> + <properties> + <help>Debug OSPFv3 Neighbor Event</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="state"> + <properties> + <help>Debug OSPFv3 Neighbor State Change</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="rib"> + <properties> + <help>Enable OSPFv3 connection to RIB debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + <children> + <node name="recv"> + <properties> + <help>Debug receiving zebra</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="send"> + <properties> + <help>Debug sending zebra</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="route"> + <properties> + <help>Enable OSPFv3 route table calculation debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + <children> + <node name="inter-area"> + <properties> + <help>Debug inter-area route calculation</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="intra-area"> + <properties> + <help>Debug intra-area route calculation</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="memory"> + <properties> + <help>Debug route memory use</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="table"> + <properties> + <help>Debug route table calculation</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + <node name="spf"> + <properties> + <help>Enable OSPFv3 SPF calculation debugging</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + <children> + <node name="database"> + <properties> + <help>Log number of LSAs at SPF Calculation time</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="process"> + <properties> + <help>Debug Detailed SPF Process</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + <node name="time"> + <properties> + <help>Measure time taken by SPF Calculation</help> + </properties> + <command>vtysh -c "debug ospf6 ${@:5}"</command> + </node> + </children> + </node> + </children> + </node> + </children> + </node> + <node name="rib"> + <properties> + <help>Monitor the Routing Information Base (RIB)</help> + </properties> + <children> + <node name="background"> + <properties> + <help>Monitor in background</help> + </properties> + <children> + <node name="start"> + <properties> + <help>Start background monitoring</help> + </properties> + <command>${vyatta_bindir}/vyatta-monitor-background RIB zebra</command> + </node> + <node name="stop"> + <properties> + <help>Stop background monitoring</help> + </properties> + <command>${vyatta_bindir}/vyatta-monitor-background-stop RIB</command> + </node> + </children> + </node> + <node name="disable"> + <properties> + <help>Disable Route Information Base (RIB) debugging</help> + </properties> + <children> + <node name="events"> + <properties> + <help>Disable RIB events debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + </node> + <node name="kernel"> + <properties> + <help>Disable RIB kernel debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + </node> + <node name="packet"> + <properties> + <help>Disable RIB packet debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + <children> + <node name="detail"> + <properties> + <help>Disable detailed debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + </node> + <node name="recv"> + <properties> + <help>Disable receive packet debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + </node> + <node name="send"> + <properties> + <help>Disable send packet debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + </node> + </children> + </node> + <node name="nexthop"> + <properties> + <help>Disable RIB nexthop debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + </node> + <node name="mpls"> + <properties> + <help>Disable RIP MPLS LSP debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + </node> + <node name="rib"> + <properties> + <help>Disable RIB debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + <children> + <node name="detailed"> + <properties> + <help>Disable detailed debugging</help> + </properties> + <command>vtysh -c "no debug zebra ${@:5}"</command> + </node> + </children> + </node> + </children> + </node> + <node name="enable"> + <properties> + <help>Enable Route Information Base (RIB) debugging</help> + </properties> + <children> + <node name="events"> + <properties> + <help>Enable RIB events debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + </node> + <node name="kernel"> + <properties> + <help>Enable RIB kernel debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + </node> + <node name="packet"> + <properties> + <help>Enable RIB packet debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + <children> + <node name="detail"> + <properties> + <help>Enable detailed debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + </node> + <node name="recv"> + <properties> + <help>Enable receive packet debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + </node> + <node name="send"> + <properties> + <help>Enable send packet debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + </node> + </children> + </node> + <node name="nexthop"> + <properties> + <help>Enable RIB nexthop debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + </node> + <node name="mpls"> + <properties> + <help>Enable RIP MPLS LSP debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + </node> + <node name="rib"> + <properties> + <help>Enable RIB debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + <children> + <node name="detailed"> + <properties> + <help>Enable detailed debugging</help> + </properties> + <command>vtysh -c "debug zebra ${@:5}"</command> + </node> + </children> + </node> + </children> + </node> + </children> + </node> + <node name="rip"> + <properties> + <help>Monitor the Routing Information Protocol (RIP)</help> + </properties> + <children> + #include <include/monitor-background.xml.i> + <node name="disable"> + <properties> + <help>Disable Routing Information Protocol (RIP) debugging</help> + </properties> + <children> + <node name="all"> + <properties> + <help>Disable RIP debugging</help> + </properties> + <command>vtysh -c "no debug rip"</command> + </node> + <node name="events"> + <properties> + <help>Disable RIP events debugging</help> + </properties> + <command>vtysh -c "no debug rip ${@:5}"</command> + </node> + <node name="packet"> + <properties> + <help>Disable RIP packet debugging</help> + </properties> + <command>vtysh -c "no debug rip ${@:5}"</command> + <children> + <node name="recv"> + <properties> + <help>Disable receive packet debugging</help> + </properties> + <command>vtysh -c "no debug rip ${@:5}"</command> + </node> + <node name="send"> + <properties> + <help>Disable send packet debugging</help> + </properties> + <command>vtysh -c "no debug rip ${@:5}"</command> + </node> + </children> + </node> + <node name="rib"> + <properties> + <help>Disable RIB debugging</help> + </properties> + <command>vtysh -c "no debug rip zebra"</command> + </node> + </children> + </node> + <node name="enable"> + <properties> + <help>Enable Routing Information Protocol (RIP) debugging</help> + </properties> + <children> + <node name="events"> + <properties> + <help>Enable RIP events debugging</help> + </properties> + <command>vtysh -c "debug rip ${@:5}"</command> + </node> + <node name="packet"> + <properties> + <help>Enable RIP packet debugging</help> + </properties> + <command>vtysh -c "debug rip ${@:5}"</command> + <children> + <node name="recv"> + <properties> + <help>Enable receive packet debugging</help> + </properties> + <command>vtysh -c "debug rip ${@:5}"</command> + </node> + <node name="send"> + <properties> + <help>Enable send packet debugging</help> + </properties> + <command>vtysh -c "debug rip ${@:5}"</command> + </node> + </children> + </node> + <node name="rib"> + <properties> + <help>Enable RIB debugging</help> + </properties> + <command>vtysh -c "debug rip zebra"</command> + </node> + </children> + </node> + </children> + </node> + <node name="ripng"> + <properties> + <help>Monitor the Routing Information Protocol Next Generation (RIPng) protocol</help> + </properties> + <children> + #include <include/monitor-background.xml.i> + <node name="disable"> + <properties> + <help>Disable Routing Information Protocol Next Generation (RIPNG) debugging</help> + </properties> + <children> + <node name="all"> + <properties> + <help>Disable RIPNG debugging</help> + </properties> + <command>vtysh -c "no debug ripng"</command> + </node> + <node name="events"> + <properties> + <help>Disable RIPNG events debugging</help> + </properties> + <command>vtysh -c "no debug ripng ${@:5}"</command> + </node> + <node name="packet"> + <properties> + <help>Disable RIPNG packet debugging</help> + </properties> + <command>vtysh -c "no debug ripng ${@:5}"</command> + <children> + <node name="recv"> + <properties> + <help>Disable receive packet debugging</help> + </properties> + <command>vtysh -c "no debug ripng ${@:5}"</command> + </node> + <node name="send"> + <properties> + <help>Disable send packet debugging</help> + </properties> + <command>vtysh -c "no debug ripng ${@:5}"</command> + </node> + </children> + </node> + <node name="rib"> + <properties> + <help>Disable RIB debugging</help> + </properties> + <command>vtysh -c "no debug ripng zebra"</command> + </node> + </children> + </node> + <node name="enable"> + <properties> + <help>Enable Routing Information Protocol Next Generation (RIPNG) debugging</help> + </properties> + <children> + <node name="events"> + <properties> + <help>Enable RIPNG events debugging</help> + </properties> + <command>vtysh -c "debug ripng ${@:5}"</command> + </node> + <node name="packet"> + <properties> + <help>Enable RIPNG packet debugging</help> + </properties> + <command>vtysh -c "debug ripng ${@:5}"</command> + <children> + <node name="recv"> + <properties> + <help>Enable receive packet debugging</help> + </properties> + <command>vtysh -c "debug ripng ${@:5}"</command> + </node> + <node name="send"> + <properties> + <help>Enable send packet debugging</help> + </properties> + <command>vtysh -c "debug ripng ${@:5}"</command> + </node> + </children> + </node> + <node name="rib"> + <properties> + <help>Enable RIB debugging</help> + </properties> + <command>vtysh -c "debug ripng zebra"</command> + </node> + </children> + </node> + </children> + </node> + </children> + </node> + </children> + </node> +</interfaceDefinition> diff --git a/op-mode-definitions/show-ipv6-ospfv3.xml.in b/op-mode-definitions/show-ipv6-ospfv3.xml.in index bbae74c75..9227fdae1 100644 --- a/op-mode-definitions/show-ipv6-ospfv3.xml.in +++ b/op-mode-definitions/show-ipv6-ospfv3.xml.in @@ -63,7 +63,17 @@ </properties> <command>vtysh -c "show ipv6 ospf6 database"</command> <children> - #include <include/ospfv3-adv-router.xml.i> + <tagNode name="adv-router"> + <properties> + <help>Search by Advertising Router ID</help> + <completionHelp> + <list><x.x.x.x></list> + </completionHelp> + </properties> + <children> + #include <include/ospfv3-linkstate-id.xml.i> + </children> + </tagNode> <node name="any"> <properties> <help>Search by Any Link state Type</help> @@ -146,6 +156,150 @@ #include <include/ospfv3-internal.xml.i> #include <include/ospfv3-linkstate-id.xml.i> #include <include/ospfv3-self-originated.xml.i> + <node name="group-membership"> + <properties> + <help>Show Group-Membership LSAs</help> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-adv-router.xml.i> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-linkstate-id.xml.i> + #include <include/ospfv3-linkstate-id-node-tag.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> + </node> + <node name="inter-prefix"> + <properties> + <help>Show Inter-Area-Prefix LSAs</help> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-adv-router.xml.i> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-linkstate-id.xml.i> + #include <include/ospfv3-linkstate-id-node-tag.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> + </node> + <node name="inter-router"> + <properties> + <help>Show Inter-Area-Router LSAs</help> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-adv-router.xml.i> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-linkstate-id.xml.i> + #include <include/ospfv3-linkstate-id-node-tag.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> + </node> + <node name="intra-prefix"> + <properties> + <help>Show Intra-Area-Prefix LSAs</help> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-adv-router.xml.i> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-linkstate-id.xml.i> + #include <include/ospfv3-linkstate-id-node-tag.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> + </node> + <node name="link"> + <properties> + <help>Show Link LSAs</help> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-adv-router.xml.i> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-linkstate-id.xml.i> + #include <include/ospfv3-linkstate-id-node-tag.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> + </node> + <node name="network"> + <properties> + <help>Show Network LSAs</help> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-adv-router.xml.i> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-linkstate-id.xml.i> + #include <include/ospfv3-linkstate-id-node-tag.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> + </node> + <node name="node.tag"> + <properties> + <help>Show LSAs</help> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-adv-router.xml.i> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-linkstate-id.xml.i> + #include <include/ospfv3-linkstate-id-node-tag.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> + </node> + <node name="router"> + <properties> + <help>Show router LSAs</help> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-adv-router.xml.i> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-linkstate-id.xml.i> + #include <include/ospfv3-linkstate-id-node-tag.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> + </node> + <node name="type-7"> + <properties> + <help>Show Type-7 LSAs</help> + </properties> + <!-- FRR uses ospf6 where we use ospfv3, thus alter the command --> + <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command> + <children> + #include <include/ospfv3-adv-router.xml.i> + #include <include/ospfv3-detail.xml.i> + #include <include/ospfv3-dump.xml.i> + #include <include/ospfv3-internal.xml.i> + #include <include/ospfv3-linkstate-id.xml.i> + #include <include/ospfv3-linkstate-id-node-tag.xml.i> + #include <include/ospfv3-self-originated.xml.i> + </children> + </node> </children> </node> <node name="interface"> diff --git a/op-mode-definitions/show-ipv6-route.xml.in b/op-mode-definitions/show-ipv6-route.xml.in index fafd615ea..065ea6f1f 100644 --- a/op-mode-definitions/show-ipv6-route.xml.in +++ b/op-mode-definitions/show-ipv6-route.xml.in @@ -7,23 +7,6 @@ <help>Show IPv6 routing information</help> </properties> <children> - <tagNode name="route"> - <properties> - <help>Show IPv6 routes of given address or prefix</help> - <completionHelp> - <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> - </completionHelp> - </properties> - <children> - <node name="longer-prefixes"> - <properties> - <help>Show longer prefixes of routes for given address or prefix</help> - </properties> - <command>vtysh -c "show ipv6 route $4 longer-prefixes"</command> - </node> - </children> - <command>vtysh -c "show ipv6 route $4"</command> - </tagNode> <node name="route"> <properties> <help>Show IPv6 routes</help> @@ -36,12 +19,42 @@ </properties> <command>vtysh -c "show ipv6 route bgp"</command> </node> + <node name="cache"> + <properties> + <help>Show kernel IPv6 route cache</help> + </properties> + <command>ip -s -f inet6 route list cache</command> + </node> + <tagNode name="cache"> + <properties> + <help>Show kernel IPv6 route cache for a given route</help> + <completionHelp> + <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> + </completionHelp> + </properties> + <command>ip -s -f inet6 route list cache $5</command> + </tagNode> <node name="connected"> <properties> <help>Show IPv6 connected routes</help> </properties> <command>vtysh -c "show ipv6 route connected"</command> </node> + <node name="forward"> + <properties> + <help>Show kernel IPv6 route table</help> + </properties> + <command>ip -f inet6 route list</command> + </node> + <tagNode name="forward"> + <properties> + <help>Show kernel IPv6 route table for a given route</help> + <completionHelp> + <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> + </completionHelp> + </properties> + <command>ip -s -f inet6 route list $5</command> + </tagNode> <node name="isis"> <properties> <help>Show IPv6 IS-IS routes</help> @@ -110,6 +123,23 @@ </tagNode> </children> </node> + <tagNode name="route"> + <properties> + <help>Show IPv6 routes of given address or prefix</help> + <completionHelp> + <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> + </completionHelp> + </properties> + <children> + <node name="longer-prefixes"> + <properties> + <help>Show longer prefixes of routes for given address or prefix</help> + </properties> + <command>vtysh -c "show ipv6 route $4 longer-prefixes"</command> + </node> + </children> + <command>vtysh -c "show ipv6 route $4"</command> + </tagNode> </children> </node> </children> diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in index b00e4cfec..58216bfd1 100644 --- a/op-mode-definitions/show-log.xml.in +++ b/op-mode-definitions/show-log.xml.in @@ -12,7 +12,7 @@ <properties> <help>Show contents of all master log files</help> </properties> - <command>eval $(lesspipe); less $_vyatta_less_options --prompt=".log?m, file %i of %m., page %dt of %D" -- `printf "%s\n" /var/log/messages* | sort -nr`</command> + <command>sudo bash -c 'eval $(lesspipe); less $_vyatta_less_options --prompt=".logm, file %i of %m., page %dt of %D" -- `printf "%s\n" /var/log/messages* | sort -nr`'</command> </leafNode> <leafNode name="authorization"> <properties> diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index 4c05ac613..1561d340e 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -79,6 +79,14 @@ class Interface(Control): 'shellcmd': 'ip -json link show dev {ifname}', 'format': lambda j: 'up' if 'UP' in jmespath.search('[*].flags | [0]', json.loads(j)) else 'down', }, + 'alias': { + 'shellcmd': 'ip -json -detail link list dev {ifname}', + 'format': lambda j: jmespath.search('[*].ifalias | [0]', json.loads(j)) or '', + }, + 'mac': { + 'shellcmd': 'ip -json -detail link list dev {ifname}', + 'format': lambda j: jmespath.search('[*].address | [0]', json.loads(j)), + }, 'min_mtu': { 'shellcmd': 'ip -json -detail link list dev {ifname}', 'format': lambda j: jmespath.search('[*].min_mtu | [0]', json.loads(j)), @@ -87,6 +95,14 @@ class Interface(Control): 'shellcmd': 'ip -json -detail link list dev {ifname}', 'format': lambda j: jmespath.search('[*].max_mtu | [0]', json.loads(j)), }, + 'mtu': { + 'shellcmd': 'ip -json -detail link list dev {ifname}', + 'format': lambda j: jmespath.search('[*].mtu | [0]', json.loads(j)), + }, + 'oper_state': { + 'shellcmd': 'ip -json -detail link list dev {ifname}', + 'format': lambda j: jmespath.search('[*].operstate | [0]', json.loads(j)), + }, } _command_set = { @@ -94,40 +110,25 @@ class Interface(Control): 'validate': lambda v: assert_list(v, ['up', 'down']), 'shellcmd': 'ip link set dev {ifname} {value}', }, + 'alias': { + 'convert': lambda name: name if name else '', + 'shellcmd': 'ip link set dev {ifname} alias "{value}"', + }, 'mac': { 'validate': assert_mac, 'shellcmd': 'ip link set dev {ifname} address {value}', }, + 'mtu': { + 'validate': assert_mtu, + 'shellcmd': 'ip link set dev {ifname} mtu {value}', + }, 'vrf': { 'convert': lambda v: f'master {v}' if v else 'nomaster', 'shellcmd': 'ip link set dev {ifname} {value}', }, } - _sysfs_get = { - 'alias': { - 'location': '/sys/class/net/{ifname}/ifalias', - }, - 'mac': { - 'location': '/sys/class/net/{ifname}/address', - }, - 'mtu': { - 'location': '/sys/class/net/{ifname}/mtu', - }, - 'oper_state':{ - 'location': '/sys/class/net/{ifname}/operstate', - }, - } - _sysfs_set = { - 'alias': { - 'convert': lambda name: name if name else '\0', - 'location': '/sys/class/net/{ifname}/ifalias', - }, - 'mtu': { - 'validate': assert_mtu, - 'location': '/sys/class/net/{ifname}/mtu', - }, 'arp_cache_tmo': { 'convert': lambda tmo: (int(tmo) * 1000), 'location': '/proc/sys/net/ipv4/neigh/{ifname}/base_reachable_time_ms', diff --git a/python/vyos/ifconfig/tunnel.py b/python/vyos/ifconfig/tunnel.py index 8ecb59755..1af4f8e72 100644 --- a/python/vyos/ifconfig/tunnel.py +++ b/python/vyos/ifconfig/tunnel.py @@ -63,31 +63,25 @@ class _Tunnel(Interface): }, }} + _create_cmd = 'ip tunnel add {ifname} mode {type}' + def __init__(self, ifname, **config): self.config = deepcopy(config) if config else {} super().__init__(ifname, **config) def _create(self): - create = 'ip tunnel add {ifname} mode {type}' - # add " option-name option-name-value ..." for all options set options = " ".join(["{} {}".format(k, self.config[k]) - for k in self.options if k in self.config and self.config[k] and k is not 'pmtud']) - self._cmd('{} {}'.format(create.format(**self.config), options)) + for k in self.options if k in self.config and self.config[k]]) + self._cmd('{} {}'.format(self._create_cmd.format(**self.config), options)) self.set_admin_state('down') def change_options(self): - change = 'ip tunnel cha {ifname} mode {type} pmtudisc' + change = 'ip tunnel change {ifname} mode {type}' # add " option-name option-name-value ..." for all options set - # option 'pmtud' doesn't has any value like 'ttl' or 'key' (ip tunnel cha tunX [no]pmtudisc) options = " ".join(["{} {}".format(k, self.config[k]) - for k in self.options if k in self.config and self.config[k] and k is not 'pmtud']) - - # set interfaces tunnel tunX parameters ip pmtu-discovery disable - if 'disable' in self.config['pmtud']: - change = 'ip tunnel cha {ifname} mode {type} nopmtudisc' - + for k in self.options if k in self.config and self.config[k]]) self._cmd('{} {}'.format(change.format(**self.config), options)) @classmethod @@ -148,7 +142,7 @@ class GREIf(_Tunnel): """ default = {'type': 'gre'} - options = ['local', 'remote', 'dev', 'ttl', 'tos', 'key', 'pmtud'] + options = ['local', 'remote', 'dev', 'ttl', 'tos', 'key'] # GreTap also called GRE Bridge class GRETapIf(_Tunnel): @@ -170,6 +164,11 @@ class GRETapIf(_Tunnel): default = {'type': 'gretap'} options = ['local', 'remote', 'ttl',] + _create_cmd = 'ip link add name {ifname} type {type}' + + def change_options(self): + pass + class IP6GREIf(_Tunnel): """ IP6Gre: IPv6 Support for Generic Routing Encapsulation (GRE) diff --git a/smoketest/configs/bgp-ix-router b/smoketest/configs/bgp-ix-router new file mode 100644 index 000000000..de6213b50 --- /dev/null +++ b/smoketest/configs/bgp-ix-router @@ -0,0 +1,218 @@ +interfaces { + ethernet eth0 { + address 192.0.2.100/25 + address 2001:db8:aaaa::ffff/64 + } + ethernet eth1 { + address 192.0.2.200/25 + address 2001:db8:bbbb::ffff/64 + } + loopback lo { + } +} +policy { + prefix-list IX-out-v4 { + rule 10 { + action permit + prefix 10.0.0.0/23 + } + rule 20 { + action permit + prefix 10.0.128.0/23 + } + } + prefix-list6 IX-out-v6 { + rule 10 { + action permit + prefix 2001:db8:100::/40 + } + rule 20 { + action permit + prefix 2001:db8:200::/40 + } + } + route-map IX-out-v4 { + rule 10 { + action permit + match { + ip { + address { + prefix-list IX-out-v4 + } + } + } + } + } + route-map IX-out-v6 { + rule 10 { + action permit + match { + ipv6 { + address { + prefix-list IX-out-v6 + } + } + } + } + } +} +protocols { + bgp 65000 { + address-family { + ipv4-unicast { + network 10.0.0.0/23 { + } + network 10.0.128.0/23 { + } + } + ipv6-unicast { + network 2001:db8:100::/40 { + } + network 2001:db8:200::/40 { + } + } + } + neighbor 192.0.2.1 { + description "Peering: IX-1 (Route Server)" + peer-group IXPeeringIPv4 + remote-as 65020 + } + neighbor 192.0.2.2 { + description "Peering: IX-1 (Route Server)" + peer-group IXPeeringIPv4 + remote-as 65020 + } + neighbor 192.0.2.3 { + description "Peering: IX-1 (Route Server)" + peer-group IXPeeringIPv4 + remote-as 65020 + } + neighbor 192.0.2.129 { + description "Peering: IX-2 (Route Server)" + peer-group IXPeeringIPv4 + remote-as 65030 + } + neighbor 192.0.2.130 { + description "Peering: IX-2 (Route Server)" + peer-group IXPeeringIPv4 + remote-as 65030 + } + neighbor 2001:db8:aaaa::1 { + description "Peering: IX-1 (Route Server)" + peer-group IXPeeringIPv6 + remote-as 65020 + } + neighbor 2001:db8:aaaa::2 { + description "Peering: IX-1 (Route Server)" + peer-group IXPeeringIPv6 + remote-as 65020 + } + neighbor 2001:db8:bbbb::1 { + description "Peering: IX-2 (Route Server)" + peer-group IXPeeringIPv6 + remote-as 65030 + } + neighbor 2001:db8:bbbb::2 { + description "Peering: IX-2 (Route Server)" + peer-group IXPeeringIPv6 + remote-as 65030 + } + parameters { + default { + no-ipv4-unicast + } + } + peer-group IXPeeringIPv4 { + address-family { + ipv4-unicast { + route-map { + export IX-out-v4 + } + soft-reconfiguration { + inbound + } + } + } + } + peer-group IXPeeringIPv6 { + address-family { + ipv6-unicast { + route-map { + export IX-out-v6 + } + soft-reconfiguration { + inbound + } + } + } + } + } + static { + route 10.0.0.0/23 { + blackhole { + distance 250 + } + } + route 10.0.128.0/23 { + blackhole { + distance 250 + } + } + route6 2001:db8:100::/40 { + blackhole { + distance 250 + } + } + route6 2001:db8:200::/40 { + blackhole { + distance 250 + } + } + } +} +service { + ssh { + } +} +system { + config-management { + commit-revisions 100 + } + console { + device ttyS0 { + speed 115200 + } + } + host-name vyos + login { + user vyos { + authentication { + encrypted-password $6$2Ta6TWHd/U$NmrX0x9kexCimeOcYK1MfhMpITF9ELxHcaBU/znBq.X2ukQOj61fVI2UYP/xBzP4QtiTcdkgs7WOQMHWsRymO/ + plaintext-password "" + } + } + } + ntp { + server 0.pool.ntp.org { + } + server 1.pool.ntp.org { + } + server 2.pool.ntp.org { + } + } + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } +} + + +// Warning: Do not remove the following line. +// vyos-config-version: "broadcast-relay@1:cluster@1:config-management@1:conntrack@1:conntrack-sync@1:dhcp-relay@2:dhcp-server@5:dhcpv6-server@1:dns-forwarding@3:firewall@5:https@2:interfaces@13:ipoe-server@1:ipsec@5:l2tp@3:lldp@1:mdns@1:nat@5:ntp@1:pppoe-server@5:pptp@2:qos@1:quagga@6:salt@1:snmp@2:ssh@2:sstp@3:system@19:vrrp@2:vyos-accel-ppp@2:wanloadbalance@3:webgui@1:webproxy@2:zone-policy@1" +// Release version: 1.3-rolling-202010241631 diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py index 8b04eb337..8a09dd96f 100644 --- a/smoketest/scripts/cli/base_interfaces_test.py +++ b/smoketest/scripts/cli/base_interfaces_test.py @@ -57,6 +57,7 @@ class BasicInterfaceTest: _test_vlan = False _test_qinq = False _test_ipv6 = False + _test_ipv6_pd = False _test_mirror = False _base_path = [] @@ -126,7 +127,17 @@ class BasicInterfaceTest: for intf in self._interfaces: test_string=f'Description-Test-{intf}' tmp = read_file(f'/sys/class/net/{intf}/ifalias') - self.assertTrue(tmp, test_string) + self.assertEqual(tmp, test_string) + self.assertEqual(Interface(intf).get_alias(), test_string) + self.session.delete(self._base_path + [intf, 'description']) + + self.session.commit() + + # Validate remove interface description "empty" + for intf in self._interfaces: + tmp = read_file(f'/sys/class/net/{intf}/ifalias') + self.assertEqual(tmp, str()) + self.assertEqual(Interface(intf).get_alias(), str()) def test_add_single_ip_address(self): addr = '192.0.2.0/31' @@ -367,7 +378,7 @@ class BasicInterfaceTest: def test_dhcpv6pd_auto_sla_id(self): - if not self._test_ipv6: + if not self._test_ipv6_pd: self.skipTest('not enabled') prefix_len = '56' @@ -423,7 +434,7 @@ class BasicInterfaceTest: self.session.delete(['interfaces', section, delegatee]) def test_dhcpv6pd_manual_sla_id(self): - if not self._test_ipv6: + if not self._test_ipv6_pd: self.skipTest('not enabled') prefix_len = '56' diff --git a/smoketest/scripts/cli/test_interfaces_bonding.py b/smoketest/scripts/cli/test_interfaces_bonding.py index d73ff09e9..f42ec3e9b 100755 --- a/smoketest/scripts/cli/test_interfaces_bonding.py +++ b/smoketest/scripts/cli/test_interfaces_bonding.py @@ -27,10 +27,11 @@ from vyos.util import read_file class BondingInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): self._test_ip = True + self._test_ipv6 = True + self._test_ipv6_pd = True self._test_mtu = True self._test_vlan = True self._test_qinq = True - self._test_ipv6 = True self._base_path = ['interfaces', 'bonding'] self._interfaces = ['bond0'] self._mirror_interfaces = ['dum21354'] diff --git a/smoketest/scripts/cli/test_interfaces_bridge.py b/smoketest/scripts/cli/test_interfaces_bridge.py index d47d236d0..464226b6f 100755 --- a/smoketest/scripts/cli/test_interfaces_bridge.py +++ b/smoketest/scripts/cli/test_interfaces_bridge.py @@ -30,6 +30,7 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): self._test_ip = True self._test_ipv6 = True + self._test_ipv6_pd = True self._test_vlan = True self._test_qinq = True self._base_path = ['interfaces', 'bridge'] @@ -187,5 +188,5 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest): self.session.delete(['interfaces', 'ethernet', member, 'vif', vif]) if __name__ == '__main__': - unittest.main(verbosity=2, failfast=True) + unittest.main(verbosity=2) diff --git a/smoketest/scripts/cli/test_interfaces_ethernet.py b/smoketest/scripts/cli/test_interfaces_ethernet.py index 6a0bdf150..42c1f15df 100755 --- a/smoketest/scripts/cli/test_interfaces_ethernet.py +++ b/smoketest/scripts/cli/test_interfaces_ethernet.py @@ -37,10 +37,11 @@ def get_wpa_supplicant_value(interface, key): class EthernetInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): self._test_ip = True + self._test_ipv6 = True + self._test_ipv6_pd = True self._test_mtu = True self._test_vlan = True self._test_qinq = True - self._test_ipv6 = True self._base_path = ['interfaces', 'ethernet'] self._mirror_interfaces = ['dum21354'] diff --git a/smoketest/scripts/cli/test_interfaces_geneve.py b/smoketest/scripts/cli/test_interfaces_geneve.py index 98f55210f..12cded400 100755 --- a/smoketest/scripts/cli/test_interfaces_geneve.py +++ b/smoketest/scripts/cli/test_interfaces_geneve.py @@ -21,6 +21,8 @@ from base_interfaces_test import BasicInterfaceTest class GeneveInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): + self._test_ip = True + self._test_ipv6 = True self._base_path = ['interfaces', 'geneve'] self._options = { 'gnv0': ['vni 10', 'remote 127.0.1.1'], diff --git a/smoketest/scripts/cli/test_interfaces_l2tpv3.py b/smoketest/scripts/cli/test_interfaces_l2tpv3.py index c756bfdd5..81af6d7f4 100755 --- a/smoketest/scripts/cli/test_interfaces_l2tpv3.py +++ b/smoketest/scripts/cli/test_interfaces_l2tpv3.py @@ -22,6 +22,8 @@ from vyos.util import cmd class GeneveInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): + self._test_ip = True + self._test_ipv6 = True self._base_path = ['interfaces', 'l2tpv3'] self._options = { 'l2tpeth10': ['local-ip 127.0.0.1', 'remote-ip 127.10.10.10', diff --git a/smoketest/scripts/cli/test_interfaces_macsec.py b/smoketest/scripts/cli/test_interfaces_macsec.py index d9635951f..89743e5fd 100755 --- a/smoketest/scripts/cli/test_interfaces_macsec.py +++ b/smoketest/scripts/cli/test_interfaces_macsec.py @@ -33,6 +33,8 @@ def get_config_value(interface, key): class MACsecInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): super().setUp() + self._test_ip = True + self._test_ipv6 = True self._base_path = ['interfaces', 'macsec'] self._options = { 'macsec0': ['source-interface eth0', 'security cipher gcm-aes-128'] } diff --git a/smoketest/scripts/cli/test_interfaces_pseudo_ethernet.py b/smoketest/scripts/cli/test_interfaces_pseudo_ethernet.py index 85e5e70bd..10bd7ca34 100755 --- a/smoketest/scripts/cli/test_interfaces_pseudo_ethernet.py +++ b/smoketest/scripts/cli/test_interfaces_pseudo_ethernet.py @@ -22,6 +22,7 @@ class PEthInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): self._test_ip = True self._test_ipv6 = True + self._test_ipv6_pd = True self._test_mtu = True self._test_vlan = True self._test_qinq = True diff --git a/smoketest/scripts/cli/test_interfaces_tunnel.py b/smoketest/scripts/cli/test_interfaces_tunnel.py index ca68cb8ba..f67b813af 100755 --- a/smoketest/scripts/cli/test_interfaces_tunnel.py +++ b/smoketest/scripts/cli/test_interfaces_tunnel.py @@ -62,6 +62,8 @@ def tunnel_conf(interface): class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): + self._test_ip = True + self._test_ipv6 = True self._test_mtu = True self._base_path = ['interfaces', 'tunnel'] self.local_v4 = '192.0.2.1' @@ -82,85 +84,14 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): self.session.delete(['interfaces', 'dummy', source_if]) super().tearDown() - def test_ipip(self): - interface = 'tun100' - encapsulation = 'ipip' - local_if_addr = '10.10.10.1/24' - self.session.set(self._base_path + [interface, 'address', local_if_addr]) - - # Must provide an "encapsulation" for tunnel tun10 - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'encapsulation', encapsulation]) - - # Must configure either local-ip or dhcp-interface for tunnel ipip tun100 - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'local-ip', self.local_v4]) - - # missing required option remote for ipip - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'remote-ip', remote_ip4]) - - # Configure Tunnel Source interface - self.session.set(self._base_path + [interface, 'source-interface', source_if]) - - self.session.commit() - - conf = tunnel_conf(interface) - self.assertEqual(interface, conf['ifname']) - self.assertEqual(encapsulation, conf['link_type']) - self.assertEqual(mtu, conf['mtu']) - self.assertEqual(source_if, conf['link']) - - self.assertEqual(self.local_v4, conf['linkinfo']['info_data']['local']) - self.assertEqual(remote_ip4, conf['linkinfo']['info_data']['remote']) - - def test_ipip6(self): - interface = 'tun110' - encapsulation = 'ipip6' - local_if_addr = '10.10.10.1/24' - - self.session.set(self._base_path + [interface, 'address', local_if_addr]) - - # Must provide an "encapsulation" for tunnel tun10 - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'encapsulation', encapsulation]) - - # Must configure either local-ip or dhcp-interface for tunnel ipip tun100 - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'local-ip', self.local_v6]) - - # missing required option remote for ipip - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'remote-ip', remote_ip6]) - - # Configure Tunnel Source interface - self.session.set(self._base_path + [interface, 'source-interface', source_if]) - - self.session.commit() - - conf = tunnel_conf(interface) - self.assertEqual(interface, conf['ifname']) - self.assertEqual('tunnel6', conf['link_type']) - self.assertEqual(mtu, conf['mtu']) - self.assertEqual(source_if, conf['link']) - - self.assertEqual(self.local_v6, conf['linkinfo']['info_data']['local']) - self.assertEqual(remote_ip6, conf['linkinfo']['info_data']['remote']) - - def test_tunnel_verify_ipv4_local_remote_addr(self): + def test_ipv4_encapsulations(self): # When running tests ensure that for certain encapsulation types the # local and remote IP address is actually an IPv4 address interface = f'tun1000' local_if_addr = f'10.10.200.1/24' - for encapsulation in ['ipip', 'sit', 'gre']: + for encapsulation in ['ipip', 'sit', 'gre', 'gre-bridge']: self.session.set(self._base_path + [interface, 'address', local_if_addr]) self.session.set(self._base_path + [interface, 'encapsulation', encapsulation]) self.session.set(self._base_path + [interface, 'local-ip', self.local_v6]) @@ -176,14 +107,35 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): self.session.commit() self.session.set(self._base_path + [interface, 'remote-ip', remote_ip4]) + self.session.set(self._base_path + [interface, 'source-interface', source_if]) + + # Source interface can not be used with sit and gre-bridge + if encapsulation in ['sit', 'gre-bridge']: + with self.assertRaises(ConfigSessionError): + self.session.commit() + self.session.delete(self._base_path + [interface, 'source-interface']) + # Check if commit is ok self.session.commit() + conf = tunnel_conf(interface) + self.assertEqual(interface, conf['ifname']) + self.assertEqual(mtu, conf['mtu']) + + if encapsulation not in ['sit', 'gre-bridge']: + self.assertEqual(source_if, conf['link']) + self.assertEqual(encapsulation, conf['link_type']) + elif encapsulation in ['gre-bridge']: + self.assertEqual('ether', conf['link_type']) + + self.assertEqual(self.local_v4, conf['linkinfo']['info_data']['local']) + self.assertEqual(remote_ip4, conf['linkinfo']['info_data']['remote']) + # cleanup this instance self.session.delete(self._base_path + [interface]) self.session.commit() - def test_tunnel_verify_ipv6_local_remote_addr(self): + def test_ipv6_encapsulations(self): # When running tests ensure that for certain encapsulation types the # local and remote IP address is actually an IPv6 address @@ -205,9 +157,28 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): self.session.commit() self.session.set(self._base_path + [interface, 'remote-ip', remote_ip6]) + # Configure Tunnel Source interface + self.session.set(self._base_path + [interface, 'source-interface', source_if]) + # Check if commit is ok self.session.commit() + conf = tunnel_conf(interface) + self.assertEqual(interface, conf['ifname']) + self.assertEqual(mtu, conf['mtu']) + self.assertEqual(source_if, conf['link']) + + # remap encapsulation protocol(s) + if encapsulation in ['ipip6', 'ip6ip6']: + encapsulation = 'tunnel6' + elif encapsulation in ['ip6gre']: + encapsulation = 'gre6' + + self.assertEqual(encapsulation, conf['link_type']) + + self.assertEqual(self.local_v6, conf['linkinfo']['info_data']['local']) + self.assertEqual(remote_ip6, conf['linkinfo']['info_data']['remote']) + # cleanup this instance self.session.delete(self._base_path + [interface]) self.session.commit() @@ -232,148 +203,5 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): # Check if commit is ok self.session.commit() - def test_tunnel_ip6ip6(self): - interface = 'tun120' - encapsulation = 'ip6ip6' - local_if_addr = '2001:db8:f00::1/24' - - self.session.set(self._base_path + [interface, 'address', local_if_addr]) - - # Must provide an "encapsulation" for tunnel tun10 - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'encapsulation', encapsulation]) - - # Must configure either local-ip or dhcp-interface for tunnel ipip tun100 - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'local-ip', self.local_v6]) - - # missing required option remote for ipip - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'remote-ip', remote_ip6]) - - # Configure Tunnel Source interface - self.session.set(self._base_path + [interface, 'source-interface', source_if]) - - self.session.commit() - - conf = tunnel_conf(interface) - self.assertEqual(interface, conf['ifname']) - self.assertEqual('tunnel6', conf['link_type']) - self.assertEqual(mtu, conf['mtu']) - self.assertEqual(source_if, conf['link']) - - self.assertEqual(self.local_v6, conf['linkinfo']['info_data']['local']) - self.assertEqual(remote_ip6, conf['linkinfo']['info_data']['remote']) - - def test_tunnel_gre_ipv4(self): - interface = 'tun200' - encapsulation = 'gre' - local_if_addr = '172.16.1.1/24' - - self.session.set(self._base_path + [interface, 'address', local_if_addr]) - - # Must provide an "encapsulation" for tunnel tun10 - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'encapsulation', encapsulation]) - - # Must configure either local-ip or dhcp-interface - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'local-ip', self.local_v4]) - - # No assertion is raised for GRE remote-ip when missing - self.session.set(self._base_path + [interface, 'remote-ip', remote_ip4]) - - # Configure Tunnel Source interface - self.session.set(self._base_path + [interface, 'source-interface', source_if]) - - self.session.commit() - - conf = tunnel_conf(interface) - self.assertEqual(interface, conf['ifname']) - self.assertEqual(encapsulation, conf['link_type']) - self.assertEqual(mtu, conf['mtu']) - self.assertEqual(source_if, conf['link']) - - self.assertEqual(self.local_v4, conf['linkinfo']['info_data']['local']) - self.assertEqual(remote_ip4, conf['linkinfo']['info_data']['remote']) - - - def test_gre_ipv6(self): - interface = 'tun210' - encapsulation = 'ip6gre' - local_if_addr = '2001:db8:f01::1/24' - - self.session.set(self._base_path + [interface, 'address', local_if_addr]) - - # Must provide an "encapsulation" for tunnel tun10 - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'encapsulation', encapsulation]) - - # Must configure either local-ip or dhcp-interface - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'local-ip', self.local_v6]) - - # No assertion is raised for GRE remote-ip when missing - self.session.set(self._base_path + [interface, 'remote-ip', remote_ip6]) - - # Configure Tunnel Source interface - self.session.set(self._base_path + [interface, 'source-interface', source_if]) - - self.session.commit() - - conf = tunnel_conf(interface) - self.assertEqual(interface, conf['ifname']) - self.assertEqual(encapsulation, conf['link_type']) - self.assertEqual(mtu, conf['mtu']) - self.assertEqual(source_if, conf['link']) - - self.assertEqual(self.local_v6, conf['linkinfo']['info_data']['local']) - self.assertEqual(remote_ip6, conf['linkinfo']['info_data']['remote']) - - - def test_tunnel_sit(self): - interface = 'tun300' - encapsulation = 'sit' - local_if_addr = '172.16.2.1/24' - - self.session.set(self._base_path + [interface, 'address', local_if_addr]) - - # Must provide an "encapsulation" for tunnel tun10 - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'encapsulation', encapsulation]) - - # Must configure either local-ip or dhcp-interface - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.set(self._base_path + [interface, 'local-ip', self.local_v4]) - - # No assertion is raised for GRE remote-ip when missing - self.session.set(self._base_path + [interface, 'remote-ip', remote_ip4]) - - # Source interface can not be used with sit - self.session.set(self._base_path + [interface, 'source-interface', source_if]) - with self.assertRaises(ConfigSessionError): - self.session.commit() - self.session.delete(self._base_path + [interface, 'source-interface']) - - self.session.commit() - - conf = tunnel_conf(interface) - self.assertEqual(interface, conf['ifname']) - self.assertEqual(encapsulation, conf['link_type']) - self.assertEqual(mtu, conf['mtu']) - - self.assertEqual(self.local_v4, conf['linkinfo']['info_data']['local']) - self.assertEqual(remote_ip4, conf['linkinfo']['info_data']['remote']) - - if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/smoketest/scripts/cli/test_interfaces_vxlan.py b/smoketest/scripts/cli/test_interfaces_vxlan.py index a9b0fc5a1..a726aa610 100755 --- a/smoketest/scripts/cli/test_interfaces_vxlan.py +++ b/smoketest/scripts/cli/test_interfaces_vxlan.py @@ -21,6 +21,8 @@ from base_interfaces_test import BasicInterfaceTest class VXLANInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): + self._test_ip = True + self._test_ipv6 = True self._test_mtu = True self._base_path = ['interfaces', 'vxlan'] self._options = { diff --git a/smoketest/scripts/cli/test_interfaces_wireless.py b/smoketest/scripts/cli/test_interfaces_wireless.py index ffaa7d523..51d97f032 100755 --- a/smoketest/scripts/cli/test_interfaces_wireless.py +++ b/smoketest/scripts/cli/test_interfaces_wireless.py @@ -33,6 +33,7 @@ def get_config_value(interface, key): class WirelessInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): + self._test_ip = True self._base_path = ['interfaces', 'wireless'] self._options = { 'wlan0': ['physical-device phy0', 'ssid VyOS-WIFI-0', diff --git a/smoketest/scripts/cli/test_interfaces_wirelessmodem.py b/smoketest/scripts/cli/test_interfaces_wirelessmodem.py index 45cd069f4..696a6946b 100755 --- a/smoketest/scripts/cli/test_interfaces_wirelessmodem.py +++ b/smoketest/scripts/cli/test_interfaces_wirelessmodem.py @@ -40,7 +40,7 @@ class WWANInterfaceTest(unittest.TestCase): self.session.commit() del self.session - def test_wlm_1(self): + def test_wwan(self): for interface in self._interfaces: self.session.set(base_path + [interface, 'no-peer-dns']) self.session.set(base_path + [interface, 'connect-on-demand']) diff --git a/smoketest/scripts/cli/test_nat.py b/smoketest/scripts/cli/test_nat.py index 7ca82f86f..b5702d691 100755 --- a/smoketest/scripts/cli/test_nat.py +++ b/smoketest/scripts/cli/test_nat.py @@ -138,7 +138,6 @@ class TestNAT(unittest.TestCase): else: self.assertEqual(iface, inbound_iface_200) - def test_snat_required_translation_address(self): # T2813: Ensure translation address is specified rule = '5' @@ -156,5 +155,28 @@ class TestNAT(unittest.TestCase): self.session.set(src_path + ['rule', rule, 'translation', 'address', 'masquerade']) self.session.commit() + def test_dnat_negated_addresses(self): + # T3186: negated addresses are not accepted by nftables + rule = '1000' + self.session.set(dst_path + ['rule', rule, 'destination', 'address', '!192.0.2.1']) + self.session.set(dst_path + ['rule', rule, 'destination', 'port', '53']) + self.session.set(dst_path + ['rule', rule, 'inbound-interface', 'eth0']) + self.session.set(dst_path + ['rule', rule, 'protocol', 'tcp_udp']) + self.session.set(dst_path + ['rule', rule, 'source', 'address', '!192.0.2.1']) + self.session.set(dst_path + ['rule', rule, 'translation', 'address', '192.0.2.1']) + self.session.set(dst_path + ['rule', rule, 'translation', 'port', '53']) + self.session.commit() + + def test_nat_no_rules(self): + # T3206: deleting all rules but keep the direction 'destination' or + # 'source' resulteds in KeyError: 'rule'. + # + # Test that both 'nat destination' and 'nat source' nodes can exist + # without any rule + self.session.set(src_path) + self.session.set(dst_path) + self.session.commit() + + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py index 1d93aeda4..ccb9268fe 100755 --- a/smoketest/scripts/cli/test_protocols_bgp.py +++ b/smoketest/scripts/cli/test_protocols_bgp.py @@ -47,8 +47,7 @@ neighbor_config = { 'cap_strict' : '', }, '192.0.2.3' : { -# XXX: not available in current Perl backend -# 'description' : 'foo bar baz', + 'description' : 'foo bar baz', 'remote_as' : '200', 'passive' : '', 'multi_hop' : '5', @@ -67,8 +66,7 @@ peer_group_config = { # 'ttl_security': '5', }, 'bar' : { -# XXX: not available in current Perl backend -# 'description' : 'foo peer bar group', + 'description' : 'foo peer bar group', 'remote_as' : '200', 'shutdown' : '', 'no_cap_nego' : '', diff --git a/smoketest/scripts/cli/test_system_ntp.py b/smoketest/scripts/cli/test_system_ntp.py index 7d1bc144f..986c8dfb2 100755 --- a/smoketest/scripts/cli/test_system_ntp.py +++ b/smoketest/scripts/cli/test_system_ntp.py @@ -76,7 +76,11 @@ class TestSystemNTP(unittest.TestCase): self.assertTrue(process_named_running(PROCESS_NAME)) def test_ntp_clients(self): - # Test the allowed-networks statement + """ Test the allowed-networks statement """ + listen_address = ['127.0.0.1', '::1'] + for listen in listen_address: + self.session.set(base_path + ['listen-address', listen]) + networks = ['192.0.2.0/24', '2001:db8:1000::/64'] for network in networks: self.session.set(base_path + ['allow-clients', 'address', network]) @@ -102,7 +106,9 @@ class TestSystemNTP(unittest.TestCase): # Check listen address tmp = get_config_value('interface') - test = ['ignore wildcard', 'listen 127.0.0.1', 'listen ::1'] + test = ['ignore wildcard'] + for listen in listen_address: + test.append(f'listen {listen}') self.assertEqual(tmp, test) # Check for running process diff --git a/src/conf_mode/nat.py b/src/conf_mode/nat.py index 1ccec3d2e..2d98cb11b 100755 --- a/src/conf_mode/nat.py +++ b/src/conf_mode/nat.py @@ -88,7 +88,7 @@ def get_config(config=None): for direction in ['source', 'destination']: if direction in nat: default_values = defaults(base + [direction, 'rule']) - for rule in nat[direction]['rule']: + for rule in dict_search(f'{direction}.rule', nat) or []: nat[direction]['rule'][rule] = dict_merge(default_values, nat[direction]['rule'][rule]) diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py index 678be5066..de0148b2f 100755 --- a/src/conf_mode/protocols_bgp.py +++ b/src/conf_mode/protocols_bgp.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020 VyOS maintainers and contributors +# Copyright (C) 2020-2021 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -31,22 +31,16 @@ config_file = r'/tmp/bgp.frr' def get_config(): conf = Config() - base = ['protocols', 'nbgp'] + base = ['protocols', 'bgp'] bgp = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) - # XXX: any reason we can not move this into the FRR template? - # we shall not call vtysh directly, especially not in get_config() if not conf.exists(base): - bgp = {} - call('vtysh -c \"conf t\" -c \"no ip protocol bgp\" ') - - if not conf.exists(base + ['route-map']): - call('vtysh -c \"conf t\" -c \"no ip protocol bgp\" ') + return bgp # We also need some additional information from the config, # prefix-lists and route-maps for instance. base = ['policy'] - tmp = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) + tmp = conf.get_config_dict(base, key_mangling=('-', '_')) # As we only support one ASN (later checked in begin of verify()) we add the # new information only to the first AS number asn = next(iter(bgp)) @@ -64,15 +58,11 @@ def verify(bgp): raise ConfigError('Only one BGP AS number can be defined!') for asn, asn_config in bgp.items(): - import pprint - pprint.pprint(asn_config) - # Common verification for both peer-group and neighbor statements for neighbor in ['neighbor', 'peer_group']: # bail out early if there is no neighbor or peer-group statement # this also saves one indention level if neighbor not in asn_config: - print(f'no {neighbor} found in config') continue for peer, peer_config in asn_config[neighbor].items(): @@ -101,22 +91,26 @@ def verify(bgp): # Validate if configured Prefix list exists if 'prefix_list' in afi_config: for tmp in ['import', 'export']: - if tmp in afi_config['prefix_list']: - if afi == 'ipv4_unicast': - prefix_list = afi_config['prefix_list'][tmp] - if 'prefix_list' not in asn_config or prefix_list not in asn_config['prefix_list']: - raise ConfigError(f'prefix-list "{prefix_list}" used for "{tmp}" does not exist!') - if afi == 'ipv6_unicast': - prefix_list = afi_config['prefix_list6'][tmp] - if 'prefix_list6' not in asn_config or prefix_list not in asn_config['prefix_list6']: - raise ConfigError(f'prefix-list "{prefix_list}" used for "{tmp}" does not exist!') - + if tmp not in afi_config['prefix_list']: + # bail out early + continue + # get_config_dict() mangles all '-' characters to '_' this is legitim, thus all our + # compares will run on '_' as also '_' is a valid name for a prefix-list + prefix_list = afi_config['prefix_list'][tmp].replace('-', '_') + if afi == 'ipv4_unicast': + if dict_search(f'policy.prefix_list.{prefix_list}', asn_config) == None: + raise ConfigError(f'prefix-list "{prefix_list}" used for "{tmp}" does not exist!') + elif afi == 'ipv6_unicast': + if dict_search(f'policy.prefix_list6.{prefix_list}', asn_config) == None: + raise ConfigError(f'prefix-list6 "{prefix_list}" used for "{tmp}" does not exist!') if 'route_map' in afi_config: for tmp in ['import', 'export']: if tmp in afi_config['route_map']: - route_map = afi_config['route_map'][tmp] - if 'route_map' not in asn_config or route_map not in asn_config['route_map']: + # get_config_dict() mangles all '-' characters to '_' this is legitim, thus all our + # compares will run on '_' as also '_' is a valid name for a route-map + route_map = afi_config['route_map'][tmp].replace('-', '_') + if dict_search(f'policy.route_map.{route_map}', asn_config) == None: raise ConfigError(f'route-map "{route_map}" used for "{tmp}" does not exist!') diff --git a/src/conf_mode/ssh.py b/src/conf_mode/ssh.py index 28e606663..8eeb0a7c1 100755 --- a/src/conf_mode/ssh.py +++ b/src/conf_mode/ssh.py @@ -77,10 +77,9 @@ def apply(ssh): if not ssh: # SSH access is removed in the commit call('systemctl stop ssh.service') + return None - if ssh: - call('systemctl restart ssh.service') - + call('systemctl restart ssh.service') return None if __name__ == '__main__': diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py index 10d297aff..99af5c757 100755 --- a/src/conf_mode/system-login.py +++ b/src/conf_mode/system-login.py @@ -158,11 +158,11 @@ def generate(login): env = os.environ.copy() env['vyos_libexec_dir'] = '/usr/libexec/vyos' - call(f"/opt/vyatta/sbin/my_delete system login user '{user}' " - "authentication plaintext-password", env=env) + call(f"/opt/vyatta/sbin/my_delete system login user '{user}' " \ + f"authentication plaintext-password", env=env) - call(f"/opt/vyatta/sbin/my_set system login user '{user}' " - "authentication encrypted-password '{encrypted_password}'", env=env) + call(f"/opt/vyatta/sbin/my_set system login user '{user}' " \ + f"authentication encrypted-password '{encrypted_password}'", env=env) else: try: if getspnam(user).sp_pwdp == dict_search('authentication.encrypted_password', user_config): @@ -212,7 +212,6 @@ def apply(login): else: command += f" -d '/home/{user}'" command += f' -G frrvty,vyattacfg,sudo,adm,dip,disk {user}' - try: cmd(command) diff --git a/vyos-configtest b/vyos-configtest deleted file mode 100644 index e69de29bb..000000000 --- a/vyos-configtest +++ /dev/null |