Subject: [Idr] Question about the magic bits resulting in 179

From: John Kristoff <[email-masked]>
Date: Mon, 6 Apr 2020 15:18:01 -0500

Friends,

In many software BGP implementations (e.g. BIRD, FRR, GoBGP) the BGP
listening process and remote peer may be specified with a port other
than 179. However, in hardware-based routers such as Cisco and Juniper,
when I went to use a non-standard port on one of them, I noticed no
such knob to change the default port.  It had never really occurred to
me this was a big deal before, but now it seems sort of unusual given
that practically all Internet services these days permit non-default
port usage.  Note, it really is not important why I or anyone would
want to do this, it really is beside the point.

When I asked some other operators about this I got a lot of push back
such as questioning the motive, suggesting this is nonsensical, and
that is would not be BGP.

The last idea I'd like to pose as a question to this group and use the
resulting consensus as something that might be reference material for my
operator friends that I think are essentially wrong.  :-)

From my reading of IETF RFC 4271 - A Border Gateway Protocol 4 (BGP-4),
179 support is clearly required for an implementation following the
specification. From section 8.2.1:

  A BGP implementation MUST connect to and listen on TCP port 179 for
  incoming connections in addition to trying to connect to peers. 

However, the requirement that an operator must use port 179 seems less
strict and as far as I can tell is ultimately a local decision if an
implementation support changing it. In the Administrative Events
sections there is this (sorry for extensive quoting, but context is
required):

      Event 14: TcpConnection_Valid

         Definition: Event indicating the local system reception of a
                     TCP connection request with a valid source IP
                     address, TCP port, destination IP address, and TCP
                     Port.  The definition of invalid source and invalid
                     destination IP address is determined by the
                     implementation.

                     BGP's destination port SHOULD be port 179, as
                     defined by IANA.

                     TCP connection request is denoted by the local
                     system receiving a TCP SYN.

Furthermore, from an unfinished draft-ietf-idr-bgp-issues-06
summarizing discussion when the RFC was being finished I found this
that drew consensus:

   Sue replied that this is local policy and is implementation
   dependent.  Siva agreed regarding the source port & IP address, but
   disagreed about the destination port.  He argued that we need to know
   the destination port for interoperability.

   Sue asked Siva to provide some text.

   After a long lull, Sue replied with:

   I would like to keep the current text of "Should" in the following
   text "BGP's destination port SHOULD be port 179 as defined by IANA."

   Should indicates that it normally should be 179.  If an
   implementation allows for an alternative TCP port, it is still valid
   as the "MUST" is not indicated.

That seems to clearly allow for an implementation or operator to use
a port other than 179 if they choose to, and there is nothing that would
constitute this as somehow invalid BGP or particularly wrong, if not
uncommon or unusual. Fair assessment?

Thank you for any feedback,

John

---

From: Robert Raszuk <[email-masked]>
Date: Mon, 6 Apr 2020 22:32:12 +0200

Hi John,

Brilliant observation. I fully support your summary.

Just FYI a bit related 10 years ago I published a draft
https://tools.ietf.org/html/draft-raszuk-ti-bgp-01 which asked for new
single port assignment to BGP. The main reason was to separate routing
and non routing related BGP processes on any BGP speaker.

The main objection at that time was that we do not need it as we have a
wonderful BGP multi sessions idea which can easily split all incoming
updates on port 179 to different sub-processes. Well those who followed BGP
multi sessions history do know by now that it never took off. And even if
some implementations tried it did not go too far.

So yes BGP port should be either a local decision of a network operator or
when using EBGP choice of peers.

Kind regards,
R.

On Mon, Apr 6, 2020 at 10:18 PM John Kristoff <[email-masked]> wrote:

> _______________________________________________
> Idr mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/idr
>

---

From: Brian Dickson <[email-masked]>
Date: Mon, 6 Apr 2020 14:43:34 -0700

> uncommon or unusual. Fair assessment?
I think the distinction is between "implementation" and "operator".
An implementation MUST default to 179, and an operator SHOULD use 179 (but
clearly can agree with another party or internally to use anything else).

There may also be implementations with hard-coded (ASIC) guts for special
handling of TCP port 179 (e.g. special QoS-like handling to ensure BGP
traffic is prioritized by hardware.)

Hope this is helpful.

Brian