Skip to content
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

fix the show ip bgp network command #1733

Merged
merged 1 commit into from
Jul 30, 2021

Conversation

arlakshm
Copy link
Contributor

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan [email protected]

What I did

Fix the issue sonic-net/sonic-buildimage#7935

How I did it

Add the default namespace option to DEFAULT_NAMESPACE instead of None

How to verify it

Run the command on VS
show ip bgp network and show ipv6 bgp network

admin@vlab-01:~$ show ip bgp network  -h
Usage: show ip bgp network [OPTIONS] [<ipv4-address>|<ipv4-prefix>]
                           [bestpath|json|longer-prefixes|multipath]

  Show IP (IPv4) BGP network

Options:
  -n, --namespace TEXT  Namespace name or all  [default: ]
  -h, -?, --help        Show this message and exit.
admin@vlab-01:~$ show ip bgp network | more

BGP table version is 6405, local router ID is 10.1.0.32, vrf id 0
Default local pref 100, local AS 65100
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*= 0.0.0.0/0        10.0.0.61                              0 64600 65534 6666 6667 i
*=                  10.0.0.63                              0 64600 65534 6666 6667 i
*>                  10.0.0.57                              0 64600 65534 6666 6667 i
*=                  10.0.0.59                              0 64600 65534 6666 6667 i
*> 10.1.0.32/32     0.0.0.0                  0         32768 i
*> 100.1.0.29/32    10.0.0.57                              0 64600 i
*> 100.1.0.30/32    10.0.0.59                              0 64600 i
admin@vlab-01:~$ show ip bgp network 100.1.0.30/32

BGP routing table entry for 100.1.0.30/32
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  10.0.0.57 10.0.0.59 10.0.0.61 10.0.0.63
  64600
    10.0.0.59 from 10.0.0.59 (100.1.0.30)
      Origin IGP, valid, external, best (First path received)
      Community: 5060:12345
      Last update: Tue Jul 27 22:20:03 2021
admin@vlab-01:~$ show ipv6 bgp network | more
BGP table version is 6407, local router ID is 10.1.0.32, vrf id 0
Default local pref 100, local AS 65100
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*= ::/0             fc00::7a                               0 64600 65534 6666 6667 i
*=                  fc00::7e                               0 64600 65534 6666 6667 i
*>                  fc00::72                               0 64600 65534 6666 6667 i
*=                  fc00::76                               0 64600 65534 6666 6667 i
*> 2064:100::1d/128 fc00::72                               0 64600 i
*> 2064:100::1e/128 fc00::76                               0 64600 i
*> 2064:100::1f/128 fc00::7a                               0 64600 i
*> 2064:100::20/128 fc00::7e                               0 64600 i


admin@vlab-01:~$ show ipv6 bgp network 2064:100::20/128
BGP routing table entry for 2064:100::20/128
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  fc00::72 fc00::76 fc00::7a fc00::7e
  64600
    fc00::7e from fc00::7e (100.1.0.32)
    (fe80::cde:f4ff:feff:c74e) (prefer-global)
      Origin IGP, valid, external, best (First path received)
      Community: 5060:12345
      Last update: Tue Jul 27 22:20:07 2021

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@arlakshm arlakshm requested review from prsunny and smaheshm July 30, 2021 01:48
Copy link
Contributor

@smaheshm smaheshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@yxieca
Copy link
Contributor

yxieca commented Aug 5, 2021

@arlakshm can you create a separate PR for 202012 branch? This change cannot be cherry-picked cleanly.

judyjoseph pushed a commit that referenced this pull request Aug 7, 2021
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@prsunny
Copy link
Contributor

prsunny commented Oct 29, 2021

@arlakshm , this you may want to create a separate PR for 201911 as files have diverged a lot. @abdosi for viz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants