⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc1940.txt

📁 著名的RFC文档,其中有一些文档是已经翻译成中文的的.
💻 TXT
📖 第 1 页 / 共 4 页
字号:
         generate a control packet with "Unimplemented source route           protocol type"       end if       discard the packet       return     end if     if the Hop Count field is greater than 0 begin       decrement the Hop Count field     end if     if the Hop Count field is 0 begin       if the packet is a data packet begin         generate a control packet with "Hop Count Exceeded"      end if       discard the packet       return     end if     if the packet is a data packet begin       if the packet violates transit policy begin         generate a control packet with "Transit Policy Violation"Estrin, et al                Informational                     [Page 14]RFC 1940                         SDRv1                          May 1996         discard the data packet         return       end if     end if     set mode to NONE     set advanced to FALSE     if Next Hop Ptr does not equal Source Route Length begin       set NEXT_HOP to the next hop in the source route       while mode equals NONE begin         if NEXT_HOP is from network 127.0.0.0 begin           set the Loose/Strict Source Route bit equal to               the Loose/Strict Source Route Change bit         else if NEXT_HOP is from network 128.0.0.0 begin           set NEXT_DI to the least significant two octets of NEXT_HOP           if NEXT_DI is not equal to LOCAL_DI begin             set mode to DOMAIN           end if         else if NEXT_HOP does not equal an address assigned to the           local router begin           set mode to LOCAL         end if         if mode equals NONE begin           set advanced to TRUE           increment the Next Hop Pointer field           if Next Hop Pointer equals Source Route Length begin             set mode to COMPLETE           else             set NEXT_HOP to the next hop in the source route           end if         end if       end while     end if     if mode equals DOMAIN begin       set route to NONE       if the source route is loose begin         if not advanced begin           find the route, if any, based on Prefix and Prefix Length           if the route is an aggregate formed at the local router begin             set route to NONE           end if         end if         if route equals NONE begin           select a BGP or IDRP route, if any, with a path that includes             NEXT_DI and is not an aggregate formed at the local router           if route equals NONE beginEstrin, et al                Informational                     [Page 15]RFC 1940                         SDRv1                          May 1996             if the packet is a data packet begin              generate a control packet with "No Route Available"             end if             discard the packet             return           end if           copy the NLRI from the route to the Prefix and Prefix Length         end if         if the route is an IDRP route begin           set appropriate TOS in delivery header         end if         set NEXT_ROUTER from the route       else         set NEXT_ROUTER from the routing information for NEXT_DI           using the D-FIB         if route equals NONE begin           if the packet is a data packet begin             generate a control packet with "No Route Available"           end if           discard the packet           return         end if         if NEXT_DI is not adjacent begin           if the packet is a data packet begin             generate a control packet with "Strict Source Route Failed"           end if           discard the packet           return         end if       end if       end if     end if     if mode equals LOCAL begin       set NEXT_ROUTER equal to NEXT_HOP       if the source route is strict and NEXT_ROUTER is not         adjacent begin         if the packet is a data packet begin           generate a control packet with "Strict Source Route Failed"         end if         discard the packet         return       end if     end if     if mode equals LOCAL or mode equals DOMAIN begin       set the destination address of the delivery header equalEstrin, et al                Informational                     [Page 16]RFC 1940                         SDRv1                          May 1996         to NEXT_ROUTER       checksum the delivery header       route packet to NEXT_ROUTER using normal IP forwarding       return     end if     if the packet is a control packet begin       discard the packet     end if     remove the delivery header and the SDRP Header     if there is no normal IP route to the payload destination begin       generate a control packet with "No Route Available"       discard the data packet       return     end if     forward the payload using normal IP forwarding     if the probe bit is set begin       generate a control packet with "Probe Completed"     end if5.2.2 Handling an SDRP control packet.   An SDRP control packet is indicated by 0 in the Data packet/Control   packet bit in the Flags field in the SDRP Header.   If the Target Router field of the received SDRP packet contains an IP   address that is assigned to the router that received this SDRP   packet, then the router should use the information carried in the   Notification Code field, the Source Route Identifier field and the   information carried in the Payload field to update the status of its   SDRP routes. Details of such procedures are described in Section 7.   Otherwise, the router checks whether it can forward the packet to the   router specified in the Target Router field by using the routing   information present in its local FIB. If forwarding is possible then   the local system sets the destination address of the delivery header   to the address specified in the Target Router field, and hands the   packet off for normal IP forwarding.  If normal IP forwarding is   impossible then the packet may be forwarded in the same manner as an   SDRP data packet (described below) but with the following exceptions.      - Control packets are not subject to transit policies.      - In no case should a control packet be generated in response to        an error caused by a control packet.      - If the source route is completely traversed and the packet still        cannot be forwarded via normal IP routing, the packet should be        silently dropped.Estrin, et al                Informational                     [Page 17]RFC 1940                         SDRv1                          May 19965.2.3 Handling an SDRP data packet.   An SDRP data packet is indicated by a one in the Data packet/Control   packet bit in the Flags field in the SDRP Header.   An SDRP data packet is forwarded by sending the packet along the   source route in the SDRP Header.  When the source route is completely   traversed and the packet has reached the destination domain, the   payload may be removed from the data packet and forwarded normally.   Further details are described below.5.2.4 Checking the SDRP version number   An SDRP packet that has a version number other than 1 should be   discarded.  If the SDRP packet was a data packet, then a control   packet with the Notification Code "Unimplemented SDRP version" should   be generated as specified in section 6.5.2.5 Checking the Source Route Protocol Type   This document describes Source Route Protocol Type 1.  An SDRP router   may support multiple Source Route Protocol Types; however an SDRP   router is NOT required to support all defined Source Route Types.   Any packet that has a Source Route Protocol Type which is not   supported should be discarded.  If the SDRP packet was a data packet,   then a control packet with the Notification Code "Unimplemented   Source Route Protocol Type" should be generated as specified in   section 6.5.2.6 Decrementing and checking Hop Count   If an SDRP packet is to be forwarded and the Hop Count field is non-   zero, the Hop Count field should be decremented.  If the resulting   value is zero and the packet was a data packet, then a control packet   with the Notification Code "Hop Count Exceeded" should be generated   and sent to the encapsulating router as specified in section 6, and   the packet should be discarded.  If the resulting value is zero and   the packet was a control packet, the packet should be discarded.  The   payload of the control packet should carry the payload header   followed by 64 bits of the payload data of the data packet.5.2.7 Upholding transit policies   It is not a goal of SDRP to create a security routing system.   Therefore, we need to qualify our use of the term "upholding transit   policy".  It is assumed that transit policies have the nature of a   "gentleperson's agreement", and are upheld by all the participants.   In other words, it is assumed that there will be no maliciousEstrin, et al                Informational                     [Page 18]RFC 1940                         SDRv1                          May 1996   attempts to violate transit policies and that parties will rely on   auditing and post facto detection of violations. When a security   architecture is developed for IP or other network protocols then it   may be applied to increase the assurance of transit policy   enforcement. These issues are beyond the scope of this document.   A router may examine any data packet to verify if it complies with   local transit policies, as described in section 5.1.  If the   verification fails, the router generates a control packet.  If the   verification referred to only the contents of the SDRP header, then   the payload field of the control packet should be empty. If the   verification referred to both the contents of the SDRP header and the   payload header, then the payload field of the control packet should   carry the payload header.  If the verification referred to the   transport protocol header, then the payload field of the control   packet should carry the payload header and the transport header.   The Notification Code field of the SDRP header in the control packet   is set to Transit Policy Violation.  The procedures for constructing   the rest of the SDRP Header of the control packet are specified in   Section 6.5.2.8 Partially traversed source routes   If a router receives an SDRP packet with a partially traversed source   route, it extracts the next hop of the source route from the Source   Route field. The router locates the high-order byte of the   appropriate hop by using the Next Hop Pointer field as a 32 bit word   offset relative to the start of the Source Route field.  The next hop   is always four octets long.  The following procedure is used to   interpret the next hop.   Syntactically, each element in the source route appears as an IP   address.  There are three encodings for the next hop:   a) The next hop is an address in network 127.0.0.0.  In this case,   the Loose/Strict Source Route field is set equal to the Loose/Strict   Source Route Change bit.  Then the Next Hop Pointer is incremented,   the next hop is read from the Source Route field, and these three   cases are examined again.   b) The next hop is an address in network 128.0.0.0.  In this case,   the DI of the next domain is extracted from the least significant two   octets of the next hop.  If the extracted DI is the same as the DI of   the local domain, then the Next Hop Pointer is incremented, the next   hop is read from the Source Route field, and these three cases are   examined again.  Otherwise, if the extracted DI is different from the   DI of the local domain, the next hop is the extracted DI, and theEstrin, et al                Informational                     [Page 19]RFC 1940                         SDRv1                          May 1996   forwarding process may proceed.   c) The next hop is any other IP address.  If the next hop is equal to   any IP address assigned to the local router, the Next Hop Pointer is   incremented, the next hop is read from the Source Route field, and   these three cases examined again.  Otherwise, the next hop is the IP   address of the next router in the source route and the forwarding   process may proceed.   The above procedure for interpreting the next hop in the source route   finishes when the next hop is either a router other than the local   router or an encoded DI that is not the local DI or a completed   source route.   If upon termination of this procedure the source route is completely   traversed, see section 5.2.9.5.2.8.1 Finding a route to the next hop   If the next hop is not a DI, then the destination address in the   delivery header is replaced by the next hop address and the resulting   packet can then be forwarded using normal IP forwarding.  Otherwise,   a DI was extracted from the next hop in the source route, and the   following procedure is used to find a route to the next domain.   Given the DI of the next domain, the router next consults its D-FIB.   If no entry exists in the D-FIB for the next domain, then the packet   should be discarded.  If the packet was a data packet, a control   message with Notification Code "No Route Available" should be   generated as specified in Section 6. No other actions are necessary.   If there is a D-FIB entry, the router next examines the SDRP header   to determine if the packet specified a strict source route.  If so,   and the next domain is not adjacent to the local domain, then a   control packet with the Notification Code "Strict Source Route   Failed" should be generated, as specified in section 6, and the   original packet should be discarded.  No other actions are necessary.   If source route is loose, then BGP or IDRP information must be used   to insure that there is no loop in reaching the next hop.  If the   Next Hop Pointer was incremented when determining the next hop, then   the router must select a BGP or IDRP route with a path that includes   the extracted DI, and the NLRI for this route is copied into the   Prefix Length and Prefix fields.   Otherwise, the Next Hop Pointer was not incremented, and the router   should use the information carried in the Prefix and Prefix Length as   an index into its BGP or IDRP routing table.  If it finds a matchingEstrin, et al                Informational                     [Page 20]RFC 1940                         SDRv1                          May 1996   route then it must select the corresponding D-FIB entry.  If the   route was formed locally by aggregation, then the router must consult   its D-FIB and select any route with a path that includes the   extracted DI.  The NLRI for this route should be copied into the   Prefix Length and Prefix fields.   In either case, the D-FIB entry includes the IP address of the next   SDRP-speaking router to which the SDRP packet should be routed.  The   destination address in the delivery header is replaced by this   address.  The resulting packet can then be forwarded using normal IP   forwarding.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -