Hi Tico,
The problem is limited to quagga it seems. I have setup a juniper and
cisco session and they both come up fine. Only the quagga routers seem
to hang on the empty update.
I have the following in my bgpd.conf:
group "peers-rs-v6" {
announce IPv6 unicast
announce IPv4 none
softreconfig in yes
enforce neighbor-as yes
local-address 2001:db8:1::a500:6777:1
[cut..]
neighbor 2001:0DB8:1::A506:5502:1 {
descr "laborantix ipv6"
remote-as 65502
announce all
#passive /* with or without doesn't matter */
max-prefix 2000
}
[cut..]
}
and the following quagga bgpd.conf:
!
hostname Test2-bgpd
log file /var/log/quagga/bgpd.log
log syslog
log facility local7
service advanced-vty
!
debug bgp events
debug bgp updates
!
bgp multiple-instance
!
router bgp 65502
bgp router-id 10.0.0.64
bgp log-neighbor-changes
no bgp default ipv4-unicast
network 172.16.4.0/24
network 172.16.5.0/24
network 172.16.6.0/24
neighbor AMS-IX-RS peer-group
neighbor AMS-IX-RS remote-as 6777
neighbor AMS-IX-RS activate
neighbor AMS-IX-RS next-hop-self
neighbor AMS-IX-RS soft-reconfiguration inbound
neighbor AMS-IX-RS route-map TO-RS out
neighbor 10.0.0.59 peer-group AMS-IX-RS
neighbor 10.0.0.59 description RS1
neighbor 2001:db8:1::a500:6777:1 remote-as 6777
!
address-family ipv6
network 2001:db8:97::/64
neighbor 2001:db8:1::a500:6777:1 activate
neighbor 2001:db8:1::a500:6777:1 soft-reconfiguration inbound
neighbor 2001:db8:1::a500:6777:1 route-map TO-RS out
exit-address-family
!
route-map TO-RS permit 10
set community 6777:6777
!
line vty
!
end
I can reproduce the problem multiple times, on laborantix (running quagga).
$ bgpctl s
s
Neighbor AS MsgRcvd MsgSent OutQ Up/Down
State/PrfRcvd
foundry 65505 2531 2673 0 22:15:06 0
juniper 65504 2673 2672 0 22:14:46 9
cisco 65503 2674 2671 0 22:14:32 3
laborantix 65502 2670 2669 0 22:13:18 3
experimentix 65501 2669 2669 0 22:13:18 3
junix ipv6 65504 2762 2761 0 00:19:04 4
cisco ipv6 65503 2677 2760 0 00:05:53 3
laborantix ipv6 65502 251 251 0 00:14:48 Idle
experimentix ipv6 65501 2669 2757 0 22:13:18
1/2000
--
$ bgpctl show neigh 'laborantix ipv6'
BGP neighbor is 2001:db8:1::a506:5501:1, remote AS 65501
Description: experimentix ipv6
BGP version 4, remote router-id 10.0.0.61
BGP state = Established, up for 22:14:28
Last read 00:00:05, holdtime 90s, keepalive interval 30s
Neighbor capabilities:
Multiprotocol extensions: IPv6 Unicast
Route Refresh
Message statistics:
Sent Received
Opens 1 1
Notifications 0 0
Updates 98 1
Keepalives 2661 2670
Route Refresh 0 0
Total 2760 2672
Update statistics:
Sent Received
Updates 104 1
Withdraws 0 0
Local host: 2001:db8:1::a500:6777:1, Local port: 179
Remote host: 2001:db8:1::a506:5501:1, Remote port: 58624
--
Test2-bgpd# show bgp neighbors 2001:db8:1::a500:6777:1
BGP neighbor is 2001:db8:1::a500:6777:1, remote AS 6777, local AS 65502,
external link
BGP version 4, remote router ID 0.0.0.0
BGP state = Active
Last read 00:00:48, hold time is 180, keepalive interval is 60 seconds
Message statistics:
Inq depth is 0
Outq depth is 0
Sent Rcvd
Opens: 4490 3653
Notifications: 59 3651
Updates: 3708 3766
Keepalives: 7444 23
Route Refresh: 0 0
Capability: 0 0
Total: 15701 11093
Minimum time between advertisement runs is 30 seconds
For address family: IPv6 Unicast
Inbound soft reconfiguration allowed
Community attribute sent to this neighbor(both)
Outbound path policy configured
Route map for outgoing advertisements is *TO-RS
0 accepted prefixes
Connections established 3710; dropped 3710
Last reset 00:00:48, due to BGP Notification send
Local host: 2001:db8:1::a506:5502:1, Local port: 59390
Foreign host: 2001:db8:1::a500:6777:1, Foreign port: 179
Nexthop: 10.0.0.64
Nexthop global: 2001:db8:1::a506:5502:1
Nexthop local: ::
BGP connection: shared network
Next connect timer due in 72 seconds
Read thread: off Write thread: off
--
# bgpctl neigh 'laborantix ipv6' clear
request processed
# bgpctl s s
Neighbor AS MsgRcvd MsgSent OutQ Up/Down
State/PrfRcvd
foundry 65505 2555 2703 0 22:27:41 0
juniper 65504 2698 2702 0 22:27:21 9
cisco 65503 2699 2699 0 22:27:07 3
laborantix 65502 2695 2697 0 22:25:53 3
experimentix 65501 2695 2697 0 22:25:53 3
junix ipv6 65504 2791 2793 0 00:31:39 4
cisco ipv6 65503 2706 2794 0 00:18:28 3
laborantix ipv6 65502 261 261 0 00:01:19 Idle
experimentix ipv6 65501 2713 2815 0 00:05:37
1/2000
--
Test2-bgpd# clear bgp 2001:db8:1::a500:6777:1
Test2-bgpd# show bgp neighbors 2001:db8:1::a500:6777:1
BGP neighbor is 2001:db8:1::a500:6777:1, remote AS 6777, local AS 65502,
external link
BGP version 4, remote router ID 0.0.0.0
BGP state = Active
Last read 00:00:03, hold time is 180, keepalive interval is 60 seconds
Message statistics:
Inq depth is 0
Outq depth is 0
Sent Rcvd
Opens: 4492 3654
Notifications: 60 3651
Updates: 3708 3768
Keepalives: 7446 23
Route Refresh: 0 0
Capability: 0 0
Total: 15706 11096
Minimum time between advertisement runs is 30 seconds
For address family: IPv6 Unicast
Inbound soft reconfiguration allowed
Community attribute sent to this neighbor(both)
Outbound path policy configured
Route map for outgoing advertisements is *TO-RS
0 accepted prefixes
Connections established 3711; dropped 3711
Last reset 00:00:02, due to User reset
Local host: 2001:db8:1::a506:5502:1, Local port: 59392
Foreign host: 2001:db8:1::a500:6777:1, Foreign port: 179
Nexthop: 10.0.0.64
Nexthop global: 2001:db8:1::a506:5502:1
Nexthop local: ::
BGP connection: shared network
Next connect timer due in 118 seconds
Read thread: off Write thread: off
The quagga log shows the following:
2009/01/30 15:05:53 BGP: 2001:db8:1::a500:6777:1 [Event] Connect start
to 2001:db8:1::a500:6777:1 fd 13
2009/01/30 15:05:53 BGP: %ADJCHANGE: neighbor 2001:db8:1::a500:6777:1 Up
2009/01/30 15:05:53 BGP: 2001:db8:1::a500:6777:1 rcvd UPDATE w/ attr: ,
origin i, mp_nexthop 2001:db8:1::a506:5503:1, community 6777:6777, path
65503
2009/01/30 15:05:53 BGP: 2001:db8:1::a500:6777:1 rcvd 2001:db8:10::/64
2009/01/30 15:05:53 BGP: 2001:db8:1::a500:6777:1 rcvd 2001:db8:11::/64
2009/01/30 15:05:53 BGP: 2001:db8:1::a500:6777:1 rcvd 2001:db8:12::/64
2009/01/30 15:05:53 BGP: 2001:db8:1::a500:6777:1 rcvd UPDATE w/ attr: ,
origin i, mp_nexthop 2001:db8:1::a506:5503:1, community 6777:6777, path
65504 65503 65502
2009/01/30 15:05:53 BGP: 2001:db8:1::a500:6777:1 rcvd UPDATE about
2001:db8:97::/64 -- DENIED due to: as-path contains our own AS;
2009/01/30 15:05:54 BGP: %NOTIFICATION: sent to neighbor
2001:db8:1::a500:6777:1 6/4 (Cease/Administratively Reset) 0 bytes
2009/01/30 15:05:54 BGP: %ADJCHANGE: neighbor 2001:db8:1::a500:6777:1
Down User reset
2009/01/30 15:05:54 BGP: 2001:db8:1::a500:6777:1 [Event] Connect start
to 2001:db8:1::a500:6777:1 fd 13
2009/01/30 15:05:54 BGP: 2001:db8:1::a500:6777:1 [Event] BGP connection
closed fd 13
And the daemon log:
Jan 30 15:06:33 routeertnix bgpd[11747]: neighbor
2001:db8:1::a506:5502:1 (laborantix ipv6): state change Idle -> Active,
reason: Start
Jan 30 15:07:07 routeertnix bgpd[11747]: neighbor
2001:db8:1::a506:5502:1 (laborantix ipv6): state change Active ->
OpenSent, reason: Connection opened
Jan 30 15:07:07 routeertnix bgpd[11747]: neighbor
2001:db8:1::a506:5502:1 (laborantix ipv6): state change OpenSent ->
OpenConfirm, reason: OPEN message received
Jan 30 15:07:07 routeertnix bgpd[11747]: neighbor
2001:db8:1::a506:5502:1 (laborantix ipv6): state change OpenConfirm ->
Established, reason: KEEPALIVE message received
Jan 30 15:07:07 routeertnix bgpd[11747]: neighbor
2001:db8:1::a506:5502:1 (laborantix ipv6): received notification: Cease,
administrative reset
Jan 30 15:07:07 routeertnix bgpd[11747]: neighbor
2001:db8:1::a506:5502:1 (laborantix ipv6): state change Established ->
Idle, reason: NOTIFICATION received
Jan 30 15:07:07 routeertnix bgpd[11747]: Connection attempt from
neighbor 2001:db8:1::a506:5502:1 (laborantix ipv6) while session is in
state Idle
I hope this abundunce of information helps.
Kind regards,
Arnoud
tico schreef:
> Arnoud Vermeer wrote:
>> Hi,
>>
>> I found a bug while working on a route server implementation based on
>> OpenBGPD. I have a IPv6 session from OpenBGPD 4.4 (on OpenBSD 4.4,
>> routeertnix) to Quagga 0.99.5 (laborantix).
>>
>>
> Hello Arnoud,
>
> I'm running a native IPv6 session from OpenBGPD 4.4 to a Foundry of
> some sort operated by my transit, so my experience below is not a
> duplicate of your test, but I've included it for whatever it's worth.
>> I have multiple IPv4 peers, and multiple IPv6 peers in the setup. When I
>> start the BGP daemon, everything starts up nicely. All sessions come up.
>>
>>
> Same here.
>> When I clear a IPv6 peering session, the connection shifts to the
>> Idle state. When I look in the log, I can see it connect and
>> establish a connection, but break as soon as a mistery update gets
>> send out.
>>
>>
> <<snip>>
>
> Here is where I don't match your experience:
> $ bgpctl sho nei 2001:470:1:53::1
> BGP neighbor is 2001:470:1:53::1, remote AS 6939
> Description: Hurricane_rtr0_v6
> BGP version 4, remote router-id 216.218.252.162
> BGP state = Established, up for 04w3d02h
> Last read 00:00:10, holdtime 90s, keepalive interval 30s
> Neighbor capabilities:
> Multiprotocol extensions: IPv6 Unicast
> Route Refresh
>
> Message statistics:
> Sent Received Opens
> 1 1
> Notifications 0 0
> Updates 1 109606
> Keepalives 86391 72742
> Route Refresh 1 0
> Total 86394 182349
>
> Update statistics:
> Sent Received Updates 1
> 99044
> Withdraws 0 22196
>
> Local host: 2001:470:1:53::2, Local port: 179
> Remote host: 2001:470:1:53::1, Remote port: 8028
>
> $ bgpctl nei 2001:470:1:53::1 clear request processed
> $ bgpctl sho nei 2001:470:1:53::1 BGP neighbor is 2001:470:1:53::1,
> remote AS 6939
> Description: Hurricane_rtr0_v6
> BGP version 4, remote router-id 216.218.252.162
> BGP state = Idle, down for 00:00:03
> Last read 00:00:04, holdtime 240s, keepalive interval 80s
>
> Message statistics:
> Sent Received Opens
> 1 1
> Notifications 1 0
> Updates 1 109632
> Keepalives 86391 72742
> Route Refresh 1 0
> Total 86395 182375
>
> Update statistics:
> Sent Received Updates
> 0 0
> Withdraws 0 0
>
> Last error: Cease
>
> $ bgpctl sho nei 2001:470:1:53::1
> BGP neighbor is 2001:470:1:53::1, remote AS 6939
> Description: Hurricane_rtr0_v6
> BGP version 4, remote router-id 216.218.252.162
> BGP state = Active, down for 00:00:09
> Last read 00:00:10, holdtime 240s, keepalive interval 80s
>
> Message statistics:
> Sent Received Opens
> 1 1
> Notifications 1 0
> Updates 1 109632
> Keepalives 86391 72742
> Route Refresh 1 0
> Total 86395 182375
>
> Update statistics:
> Sent Received Updates
> 0 0
> Withdraws 0 0
>
> Local host: 2001:470:1:53::2, Local port: 179
> Remote host: 2001:470:1:53::1, Remote port: 8028
>
> $ bgpctl sho nei 2001:470:1:53::1
> BGP neighbor is 2001:470:1:53::1, remote AS 6939
> Description: Hurricane_rtr0_v6
> BGP version 4, remote router-id 216.218.252.162
> BGP state = Established, up for 00:00:08
> Last read 00:00:08, holdtime 90s, keepalive interval 30s
> Neighbor capabilities:
> Multiprotocol extensions: IPv6 Unicast
> Route Refresh
>
> Message statistics:
> Sent Received Opens
> 2 2
> Notifications 1 0
> Updates 2 110178
> Keepalives 86392 72743
> Route Refresh 1 0
> Total 86398 182923
>
> Update statistics:
> Sent Received Updates
> 1 731
> Withdraws 0 0
>
> Local host: 2001:470:1:53::2, Local port: 179
> Remote host: 2001:470:1:53::1, Remote port: 8119
>
> $ uname -a
> OpenBSD earth.raapid.net 4.4 GENERIC#1021 i386
> $ bgpctl sho rib mem
> RDE memory statistics
> 272868 IPv4 network entries using 8.3M of memory
> 1566 IPv6 network entries using 67.3K of memory
> 275328 prefix entries using 8.4M of memory
> 47567 BGP path attribute entries using 3.6M of memory
> 43683 BGP AS-PATH attribute entries using 1.6M of memory,
> and holding 47567 references
> 4696 BGP attributes entries using 110K of memory
> and holding 9090 references
> 4695 BGP attributes using 36.7K of memory
> RIB using 22.2M of memory
>
>
>> When the NOTIFICATION is received, the peer is set back to the state
>> Idle, where the process starts again. The only way to break the cicle is
>> to restart the entire OpenBGPD daemon.
>>
> The only time I've had a session get "hung down" is once or twice when
> running 4.3 and having made several bgpd.conf changes and issuing
> "bgpctl reload" several times -- I believe it was regarding changing
> an MD5 secret but I can't remember for sure. Either way, I eventually
> restarted bgpd at that time and the sessions came right up, and I
> haven't seen that behavior occur again after I upgraded to 4.4, but YMMV.
>
> Cheers,
> Tico