跳到主要内容

3. 传输连接

数据链路交换机可以成对使用, 也可以单独使用. 单台 DLS 在内部将一条数据链路交换到另一条, 不使用 TCP (下图中的 DLC(1) 到 DLC(2)). 成对使用的 DLS 则通过交换机到交换机协议 (Switch-to-Switch Protocol, SSP) 在可靠传输上复用数据链路. 本 RFC 将记录数据链路交换机之间这种复用的帧格式和协议. SSP 的初始实现使用 TCP 作为数据链路交换机之间的可靠传输. 不过, 也可以使用其他传输连接, 例如 OSI TP4.

    +-----------------------------------------------+Switch-to-Switch
| DLC Interfaces | Protocol (SSP)
|+------------+ DLC Request +------------+ |
|| Data |<---------------- | | |Send SSP Frame
|| Link | DLC Indication | | |-------------->
|| Control 1 |----------------->| | |
|+------------+ | Data Link | |
|+------------+ DLC Request | Switch | |
|| Data |<---------------- | | |Rec. SSP Frame
|| Link | DLC Indication | | |<-------------
|| Control 2 | ---------------->| | |
|+------------+ +------------+ |
| Multi-Protocol Router |
+-----------------------------------------------+

Figure 2. DLS System Diagram

在两个路由器之间进行数据链路交换之前, 它们必须先建立一条 TCP 连接. 每台 DLS 将维护一个支持 DLS 的路由器列表及其状态 (活动/非活动). 一旦建立了该连接, DLS 就会利用 SSP 在该传输连接上建立端到端电路. 传输连接中包含一组特定的 DLS 消息单元. 以下各节将记录这些 PDU 的消息格式和类型.

数据链路交换机之间 TCP 连接的相关默认参数如下:

            Socket Family     AF_INET        (Internet protocols)
Socket Type SOCK_STREAM (stream socket)
Read Port Number 2065
Write Port Number 2067

两台或多台数据链路交换机可以连接到同一个 LAN, 该 LAN 由若干通过源路由桥互连的令牌环网段组成. 在这种情况下, 连接到同一 LAN 的桥之间没有定义 TCP 连接. 这使得使用中的系统能够以类似于在源路由桥接网络中选择桥路径的方式, 选择可能的某台数据链路交换机. 连接到公共 LAN 的每台数据链路交换机中的虚拟环网段必须配置相同的环号. 这将防止一台数据链路交换机发送的 LAN 帧经由其他数据链路交换机传播.

3.1. SSP 帧格式​

下图给出了数据链路交换机之间流量的两种消息头. 控制消息头用于除信息消息以外的所有消息. 信息消息头长 16 字节, 控制消息头长 72 字节. 控制消息头的前 16 字节与信息消息头相同.

     CONTROL MESSAGES (72 Bytes)
    +-----------------------------------------------------------------+
    | Version Number                  Reserved Field                  |
    | Message Length               ---->           .                  |
    | Remote Data Link Correlator  ---->           .                  |
    |            .                                 .                  |
    | Remote DLC Port ID           ---->           .                  |
    |            .                                 .                  |
    | Reserved Field               ---->           .                  |
    | Message Type                    Reserved Field                  |
    | Protocol ID                     Header Number                   |
    | Header Length                ---->           .                  |
    | Reserved Field               ---->           .                  |
    | Reserved Field                  Message Type                    |
    | Target MAC Address           ---->           .                  |
    |            .                                 .                  |
    |            .                                 .                  |
    | Origin MAC Address           ---->           .                  |
    |            .                                 .                  |
    |            .                                 .                  |
    | Origin Link SAP                 Target Link SAP                 |
    | Frame Direction                 Reserved Field                  |
    | Message Length               ---->           .                  |
    | DLC Header Length            ---->           .                  |
    | Origin DLC Port ID           ---->           .                  |
    |            .                                 .                  |
    | Origin Data Link Correlator  ---->           .                  |
    |            .                                 .                  |
    | Origin Transport ID          ---->           .                  |
    |            .                                 .                  |
    | Target DLC Port ID           ---->           .                  |
    |            .                                 .                  |
    | Target Data Link Correlator  ---->           .                  |
    |            .                                 .                  |
    | Target Transport ID          ---->           .                  |
    |            .                                 .                  |
    | Reserved Field               ---->           .                  |
    |            .                                 .                  |
    +-----------------------------------------------------------------+
             (Even Byte)                      (Odd Byte)



     INFORMATION MESSAGE (16 Bytes)
    +-----------------------------------------------------------------+
    | Version                         Reserved Field                  |
    | Message Length               ---->           .                  |
    | Remote Data Link Correlator  ---->           .                  |
    |            .                                 .                  |
    | Remote DLC Port ID           ---->           .                  |
    |            .                                 .                  |
    | Reserved Field               ---->           .                  |
    | Message Type                    Reserved Field                  |
    +-----------------------------------------------------------------+
             (Even Byte)                      (Odd Byte)

   The Version Number is set to x'4B', indicating a numeric value of 75.

   The Header Length is x'00 48', indicating a numeric value of 72
   bytes.

   The Header Number is x'01', indicating a value of one.

   The Frame Direction field is set to x'01' for frames sent from the
   origin DLS to the target DLS, and is set to x'02' for frames sent
   from the target DLS to the origin DLS.

      Note:  The Remote Data Link Correlator and Remote DLC Port ID are
      set equal to the Target Data Link Correlator and Target DLC Port
      ID if the Frame Direction field is set to x'01', and are set equal
      to the Origin Data Link Correlator and Origin DLC Port ID if the
      Direction Field is set to x'02'.

   The Protocol ID field is set to x'42', indicating a numeric value of
   66.

   The Message Length field defines the number of bytes within the data
   field following the header.  Note that this value is specified in two
   different fields of the message header.

   The DLC Header Length is set to zero for SNA and is set to x'23' for
   NetBIOS datagrams, indicating a length of 35 bytes.  This includes
   the Access Control (AC) field, the Frame Control (FC) field,
   Destination MAC Address (DA), the Source MAC Address (SA), the
   Routing Information (RI) field (padded to 18 bytes), the Destination
   link SAP (DSAP), the Source link SAP (SSAP), and the LLC control
   field (UI).

   The values for the Message Type field are defined in a later section.
   Note that this value is specified in two different fields of the
   message header.



   Reserved fields are set to zero upon transmission and should be
   ignored upon receipt.

3.2. Address Parameters

   A data link is defined as a logical association between the two end
   stations using Data Link Switching.  It is identified by a Data Link
   ID (14 bytes) consisting of the pair of attachment addresses
   associated with each end system.  Each attachment address is
   represented by the concatenation of the MAC address (6 bytes) and the
   LLC address (1 byte).

     DATA LINK ID   (14 Bytes)
    +-----------------------------------------------------------------+
    |Target MAC Address           ---->         .                     |
    |           .                               .                     |
    |           .                               .                     |
    |Origin MAC Address           ---->         .                     |
    |           .                               .                     |
    |           .                               .                     |
    |Origin Link SAP                   Target Link SAP                |
    +-----------------------------------------------------------------+

   An end-to-end circuit is identified by a pair of Circuit ID's.  A
   Circuit ID is a 64 bit  number that identifies the DLC circuit within
   a single DLS.  It consists of a DLC Port ID (4 bytes), and a Data
   Link Correlator (4 bytes).  This value is unique in a single DLS and
   is assigned locally.  The pair of Circuit ID's along with the
   identifiers of the Data Link Switches, uniquely identify a single
   end-to-end circuit.  Each DLS must keep a table of these Circuit ID
   pairs, one for the local end of the circuit and the other for the
   remote end of the circuit.  In order to identify which Data Link
   Switch originated the establishment of a circuit, the terms, origin
   DLS and target DLS, will be employed in this document.

     CIRCUIT ID   (8 Bytes)
    +-----------------------------------------------------------------+
    |DLC Port ID                  ---->         .                     |
    |           .                               .                     |
    |Data Link Correlator         ---->         .                     |
    |           .                               .                     |
    +-----------------------------------------------------------------+

   The Origin Transport ID and the Target Transport ID fields in the
   message header are used to identify the individual TCP/IP port on a
   Data Link Switch.  The values have only local significance.  However,
   each Data Link Switch is required to reflect the values contained in
   these two fields, along with the associated values for DLC Port ID



   and the Data Link Correlator, when returning a message to the other
   Data Link Switch.

   The following figure shows the use of the addressing parameters
   during the establishment of an end-to-end connection.  The CANUREACH,
   ICANREACH, and REACH_ACK messages all carry the Data Link ID,
   consisting of the MAC and Link SAP addresses associated with the two
   end stations.  Upon receipt of a CANUREACH message, the target DLS
   starts a data link for each port, thereby obtaining a Data Link
   Correlator.  If the target station can be reached, an ICANREACH
   message is returned to the origin DLS containing the Target Circuit
   ID parameter.  Upon receipt, the origin DLS starts a data link and
   returns the Origin Circuit ID to the target DLS within the REACH_ACK
   message.  If the REACH_ACK message is not successfully received, the
   target Data Link Switch can obtain the Origin Circuit ID from a
   subsequent message (i.e., CONTACT, XIDFRAME, or DGRMFRAME).

     +------------+                                  +------------+
     |Disconnected|                                  |Disconnected|
     +------------+     CANUREACH (Data Link ID)     +------------+
           ------------------------------------------------->
               ICANREACH (Data Link ID, Target Circuit ID)
           <------------------------------------------------
         REACH_ACK (Data Link ID, Origin Cir ID, Target Cir ID)
           ------------------------------------------------->
     +------------+                                  +------------+
     |Circuit Est.|                                  |Circuit Est.|
     +------------+                                  +------------+
         XIDFRAME (Data Link ID, Origin Cir ID, Target Cir ID)
           <------------------------------------------------>
          CONTACT (Data Link ID, Origin Cir ID, Target Cir ID)
           ------------------------------------------------->
         CONTACTED (Data Link ID, Origin Cir ID, Target Cir ID)
           <-------------------------------------------------
     +------------+                                  +------------+
     | Connected  |                                  | Connected  |
     +------------+                                  +------------+
            INFOFRAME (Remote Circuit ID = Target Circuit ID)
           ------------------------------------------------->
            INFOFRAME (Remote Circuit ID = Origin Circuit ID)
           <-------------------------------------------------

                  Figure 3.  DLS Circuits and Connections

3.2. 地址参数​

     CONTROL MESSAGES (72 Bytes)
    +-----------------------------------------------------------------+
    | Version Number                  Reserved Field                  |
    | Message Length               ---->           .                  |
    | Remote Data Link Correlator  ---->           .                  |
    |            .                                 .                  |
    | Remote DLC Port ID           ---->           .                  |
    |            .                                 .                  |
    | Reserved Field               ---->           .                  |
    | Message Type                    Reserved Field                  |
    | Protocol ID                     Header Number                   |
    | Header Length                ---->           .                  |
    | Reserved Field               ---->           .                  |
    | Reserved Field                  Message Type                    |
    | Target MAC Address           ---->           .                  |
    |            .                                 .                  |
    |            .                                 .                  |
    | Origin MAC Address           ---->           .                  |
    |            .                                 .                  |
    |            .                                 .                  |
    | Origin Link SAP                 Target Link SAP                 |
    | Frame Direction                 Reserved Field                  |
    | Message Length               ---->           .                  |
    | DLC Header Length            ---->           .                  |
    | Origin DLC Port ID           ---->           .                  |
    |            .                                 .                  |
    | Origin Data Link Correlator  ---->           .                  |
    |            .                                 .                  |
    | Origin Transport ID          ---->           .                  |
    |            .                                 .                  |
    | Target DLC Port ID           ---->           .                  |
    |            .                                 .                  |
    | Target Data Link Correlator  ---->           .                  |
    |            .                                 .                  |
    | Target Transport ID          ---->           .                  |
    |            .                                 .                  |
    | Reserved Field               ---->           .                  |
    |            .                                 .                  |
    +-----------------------------------------------------------------+
             (Even Byte)                      (Odd Byte)



     INFORMATION MESSAGE (16 Bytes)
    +-----------------------------------------------------------------+
    | Version                         Reserved Field                  |
    | Message Length               ---->           .                  |
    | Remote Data Link Correlator  ---->           .                  |
    |            .                                 .                  |
    | Remote DLC Port ID           ---->           .                  |
    |            .                                 .                  |
    | Reserved Field               ---->           .                  |
    | Message Type                    Reserved Field                  |
    +-----------------------------------------------------------------+
             (Even Byte)                      (Odd Byte)

   The Version Number is set to x'4B', indicating a numeric value of 75.

   The Header Length is x'00 48', indicating a numeric value of 72
   bytes.

   The Header Number is x'01', indicating a value of one.

   The Frame Direction field is set to x'01' for frames sent from the
   origin DLS to the target DLS, and is set to x'02' for frames sent
   from the target DLS to the origin DLS.

      Note:  The Remote Data Link Correlator and Remote DLC Port ID are
      set equal to the Target Data Link Correlator and Target DLC Port
      ID if the Frame Direction field is set to x'01', and are set equal
      to the Origin Data Link Correlator and Origin DLC Port ID if the
      Direction Field is set to x'02'.

   The Protocol ID field is set to x'42', indicating a numeric value of
   66.

   The Message Length field defines the number of bytes within the data
   field following the header.  Note that this value is specified in two
   different fields of the message header.

   The DLC Header Length is set to zero for SNA and is set to x'23' for
   NetBIOS datagrams, indicating a length of 35 bytes.  This includes
   the Access Control (AC) field, the Frame Control (FC) field,
   Destination MAC Address (DA), the Source MAC Address (SA), the
   Routing Information (RI) field (padded to 18 bytes), the Destination
   link SAP (DSAP), the Source link SAP (SSAP), and the LLC control
   field (UI).

   The values for the Message Type field are defined in a later section.
   Note that this value is specified in two different fields of the
   message header.



   Reserved fields are set to zero upon transmission and should be
   ignored upon receipt.

3.2. Address Parameters

   A data link is defined as a logical association between the two end
   stations using Data Link Switching.  It is identified by a Data Link
   ID (14 bytes) consisting of the pair of attachment addresses
   associated with each end system.  Each attachment address is
   represented by the concatenation of the MAC address (6 bytes) and the
   LLC address (1 byte).

     DATA LINK ID   (14 Bytes)
    +-----------------------------------------------------------------+
    |Target MAC Address           ---->         .                     |
    |           .                               .                     |
    |           .                               .                     |
    |Origin MAC Address           ---->         .                     |
    |           .                               .                     |
    |           .                               .                     |
    |Origin Link SAP                   Target Link SAP                |
    +-----------------------------------------------------------------+

   An end-to-end circuit is identified by a pair of Circuit ID's.  A
   Circuit ID is a 64 bit  number that identifies the DLC circuit within
   a single DLS.  It consists of a DLC Port ID (4 bytes), and a Data
   Link Correlator (4 bytes).  This value is unique in a single DLS and
   is assigned locally.  The pair of Circuit ID's along with the
   identifiers of the Data Link Switches, uniquely identify a single
   end-to-end circuit.  Each DLS must keep a table of these Circuit ID
   pairs, one for the local end of the circuit and the other for the
   remote end of the circuit.  In order to identify which Data Link
   Switch originated the establishment of a circuit, the terms, origin
   DLS and target DLS, will be employed in this document.

     CIRCUIT ID   (8 Bytes)
    +-----------------------------------------------------------------+
    |DLC Port ID                  ---->         .                     |
    |           .                               .                     |
    |Data Link Correlator         ---->         .                     |
    |           .                               .                     |
    +-----------------------------------------------------------------+

   The Origin Transport ID and the Target Transport ID fields in the
   message header are used to identify the individual TCP/IP port on a
   Data Link Switch.  The values have only local significance.  However,
   each Data Link Switch is required to reflect the values contained in
   these two fields, along with the associated values for DLC Port ID



   and the Data Link Correlator, when returning a message to the other
   Data Link Switch.

   The following figure shows the use of the addressing parameters
   during the establishment of an end-to-end connection.  The CANUREACH,
   ICANREACH, and REACH_ACK messages all carry the Data Link ID,
   consisting of the MAC and Link SAP addresses associated with the two
   end stations.  Upon receipt of a CANUREACH message, the target DLS
   starts a data link for each port, thereby obtaining a Data Link
   Correlator.  If the target station can be reached, an ICANREACH
   message is returned to the origin DLS containing the Target Circuit
   ID parameter.  Upon receipt, the origin DLS starts a data link and
   returns the Origin Circuit ID to the target DLS within the REACH_ACK
   message.  If the REACH_ACK message is not successfully received, the
   target Data Link Switch can obtain the Origin Circuit ID from a
   subsequent message (i.e., CONTACT, XIDFRAME, or DGRMFRAME).

     +------------+                                  +------------+
     |Disconnected|                                  |Disconnected|
     +------------+     CANUREACH (Data Link ID)     +------------+
           ------------------------------------------------->
               ICANREACH (Data Link ID, Target Circuit ID)
           <------------------------------------------------
         REACH_ACK (Data Link ID, Origin Cir ID, Target Cir ID)
           ------------------------------------------------->
     +------------+                                  +------------+
     |Circuit Est.|                                  |Circuit Est.|
     +------------+                                  +------------+
         XIDFRAME (Data Link ID, Origin Cir ID, Target Cir ID)
           <------------------------------------------------>
          CONTACT (Data Link ID, Origin Cir ID, Target Cir ID)
           ------------------------------------------------->
         CONTACTED (Data Link ID, Origin Cir ID, Target Cir ID)
           <-------------------------------------------------
     +------------+                                  +------------+
     | Connected  |                                  | Connected  |
     +------------+                                  +------------+
            INFOFRAME (Remote Circuit ID = Target Circuit ID)
           ------------------------------------------------->
            INFOFRAME (Remote Circuit ID = Origin Circuit ID)
           <-------------------------------------------------

                  Figure 3.  DLS Circuits and Connections

在交换 XIDFRAME, CONTACT 和 CONTACTED 消息期间, XIDFRAME 等消息格式中除 DATA LINK ID 参数外, 还包含一对 Circuit ID 参数. 一旦连接建立, INFOFRAME 消息就使用较短的

消息头进行交换. 该消息头只包含与远端 DLS 关联的 Circuit ID. Remote Data Link Correlator 和 Remote DLC Port ID 被设置为与发起方或目标数据链路交换机 (取决于包的方向) 关联的 Data Link Correlator 和 DLC Port ID.

3.3. 消息类型​

下表列出了数据链路交换机之间交换的协议数据单元. 所有未列出的值均保留, 以供后续版本使用.

     Command       Function                       Hex Value
------- -------- ---------
CANUREACH Can U Reach Station x'03'
ICANREACH I Can Reach Station x'04'
REACH_ACK Reach Acknowledgment x'05'
DGRMFRAME Datagram Frame (See note) x'06'
XIDFRAME XID Frame x'07'
CONTACT Contact Remote Station x'08'
CONTACTED Remote Station Contacted x'09'
RESTART_DL Restart Data Link x'10'
DL_RESTARTED Data Link Restarted x'11'
INFOFRAME Information (I) Frame x'0A'
HALT_DL Halt Data Link x'0E'
DL_HALTED Data Link Halted x'0F'
NETBIOS_NQ NetBIOS Name Query x'12'
NETBIOS_NR NetBIOS Name Recognized x'13'
DATAFRAME Data Frame (See note) x'14'
NETBIOS_ANQ NetBIOS Add Name Query x'1A'
NETBIOS_ANR NetBIOS Add Name Response x'1B'

Table 1. SSP Message Types

注: DGRMFRAME 和 DATAFRAME 消息都用于承载 DLC 实体在 UI 帧中收到的信息. 如下文所述, DGRMFRAME 消息根据一对 Circuit ID 寻址, 而 DATAFRAME 消息根据由一对 MAC 地址和一对链路 SAP 地址组成的 Data Link ID 寻址. 后者用于端到端电路建立之前, 此时尚未建立 Circuit ID.

对于 NetBIOS 控制消息的交换, 整个 DLC 头作为消息单元的一部分承载. 这包括 MAC 头 (其中路由信息字段填充到 18 字节) 和 LLC 头. 受影响的消息类型有: NETBIOS_NQ, NETBIOS_NR, NETBIOS_ANQ, NETBIOS_ANR, 以及当

被 NetBIOS 系统使用时的 DATAFRAME. 远端数据链路交换机在收到上述五种消息时, 不使用 DLC 头中的路由信息.