Journal of Electromagnetic Analysis and Applications
Vol. 1  No. 1 (2009) , Article ID: 197 , 5 pages DOI:10.4236/jemaa.2009.11010

The Preliminary Design of IPv6 Home Gateway and Terminal*

Chengyi Wang1, Ren Gao1

1School of Electronic Engineering, Hubei University of Economics, Wuhan, China.


Received January 8th, 2009; revised February 9th, 2009; accepted March 4th, 2009.

Keywords: IPv6, Home Gateway, Home Network Terminal Controller, CGI


This paper briefly analyzes the advantages of IPv6 used at Intelligent home and describes an IPv6 home network frame. It also studies IPv6 transition technical problems facing home gateways and gives the summaries to the main protocol of each node of home network and their mutual relations. The key nodes of the home network based on IPv6, including the hardware design and software design of the home gateway and home network controller, are systematically designed in the paper. Finally, it illustrates the actual test environment and test in detail. The paper gives a view of the fact that the intelligent home appliances are becoming the current trend with the accelerating the transition of IPv4 to IPv6 and home network-wide implementation of IPv6 is about to become a reality, holding that the network controllers and home gateway based on ARM processor can support IPv6 and carry on the implementation of remote control and local control based on Web Browser.

1. Introduction

With the rapid development and extensive application of micro-electronics, computers, networks, telecommunications and other technologies, various new consumer electronics products are rapidly entering the home. The intelligent home is becoming a trend of the times. One of the core technologies is the intelligent home network or home network. Through the network, a variety of information appliances, security alarm systems, medical monitoring systems and other home equipment will be connected and become an interactive information, centralized control and even remote control network.

2. IPv6 and Home Network

To build a home network, the most basic requirement is to achieve interconnection of different devices, and set up convenient ways of interaction. The interconnection's basic approach is to carry on the implementation of the connection based on TCP/IP protocol stack; To achieve interoperability, the most convenient and the simplest way is through the WEB browser; The most direct way for the equipment to achieve these functions is to contain embedded systems; To meet the needs of future home network quantity, size and security, the transition to IPv6 is becoming the current trend.

Compared to IPv4, IPv6 intelligent home has the following advantages.

• Extremely rich IP address: In theory, each square meter of earth land surface may assign 1023 IP address averagely. This makes it possible that all networking equipment is assigned a public IP address. This is very important for China with the largest population [1].

• Improvement of Quality of Service: Through the support of the stream label, from the specific source to the specific destination transmission packet series, IPv6 data packets may carry on highly effective processing by the middle router. To watch video, such as to ensure the quality of programming, is an example.

• More security guarantee: With the supports of Authentication Header (AH) and Encapsulating Security Payload (ESP), the encryption of identify validation and payloads is implemented [2]. AH and ESP also support the encryption packets transmit on the Internet by the way of Tunneling technology. To easily realize remote control of home network information security is a good example.

• Strong ability of address automatic disposition: As the giant address resources, the IPv6 protocol’s ability of address automatic disposition is more convenient than DHCP’s. This also makes each kind of network home appliances and the intelligent network products of the user’s home be connected more freely without complex disposition works than before. It is just “plug and play”.

3. IPv6 Home Network Frame

3.1 IPv6 Home Network Frame

Home network mainly consists of the home gateway, PC, information appliance and intelligence control terminal components [3]. With the exception of home gateway and PC, other equipment can be designed as controlled by the network terminal controller. The structure is illustrated in Figure 1. The general structure will meet the needs of home network interoperability and the easy operation, bearing the most basic IPv6 technical characteristics. The frame structure consists of outer network, gateway and various inner parts. All equipment shown in the Figure 1 can be controlled locally and centrally through the hand remote control device at home. It also can be controlled by the long-distance PC, which entered the home gateway machine through the Internet. The equipment is centrally controlled including local central control and longdistance central control by operator interface. Since all equipment has their own IP addresses based on the IPv6, they can be directly connected to external network without gateway. The dashed line means that it can be connected via gateway or without it directly, and the Internet should IPv6 or IPv4.

3.2 IPv6 Transition Technology

Network at home are more prone to form a pure IPv6 network. Home network often tends to connect to the Internet and the current Internet is based mainly on the IPv4 protocol stack, or IPv6 coexistence with IPv4 networks. Since the IETF released IPv6 protocol, it has been over ten years. The transition of the technology from IPv4 to IPv6 has experienced more than ten years, which is also expected to last a longer period of time. For the home network out-side, the link may be based on IPv4 port or IPv6 port. It is necessary for the home network gateway to support this transition. IPv6 transition technology has three main types: dual stack, tunnel, translate. Their typical applications are as in Table 1. Among them node A may be the home gateway. Node B may be the WAN-side node or remote PC. Middle may be the middle node or connected directly.

Figure 1. IPv6 home network architecture

Table 1. IPv6 transition technology and the applicable scene

3.3 The Protocol Stack at Home Network

At home network, the transmission of information is mainly related to the three adjacent nodes: home network terminal, home gateway and wan-side node. Relations with the protocol stack of information transmitted are as shown in Figure 2.

4. System Design

4.1 Hardware Design for Home Gateway

The design of home gateway in Figure 3 is based on network processor. The home gateway is conducted with the development board based on the network processor, such as Intel IXP425. It is equipped with a 10MB/100MB Ethernet port for external network, and provides eight 10MB/100MB Ethernet ports for internal network via a switching module. It also enables home wireless connection possible by the wireless local area network selected by the CF card plug [4].

4.2 The Hardware Design of Home Network Terminal

To support the IPv6 protocol stack and achieve remote control, the design of the terminal devices is formed with the network terminals and micro-controller, connecting the home gateway and appliance, shown in Figure 4. Network termination module can receive control information from the network through RS232 serial communication with the home appliance control module; appliance control module connected with appliances executing system can get control commands from the network termination module and operate home appliances. Among the above modules, the network terminal module is the core of information appliance system, which allows access to IPv6 network appliances, and serves as an embedded Web server to respond to the request of the client to complete the control data network.

Figure 2. The protocol stack at home network

Figure 3. Hardware design for home gateway

The design in this article mainly consists of the network terminal microprocessor module, memory module, serial module, Ethernet module, power management and reset circuit modules, and JTAG module composed of several parts. Among them, the microprocessor modules are using S3C2410 of Samsung ARM9 core microprocessor. Ethernet module is constructed with the dual-NIC by two AX88796 cards.

4.3 The Design of Software System

4.3.1 The Frame of Software System

The design of the home gateway has three main functions: 1) IPv6/IPv4 route; 2) data-link layer switch; 3) Web server. Its software system structure is as shown in Figure 5, the relevant protocol stack shown in Figure 2.

Figure 4. The hardware design of home network terminal

Figure 5. The frame of software system

The above-mentioned home gateways and network terminals are based on the 32bit embedded system. The main difference is the different hardware performance, which is reflected in the gateway hardware based on the network processor by a number of network processing engines to work together. The software system structure of Network terminal has the most similarities to home gateway. The main differences are: 1) network terminal without IPv6/IPv4 route just supports the data-link layer switch and Web server; 2) the boot loader of network terminal is vivi not redboot. Considering the needs of the following experiments, the following article focuses on network terminal software system structure and gives a further description below.

Network terminal software can be divided into three levels [5]: 1) hardware driver layer, including the generic hardware drivers, such as serial, USB devices, Ethernet, etc.; 2) embedded OS, including file system management, memory management, disruption and interruption of treatment, the system initialization, network protocol stack, various system calls, etc.; 3) application layer, through the kernel system call to implement the users needs of the required application services.

4.3.2 Embedded Linux

The main task is to transplant. Embedded Linux operating system transplant includes Boot Loader, the kernel and root file system. Boot Loader is the guiding procedure of embedded systems. VIVI as Boot Loader is developed by Korea Mizi system, which fits in the ARM920T and supports S3C2410 processor. Boot Loader is the first implementation code after power-on reset and is closely related to hardware. It first initializes the system hardware, sets the stack pointer, jumps to the entrance of the operating system kernel, and then gives the system control to the operating system. The kernel is the core of Linux operating system, which is the system software of managing hardware resources, controlling the running program and improving human-machine interface and application software to provide support. It achieves embedded systems management through the processor, memory management, file management, device management. The root file system is an important component of the Linux system, including system software and libraries, as well as the application software used to provide users with structure and application, and as the read/write results region of data storage.

4.3.3 CGI

According to the demands of embedded Web server application environments, network terminals and home gateways are required to provide web-based interoperability to update web page, deal with dynamic data, which can make use of Common Gateway Interface (CGI) to support. CGI is a software module of the embedded Web server for the implementation of server-side “script” program [6]. Furthermore, it uses “script” the implementation of the procedures, but also provides a channel to handle the operation of the hardware. This constitutes a long-distance intelligent home control system's overall structure.

In the most Embedded Web applications, dynamic content show or interactive operation is required to be provided in order to remote control devices. The content provided by the simple static page is the same and is hard to be completed interoperability. Common Gateway Interface (CGI) can fundamentally solve the problem of this situation so that the WEB clients and servers have the interactive features, having remote control of embedded systems achieved. Typically, after the server responds to client requests, it will implement the corresponding CGI program and put the results of the implementation back to the client in order to achieve a dynamic Web. Web page code prepared by the ACTION attribute to specify the server required the implementation of the CGI program. METHOD property is specified in the client to submit data (POST or GET). CGI program is divided into the following sections: ① According to POST method or GET method, to receive data from the submitted forms; ② to decode URL encoding; ③ to use printf () function to generate the HTML source code and give  the correctly decoded data back to the browser.

5. The Experimental Environment and Testing

5.1 The Basic Experimental Environment

The basic experimental environment to implement the systematic structure is as Figure 6. We can see from the diagram, the actual experimental environment has been simplified in order to simplify the problem, reduce costs, and realize the principle of a system. The specific simplifying job includes:

• PC2 replaces network processor: that is, the computer with dual network adapters is in place of NP. The network processor is very powerful, capable of performing the work of home gateway. It can mainly handle the analysis from the data-link layer to application layer, layer 2 switch, IPv4/IPv6 route. In this design, the focus is on implementation of the remote control of home terminals through the home gateway. Home gateway software and the transplanting process, Web server of the development process and function similar. The function of gateway is placed by PC software.

• PC1 replaces internet: pc1 is a stand-alone computers, which can be used conveniently as IPv4 node or IPv6 node. It can remote control home gateway and home network terminal by modeling.

• Using two network terminals separately replace two different types of equipment: Network terminal 1 is used to express different information appliance, such as refrigerators; Network terminal 2 is used to express two different intelligence control terminal, such as curtains.

5.2 Test

The whole experimental environment includes two networks, known as the home network and the outside network. Home network consists of PC2, network controller1

Figure 6. Basic test environment

and network controller 2. Each network controller is formed with a S3C2410 board and MCS-51 Single-chip Computer board (MCU board), each MCU board separately represents intelligence appliance. Different combinations of lights with different colors present their different control status and the actual device can be controlled. PC1 is installed with Windows XP as a client terminal. PC2 is installed with Windows Server 2003 and dual NIC, configured as a router. It is used for each access network appliance automatically assigned 64 of the IPv6 routing prefix 3FFE: FFFF: 2005:/64. Two PC machines are configured with IPv6 protocol and the installation of the browser Firefox. The kernel of embedded system is linux 2.6.8. Web software is mini_httpd, which can support IPv6 users visit, and the space needed for the compiled code is small. In order to configure and test IPv6 network environment, the supporting IPv6 configuration tools are required, such as ifconfig, ping, and traceroute and so on. Existing network configuration tools in linux do not support the IPv6 protocol. Therefore, it needs to re-compile source packages containing these instrument procedures to ensure its support for IPv6. This paper chooses the busybox 1.1.2, because it contains the majority of support for IPv6 network configuration tool, but the volume was small.

The network terminals of various home appliances are equipped with 64-bit IPv6 interface identifier derived from its MAC address. Take network controller 1 as an example, its MAC address being 00-E0-4C-4A-35-25, in accordance with IEEE EUI-64 format [7], the IPv6 interface identifier will be the 2E0:4Cff:fe4A:3525. When the appliance joins the test, it will automatically get the routing prefix of 64-bit of IPv6 distributed by PC2. Together with the existing 64-bit interface identifier for each household appliance, it can form the world's sole128 IPv6 address.

When testing, to give the appliance’s IPv6 address in the PC1 browser, can enter the corresponding appliance control interface. The user can operate on household electrical appliances by clicking the button. After the implementation of the user command, household electrical appliances will implement the results back to the browser. To cite the network controller 1 as an example, after entering in the browser the IPv6 address refrigerator http://[3FFE:FFFF:2005:0:2E0:4Cff: fe4A:3525] to get its user interface, the user can control home appliances by clicking the corresponding button.

6. Conclusions

Intelligent home appliances are becoming the trend of the times, while the IPv4 to IPv6 transition is accelerating. We can notice that a new generation of backbone network based on the IPv6 in China has been built. The new network routing equipment can support IPv6. Home network with implementation of the pure IPv6 will become a reality. Network controllers and home gateway (including IXP425 ARM Platform) based on ARM processor is able to support IPv6. In addition the implementation of the remote control and local control based on Web Browser can be achieved.


  1. D. R. Hinden, “Internet protocol version 6 (IPv6) specification,” RFC 2460 standards Track, December 1998.
  2. S. Hagen, “IPv6 essentials,” Ji Qiao Translation, Tsinghua University Press, Beijing, 2004.
  3. J. Yu, Z. Huang, and W. J. Tang, “Research and application of home network based on IPv6,” Journal of Shenyang Normal University (Natural Science), Shenyang, No. 1, pp. 75-78, 2008.
  4. W. H. Nie, Z. Q. Wang, and S. D. Du, “The construction of web server based on IXP425 and Linux,” Microcomputer Applications, Beijing, No. 9, pp. 549-553, 2004.
  5. T. Satio, I. Tomoda, and Y. Takabatake, “Home gateway architecture and its implementation,” IEEE Transactions on Consumer Electronics, Vol. 46, No. 4, pp. 1161-1166, 2000.
  6. C. G.Yao, J. D. Wang and Y. X. Peng, “Design of home gateway based on IPv6,” Computer Technology and Development, Xi’an, No. 3, pp. 207-213, 2007.
  7. M. C. Fermilab, “Transmission of IPv6 packets over Ethernet,” RFC 2464 standards Track, December 1998.


*Fund Project: Provincial Education Department of Hubei scientific research project (D200619006).