OSPFv3 basics of data communication network

Articles and resources are archived in [AIShareLab], which can be obtained by replying to communication systems and networks .

First, the purpose

  1. Master the basic IPv6 configuration of the router.
  2. Master the basic configuration of OSPFv3 (single area).

2. Topology

As shown in Figure 1, three routers R1, R2 and R3 are connected through corresponding physical interfaces. Among them, R1 and
R3 are each connected to a network segment. For simplicity, only two computers PC1 in these network segments are shown here. and PC2, PC1
and PC2 use R1 and R3 as their default gateways respectively. Among them, routers R1, R2 and R3 are recommended to use
AR2220 and above devices.

Insert image description here

Figure 1 OSPFv3 basic experimental topology diagram

3. Demand

Complete the OSPFv3 configuration on R1, R2 and R3 (the three routers all belong to Area 0), so that
the network segments where PC1 and PC2 are located can communicate with each other.

4. Steps

(1) Complete the basic configuration of R1, R2 and R3
① Complete the following configuration on R1:

<Huawei> system-view
[Huawei] sysname R1
[R1] ipv6
[R1] interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0] ipv6 enable
[R1-GigabitEthernet0/0/0] ipv6 address fc00:12::1 64
[R1-GigabitEthernet0/0/0] quit
[R1] interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1] ipv6 enable
[R1-GigabitEthernet0/0/1] ipv6 address FC00:1::FFFF 64
[R1-GigabitEthernet0/0/1] quit

Insert image description here

Figure 2 R1 configuration process

② Complete the following configuration on R2:

<Huawei> system-view
[Huawei] sysname R2
[R2] ipv6
[R2] interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0] ipv6 enable
[R2-GigabitEthernet0/0/0] ipv6 address fc00:12::2 64
[R2-GigabitEthernet0/0/0] quit
[R2] interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1] ipv6 enable
[R2-GigabitEthernet0/0/1] ipv6 address fc00:23::2 64
[R2-GigabitEthernet0/0/1] quit

Insert image description here

Figure 3 R2 configuration process

③ Complete the following configuration on R3:

<Huawei> system-view
[Huawei] sysname R3
[R3] ipv6
[R3] interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0] ipv6 enable
[R3-GigabitEthernet0/0/0] ipv6 address fc00:23::3 64
[R3-GigabitEthernet0/0/0] quit
[R3] interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1] ipv6 enable
[R3-GigabitEthernet0/0/1] ipv6 address FC00:2::FFFF 64
[R3-GigabitEthernet0/0/1] quit

Insert image description here

Figure 4 R3 configuration process

(2) Complete OSPFv3 configuration on R1, R2 and R3
① Start packet capture: Right-click the GE0/0/0 interface of R1 and start packet capture as shown in Figure 2, in an attempt to capture R1's GE0
/0 /0 Inbound and outbound packets on the interface.

② Complete the following configuration on R1:
[R1] ospfv3 1 #The command used in the system view is to create an OSPFv3 process and enter the
OSPFv3 view, where 1 is the process identifier, and the process identifier only has local meaning.
[R1-ospfv3-1] router-id 1.1.1.1 #Command used in OSPFv3 view, its function is to
configure a unique router identifier expressed in IPv4 address format for the running OSPFv3 protocol. Here, 1.1.1.1
is Router identifier represented in IPv4 address format.
[R1-ospfv3-1] quit
[R1] interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0] ospfv3 1 area 0 #Command used in interface view, its
function is to specify the interface (here is the interface GigabitEthernet 0/0/0) Start the OSPFv3 routing protocol and specify
the area to which the interface belongs. Here, 1 is the process identifier, specified when creating the OSPFv3 process, and 0 is the area identifier,
indicating that the specified interface belongs to area 0. Note that this command can be used only after the IPv6 function is enabled on the interface.
[R1-GigabitEthernet0/0/0] quit
[R1] interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1] ospfv3 1 area 0

Insert image description here

Figure 5 R1 configuration process

③ Complete the following configuration on R2:

[R2] ospfv3 1
[R2-ospfv3-1] router-id 2.2.2.2
[R2-ospfv3-1] quit
[R2] interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0] ospfv3 1 area 0
[R2-GigabitEthernet0/0/0] quit
[R2] interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1] ospfv3 1 area 0

Insert image description here

Figure 6 R2 configuration process

④ Complete the following configuration on R3:

[R3] ospfv3 1
[R3-ospfv3-1] router-id 3.3.3.3
[R3-ospfv3-1] quit
[R3] interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0] ospfv3 1 area 0
[R3-GigabitEthernet0/0/0] quit
[R3] interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1] ospfv3 1 area 0

After completing the above configuration, the three routers will start exchanging OSPFv3 protocol packets and perform route calculations.

Insert image description here

Figure 6 R3 configuration process

Phased verification:
⑴ Check the OSPFv3 neighbor relationship on R1. The specific command format is display ospfv3 peer to verify whether R1 has
established an adjacency relationship with R2.
Note: Examples of running results are as follows:
display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 Full/Backup 00:00:38 GE0/0/0 0
or above The output content is the OSPFv3 neighbor table of R1. It can be seen from the table that R1 has discovered neighbor R2, and the current
status of this neighbor is "Full", which means that the two have established a fully adjacent adjacency relationship.

Insert image description here

Figure 7 R1 OSPFv3 neighbor relationship
Verification shows that R1 has established an adjacency relationship with R2.
⑶ Check the OSPFv3 neighbor relationship on R2. The specific command format is display ospfv3 peer to verify whether R2 has established adjacency relationships with R1 and R3.

Insert image description here

Figure 8 R2 has established adjacency relationships with R1 and R3

⑷ Check the OSPFv3 neighbor relationship on R3. The specific command format is display ospfv3 peer to verify whether R3 has established an adjacency relationship with R2.

Insert image description here

Figure 9 R2 has established an adjacency relationship with R3

(4) Check the routing table on R1. The specific command format is display ipv6 routing-table to verify whether R1 has
learned the route to the remote network through OSPFv3.
Insert image description here

Figure 10 R1 has learned the route to the remote network through OSPFv3.
As can be seen from the above figure, R1 has learned the routes to FC00:23::/64 and FC00:2::/64 through OSPFv3. The two routes are The "Protocol" field is all "OSPFv3", which means that the route is learned through OSPFv3.

⑸ Check the routing table on R2. The specific command format is display ipv6 routing-table. Verify that R2 has learned the route to the remote network through OSPFv3 and marked the corresponding table entry. R2 has learned the route to the remote network through OSPFv3. Network routing.
Insert image description here

Figure 11 R2 routing table
⑹ View the routing table on R3. The specific command format is display ipv6 routing-table. Verify whether R3 has learned the route to the remote network through OSPFv3 and marked the corresponding entries, as shown in Figure 12 , R2 has learned the route to the remote network through OSPFv3.

Insert image description here

Figure 12 R3 routing table

(3) Observe the OSPF message interaction process
① Capture data packets and view the protocol stack.
In the Wireshark interface, check the information captured after turning on packet capture earlier. As shown in Figure 3,
after the configuration of R1, R2 and R3 is completed, multiple OSPF packets are exchanged in the network.

Insert image description here

Figure 13 After the OSPFv3 configuration of R1, R2 and R3 interfaces is completed, the data packets captured by R1 GE 0/0/0 are
based on the actual captured data. Answer the following questions:
Combined with the captured information, explain the bottom-up protocol of OSPF data packets. Stack and packaging structures.

OSPF (Open Shortest Path First) is an interior gateway protocol (IGP) used to exchange routing information between routers in a single autonomous system (AS). During the transmission process, OSPF data packets will pass through the bottom-up protocol stack, and specific headers and trailers are added at each layer to achieve data encapsulation and decapsulation. The bottom-up protocol stack and encapsulation structure of OSPF data packets are as follows:
Data Link Layer: The protocol used by OSPF data packets at the data link layer is usually Ethernet. At this layer, OSPF packets add Ethernet headers and trailers. The Ethernet frame header includes information such as source address and destination address, and the frame tail includes information such as checksum.
Network Layer: The protocol used by OSPF packets at the network layer is IP (Internet Protocol). At this layer, OSPF packets add IP packet headers and trailers. The IP data packet header includes source IP address and destination IP address and other information, and the IP data packet tail includes checksum and other information.
OSPF layer: OSPF packets use the OSPF protocol at the OSPF layer. At this layer, OSPF headers and trailers are added to OSPF packets. The OSPF message header includes version number, message type, area ID and other information, and the message tail includes checksum and other information. OSPF message types include: Hello messages, database description messages, link status request messages, and link status update messages.
Application Layer: OSPF packets have no specific protocol at the application layer. However, OSPF packets contain OSPF routing information, which can be used by the router's routing table to determine the best routing path.

To sum up, the bottom-up protocol stack and encapsulation structure of OSPF packets include Ethernet frame header and frame trailer, IP packet header and trailer, OSPF message header and trailer, etc. At each layer, corresponding protocol headers and trailers are added to implement data encapsulation and decapsulation.

Note: OSPF is a link state-based interior gateway protocol developed by the IETF organization. Currently, OSPF Version 2 (OSPFv2) is used for IPv4 and OSPF Version 3 (OSPFv3) is used for the IPv6 protocol. OSPFv3 is enhanced based on OSPFv2 and is an independent routing protocol. OSPFv3 has the following features: area division, state machine, flooding mechanism, supported network types (Broadcast, NBMA, P2P and P2MP), message types (Hello messages, DD messages, LSR messages, LSU messages and LSAck message) and route calculation are consistent with OSPFv2; the autonomous system is divided into one or more logical areas, and routes are published in the form of LSA (Link State Advertisement); relying on the interaction between devices in the area OSPFv3 messages are used to unify routing information; OSPFv3 messages are encapsulated in IPv6 datagrams and can be sent in unicast and multicast forms; OSPFv3 operates based on links, and devices can establish neighbor relationships as long as they are on the same link; The link supports multiple instances. Specifically, an OSPFv3 physical interface can be bound to multiple instances and identified by different instances (Instance IDs). That is, a single OSPFv3 link supports running multiple OSPFv3 instances running on the same physical interface. Multiple OSPFv3 instances on the link establish neighbors and send messages to the opposite device of the link respectively without interfering with each other; the meaning of IP addresses is removed from OSPFv3 messages and LSA messages, and the message format is reconstructed. and LSA format; OSPFv3 identifies network devices through Router ID. Router ID is the unique identification of an OSPFv3 device in the autonomous system. Its length is 32 bits. It is used as a local identifier and has nothing to do with the IPv6 address. It is expressed in dotted decimal notation; OSPFv3 uses the link local address (FE80::/10) as the source address of the sent packet and the next hop of the route. OSPFv3 mainly includes five message types, and the corresponding names and functions are shown in Table 1.

Insert image description here

Table 1 OSPFv3 message types

②Analyze single data packet format.
Based on the actual captured data, answer the following questions:
a. What are the OSPF messages that appear in the actual captured results, and how many types are there? Are they consistent with the OSPF packet types listed in Table 1
?
Answer: The OSPF packets that appear in the actual capture results are Hello packets, DD packets, LSR packets, LSU packets, and LSA packets. There are 5 types in total, which are consistent with the OSPF packet types listed in Table 1. .
b. Check each OSPF message. In the IPv6 datagram containing different OSPF messages, what is the value of Next Header?
Is this field the same in different packets ?
Answer: As shown in Figure 14, in IPv6 datagrams containing different OSPF messages, the Next Header value is OSPF IGP (89), and this field is the same in different messages.

Insert image description here

Figure 14 OSPF message

c. Select a Hello Packet message and check, what are the source address and destination address of the IPv6 datagram containing the message
? What are the source and destination addresses of the Ethernet frame containing this message?
Answer: As shown in Figure 15, select a Hello Packet message and view it. It contains the IPv6 datagram source address fe80: :2e0:fcff:fec7 :6622 and the destination address ff02: :5, which contains the message. Ethernet frame source address HuaweiTe_ c7:66:22 (00:e0:fc:c7:66:22) and destination address IPv6mcast 05 (33:33: 00: 00:00:05).

Insert image description here

Figure 15 Hello Packet message


d. Select an LS Acknowledge packet and view it. What are the source address and destination address of the IPv6 datagram containing this packet ? What are the source and destination addresses of the Ethernet frame containing this message? Does the message contain the sender
's IPv6 address?
Answer: As shown in Figure 16, select an LS Acknowledge message and view it. It contains the IPv6 datagram source address fe80: :2e0: fcff:fec7:6622 and the destination address ff02::5, which contains the Ethernet of the message. The frame source address HuaweiTe_ c7:66:22 (00:e0:fc:c7:66:22) and the destination address IPv6mcast_ 05 (33: 33:00: 00:00:05), the message contains the sender’s IPv6 address .

Insert image description here

Figure 16 LS Acknowledge message

(4) Complete the configuration on PC1 and PC2
① Staticly configure the IPv6 address, prefix length and gateway information of PC1. The specific parameters are shown in Figure 17.
Insert image description here

Figure 16 LS Acknowledge message

(4) Complete the configuration on PC1 and PC2
① Staticly configure the IPv6 address, prefix length and gateway information of PC1. The specific parameters are shown in Figure 17.
Insert image description here

Figure 17 IPv6 static address configuration of PC1
② Staticly configure the IPv6 address, prefix length and gateway information of PC2. The specific parameters are shown in Figure 18.

Insert image description here

Figure 18 IPv6 static address configuration of PC2

(5) Connectivity test
Ping PC2 on PC1. The specific command format is ping the IPv6 address of PC2 -6 to verify whether PC1 can
successfully communicate with PC2.

Insert image description here

Figure 19 PC1 can successfully communicate with PC2

As shown in Figure 19, PC1 can successfully communicate with PC2.

Guess you like

Origin blog.csdn.net/m0_52316372/article/details/132779632