Routing
Highlighted
Routing

BGP stuck in Connect state

[ Edited ]
‎07-31-2017 10:22 PM

I have R2 as client directly connected to R4 (RR) and adjacency stuck in connect state. Not sure what the below logs mean and what should i look for. 

 

 

Logs on R2:

Jul 31 22:17:13.519268 bgp_reuse_scan: Starting scan
Jul 31 22:17:16.659338 bgp_connect_timeout: BGP_3895077211.172.27.255.4_Connect
Jul 31 22:17:16.659390 bgp_connect_start: peer 172.27.255.4 (Internal AS 3895077211)
Jul 31 22:17:16.659401 bgp_event: peer 172.27.255.4 (Internal AS 3895077211) old state Active event ConnectRetry new state Connect
Jul 31 22:17:16.659517 task_get_socket: domain AF_INET  type SOCK_STREAM  protocol 0  socket 59
Jul 31 22:17:16.659537 task_set_option_internal: task BGP_3895077211.172.27.255.4 socket 59 option RecvBuffer(0)
Jul 31 22:17:16.659546  value 16384
Jul 31 22:17:16.659558 task_set_option_internal: task BGP_3895077211.172.27.255.4 socket 59 option SendBuffer(1)
Jul 31 22:17:16.659566  value 16384
Jul 31 22:17:16.659577 task_set_socket: task BGP_3895077211.172.27.255.4 socket 59
Jul 31 22:17:16.659595 task_set_option_internal: task BGP_3895077211.172.27.255.4 socket 59 option NonBlocking(8)
Jul 31 22:17:16.659606  value 1
Jul 31 22:17:16.659617 task_set_option_internal: task BGP_3895077211.172.27.255.4 socket 59 option ReUsePort(38)
Jul 31 22:17:16.659626  value 1
Jul 31 22:17:16.659637 task_set_option_internal: task BGP_3895077211.172.27.255.4 socket 59 option PathMTUDiscovery(26)
Jul 31 22:17:16.659645  value 0
Jul 31 22:17:16.659658 task_set_option_internal: task BGP_3895077211.172.27.255.4 socket 59 option TOS(16)
Jul 31 22:17:16.659679  value 192
Jul 31 22:17:16.659691 task_set_option_internal: task BGP_3895077211.172.27.255.4 socket 59 option LridCheck(59)
Jul 31 22:17:16.659700  value 0
Jul 31 22:17:16.659716 task_addr_local: task BGP_3895077211.172.27.255.4 address 172.27.255.2
Jul 31 22:17:16.659741 task_connect: task BGP_3895077211.172.27.255.4+179 addr 172.27.255.4+179
Jul 31 22:17:16.659798 task_timer_reset: reset BGP_3895077211.172.27.255.4+179_Connect
Jul 31 22:17:16.659816 task_timer_set_oneshot_latest: timer BGP_3895077211.172.27.255.4+179_Connect interval set to 2:28
Jul 31 22:17:33.379368 bgp_reuse_scan: Starting scan
Jul 31 22:17:53.339267 bgp_reuse_scan: Starting scan
Jul 31 22:18:13.269227 bgp_reuse_scan: Starting scan

Logs on R4:

Jul 31 22:06:18.405030 task_process_events: connect ready for BGP_3895077211.172.27.255.2+179
Jul 31 22:06:18.405057 bgp_connect_complete: error connecting to 172.27.255.2 (Internal AS 3895077211): Socket is not connected
Jul 31 22:06:18.405062 bgp_close_socket: peer 172.27.255.2 (Internal AS 3895077211)
Jul 31 22:06:18.405067 task_close: close socket 58 task BGP_3895077211.172.27.255.2+179
Jul 31 22:06:18.405072 task_reset_socket: task BGP_3895077211.172.27.255.2+179 socket 58
Jul 31 22:06:18.405090 bgp_event: peer 172.27.255.2 (Internal AS 3895077211) old state Connect event OpenFail new state Idle
Jul 31 22:06:18.405174 bgp_event: peer 172.27.255.2 (Internal AS 3895077211) old state Idle event Start new state Connect
Jul 31 22:06:18.405179 bgp_connect_start: peer 172.27.255.2 (Internal AS 3895077211)
Jul 31 22:06:18.405182 bgp_event: peer 172.27.255.2 (Internal AS 3895077211) old state Connect event ConnectRetry new state Connect
Jul 31 22:06:18.405193 task_get_socket: domain AF_INET type SOCK_STREAM protocol 0 socket 58
Jul 31 22:06:18.405210 task_set_option_internal: task BGP_3895077211.172.27.255.2 socket 58 option RecvBuffer(0)
Jul 31 22:06:18.405215 value 16384
Jul 31 22:06:18.405231 task_set_option_internal: task BGP_3895077211.172.27.255.2 socket 58 option SendBuffer(1)
Jul 31 22:06:18.405234 value 16384
Jul 31 22:06:18.405239 task_set_socket: task BGP_3895077211.172.27.255.2 socket 58
Jul 31 22:06:18.405258 task_set_option_internal: task BGP_3895077211.172.27.255.2 socket 58 option NonBlocking(8)
Jul 31 22:06:18.405263 value 1
Jul 31 22:06:18.405268 task_set_option_internal: task BGP_3895077211.172.27.255.2 socket 58 option ReUsePort(38)
Jul 31 22:06:18.405271 value 1
Jul 31 22:06:18.405276 task_set_option_internal: task BGP_3895077211.172.27.255.2 socket 58 option PathMTUDiscovery(26)
Jul 31 22:06:18.405280 value 0
Jul 31 22:06:18.405286 task_set_option_internal: task BGP_3895077211.172.27.255.2 socket 58 option TOS(16)
Jul 31 22:06:18.405289 value 192
Jul 31 22:06:18.405295 task_set_option_internal: task BGP_3895077211.172.27.255.2 socket 58 option LridCheck(59)
Jul 31 22:06:18.405298 value 0
Jul 31 22:06:18.405305 task_addr_local: task BGP_3895077211.172.27.255.2 address 172.27.255.4
Jul 31 22:06:18.405317 task_connect: task BGP_3895077211.172.27.255.2+179 addr 172.27.255.2+179
Jul 31 22:06:18.405337 task_timer_reset: reset BGP_3895077211.172.27.255.2+179_Connect
Jul 31 22:06:18.405346 task_timer_set_oneshot_latest: timer BGP_3895077211.172.27.255.2+179_Connect interval set to 1:04
root@R4# run show bgp summary 
Groups: 2 Peers: 4 Down peers: 3
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0               
                       0          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
172.27.255.1     3895077211         48         49       0       0       20:54 0/0/0/0              0/0/0/0
172.27.255.2     3895077211          0          0       0       0       21:06 Connect

 

root@R2# run show bgp summary 
Groups: 1 Peers: 2 Down peers: 2
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0               
                       0          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
172.27.255.3     3895077211          0          0       0       0       21:38 Active
172.27.255.4     3895077211          0          0       0       0       21:38 Active

 Please suggest.

 

Thanks!!

39 REPLIES 39
Routing

Re: BGP stuck in Connect state

‎08-01-2017 07:53 AM

2nd Try... Anyone ?

Routing

Re: BGP stuck in Connect state

‎08-01-2017 08:06 AM

Hi,

 

Can you post the interface and bgp configurations for both sides?

 

Routing

Re: BGP stuck in Connect state

‎08-01-2017 08:29 AM
root@R2# show protocols bgp 
traceoptions {
    file debug-bgp size 1g files 2;
    flag all;
}
group cluster-1 {
    type internal;
    local-address 172.27.255.2;
    neighbor 172.27.255.3;
    neighbor 172.27.255.4;
}

root@R4# show protocols bgp 
traceoptions {
    file debug-bgp size 1g files 2;
    flag all;
}
group cluster-1 {
    type internal;
    local-address 172.27.255.4;
    cluster 0.0.0.1;
    neighbor 172.27.255.1;
    neighbor 172.27.255.2;
    neighbor 172.27.255.5;
}
group INTERNAL {
    type internal;
    local-address 172.27.255.4;
    neighbor 172.27.255.3;
}
root@R2# run show configuration interfaces ge-0/0/1                   
unit 0 {
    family inet {
        address 172.27.0.5/24;
    }
}


root@R4# run show configuration interfaces ge-0/0/0 
unit 0 {
    family inet {
        address 172.27.0.6/24;
    }
}

root@R2# run show configuration interfaces lo0
unit 0 {
family inet {
address 172.27.255.2/32;
}
}

root@R4# run show configuration interfaces lo0
unit 0 {
family inet {
address 172.27.255.4/32;
}
}

root@R4# show routing-options
router-id 172.27.255.4;
autonomous-system 3895077211;

root@R2# show routing-options
router-id 172.27.255.2;
autonomous-system 3895077211;
Routing

Re: BGP stuck in Connect state

[ Edited ]
‎08-01-2017 10:51 AM

Can you ping R4s loopback from R2s loopback?

Do you have any RE filters applied?

Routing

Re: BGP stuck in Connect state

[ Edited ]
‎08-01-2017 11:12 AM

Can't ping R2 and R4 each other. No RE filter applied. FYI, i'm running this on vMX on Junosphere.

 

root@R2# run show route 172.27.255.4  

inet.0: 11 destinations, 12 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.27.255.4/32    *[OSPF/10] 5d 00:08:25, metric 1
                    > to 172.27.0.6 via ge-0/0/1.0

root@R4# run show route 172.27.255.2    

inet.0: 13 destinations, 16 routes (13 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.27.255.2/32    *[OSPF/10] 5d 00:07:23, metric 1
                    > to 172.27.0.5 via ge-0/0/0.0

 Weird thing is i can't ping to directly connected interface.

 

root@R2# run show route 172.27.0.6  

inet.0: 11 destinations, 12 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.27.0.0/24      *[Direct/0] 6d 02:09:24
                    > via ge-0/0/0.0
                    [Direct/0] 6d 02:09:24
                    > via ge-0/0/1.0

root@R2# run ping 172.27.0.6  
PING 172.27.0.6 (172.27.0.6): 56 data bytes
^C
--- 172.27.0.6 ping statistics ---
6 packets transmitted, 0 packets received, 100% packet loss

Thanks!!

Routing

Re: BGP stuck in Connect state

[ Edited ]
‎08-01-2017 03:08 PM

 

You posted:

root@R2# run show route 172.27.255.4  

inet.0: 11 destinations, 12 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.27.255.4/32    *[OSPF/10] 5d 00:08:25, metric 1
                    > to 172.27.0.6 via ge-0/0/1.0

This shows a next hop of 172.27.0.6 via ge-0/0/1.0.

 

But then you posted:

root@R2# run show route 172.27.0.6  

inet.0: 11 destinations, 12 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.27.0.0/24      *[Direct/0] 6d 02:09:24
                    > via ge-0/0/0.0
                    [Direct/0] 6d 02:09:24
                    > via ge-0/0/1.0

 This is showing that 172.27.0.0/24 is configured on two different interfaces on the same router. It's unable to reach 172.27.0.6 because R2 is pointing to ge-0/0/0.0 instead of ge-0/0/1.0.

 

You need to use two different subnets for those interfaces. You can use 172.27.0.0/30 for one interface and 172.27.0.4/30 for the other interface.

Routing

Re: BGP stuck in Connect state

‎08-01-2017 05:05 PM

For the simplicity, i have changed loopback of R2 as 2.2.2.2/32 and R4 as 4.4.4.4/32. They are both directly connected and running ospf. Though i can't ping each other. 

 

root@R2# run show ospf neighbor    
Address          Interface              State     ID               Pri  Dead
172.27.0.6       ge-0/0/1.0             Full      4.4.4.4          128    31

root@R4# run show ospf neighbor    
Address          Interface              State     ID               Pri  Dead
172.27.0.5       ge-0/0/0.0             Full      2.2.2.2          128    34

root@R4# run show route 2.2.2.2 

inet.0: 10 destinations, 13 routes (10 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

2.2.2.2/32         *[OSPF/10] 00:18:51, metric 1
                    > to 172.27.0.5 via ge-0/0/0.0

root@R2# run show route 4.4.4.4 

inet.0: 8 destinations, 9 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

4.4.4.4/32         *[OSPF/10] 00:19:21, metric 1
                    > to 172.27.0.6 via ge-0/0/1.0

root@R2# run ping 4.4.4.4
PING 4.4.4.4 (4.4.4.4): 56 data bytes
^C
--- 4.4.4.4 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
Routing

Re: BGP stuck in Connect state

‎08-01-2017 05:59 PM

The issue was not with the loopbacks. On R2, what ip addresses do you have configured on ge-0/0/1.0 and ge-0/0/0.0? Are they on the same subnet? If so, change it so that they are on different subnets.

Routing

Re: BGP stuck in Connect state

‎08-01-2017 06:39 PM

When i put them on different subnet, ospf doesn't come up. 

Routing

Re: BGP stuck in Connect state

‎08-01-2017 07:05 PM

You have to change the IP of the interface on the peer routers as well.

 

Try these things:

Assuming that R2 ge-0/0/1.0 is connected to R4 ge-0/0/0.0:

- Change the IP on ge-0/0/1.0 on R2 to 172.27.0.5/30

- Change the IP on ge-0/0/0.0 on R4 to 172.27.0.6/30

 

It looks like R2 is connected to another router on ge-0/0/0.0:

- Change the IP on ge-0/0/0.0 on R2 to 172.27.0.1/30

- Change the IP of whatever R2 is connected to 172.27.0.2/30

 

So it should look like this:

 r2-r4.PNG

 

Routing

Re: BGP stuck in Connect state

‎08-01-2017 08:24 PM

Please see attached full topology. 

 

Following is my interface config for all router. issue is still persist.

 

root@R1# run show interfaces terse |match /30 
ge-0/0/0.0              up    up   inet     172.27.0.1/30   
ge-0/0/1.0              up    up   inet     172.27.0.14/30  
ae0.0                   up    up   inet     172.27.0.10/30  


root@R2# run show interfaces terse |match /30 
ge-0/0/0.0              up    up   inet     172.27.0.2/30   
ge-0/0/1.0              up    up   inet     172.27.0.5/30 

root@R3# run show interfaces terse |match /30 
ge-0/0/0.0              up    up   inet     172.27.0.17/30  
ge-0/0/1.0              up    up   inet     172.27.0.13/30  
ge-0/0/3.0              up    up   inet     172.27.0.26/30  


root@R4# run show interfaces terse |match /30 
ge-0/0/0.0              up    up   inet     172.27.0.6/30   
ge-0/0/1.0              up    up   inet     172.27.0.18/30  
ge-0/0/5.0              up    up   inet     172.27.0.21/30  
ae0.0                   up    up   inet     172.27.0.9/30   


root@R5# run show interfaces terse |match /30 
ge-0/0/0.0              up    up   inet     172.27.0.22/30  
ge-0/0/1.0              up    up   inet     172.27.0.25/30  

Attachments

Routing

Re: BGP stuck in Connect state

‎08-01-2017 09:45 PM

3895077211; ASN???

The current ASN allocation is based on 2-byte AS number, also known as a 16-bit AS1.
AS numbers range 0-65535 lower and upper are reserved leaving 1-65534. Of these 64512 to 65535 are considered for private internal use, the rest are assigned/reserved for public ASN. So for now use one of those private numbers. If you chose to go with 4-byte AS /32 bit ASN, you now have 4.2B+ numbers; the format is AS-dot notation format, something like 65534.65534. So for now stick with 2 byte using a number from the private range.

root@R4# = RR
cluster 0.0.0.1; ??? <=== I would first verify that regular loopback peering works before going to RR. Anyways...
If R2 is a client to R4 then only R4 should be the neighbor. So delete neighbor 172.27.255.3
Also make sure these neighbors, have only the RR as their neighbor sice they are clients
neighbor 172.27.255.1;
neighbor 172.27.255.5
Suggestion: For your lab, use router id like this convention, R4 - router-id 4.4.4.4, R2 - router-id 2.2.2.2; When you start viewing the ospf database, it will make a world of difference when you can just really easily see the router id which does not look like your interface id. Just a suggestion. (Would require that you must purge the OSPF database) -- Scrath - I see you have already comnpleted this step, Leaving it in place though.

172.27.0/24 is fine. You can use /27 so you have ranges .1 - .30. If you use /30 you will only have IP .1 and .2 as valid IPs.
Try those and see what happens.

[KUDOS PLEASE! If you think I earned it!
If this solution worked for you please flag my post as an "Accepted Solution" so others can benefit..]
Routing

Re: BGP stuck in Connect state

‎08-02-2017 04:16 AM

You still can't ping? On R2, please do the following and post your results:

 

show ospf neighbor

show interfaces ge-0/0/1.0 terse

show interfaces ge-0/0/0.0 terse

show route 172.27.0.6

show route 172.27.0.1

ping 172.27.0.6 source 172.27.0.5 rapid

ping 172.27.0.1 source 172.27.0.2 rapid

ping 4.4.4.4 source 2.2.2.2 rapid

 

 

Don't change anything with BGP until you can actually ping. Let's fix the layer 3 issue before jumping into layer 7.

Routing

Re: BGP stuck in Connect state

‎08-02-2017 05:47 AM

Hi, 

 

What type of device is that?

>show version

 

Abdellah HAMDAD
Senior Network Consultant
JNCIE-SP/ENT/SEC
JNCIP-DC
JNCSP-SP/ENT/SEC
JNCDS-WAN/DC/SEC
Routing

Re: BGP stuck in Connect state

[ Edited ]
‎08-02-2017 06:18 AM

@pevangelista

Please see requested output:

 

root@R2> show ospf neighbor 
Address          Interface              State     ID               Pri  Dead
172.27.0.1       ge-0/0/0.0             Full      1.1.1.1          128    38
172.27.0.6       ge-0/0/1.0             Full      4.4.4.4          128    32

root@R2> show interfaces ge-0/0/1.0 terse 
Interface               Admin Link Proto    Local                 Remote
ge-0/0/1.0              up    up   inet     172.27.0.5/30   
                                   multiservice

root@R2> show interfaces ge-0/0/0.0 terse 
Interface               Admin Link Proto    Local                 Remote
ge-0/0/0.0              up    up   inet     172.27.0.2/30   
                                   multiservice

root@R2> show route 172.27.0.6 

inet.0: 17 destinations, 17 routes (17 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.27.0.4/30      *[Direct/0] 10:25:02
                    > via ge-0/0/1.0

root@R2> show route 172.27.0.1 

inet.0: 17 destinations, 17 routes (17 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.27.0.0/30      *[Direct/0] 10:09:46
                    > via ge-0/0/0.0

root@R2> ping 172.27.0.6 source 172.27.0.5 rapid 
PING 172.27.0.6 (172.27.0.6): 56 data bytes
.....
--- 172.27.0.6 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

root@R2> ping 172.27.0.1 source 172.27.0.2 rapid 
PING 172.27.0.1 (172.27.0.1): 56 data bytes
.....
--- 172.27.0.1 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

root@R2> ping 4.4.4.4 source 2.2.2.2 rapid 
PING 4.4.4.4 (4.4.4.4): 56 data bytes
.....
--- 4.4.4.4 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

 

Routing

Re: BGP stuck in Connect state

[ Edited ]
‎08-02-2017 06:19 AM

@Doods

 

Its vMX running on Junosphere.

 

root@R2> show version 
Hostname: R2
Model: vmx
Junos: 14.1-20140130_ib_14_1_psd.0
Routing

Re: BGP stuck in Connect state

‎08-02-2017 06:28 AM

 

Routing

Re: BGP stuck in Connect state

‎08-02-2017 06:33 AM

Hi, 

 

Please share the following on R2 and R4: 

 

show arp no-resolve 

show chassis mac-addresses    

Abdellah HAMDAD
Senior Network Consultant
JNCIE-SP/ENT/SEC
JNCIP-DC
JNCSP-SP/ENT/SEC
JNCDS-WAN/DC/SEC
Routing

Re: BGP stuck in Connect state

[ Edited ]
‎08-02-2017 06:37 AM

@Doods:

 

Looks like R4 didn't learn R2's mac-address

 

root@R2# run show arp no-resolve 
MAC Address       Address         Interface     Flags
56:68:28:3d:5c:5f 10.233.240.2    fxp0.0               none
56:68:28:3d:5c:5f 10.233.244.2    fxp0.0               none
56:68:28:41:89:cc 10.233.255.254  fxp0.0               none
00:05:86:71:32:00 172.27.0.1      ge-0/0/0.0           none
00:05:86:71:33:00 172.27.0.6      ge-0/0/1.0           none
Total entries: 5

[edit]
root@R2# run show chassis mac-addresses 
MAC address information:
  Public base address     00:05:86:71:18:00
  Public count            960
  Private base address    00:05:86:71:1b:c0
  Private count           64

root@R4# run show arp no-resolve 
MAC Address       Address         Interface     Flags
56:68:28:3d:5c:5f 10.233.240.2    fxp0.0               none
56:68:28:3d:5c:5f 10.233.244.2    fxp0.0               none
56:68:28:41:89:cc 10.233.255.254  fxp0.0               none
00:05:86:71:35:c0 172.27.0.10     ae0.0                none
00:05:86:71:63:00 172.27.0.17     ge-0/0/1.0           none
00:05:86:71:99:00 172.27.0.22     ge-0/0/5.0           none
Total entries: 6

[edit]
root@R4# run show chassis mac-addresses 
MAC address information:
  Public base address     00:05:86:71:33:00
  Public count            960
  Private base address    00:05:86:71:36:c0
  Private count           64