Implementation and testing of IPv6 protocol stack

Source: Internet
Author: User

We have already introduced and explained the basic content and design steps of the IPv6 protocol stack in detail in the previous article. Now let's test our module functions, check whether it can be used normally. For detailed development environment and test steps, refer to the following.

Implementation and Test on Altera De2

Development Environment:

AlteraDe2 hardware platform), QuartusII5.1 and NiosII5.1 software platform). The entire development process is based on LWIP1.1.0. After understanding the structure of LWIP, rewrite it with the development environment.

After completing the previous design steps, we have now tested and verified the IPv6 protocol stack. The tests are mainly focused on the ND, IPv6, and ICMPV6 modules at the network layer. Because the Neighbor Discovery module is based on the IPv6 protocol module and ICMPV6, testing the neighbor module is equivalent to testing IPv6 and ICMPV6,
Very representative.

Due to the absence of IPv6 routers in the surrounding network environment, the test is performed on the IPv6 LAN. Alterade2 is directly connected to the PC through Ethernet. The MAC address of the circuit board is 00-10-5C-F7-5F-5D. The local IPv6 address obtained through the address conversion algorithm is: fe80: 210: 5cff: fef7: 5f5d. When it is connected to the network, to verify the uniqueness of the address you want to configure, it needs to send neighbor request packets. Through the PC network packet capture tool Sniffer, we have caught the neighbor request packets sent by the target board.

Neighbor Request Message

The packet type value is 135. The target address is fe80: 210: 5cff: fef7: 5f5d. After obtaining the link address, we run ping6fe80: 210: 5cff: fef7: 5f5d on the PC end.

In this process, you need to know the link layer address of the target board, and then initiate an address explanation for the IPv6 Protocol address of the target board. During the address interpretation process, we caught the unicast neighbor announcement packet sent by the target protocol stack, including the link layer address.

Neighbor announcement message

The packet type value is 136, and the destination address is the local IPv6 address fe80: 210: 5cff: fef7: 5f5d of the target board.

Port on the 4410 box

Transplantation Target Platform: Based on the ARM7 development board of the-box processor, the embedded uc/OS-ii operating system is transplanted according to the general method, on the basis of transplantation, the operating system simulation layer is compiled with operating system functions, and the function pointer of the network interface layer is directed to the NIC Driver provided by the circuit board, add the startup code for the IPv6 protocol stack to the system startup test function. After this is done, we use the same test method on alterade2 for testing. The experimental results show that the protocol stack meets the basic communication function. Prove that the protocol stack can be transplanted on the circuit board.

Summary

This article introduces the design idea and implementation method of embedded streamlined and miniaturized) TCP/IPv6. Streamlining and portability are the main considerations, this IPv6 protocol stack is a feasible solution for embedding devices and accessing IPv6 networks.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.