sonic-net / SONiC

Landing page for Software for Open Networking in the Cloud (SONiC) - https://sonic-net.github.io/SONiC/
2.22k stars 1.12k forks source link

BGP unnumbered RFC 5549 #470

Open compyy opened 4 years ago

compyy commented 4 years ago

Hello,

Something couldnt find in feature list, is "BGP unnumbered RFC 5549" officially supported and tested ?

Regards, Yasir

shenyang146416 commented 4 years ago

supported.In BGP, you configure unnumbered interfaces using extended next hop encoding (ENHE), which is defined by RFC 5549. BGP unnumbered interfaces provide a means of advertising an IPv4 route with an IPv6 next hop. Prior to RFC 5549, an IPv4 route could be advertised only with an IPv4 next hop.BGP unnumbered interfaces are particularly useful in deployments where IPv4 prefixes are advertised through BGP over a section without any IPv4 address configuration on links. As a result, the routing entries are also IPv4 for destination lookup and have IPv6 next hops for forwarding purposes.

Configure BGP Unnumbered:

interface lo ip address 1.1.1.1/32 router bgp 65530 bgp router-id 1.1.1.1 neighbor fabric peer-group neighbor fabric remote-as external neighbor fabric description Internal Fabric Network neighbor fabric capability extended-nexthop neighbor ens33 interface peer-group fabric address-family ipv4 unicast redistribute connected

1、sho ip bgp neighbors BGP neighbor on ens33: fe80::22d1:7299:a866:3a9c, remote AS 65531, local AS 65530, external link ... 2、show ip route bgp Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, f - OpenFabric,

  • selected route, * - FIB route, q - queued route, r - rejected route

B>* 2.2.2.2/32 [20/0] via fe80::22d1:7299:a866:3a9c, ens33, 01:25:29

3、 install routes into the kernel in IPv4 prefix to IPv6 next hop format ip route show default via 192.168.226.2 dev ens33 proto dhcp metric 100 2.2.2.2 via 169.254.0.1 dev ens33 proto 186 metric 20 onlink