FRRouting supports using IP network address as BGP peer instead of explicit configuration each of them (bgp listen range option - http://docs.frrouting.org/en/latest/bgp.html#clicmd-[no]bgplistenrange%3CA.B.C.D/M|X:X::X:X/M%3Epeer-groupPGNAME).
We could this to VyOS to extend BGP functionality.
Description
Description
Details
Details
- Difficulty level
- Unknown (require assessment)
- Version
- -
- Why the issue appeared?
- Will be filled on close
- Is it a breaking change?
- Unspecified (possibly destroys the router)
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
In progress | FEATURE REQUEST | None | T3355 Remove all remaining legacy Vyatta code | ||
Resolved | c-po | T2175 Rewriting all FRR processes allow for reloading and to XML/Python style | |||
Resolved | FEATURE REQUEST | c-po | T2174 Rewrite protocol BGP to new XML/Python style | ||
Resolved | FEATURE REQUEST | zsdc | T1875 Add the ability to use network address as BGP neighbor (bgp listen range) |
Event Timeline
Comment Actions
I tried adding it but failed miserably. This should best be done with the entire BGP rewrite.
Here is my change for future reference:
diff --git c/scripts/bgp/vyatta-bgp.pl i/scripts/bgp/vyatta-bgp.pl index 359eb972..7646055b 100755 --- c/scripts/bgp/vyatta-bgp.pl +++ i/scripts/bgp/vyatta-bgp.pl @@ -206,6 +206,11 @@ my %qcom = ( del => 'router bgp #3 ; no neighbor #5', noerr => 'del', }, + 'protocols bgp var listen-range var peer-group' => { + set => 'router bgp #3 ; bgp listen range #5 peer-group #7', + del => 'router bgp #3 ; no bgp listen range #5 peer-group #7', + noerr => 'del', + }, 'protocols bgp var neighbor var address-family' => { set => undef, del => undef, @@ -1791,6 +1796,7 @@ sub main # notice the extra space in the level string. keeps the parent from being deleted. $qconfig->deleteConfigTreeRecursive('protocols bgp var neighbor var', undef, \@ordered) || die "exiting $?\n"; + $qconfig->deleteConfigTreeRecursive('protocols bgp var listen-range var', undef, \@ordered) || die "exiting $?\n"; $qconfig->deleteConfigTreeRecursive('protocols bgp var peer-group var', undef, \@ordered) || die "exiting $?\n"; $qconfig->deleteConfigTreeRecursive('protocols bgp') || die "exiting $?\n"; @@ -1805,5 +1811,6 @@ sub main $qconfig->setConfigTreeRecursive('protocols bgp var neighbor var address-family ipv6-unicast' , undef, \@ordered) || die "exiting $?\n"; $qconfig->setConfigTreeRecursive('protocols bgp var neighbor var ', undef, \@ordered) || die "exiting $?\n"; + $qconfig->setConfigTreeRecursive('protocols bgp var listen-range var ', undef, \@ordered) || die "exiting $?\n"; $qconfig->setConfigTreeRecursive('protocols bgp') || die "exiting $?\n"; } diff --git c/templates/protocols/bgp/node.tag/listen-range/node.def i/templates/protocols/bgp/node.tag/listen-range/node.def new file mode 100644 index 00000000..94f1ac70 --- /dev/null +++ i/templates/protocols/bgp/node.tag/listen-range/node.def @@ -0,0 +1,6 @@ +tag: +type: txt +help: Accept connections from any peers in the specified prefix +val_help: ipv4net; IPv4 address and prefix length +val_help: ipv6net; IPv6 address and prefix length +syntax:expression: exec "ipaddrcheck --verbose --is-any-net $VAR(@)" diff --git c/templates/protocols/bgp/node.tag/listen-range/node.tag/peer-group/node.def i/templates/protocols/bgp/node.tag/listen-range/node.tag/peer-group/node.def new file mode 100644 index 00000000..b707f391 --- /dev/null +++ i/templates/protocols/bgp/node.tag/listen-range/node.tag/peer-group/node.def @@ -0,0 +1,7 @@ +type: txt +help: IPv4 peer group for this peer +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-bgp.pl --list-peer-groups --as $VAR(../../@) ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"protocols bgp $VAR(../../@) peer-group $VAR(@)\" "; "protocols bgp $VAR(../../@) peer-group $VAR(@) doesn't exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peer-group-bfd $VAR(@) --as $VAR(../../@)"