-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bgpd: add [no]neighbor capability fqdn #15192
Conversation
6220fc6
to
52c277e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you switch to no neighbor <A.B.C.D|X:X::X:X|WORD> capability fqdn
format?
Hi Donatas, the draft defining that capabilty is using hostname: what do you prefer? |
I meant that CLI change should be using |
what do you think about |
Why can't it be without the last dont-negotiate? |
the default will bee hostname capability advertising |
ok i will do it |
52c277e
to
f7084f7
Compare
And it should be |
The draft title is named "hostname", not "fqdn". |
Disagree, the capability is named FQDN, not hostname. |
conforming with https://www.iana.org/assignments/capability-codes/capability-codes.xhtml |
f7084f7
to
d42f8ad
Compare
ci:rerun |
d42f8ad
to
429263d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments to address, sorry.
bgpd/bgp_open.c
Outdated
if (cmd_domainname_get()) { | ||
len = strlen(cmd_domainname_get()); | ||
/* FQDN capability */ | ||
if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_FQDN)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we combine cmd_hostname_get() and CHECK_FLAG()? This keeps the same nesting level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken into account
bgpd/bgp_vty.c
Outdated
/* neighbor capability fqdn */ | ||
DEFPY (neighbor_capability_fqdn, | ||
neighbor_capability_fqdn_cmd, | ||
"[no$no]neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor capability fqdn", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after no
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken into account
bgpd/bgp_vty.c
Outdated
@@ -18189,6 +18207,12 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp, | |||
if (peergroup_flag_check(peer, PEER_FLAG_DONT_CAPABILITY)) | |||
vty_out(vty, " neighbor %s dont-capability-negotiate\n", addr); | |||
|
|||
/* capability fqdn*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* capability fqdn */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken into account
bgpd/bgp_vty.c
Outdated
@@ -20525,6 +20549,9 @@ void bgp_vty_init(void) | |||
install_element(BGP_NODE, &neighbor_dont_capability_negotiate_cmd); | |||
install_element(BGP_NODE, &no_neighbor_dont_capability_negotiate_cmd); | |||
|
|||
/* "neighbor capability fqdn" command.*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* "neighbor capability fqdn" command. */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken into account
doc/user/bgp.rst
Outdated
use of peer's name and domain name. | ||
|
||
This capability is activated by default. The ''no neighbor PEER capability | ||
fqdn'' avoid negotiation of that capability. This is usefull for peer that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is useful for peers who are not supporting this capability or supporting BGP Capabilities Negotiation RFC 2842.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken into account
bgpd/bgp_vty.c
Outdated
@@ -18189,6 +18207,12 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp, | |||
if (peergroup_flag_check(peer, PEER_FLAG_DONT_CAPABILITY)) | |||
vty_out(vty, " neighbor %s dont-capability-negotiate\n", addr); | |||
|
|||
/* capability fqdn*/ | |||
if (!peergroup_flag_check(peer, PEER_FLAG_CAPABILITY_FQDN)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this flag work with peer groups? I think we need to add that to peer_group2peer_config_copy()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it works, unitary tests are ok
@@ -150,6 +151,47 @@ def _bgp_check_fqdn(fqdn=None): | |||
_, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5) | |||
assert result is None, "FQDN capability disabled, but we still have a hostname" | |||
|
|||
step("re enable sending any capability from r2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Re-enable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken into account
tests/topotests/bgp_dont_capability_negotiate/test_bgp_dont_capability_negotiate.py
Show resolved
Hide resolved
429263d
to
8d64bc9
Compare
7efdf5d
to
7570b36
Compare
7570b36
to
d18957a
Compare
@fdumontet6WIND not everything is addressed yet, please look at the comments again. |
@fdumontet6WIND could you fix all the pending comments before merging? |
d18957a
to
5277fd7
Compare
ci:rerun |
5277fd7
to
8d028d3
Compare
cisco routers are not dealing fairly whith unsupported capabilities. When a cisco router receive an unsupported capabilities it reset the negociation without notifying the unmatching capability as described in RFC2842. Cisco suggest the use of neighbor x.x.x.x capability fqdn to avoid the use of fqdn in open message. this new command is to remove the use of fqdn capability in the open message with the peer "x.x.x.x". Link: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/116189-problemsolution-technology-00.pdf Signed-off-by: Francois Dumontet <[email protected]>
add some steps for testing of add [no]neighbor capability fqdn command support. Signed-off-by: Francois Dumontet <[email protected]>
improve bgp doc Signed-off-by: Francois Dumontet <[email protected]>
8d028d3
to
d034d19
Compare
bgpd: add [no]neighbor dont-capability-negotiate hostname command
cisco routers are not dealing fairly whith unsupported capabilities.
When a cisco router receive an unsupported capabilities it reset the
negociation without notifying the unmatching capability as described in
RFC2842.
Cisco suggest the use of
neighbor x.x.x.x dont-capability-negociate capability-type
to avoid the use of "capability-type" in open message.
Our case is about the hostname capability.
this new command is to remove the use of hostname capability in the
open message with the peer "x.x.x.x".
Link: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/116189-problemsolution-technology-00.pdf
Signed-off-by: Francois Dumontet [email protected]