Commit 731ffd2
committed
Bgp: fix: make iBGP work over a multi-hop IGP with IPv6
Running BGP over an interior gateway protocol (the usual transit-AS setup) did
not work for IPv6 when an iBGP peer or a route's next hop was reachable only via
several IGP hops (e.g. OSPFv3). Four related problems, each fixed so the
directly-connected / IPv4 paths are unchanged:
- iBGP session start threw a fatal error ("No configuration interface for peer
address") when the IGP had not yet installed a route to the peer. Defer the
start and retry until the peer becomes reachable (BgpFsm Idle::ManualStart,
BgpSession::scheduleStartRetry/isPeerReachable, BgpRouter::findNextSession).
- The iBGP path that adopts an existing (e.g. IGP) route into BGP cast the route
unconditionally to Ipv4Route, aborting for IPv6. Use the generic IRoute;
createBgpRoutingTableEntry() already builds the right v4/v6 entry.
- A locally-originated route is built from a connected route and has no next hop,
so it was advertised over IPv6 iBGP with an unspecified MP_REACH_NLRI next hop.
Advertise our own on-link address instead (RFC 4271: a router is the next hop
for the networks it originates). IPv6 path only.
- An installed iBGP route used the (possibly multi-hop) BGP next hop directly as
its gateway, so IPv6 neighbour discovery looked for it on the wrong link and
failed. Resolve the next hop recursively through the IGP and install the
immediate on-link next hop; a directly-connected next hop is kept as-is.
The bgpv4 and tutorials/bgp fingerprints are unchanged (these paths only trigger
for not-yet-reachable / multi-hop IPv6 next hops).1 parent 7cf0a4f commit 731ffd2
4 files changed
Lines changed: 47 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | | - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
691 | 693 | | |
692 | 694 | | |
693 | 695 | | |
| |||
709 | 711 | | |
710 | 712 | | |
711 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
712 | 722 | | |
713 | 723 | | |
714 | 724 | | |
| |||
844 | 854 | | |
845 | 855 | | |
846 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
847 | 863 | | |
848 | 864 | | |
849 | 865 | | |
| |||
983 | 999 | | |
984 | 1000 | | |
985 | 1001 | | |
986 | | - | |
987 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
988 | 1008 | | |
989 | 1009 | | |
990 | 1010 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
100 | 112 | | |
101 | 113 | | |
102 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
0 commit comments