Hi Claudio & Co.,
I am running 4.3-current. I am using a very basic bgpd config
file that worked for 4.2 very well. Unfortunatelly, with
-current my router does not want to announce our prefix anymore.Any ideas?
Thanks,
- ChristianDetails: (my as: 303, transit: 304)
I am able to receive prefixes from my transit provider.
bgpctl shows the following (77.X.Y.0/21 being our prefix):# bgpctl show rib 77.X.Y.0
flags: * = Valid, > = Selected, I = via IBGP, A = Announced
origin: i = IGP, e = EGP, ? = Incompleteflags destination gateway lpref med aspath origin
77.X.Y.0/21 A.B.C.D 105 0 304 [SOMEAS] 303 i
I* 77.X.Y.0/21 77.X.Y.2 100 0 i
AI 77.X.Y.0/21 0.0.0.0 100 0 iSo there are two funny things:
- I get my own prefix (announced by our other router, 77.X.Y.2)
via the transit provider.
- The line with my announced prefix ("AI") is missing the "*".2# bgpctl network show
flags: S = Static
flags destination
* 77.X.Y.0/21/etc/bgpd.conf:
AS 303
router-id 77.X.Z.3
network 77.X.Y.0/21
group "Peering XXXXXXXXXXX" {
remote-as 304
neighbor A.B.C.D {
tcp md5sig password "xxxxxxx"
announce self
set localpref 105
}
}group IBPG {
group IBPG {
remote-as 303
neighbor 77.X.Y.2 {
tcp md5sig password "xxxxxxxxx"
}[...some other internal IBGP sessions...]
}deny from any
allow quick from group IBPG
allow from any inet prefixlen 8 - 24
allow from any prefix 0.0.0.0/0# filter bogus networks
deny from any prefix 10.0.0.0/8 prefixlen >= 8
deny from any prefix 172.16.0.0/12 prefixlen >= 12
deny from any prefix 192.168.0.0/16 prefixlen >= 16
deny from any prefix 169.254.0.0/16 prefixlen >= 16
deny from any prefix 192.0.2.0/24 prefixlen >= 24
deny from any prefix 224.0.0.0/4 prefixlen >= 4
deny from...
The missing * in tha AI output is an error when composing the control
message to bgpctl. The problem with the looped AS path is a bit more evil.
In the decision process the wrong flags field was inspected and because of
that loops remained undetected.
Having the loop in the table with a higher lpref will result in missing
anouncements. That's why your own route is not selected (missing ">").I hope the attached diff fixes all your issues. At least it seems to work
for me.Index: rde.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v
retrieving revision 1.230
diff -u -p -r1.230 rde.c
--- rde.c 26 Feb 2008 19:58:51 -0000 1.230
+++ rde.c 16 Apr 2008 14:04:10 -0000
@@ -1717,7 +1717,7 @@ rde_dump_rib_as(struct prefix *p, struct
rib.flags |= F_RIB_INTERNAL;
if (asp->flags & F_PREFIX_ANNOUNCED)
rib.flags |= F_RIB_ANNOUNCE;
- if (asp->nexthop != NULL && asp->nexthop->state == NEXTHOP_REACH)
+ if (asp->nexthop == NULL || asp->nexthop->state == NEXTHOP_REACH)
rib.flags |= F_RIB_ELIGIBLE;
if (asp->flags & F_ATTR_LOOP)
rib.flags &= ~F_RIB_ELIGIBLE;
@@ -2846,4 +2846,3 @@ sa_cmp(struct bgpd_addr *a, struct sockareturn (0);
}
-
Index: rde_decide.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/rde_decide.c,v
retrieving revision 1.49
diff -u -p -r1.49 rde_decide.c
--- rde_decide.c 27 Nov 2007 01:13:54 -0000 1.49
+++ rde_decide.c 16 Apr 2008 14:43:48 -0000
@@ -121,14 +121,14 @@ prefix_cmp(struct prefix *p1, struct pre
if (!(p2->flags & F_LOCAL))
return (1);+ asp1 = p1->aspath;
+ asp2 = p2->aspath;
+
/* only loop free pathes are eligible */
- if (p1->flags & F_ATTR_LOOP)
+ if (asp1->flags & F_ATTR_LOOP)
return (-1);
- if (p2->flags & F_ATTR_LOOP)
+ if (asp2->flags & F_ATTR_LOOP)
return (1);
-
- asp1 = p1->aspath;
- asp2 = p2->aspat...
Since we discussed this offline, here for the record:
The patch works fine for me, no problems during the last few days.Thanks,
Christian
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| David Miller | Slow DOWN, please!!! |
| Mark Lord | PCIe Hotplug: NFG unless I boot with card already inserted. |
| Pavel Roskin | ndiswrapper and GPL-only symbols redux |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
