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

[FRR]: bgp-isolate works for ipv4 only #3070

Closed
jipanyang opened this issue Jun 24, 2019 · 1 comment
Closed

[FRR]: bgp-isolate works for ipv4 only #3070

jipanyang opened this issue Jun 24, 2019 · 1 comment
Assignees
Labels

Comments

@jipanyang
Copy link
Collaborator

Steps to reproduce the issue:
1.

root@vlab-01:/home/admin# docker exec -it bgp /bin/bash
root@vlab-01:/# bgp-isolate 

Hello, this is FRRouting (version 7.0.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

vlab-01# 
vlab-01# configure terminal
vlab-01(config)#   router bgp 65100
vlab-01(config-router)#     neighbor 10.0.0.57 route-map ISOLATE out
vlab-01(config-router)#     neighbor 10.0.0.59 route-map ISOLATE out
vlab-01(config-router)#     neighbor 10.0.0.61 route-map ISOLATE out
vlab-01(config-router)#     neighbor 10.0.0.63 route-map ISOLATE out
vlab-01(config-router)#     neighbor fc00::7a route-map ISOLATE out
vlab-01(config-router)#     neighbor fc00::7e route-map ISOLATE out
vlab-01(config-router)#     neighbor fc00::72 route-map ISOLATE out
vlab-01(config-router)#     neighbor fc00::76 route-map ISOLATE out
vlab-01(config-router)#   exit
vlab-01(config)# exit
vlab-01# 
vlab-01# clear ip bgp 10.0.0.57 soft out
vlab-01# clear ip bgp 10.0.0.59 soft out
vlab-01# clear ip bgp 10.0.0.61 soft out
vlab-01# clear ip bgp 10.0.0.63 soft out
vlab-01# clear ip bgp fc00::7a soft out
%BGP: Enable IPv4 Unicast address family for the neighbor fc00::7a
vlab-01# clear ip bgp fc00::7e soft out
%BGP: Enable IPv4 Unicast address family for the neighbor fc00::7e
vlab-01# clear ip bgp fc00::72 soft out
%BGP: Enable IPv4 Unicast address family for the neighbor fc00::72
vlab-01# clear ip bgp fc00::76 soft out
%BGP: Enable IPv4 Unicast address family for the neighbor fc00::76
vlab-01# 
vlab-01# 

"neighbor fc00::72 route-map ISOLATE out" went into "address-family ipv4 unicast"

root@vlab-01:/# vtysh

Hello, this is FRRouting (version 7.0.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

vlab-01# configure t
vlab-01(config)# router bgp 65100
vlab-01(config-router)# do sho run
Building configuration...

Current configuration:
!
frr version 7.0.1-sonic
frr defaults traditional
hostname vlab-01
log syslog informational
log facility local4
agentx
no service integrated-vtysh-config
!
password zebra
enable password zebra
!
ip route 0.0.0.0/0 10.250.0.1 200
!
router bgp 65100
 bgp router-id 10.1.0.32
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 bgp graceful-restart restart-time 240
 bgp graceful-restart
 bgp graceful-restart preserve-fw-state
 bgp bestpath as-path multipath-relax
 neighbor BGPSLBPassive peer-group
 neighbor BGPSLBPassive remote-as 65432
 neighbor BGPSLBPassive passive
 neighbor BGPSLBPassive ebgp-multihop 255
 neighbor BGPVac peer-group
 neighbor BGPVac remote-as 65432
 neighbor BGPVac passive
 neighbor BGPVac ebgp-multihop 255
 neighbor 10.0.0.57 remote-as 64600
 neighbor 10.0.0.57 description ARISTA01T1
 neighbor 10.0.0.57 timers 3 10
 neighbor 10.0.0.59 remote-as 64600
 neighbor 10.0.0.59 description ARISTA02T1
 neighbor 10.0.0.59 timers 3 10
 neighbor 10.0.0.61 remote-as 64600
 neighbor 10.0.0.61 description ARISTA03T1
 neighbor 10.0.0.61 timers 3 10
 neighbor 10.0.0.63 remote-as 64600
 neighbor 10.0.0.63 description ARISTA04T1
 neighbor 10.0.0.63 timers 3 10
 neighbor fc00::72 remote-as 64600
 neighbor fc00::72 description ARISTA01T1
 neighbor fc00::72 timers 3 10
 neighbor fc00::76 remote-as 64600
 neighbor fc00::76 description ARISTA02T1
 neighbor fc00::76 timers 3 10
 neighbor fc00::7a remote-as 64600
 neighbor fc00::7a description ARISTA03T1
 neighbor fc00::7a timers 3 10
 neighbor fc00::7e remote-as 64600
 neighbor fc00::7e description ARISTA04T1
 neighbor fc00::7e timers 3 10
 bgp listen range 10.255.0.0/25 peer-group BGPSLBPassive
 bgp listen range 192.168.0.0/21 peer-group BGPVac
 !
 address-family ipv4 unicast
  network 10.1.0.32/32
  network 192.168.0.0/21
  neighbor BGPSLBPassive activate
  neighbor BGPSLBPassive soft-reconfiguration inbound
  neighbor BGPSLBPassive route-map FROM_BGP_SPEAKER_V4 in
  neighbor BGPSLBPassive route-map TO_BGP_SPEAKER_V4 out
  neighbor BGPVac activate
  neighbor BGPVac soft-reconfiguration inbound
  neighbor BGPVac route-map FROM_BGP_SPEAKER_V4 in
  neighbor BGPVac route-map TO_BGP_SPEAKER_V4 out
  neighbor 10.0.0.57 activate
  neighbor 10.0.0.57 soft-reconfiguration inbound
  neighbor 10.0.0.57 allowas-in 1
  neighbor 10.0.0.57 route-map ISOLATE out
  neighbor 10.0.0.59 activate
  neighbor 10.0.0.59 soft-reconfiguration inbound
  neighbor 10.0.0.59 allowas-in 1
  neighbor 10.0.0.59 route-map ISOLATE out
  neighbor 10.0.0.61 activate
  neighbor 10.0.0.61 soft-reconfiguration inbound
  neighbor 10.0.0.61 allowas-in 1
  neighbor 10.0.0.61 route-map ISOLATE out
  neighbor 10.0.0.63 activate
  neighbor 10.0.0.63 soft-reconfiguration inbound
  neighbor 10.0.0.63 allowas-in 1
  neighbor 10.0.0.63 route-map ISOLATE out
  neighbor fc00::72 route-map ISOLATE out
  neighbor fc00::76 route-map ISOLATE out
  neighbor fc00::7a route-map ISOLATE out
  neighbor fc00::7e route-map ISOLATE out
  maximum-paths 64
 exit-address-family
 !
 address-family ipv6 unicast
  network fc00:1::/64
  neighbor BGPSLBPassive activate
  neighbor BGPVac activate
  neighbor fc00::72 activate
  neighbor fc00::72 soft-reconfiguration inbound
  neighbor fc00::72 allowas-in 1
  neighbor fc00::72 route-map set-next-hop-global-v6 in
  neighbor fc00::76 activate
  neighbor fc00::76 soft-reconfiguration inbound
  neighbor fc00::76 allowas-in 1
  neighbor fc00::76 route-map set-next-hop-global-v6 in
  neighbor fc00::7a activate
  neighbor fc00::7a soft-reconfiguration inbound
  neighbor fc00::7a allowas-in 1
  neighbor fc00::7a route-map set-next-hop-global-v6 in
  neighbor fc00::7e activate
  neighbor fc00::7e soft-reconfiguration inbound
  neighbor fc00::7e allowas-in 1
  neighbor fc00::7e route-map set-next-hop-global-v6 in
  maximum-paths 64
 exit-address-family
!
route-map RM_SET_SRC6 permit 10
 set src fc00:1::32
!
route-map RM_SET_SRC permit 10
 set src 10.1.0.32
!
route-map set-next-hop-global-v6 permit 10
 set ipv6 next-hop prefer-global 
!
route-map ISOLATE permit 10
 set as-path prepend 65100
!
route-map TO_BGP_SPEAKER_V4 deny 10
!
route-map FROM_BGP_SPEAKER_V4 permit 10
!
ip protocol bgp route-map RM_SET_SRC
!
ipv6 protocol bgp route-map RM_SET_SRC6
!
line vty
!
end
vlab-01(config-router)# 


AS 65100 prepended for ipv4 route only on neighbor:

ARISTA01T1#show ip bgp neighbors  10.0.0.56 received-routes
BGP routing table information for VRF default
Router identifier 100.1.0.29, local AS number 64600
Route status codes: s - suppressed, * - valid, > - active, # - not installed, E - ECMP head, e - ECMP
                    S - Stale, c - Contributing to ECMP, b - backup, L - labeled-unicast
Origin codes: i - IGP, e - EGP, ? - incomplete
AS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop

        Network                Next Hop              Metric  LocPref Weight  Path
 * >     10.1.0.32/32           10.0.0.56             0       -       -       65100 65100 i
 * >     192.168.0.0/21         10.0.0.56             0       -       -       65100 65100 i

ARISTA01T1#show ipv6 bgp neighbors fc00::71 received-routes
BGP routing table information for VRF default
Router identifier 100.1.0.29, local AS number 64600
Route status codes: s - suppressed, * - valid, > - active, # - not installed, E - ECMP head, e - ECMP
                    S - Stale, c - Contributing to ECMP, b - backup, L - labeled-unicast
Origin codes: i - IGP, e - EGP, ? - incomplete
AS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop

         Network                Next Hop              Metric  LocPref Weight Path
 * >     fc00:1::/64            fc00::71              0       -       -      65100 i  
ARISTA01T1#

Describe the results you received:

Describe the results you expected:

ARISTA01T1#show ipv6 bgp neighbors fc00::71 received-routes
BGP routing table information for VRF default
Router identifier 100.1.0.29, local AS number 64600
Route status codes: s - suppressed, * - valid, > - active, # - not installed, E - ECMP head, e - ECMP
                    S - Stale, c - Contributing to ECMP, b - backup, L - labeled-unicast
Origin codes: i - IGP, e - EGP, ? - incomplete
AS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop

         Network                Next Hop              Metric  LocPref Weight Path
 * >     fc00:1::/64            fc00::71              0       -       -      65100 65100 i  

Additional information you deem important (e.g. issue happens only occasionally):

@pavel-shirshov
Copy link
Contributor

Fixed #3183

mssonicbld added a commit that referenced this issue Mar 15, 2024
…lly (#18367)

#### Why I did it
src/sonic-swss
```
* dd4810b1 - (HEAD -> 202311, origin/202311) Set HOST_TX_READY_NOTIFY attribute only after query capabilities(#3070) (2 days ago) [noaOrMlnx]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan added a commit to dgsudharsan/sonic-buildimage that referenced this issue Apr 5, 2024
…commits

* c96a2f84 - Revert "[acl] Add IN_PORTS qualifier for L3 table (sonic-net#3078)" (sonic-net#3092) (6 days ago) [Neetha John]
* 80e0b57d - [Copp]Refactor coppmgr tests (sonic-net#3093) (8 days ago) [Sudharsan Dhamal Gopalarathnam]
* a4647299 - [portsorch] process only updated APP_DB fields when port is already   created (sonic-net#3025) (10 days ago) [Stepan Blyshchak]
* 91bacca5 - [buffermgrd] Move switch-statement outside of if-statement in BufferMgr::doTask (sonic-net#3055) (2 weeks ago) [Amir]
* 04912ad0 - [bulker] add support for neighbor bulking (sonic-net#2768) (2 weeks ago) [Nikola Dancejic]
* 9d4a3add - [acl] Add IN_PORTS qualifier for L3 table (sonic-net#3078) (2 weeks ago) [Neetha John]
* a13e081f - [Mellanox] Fix inconsistence in the shared headroom pool initialization (sonic-net#3057) (3 weeks ago) [Stephen Sun]
* ff2b2b85 - Add basic fabric link monitoring counters and states handling. (sonic-net#2988) (3 weeks ago) [jfeng-arista]
* 0c620910 - Add port flap count and last flap timestamp to APPL_DB (sonic-net#3052) (3 weeks ago) [Prince George]
* e9931f31 - [EVPN] Skip EVPN routes with invalid VNI or router mac field (sonic-net#3073) (3 weeks ago) [Lior Avramov]
* 600d5e80 - Set HOST_TX_READY_NOTIFY attribute only after query capabilities(sonic-net#3070) (3 weeks ago) [noaOrMlnx]
liat-grozovik pushed a commit that referenced this issue Apr 7, 2024
…commits (#18576)

* c96a2f84 - Revert "[acl] Add IN_PORTS qualifier for L3 table (#3078)" (#3092) (6 days ago) [Neetha John]
* 80e0b57d - [Copp]Refactor coppmgr tests (#3093) (8 days ago) [Sudharsan Dhamal Gopalarathnam]
* a4647299 - [portsorch] process only updated APP_DB fields when port is already   created (#3025) (10 days ago) [Stepan Blyshchak]
* 91bacca5 - [buffermgrd] Move switch-statement outside of if-statement in BufferMgr::doTask (#3055) (2 weeks ago) [Amir]
* 04912ad0 - [bulker] add support for neighbor bulking (#2768) (2 weeks ago) [Nikola Dancejic]
* 9d4a3add - [acl] Add IN_PORTS qualifier for L3 table (#3078) (2 weeks ago) [Neetha John]
* a13e081f - [Mellanox] Fix inconsistence in the shared headroom pool initialization (#3057) (3 weeks ago) [Stephen Sun]
* ff2b2b85 - Add basic fabric link monitoring counters and states handling. (#2988) (3 weeks ago) [jfeng-arista]
* 0c620910 - Add port flap count and last flap timestamp to APPL_DB (#3052) (3 weeks ago) [Prince George]
* e9931f31 - [EVPN] Skip EVPN routes with invalid VNI or router mac field (#3073) (3 weeks ago) [Lior Avramov]
* 600d5e80 - Set HOST_TX_READY_NOTIFY attribute only after query capabilities(#3070) (3 weeks ago) [noaOrMlnx]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants