Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

IPv6 Essentials

.pdf
Скачиваний:
61
Добавлен:
15.03.2015
Размер:
2.76 Mб
Скачать

Figure 8-22. Router-LSA

The fields of the Router-LSA are fully detailed in the following list:

Flags (1 byte)

The Flags field indicates the special function of this router. Table 8-6 shows the possible values and their corresponding functions.

Table 8-6. Flags in Router-LSA

Bit

Name

W bit

This router is a wildcard multicast receiver. See RFC 1584 for more information.

V bit

This router is the endpoint of a virtual link using this area as a transit area.

E bit

This router is an ASBR.

B bit

This router is an ABR.

Options (3 bytes)

This field describes the optional capabilities supported by this router, as outlined in Table 8-4.

Link Entry (16 bytes per link)

Table 8-7 explains the possible link types and their corresponding fields. Each link has a metric assigned to it based on the characteristics of the interface. The Neighbor Interface ID and Router ID are learned through the Hello Protocol. The Link Entries are used as pointers to build the intraarea tree. Interface types 1 and 4 point to the Router-LSA specified in the Neighbor Router ID (LS-ID and Advertised Router). Interface type 2 points to Network-LSA, as specified in the Neighbor Interface ID (LS-ID) and Neighbor Router ID (Advertised Router).

131

Table 8-7. Link Type supported in a Router-LSA

Link Name type

1Point-to- point

2Transit

3Reserved

4Virtual

Neighbor Interface ID

Neighbor Router ID

 

 

Interface ID of the neighbor on the other

Router-ID of the neighbor on the other

end of the point-to-point link

end of the point-to-point link

Interface ID of the DR on this link

Router ID of the DR on this link.

 

 

Interface ID of the neighbor on the other Router ID of the neighbor on the other

end of the virtual link

end of the virtual link

8.2.5.5 Network-LSA (Type 0x2002)

The designated router of each transit link in the area originates a Network-LSA. The Link State ID is set to the Interface ID of the DR's interface to the transit link. Figure 8-23 outlines the Network-LSA. It simply contains the Options field (see Table 8-4, earlier in this chapter), followed by a list of Router IDs identifying all routers attached to this particular transit link. This represents a pointer to all routers attached to this transit link.

Figure 8-23. Network-LSA

The Options field is set to the logical OR of the Options field received from the Link-LSA of all the routers attached to this transit link. (See Section 8.2.5.9.) This provides the common optional capabilities supported by all routers on this link.

8.2.5.6 Inter-Area-Prefix-LSA (Type 0x2003)

Inter-Area-Prefix-LSAs are originated by the ABR to advertise IPv6 prefixes from other areas into the area of this LSA. A separate Inter-Area-Prefix-LSA is originated for each route. An ABR could summarize a contiguous range of IPv6 prefixes into a single advertisement. For a stub area, the ABR advertises the default route using this LSA. Inter-Area-Prefix-LSA is the equivalent of OSPF for IPv4's Summary-LSA and is outlined in Figure 8-24.

132

Figure 8-24. Inter-Area-Prefix-LSA

In the tree-building process, this LSA represents an informational pointer associated with the ABR for attaching inter-area routes to the SPF tree. The Inter-Area-Prefix-LSA fields are detailed in the following list:

Metric (20 bits)

Defines the cost from the ABR to the IPv6 address prefix advertised with this Inter-Area-Prefix- LSA. If this route represents a summary, the metric should be taken from the highest metric of the member prefixes.

IPv6 Prefix Representation (0 to 20 bytes, in multiples of 4)

Defines the actual IPv6 prefix advertised. It consists of four fields: the Prefix Length, the Prefix Options, an unused field (set to zero), and the actual IPv6 Address Prefix. The Prefix Length defines the length of the address prefix. The default route is represented by a prefix length of 0. Table 8-8 explains the prefix options. The address prefix represents the IPv6 address. If necessary, it is padded with zero bits to the next full 32-bit word.

Table 8-8. Prefix options starting with the leftmost bit

BitName Description

0-

3

4

5

6

7

Reserved

 

 

 

P bit

Propagate bit: if set, the NSSA ABR readvertises the prefix into the backbone. Only used in

Type-7-LSA.

 

MC bit

Multicast bit: if set, the prefix should be included in IPv6 multicast routing calculations.

LA bit

Local address bit: if set, the prefix is actually a local IPv6 address of the originating router.

NU bit

No unicast bit: if set, the prefix should be excluded from IPv6 unicast calculation.

8.2.5.7 Inter-Area-Router-LSA (Type 0x2004)

Inter-Area-Router-LSAs are originated by ABRs to advertise ASBRs from other areas into this area. A separate Inter-Area-Router-LSA is originated for each ASBR. This is necessary to inform all routers in this area of the existence of an outside ASBR. Inter-Area-Router-LSA is the equivalent of OSPF for IPv4's AS- Summary-LSA. As shown in Figure 8-25, the Inter-Area-Router-LSA contains the Options field (refer

133

back to Table 8-4), the Metric field, and the Router ID of the ASBR. The Metric field represents the cost from the ABR to the ASBR.

Figure 8-25. Inter-Area-Router-LSA

In the tree-building process, this LSA represents an informational pointer associated with the ABR for attaching an ASBR to the SPF tree.

8.2.5.8 AS-External-LSA (Type 0x4005)

AS-External-LSAs are advertised by ASBRs to import external IPv6 prefixes into the AS. Each AS- External-LSA represents one IPv6 prefix external to OSPF—i.e., learned from RIP, BGP, static, etc. They are flooded throughout the entire AS and are therefore known to every router except the routers in a stub area. Figure 8-26 explains the AS-External-LSA.

Figure 8-26. AS-External-LSA

In the tree-building process, this LSA represents an informational pointer associated with the ASBR for attaching external routes to the SPF tree. The AS-External-LSA fields are described in the following list.

134

E bit

If set, the specified metric is a Type 2 external metric as explained in Section 8.2.1.3. The metric is considered larger than any path to any route within the AS. If set to zero, the metric is a Type 1 external metric. It is expressed using the same units as the metric used in Router-LSA, Inter-Area- Prefix-LSA, and Intra-Area-Prefix-LSA.

F bit

If set, a forwarding address has been included in this LSA.

T bit

If set, an external router tag has been included in the LSA.

Metric (3 bytes)

Defines the cost from the ASBR to the external IPv6 prefix. The interpretation of the metric value depends on the E bit.

IPv6 Prefix Representation (0 to 20 bytes, in multiples of 4)

Defines the actual IPv6 prefix advertised. It consists of four fields: the Prefix Length, the Prefix Options, the Referenced LS Type, and the actual IPv6 Address Prefix. The Prefix Length defines the length of the address prefix. The default route is represented by a 0 length prefix. Table 8-8 explains the prefix options. The Address Prefix represents the IPv6 address. If necessary, it is padded with zero bits to the next full 32-bit word.

Referenced LS Type (part of the IPv6 Prefix Representation)

If set to a value other than zero, an additional LSA is associated with this external route. This LSA is specified in the Referenced Link State ID field.

Forwarding address (4 bytes)

If the F bit is set, any router in the AS forwards data traffic (to the external IPv6 prefix specified with this LSA) to this forwarding address. If the F bit is not set, data traffic is forwarded to the ASBR originating this LSA. This field must never be set to the IPv6 unspecified address (0:0:0:0:0:0:0:0:0). If any router within the AS cannot reach the forwarding address or the ASBR, the IPv6 prefix of the external route is not added to the routing table.

External Route Tag (4 bytes)

If the T bit is set, this field contains additional information about the external route. This information, however, will never be used within the OSPF AS. See RFC 1745 for more details.

Referenced Link State ID (4 bytes)

If and only if the Referenced LS Type is set to a value other than zero, the Referenced LS Type, Referenced Link State ID (this field), and the advertising router of this LSA represent an existing LSA in the LSDB, providing additional information for this external IPv6 prefix. This information, however, is not used by the OSPF protocol itself. The precise nature of such information is not part of the OSPF specifications.

135

8.2.5.9 Link-LSA (0x0008)

Link-LSAs are originated by each router, one for each link of the router. They are never flooded beyond this link. The Link State ID is set to the Interface ID of this link. The Link-LSA serves three purposes:

It provides the router's link-local address to all other routers attached to this link.

It provides a list of IPv6 prefixes associated with this link.

It provides a list of options to be used by the designated router for this link.

Figure 8-27 outlines the Link-LSA.

Figure 8-27. Link-LSA

In the tree-building process, this LSA represents an informational pointer associated with each link from or to a Router-LSA. It attaches the link-local address of the link to the SPF tree. The Link-LSA fields are described in the following list:

Router Priority (1 byte)

The priority number given to this router on this interface.

Options (3 bytes)

This router would like to use the options specified here (see Table 8-4). This is an indication (to the DR on this transit link) of which options it should use. See Section 8.2.5.5.

Link-local address (16 bytes)

The link-local address of the originating router's interface for this link.

Number of prefixes (4 bytes)

The number of prefixes to be advertised with this LSA.

136

IPv6 Prefix Representation (4 to 20 bytes, in multiples of 4)

All IPv6 prefixes will be listed here according to the number of prefixes. It consists of four fields: the Prefix Length, the Prefix Options, an unused field (set to zero), and the actual IPv6 Address Prefix. The Prefix Length defines the length of the address prefix. Table 8-8 explains the prefix options. The Address Prefix represents the IPv6 address. If necessary, it is padded with zero bits to the next full 32-bit word.

8.2.5.10 Intra-Area-Prefix-LSA (Type 0x2009)

A router uses the Intra-Area-Prefix-LSA to advertise one or more IPv6 prefixes associated with either this router or a Network-LSA. As OSPF for IPv6 has removed all addressing semantics from the Router-LSAs and Network-LSAs, the Intra-Area-Prefix-LSA provides this information. Each address prefix advertised is associated with a Router-LSA or a Network-LSA. Figure 8-28 shows the contents of an Intra-Area-Prefix- LSA. Particular attention should be paid to the Referenced LS Type, Link State ID, and Advertising Router fields, as explained below.

Figure 8-28. Intra-Area-Prefix-LSA

In the tree-building process, this LSA represents an informational pointer associated with a router, attaching IPv6 prefixes of its local interfaces to the SPF tree. It can also be associated with a transit link, attaching its IPv6 prefixes to the SPF tree. The Intra-Area-Prefix-LSA fields are detailed in the following list:

Number of prefixes (2 bytes)

The number of prefixes to be advertised with this LSA.

Referenced LS Type, Link State ID, Advertising Router (10 bytes)

If the Referenced LS Type is set to 1, the address prefixes are associated with this router. The Referenced Link State ID is set to 0, and the Referenced Advertising Router is set to the Router ID of the router originating this LSA. If the Referenced LS Type is set to 2, the address prefixes are associated with the Network-LSA. The Referenced Link State ID is set to the Interface ID of the link's DR, and the Referenced Advertising Router is the Router ID of the DR.

137

IPv6 Prefix Representation (4 to 20 bytes, in multiples of 4)

All IPv6 Prefixes are listed here according to the length of prefixes. It consists of four fields: the Prefix Length, the Prefix Options, the Metric, and the actual IPv6 Address Prefix. The Prefix Length defines the length of the address prefix. Table 8-8, earlier in this chapter, explained the prefix options. The Address Prefix represents the IPv6 address. If necessary, it is padded with zero bits to the next full 32-bit word. The Metric field defines the cost of this prefix.

8.2.6 Calculation of the OSPF Routing Table (Dijkstra Algorithm)

Using the LSDB as a base, each router builds an SPF tree and adds the routes to the routing table. Each router keeps multiple LSDBs. The Link LSDB contains all LSAs with link-local flooding scope, the Area LSDB contains all LSAs with area flooding scope, and finally, the AS LSDB contains all LSAs with AS flooding scope. The ABR has one Area LSDB for each locally attached area. The tree-building involves the three-step process described below. The sample network depicted in Figure 8-29 illustrates the process. Steps 1 and 2 must be performed on the Area LSDB. The ABR has to do them for each local area as it builds one SPF tree for each area.

Figure 8-29. Sample network and its LSDB

8.2.6.1 Step 1: Intra-area routes

In Step 1, the router builds the core tree using the Router-LSA and Network-LSA for this area. Remember that these two LSAs contain actual pointers. Each router places its own Router-LSA at the root of the tree. Each link entry in the Router-LSA represents a pointer to another Router-LSA (link type 1 or 4) or to a Network-LSA (link type 2). The Neighbor ID and, on link type 2, the Interface ID identify the respective LSA. Each adjacent LSA is placed temporarily in the tree as a branch, along with its metric, and the leastcost branch is made permanent because it represents the shortest path. Its LSA is examined next. If it is a Router-LSA, each link entry provides a new set of LSAs as candidates for the tree. If it is a Network-LSA, each attached router identifies a new set of LSAs as candidates, this time without a metric, because the metric to this transit link has already been determined. The candidates are added to the tree temporarily unless the candidate is already permanently in the tree and can therefore be ignored. Again, the LSA with the smallest metric (accumulated metric from the root) is made a permanent branch and its contents are examined. If this particular LSA exists as a temporary branch anywhere else in the tree, the temporary branch(es) can be eliminated. This process continues until there are no more Network-LSAs or RouterLSAs to be added. In case of two or more branches having the same least costs, each branch is made permanent.

138

The SPF core tree is now built. The tree, however, contains no addressing information. This address information is provided by the Intra-Area-Prefix-LSA. The router simply adds the Intra-Area-Prefix-LSA to the Router-LSA or Network-LSA according to the referenced LSA. The last step is to find the next hop information. Next hop addresses are the link-local addresses of directly connected routers. This information is provided by the Link-LSA originated by the directly connected routers. The router has now found all routes within the area and adds them to the OSPF routing table as Intra-area routes. Figure 8-30 explains the building of the SPF tree of area 1 for Router R1.

Figure 8-30. Intra-area tree for router R1 in area 1

8.2.6.2 Step 2: Inter-area routes

The router identifies all Inter-Area-Link-LSAs of this area. Its ABR must exist in the previously constructed tree. These LSAs are now associated with the ABR and added to the tree with the advertised metric. This attaches IPv6 prefixes of inter-area routes to the tree. The total cost to these routes consists of the cost to the ABR added to the cost advertised in the Inter-Area-Link-LSA. If the same prefix appears more than once, the one with the best total cost is considered. If the costs are equal, all equal-cost prefixes must be accepted into the inter-area routing table. The next hop is determined as the directly connected router on the shortest intra-area path to the ABR. Figure 8-31 illustrates this process for router R1.

139

Figure 8-31. Inter-area routes for router R1

If the router itself is an ABR, only Inter-Area-Link-LSAs originated by other ABRs are considered. All Inter-Area-Link-LSAs that represent routes for directly attached areas are ignored, because there is always an intra-area path to that destination, and intra-area paths are always preferred.

8.2.6.3 Step 3: External routes

The router first identifies all Inter-Area-Router-LSAs and associates them with the ABRs as described in step 2. This ensures that all ASBRs have been identified. Next, the router associates all AS-External-LSAs with their corresponding ASBR and adds them to the SPF tree. The IPv6 prefixes of all newly added LSAs form the external routes. Depending on the metric type, the router now enters these routes into the external-1 or external-2 routing table. If the same prefix appears more than once, external-1 routes are preferred over external-2 routes. If the same prefix still appears more than once, the one with the best total cost is considered. If the costs are equal, all equal-cost prefixes must be accepted. The next hop is determined as the directly connected router on the shortest intra-area path to the ASBR or to the forwarding address, if the F bit has been set within the LSA. Figure 8-32 illustrates this process for router R1.

140

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]