📄 rfc891.txt
字号:
DCN Local-Network Protocols Page 21D.L. Mills 4. For precise timekeeping, the offset can be considered valid only if the length of the last HELLO packet transmitted is equal to the length of the last one received. Thus, if HLO.LENGTH equal to PKT.LENGTH, set OFFSET -> HOST-TABLE.OFFSET; otherwise, leave this field alone. Finally, if HID is equal to CLOCK-HID and bit 15 (the DATE-VALID bit) of DATE is zero, set PKT.DATESTAMP -> DATE and call the SET-CLOCK procedure of the CLOCK process with argument HLO.TIMESTAMP.OUTPUT-PACKET Event This event is evoked once every HELLO-INTERVAL seconds. It determines if a HELLO message is to be transmitted, transmits it and updates state variables. 1. If HLO.KEEP-ALIVE is nonzero decrement its value. 2. If HLO.POLL is zero and HLO.KEEP-ALIVE is zero, do not send a HELLO message. If either is nonzero initialize the packet fields as follows: LOCAL-ADDRESS -> PKT.SOURCE, HLO.NEIGHBOR-ADDRESS -> PKT.DESTINATION and DATE -> PKT.DATESTAMP. Note: PKT.DESTINATION is set to zero if this is a broadcast link (HLO.BROADCAST set to one). Also, note that bit 15 of DATE is the DATE-VALID bit. If this bit is one the receiver will not update its master clock from the information in the transmitted packet. This is significant only if the sending host is on the least-delay path to the master clock. Set PKT.TIMESTAMP to the value returned from the READ-CLOCK procedure. If HLO.KEEP-ALIVE is zero or HOLD is nonzero, set PKT.TSP to zero; otherwise, set PKT.TIMESTAMP + HLO.TSP -> PKT.TSP. 3. Determine if the neighbor is on the same net or subnet. If the neighbor is on a different net set PKT.NHOSTS to zero and proceed with the next step. Otherwise, set NHOSTS -> PKT.NHOSTS and for each value of HID from zero to PKT.HOSTS-1 copy the HOST-TABLE.DELAY and HOST-TABLE.OFFSET fields of the corresponding HOST-TABLE entry in order into the packet. For each entry copied test if the HOST-TABLE.PID field matches the HLO.PID of the HELLO process. If so, a potential routing loop is possible. In this case use MAXDELAY for the delay field in the packet instead. 4. Finally, set HLO.LENGTH to the number of octets in the packet and send the packet.3.4. HOST Process (HOS) This process maintains the routing tables. It is activated once persecond to scan HOST-TABLE and decrement the HOST-TABLE.TTL field of eachentry. It also performs housekeeping functions.DCN Local-Network Protocols Page 22D.L. Mills3.4.1. Local variablesHOS.PID This is an eight-bit integer used to identify the HOST process. It is initialized by the kernel when the process is created and remains unchanged thereafter.HOS.HID This is an eight-bit temporary variable.3.4.2. Events and ProceduresSCAN Event This event is evoked once each second to scan the HOST-TABLE and perform housekeeping functions. 1. For each value of a temporary variable F from zero to NHOSTS-1 do the following: Set LOCAL-ADDRESS -> ADDRESS and call the ROUTE procedure, which will return the host ID HID. If F is equal to HID, then set both DELAY and OFFSET to zero, HOS.PID -> PID and call the UPDATE procedure. This will cause all packets received with the local address to be routed to this process. If HOST-TABLE.TTL is zero skip this step. Otherwise, decrement HOST-TABLE.TTL by one. If the result is nonzero skip the remainder of this step. Otherwise, If HOST-TABLE.DELAY <MAXDELAY set HOLDOFF-INTERVAL -> HOST-TABLE.TTL and MAXDELAY -> HOST-TABLE.DELAY. The effect of this step is to declare a hold-down cycle when a host goes down.4. References1. Mills, D.L. Final Report on Internet Research, ARPA Packet Switching Program. Technical Report TSLAB 82-7, COMSAT Laboratories, December 1982.DCN Local-Network Protocols Page 23D.L. MillsAppendix A. Link-Level Packet FormatsA.1. Serial Links Using Program-Interrupt Interfaces Following is a description of the frame format used onasynchronous and synchronous serial links with program-interruptinterfaces such as the DEC DLV11 and DPV11. This format providestransparency coding for all messages, including HELLO messages, butdoes not provide error detection or retransmission functions. It isdesigned to be easily implemented and compatible as far as possiblewith standard industry protocols. The protocol is serial-by-bit, with the same interpretation onthe order of transmission as standard asynchronous and synchronousinterface devices; that is, the low-order bit of each octet istransmitted first. The data portion of the frame consists of oneInternet datagram encoded according to a "character-stuffing"transparency convention:1. The frame begins with the two-octet sequence DLE-STX, in the case of asynchronous links, or the four-octet sequence SYN-SYN-DLE-STX, in the case of synchronous links. The data portion is transmitted next, encoded as described below, followed by the two-octet sequence DLE-ETX. No checksum is transmitted or expected. If it is necessary for any reason to transmit time-fill other than in the data portion, the DEL (all ones) is used. 2. Within the data portion of the frame the transmit buffer is scanned for a DLE. Each DLE found causes the sequence DLE-DLE to be transmitted. If it is necessary for some reason for the transmitter to insert time-fill within the data portion, the sequence DLE-DEL is used. 3. While scanning the data stream within the data portion of the frame the sequence DLE-DLE is found, a single DLE is inserted in the receive buffer. If the sequence DLE-ETX is found, the buffer is passed on for processing. The sequence DLE-DEL is discarded. Any other two-octet sequence beginning with DLE and ending with other than DLE, ETX or DEL is considered a protocol error (see note below). Note: In the case of synchronous links using program-interruptinterfaces such as the DPV11, for example, a slightly modifiedprotocol is suggested when both ends of the link concur. Theseinterfaces typically provide a parameter register which can be loadedwith a code used both to detect the receiver synchronizing pattern andfor time-fill when the transmit buffer register cannot be serviced intime for the next character. The parameter register must be loaded with the SYN code for thisprotocol to work properly. However, should it be necessary totransmit time-fill, a single SYN will be transmitted, rather than theDLE-DEL sequence specified. Disruptions due to these events can beminimized by use of the following rules:DCN Local-Network Protocols Page 24D.L. Mills1. If the transmitter senses a time-fill condition (usually by a control bit assigned for this purpose) between frames or immediately following transmission of a DLE, the condition is ignored. 2. If the transmitter senses a time-fill condition at other times it sends the sequence DLE-CAN.3. If the receiver finds a SYN either between frames or immediately following DLE, the SYN is discarded without affecting sequence decoding. 4. If the receiver finds the sequence DLE-CAN in the data portion, it discards the sequence and the immediately preceding octet. These rules will work in cases where a single SYN has beeninserted by the transmitter and even when a SYN has been inserted inthe DLE-CAN sequence. If an overrun (lost data) condition is sensedat the receiver, the appropriate action is to return to theinitial-synchronization state. This should also be the action if anycode other than STX is found following the initial DLE. or if anycode other than DLE, ETX, DEL or CAN is found following a DLE in thedata portion.A.2. Serial Links Using DDCMP Devices Following is a description of the frame format used on DEC DDCMP linkswith DMA interfaces such as the DEC DMV11 and DMR11. These interfacesimplement the DEC DDCMP protocol, which includes error detection andretransmission capabilities. The DDCMP frame format is as follows:+-------------+-----+-----+-----+-----+-----+------+------+------+| SYN SYN SOH |Count|Flag |Resp | Seq | Adr | CRC1 | Data | CRC2 |+-------------+-----+-----+-----+-----+-----+------+------+------+bits 24 14 2 8 8 8 16 ... 16With respect to this diagram, each octet is transmitted starting from theleftmost octet, with the bits of each octet transmitted low-order bit first.The contents of all fields except the "Data" field are managed by theinterface. The Internet datagram is placed in this field as-is, with nocharacter or bit stuffing (the extent of this field is indicated by theinterface in the "Count" field.A.3. Serial Links Using HDLC Devices Following is a description of the frame format used on HDLC links withprogram-interrupt interfaces such as the DEC DPV11. +--------+--------+--------+--------+--------+--------+ | Flag | Addr | Ctrl | Data | CRC | Flag | +--------+--------+--------+--------+--------+--------+coding 01111110 00000000 00000000 xxxxxxxx cccccccc 01111110DCN Local-Network Protocols Page 25D.L. MillsWith respect to this diagram, each octet is transmitted starting fromthe leftmost octet, with the bits of each octet transmitted low-orderbit first. The code xxxxxxxx represents the data portion and ccccccccrepresents the checksum. The bits between the "Flag" fields areencoded with a bit-stuffing convention in which a zero bit is stuffedfollowing a string of five one bits. The "Addr" and "Ctrl" fields arenot used and the checksum is ignored. The Internet datagram is placedin the "Data" field, which must be a multiple of eight bits in length.A.4. ARPANET 1822 Links Using Local or Distant Host Interfaces Following is a description of the frame format used with ARPANET1822 Local or Distant Host interfaces. These interfaces can be usedto connect a DCN host to an ARPANET IMP, Gateway or Port Expander orto connect two DCN hosts together. When used to connect a DCN host toan ARPANET IMP, Gateway or Port Expander, a 96-bit 1822 leader isprepended ahead of the Internet datagram. The coding of this leaderis as described in BBN Report 1822. When used to connect two DCNhosts together, no leader is used and the frame contains only theInternet datagram.A.5. ARPANET 1822 Links Using HDH Interfaces Following is a description of the frame format used with ARPANET1822 HDH interfaces. These interfaces can be used to connect a DCNhost to an ARPANET IMP or Gateway or to connect two DCN hoststogether. In either case, the frame format is as described inAppendix J of BBN Report 1822.A.6. X.25 LAPB Links Using RSRE Interfaces Following is a description of the frame format used on X.25 LAPBlinks with the Royal Signals and Radar Establishment interfaces.These interfaces implement the X.25 Link Access Protocol - Balanced(LAPB), also known as the frame-level protocol, using a frame formatsimilar to that described under A.3 above. Internet datagrams areplaced in the data portion of I frames and encoded with thebit-stuffing procedure described in A.3. There is no packet-levelformat used with these interfaces.A.7. Ethernet Links Following is a description of the frame format used on Ethernet links. +-----------+-----------+------+------+-----+ | Dest Addr | Srce Addr | Type | Data | CRC | +-----------+-----------+------+------+-----+bits 48 48 16 ... 32With respect to this diagram, each field is transmitted starting fromthe leftmost field, with the bits of each field transmitted low-orderbit first. The "Dest Addr" and "Srce Addr" contain 48-bit Ethernetaddresses, while the "Type" field contains the assigned value for IPdatagrams (0800 hex) or forDCN Local-Network Protocols Page 26D.L. MillsARP datagrams (0806 hex). The Internet datagram is placed in the"Data" field and followed by the 32-bit checksum. The AddressResolution Protocol (ARP) is used to establish the mapping betweenEthernet address and Internet addresses.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -