Routing

 View Only
last person joined: 4 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  (External AS 4XXXX): received unexpected EOF

    Posted 06-08-2018 10:42

    Hello, i have a problem with external BGP. 

     

    I'm using Juniper SRX.

     

    My BGP Configuration : 

    protocols {
        bgp {
            traceoptions {
                file bgp-trace size 1m files 5 world-readable;
                flag update detail;
                flag state detail;
                flag open;
                flag all;
            }
        
            group EXTBGP {
                type external;
                hold-time 240;
                import static-to-bgp;
                export static-to-bgp;
                peer-as 4XXXX;
                graceful-restart;
                neighbor 10.20.X.X {
                    multihop;
                }
            }
        }
    }

    My AS Number 4 Byte : 20XXXX

    BGP Trace Log : 

     

    Jun  8 20:35:51.869615 BGP SEND 10.20.X.X+59872 -> 10.20.X.X+179
    Jun  8 20:35:51.869668 BGP SEND message type 1 (Open) length 59
    Jun  8 20:35:51.869702 BGP SEND version 4 as 23456 holdtime 240 id 10.20.X.X parmlen 30
    Jun  8 20:35:51.869733 BGP SEND MP capability AFI=1, SAFI=1
    Jun  8 20:35:51.869762 BGP SEND Refresh capability, code=128
    Jun  8 20:35:51.869791 BGP SEND Refresh capability, code=2
    Jun  8 20:35:51.869822 BGP SEND Restart capability, code=64, time=120, flags=
    Jun  8 20:35:51.869854 BGP SEND 4 Byte AS-Path capability (65), as_num 202365
    Jun  8 20:35:51.869962 task_timer_ucreate: created timer BGP_4XXXX.10.20.X.X+179_Hold  flags <>
    Jun  8 20:35:51.870025 task_timer_uset: timer BGP_4XXXX.10.20.X.X+179_Hold <Touched> set to offset 4:00 at 20:39:51
    Jun  8 20:35:53.608575 bgp_reuse_scan: Starting scan
    Jun  8 20:35:57.169038 task_process_events: recv ready for BGP_4XXXX.10.20.X.X+179
    Jun  8 20:35:57.169156 bgp_recv_open: called for peer 10.20.X.X (External AS 4XXXX)
    Jun  8 20:35:57.169268 bgp_recv: peer 10.20.X.X (External AS 4XXXX): received unexpected EOF
    Jun  8 20:35:57.169307 bgp_peer_close: closing peer 10.20.X.X (External AS 4XXXX), state is 4 (OpenSent)
    Jun  8 20:35:57.169418 bgp_close_socket: peer 10.20.X.X (External AS 4XXXX)
    Jun  8 20:35:57.169456 task_close: close socket 36 task BGP_4XXXX.10.20.X.X+179
    Jun  8 20:35:57.169488 task_reset_socket: task BGP_4XXXX.10.20.X.X+179 socket 36
    Jun  8 20:35:57.169624 task_timer_delete: BGP_4XXXX.10.20.X.X_Hold <Touched>
    Jun  8 20:35:57.169672 bgp_event: peer 10.20.X.X (External AS 4XXXX) old state OpenSent event TransportError new state Idle
    Jun  8 20:35:57.170142 bgp_event: peer 10.20.X.X (External AS 4XXXX) old state Idle event Start new state Active
    Jun  8 20:35:57.170196 task_timer_ucreate: created timer BGP_4XXXX.10.20.X.X_Connect  flags <>
    Jun  8 20:35:57.170246 task_timer_uset: timer BGP_4XXXX.10.20.X.X_Connect <Touched> set to offset 2:28 at 20:38:25
    Jun  8 20:36:13.442577 bgp_reuse_scan: Starting scan

    ISP Network Department said me, "Enable AS4 support on your Juniper"

    root@Router# run show bgp neighbor    
    Peer: 10.20.X.X AS 4XXXX    Local: unspecified AS 20XXXX
      Type: External    State: Active         Flags: <>
      Last State: Idle          Last Event: Start
      Last Error: None
      Export: [ static-to-bgp ] Import: [ static-to-bgp ]
      Options: <Multihop Preference HoldTime PeerAS Refresh>
      Holdtime: 240 Preference: 170
      Number of flaps: 0
      Trace options:  all
      Trace file: /var/log/bgp-trace size 0 files 5

     Regards.



  • 2.  RE: (External AS 4XXXX): received unexpected EOF

    Posted 06-09-2018 03:43

    You don't need to "enable AS4 support" in Junos it natively has this since version 9.

     

    This error message means the remote peer is rejecting the connection (and in a fashion in violation of rfc1771 but that is secondary).

    received unexpected EOF

    So there is something in your peer request that does not match your partner.  You need to double check all these parameters are correct.  The two possibles I see are:

     

    Where do you set your local AS?  I don't see that in your group configuration.

    You may be missing this so the peer is rejecting the connect request.

     

    Are you a multihop connection?  Or is this a peering on a directly connected interface.  If the ip address of the peer is your direct neighbor remove the multihop.

     

     



  • 3.  RE: (External AS 4XXXX): received unexpected EOF

    Posted 06-09-2018 05:28

    Hello,

    Thank you for your answer. 

     

    - I set local-as in group > neighbor but nothing changed.

    - I tried with multi-hop 

     

    Regards.



  • 4.  RE: (External AS 4XXXX): received unexpected EOF

    Posted 06-10-2018 04:21

    Is your peer multi hop?

    If the address of the peer is NOT directly connected to your router then you will need the multihop and you will likely also need to set the local address too the expected value given by the ISP.  Usually the ip address of the interface facing them.

     

    set protocols bgp group EXTBGP local-address x.x.x.x

     

    Also you are explicitly setting hold time and graceful restart, I assume the peer partner gave you these values to set.  If not, remove them from the configuration and let the peers negociate without constraints.