Protocols of local computer networks
4 Link-State update Up-dating of link state
5 Link-State ack Confirmation of link state
B the MESSAGE LENGTH field contains length of the message of the OSPF protocol expressed in bytes. B the SOURCE Router IP ADDRESS field is placed the IP address performing in this case function of the identifier of a source of the message of the OSPF protocol. B the Area ID field is located 32-bit number of that area of autonomous system where the message was created. B some implementations of an algorithm of routing of OSPF for writing and display of number of area is used decimal — the point form taken for IP addresses. When using this form the identifier for, for example, zero area will look as follows: 0.0.0.0. Usually the router marks the message of the OSPF protocol with the identifier of area where the interface via which it was passed is located. The messages passed through the virtual links organized in area can introduce an exception of this rule. The virtual links in the OSPF protocol are applied to lead topological structure of autonomous system to a canonical form: the central trunk region connected by radial ports to peripheral areas. When using an algorithm of routing of the OSPF protocol on a real network the administrator can have a need for integrating untied fragments of trunk area. The virtual link can be used and if it is necessary to configure some section of a network, directly not the bound to trunk area as the certain OSPF area.
B the CHECKSUM field is placed two-byte checksum of the message of the OSPF protocol. When forming this amount contents of bytes of authentication are not considered. B that case if length of the message cannot be introduced by an integral number of 16-bit numbers, a last plea is added by the necessary number of zero bytes on the right.
B the AUTHENTICATION TYPE field is placed the coding corresponding to type of the used authentication scheme of a source of the routing information. Assignment of the codings establishing type of authentication of the OSPF protocol is given in tab. 4.2.
Table 4.2. Types of the used authentication schemes of the OSPF protocol
Message TYPE Type
Assignment of the message
Authentication is not used the Simple password
Cryptographic authentication Cryptography authentication
More than 2 Reserved by IANA
IANA is reserved
Routing on the TCP/IP networks
If contents of the TYPE field are equal 0, it means that for determination of authenticity of the subscriber no diagram is used. B such cases in two subsequent fields can be placed any insignificant information.
Use of the simple password allows to avoid routing errors which can be called by incorrect behavior of routers. B this case use of the simple 32-bit password will allow to discard messages from routers which erraticly read themselves being in the field. Use of this diagram does not allow to confront, however, with deliberate distortion of information as the open password can easily be intercepted and reproduced.
For countersteering the attacks directed to deliberate distortion of the routing information should use the cryptography authentication scheme of the OSPF protocol. B this case each OSPF message is vested with a unique combination of the key code and sequential number of the message. As in this case the code of encoding is not passed in an explicit form, contents of code fields cannot be used for the second time.
Message of HELLO
For establishment of the mutual relationship routers of the OSPF protocol use the Hello protocol. Use of this protocol provides accomplishment of the following functions:
□ searching of adjacent routers in a network segment;
□ choice of DR and BDR routers;
□ determination of the status of the port;
□ establishment of partnership between routers.
In order that routers of the OSPF protocol became partners, accomplishment of the following conditions is necessary:
□ routers shall be connected to one network segment and belong one logical area of the OSPF protocol;
□ both routers shall undergo satisfactorily authentication process if it is necessary for establishment of partnership;
□ the values of Hello and Dead InteiTal time clocks established at routers shall match (assignment of time clocks is given further in the text);
□ the signs of stub area (stub area flag) established at routers also shall match.
Hello protocol packets periodically go via all interfaces of the router. B these packets the router places the IP-addresses of adjacent routers from which he received messages of Hello. When
the router finds in the hello packet received from the partner Eve own identifier, it is sign of establishment of partnership.
B networks multiple access of Broadcast (Ethernet) or NBMA (Non Broadcast Multi Access — the Frame Relay) the Hello protocol is used for a choice of the assigned router.
B Broadcast networks the OSPF protocol router for drive of hello packets uses multicast of address 220.127.116.11 or 18.104.22.168. These packets contain representations of this router concerning the candidate of the assigned router and also the list of routers with which at the sender partnership is established.
B NBMA networks for obvious reasons such mode of addressing cannot be used for delivery of messages of Hello. Therefore on such networks the router sends the hello packets to all the neighbors in the Unicast mode, using at the same time statically defined list.
Ha of fig. 4.11 is given structure of the message of Hello. The first 24 bytes are occupied by standard title of the message of the OSPF protocol with the established sign of the message of Hello (TYPE=1).
0 8 16 31
OSPF Header (TAPE = 1)
Fig. 4.11. Structure of the message of Hello
B the Net MASK field is placed a network Broadcast or NBMA mask. B the DEAD TIMER field is placed the maximum value of an interval (in seconds) during which the router can expect obtaining the next message of Hello from the adjacent router. When obtaining the next message the time clock is reset in the maximum value and restarted. After this interval the adjacent router is declared by “dead”. The DEAD TIMER value shall be
Routing on the TCP/IP networks
identical at all routers connected to one network. B the Hello Inter field is placed the value of the period of sending of messages Hello expressed in sekuvda. B the GWAY PRIO field is placed the router priority considered in case of a choice of the assigned router and than the value — that a high priority is more. B the DR and BDR fields the router places the sentences on candidates for fasts of the assigned router and its deputy. B of the rest of the message Hello settle down identifiers of adjacent routers (NEIGHBOUR ADDRESS).
Messages of Database Description
Messages of Database Description are passed if there is a need for drive of all database of routing. Ha of fig. 4.12 is introduced structure of the message of Database Description.
about 8 16 31
OSPF Header (TAPE = 2)
Sequence Number LSA1 LSA,
Fig. 4.12. Structure of the message of Database Description
B process of drive of the database participate two routers of the OSPF protocol. One of routers performing the Slave function (subordinate) (S=0) passes request for obtaining the database. The Master router (main) (S=I) creates the response message containing the complete database of field of routing. B that case if the passed basis occupies more than one IP packet, in the message are placed special signs of the beginning (I=I) and continuation (M=1). To provide a possibility of restoration of the lost messages, each of them is supplied with the individual sequential number (Sequence Number).
Messages of Link-State Request
Messages of Link-State Request are used for receiving a fragment of the database of routing. Ha of fig. 4.13 is introduced structure of the message of Link-State Request.
0 8 16 31
OSPF Header (TAPE = 3)
Fig. 4.13. Structure of the message of Link-State Request
Directly after title of the message of Link-State Request the initiator of request places the fragment of the database needing up-dating.
Messages of Link-State Update
Messages of Link-State Update are used for drive of a fragment of the database of routing. The structure of the message of Link-State Update is introduced in fig. 4.14.
0 8 16 31
OSPF Header (TARE = 4)
Number of LSA LSAl LSA2
Fig. 4.14. Structure of the message of Link-State Update
The structure of the message of Link-State Update practically matches structure of the message of Link-State Request. B the Number of LSA field, additional in relation to the message of Link-State Request, is located the volume of the passed database fragment expressed in number of LSA.
Messages of Link State Acknowledgment.
Messages of Link-State Acknowledgment are used for assurance of receipt of a fragment of the database of routing. The structure of the message of Link-State Acknowledgment is introduced in fig. 4.15.
For drive of the message of Link-State Acknowledgment all modes of addressing applied in a protocol algorithm marshruti-can be used
Routing on the TCP/IP networks
OSPF zation. The structure of the message of Link-State Acknowledgment matches structure of the message of Link-State Request. The difference consists that instead of actually messages of LSA only their titles are passed.
0 8 16 31
OSPF Header (TAPE = 5)
Fig. 4.15. Structure of the message of Link-State Acknowledgment
Example of practical application of an algorithm of the OSPF protocol
Ha of fig. 4.16 is given the diagram of a section of a network in which for creation of routes algorithms of the RIP and OSPF protocols are used (process number 77). Particular B the routing protocol OSPF is included on the SO and EO interfaces of the M2 router.
I I I
I I I I I I I I