Design scheme of SOHO router based on ATM9TDMI + Linux

In view of the current SOHO router design scheme that is difficult to meet the requirements of high-speed access network users and the lack of system stability, based on the embedded Linux operating system, a new SOHO (Small Office and Home Office) router design scheme is proposed, which is effective Improve the stability and security of the system.

0 Preface

The current SOHO router design uses the ARM7TDMI + μClinux design architecture. The operating frequency of the ARM7 core microprocessor is about 50M, and the operating frequency of the Ethernet control chip is generally 100M. The processor speed is difficult to meet the requirements of high-speed access network users; μClinux operating system, Without a memory protection mechanism, any program may cause the kernel to crash and the system stability is poor. This article uses the ARM920T core microprocessor, the operating frequency is 200M, which is enough to meet the requirements of high-speed access network users. It has an advanced MMU architecture and supports WinCE, EPOC32, and Linux operating systems. Linux operating system, with memory protection mechanism and powerful network control function, can prevent malicious programs from damaging the system and implement * filter firewall, which effectively improves the stability and security of the system.

1 SOHO router principle

Routers include core routers located in the center of the network, enterprise routers connected to enterprise-level networks, and SOHO routers that connect home or small unit users to the network. SOHO routers can implement automatic configuration, basic packet routing, and filtering functions. Strictly speaking, SOHO routers cannot be completely called routers, they only implement part of the functions of traditional routers. SOHO routers use NAT (Network Address TranslaTIon) conversion technology to convert private private IP addresses in the LAN into a legal public IP address, so that multiple hosts in the private network share a legal IP address to access the Internet.

This article uses the Linux kernel to support IP Masquerade (IP masquerade) technology to achieve NAT conversion, to achieve shared access to the Internet by multiple hosts. How IP Masquerade works: The client sets the Linux machine that implements IP Masquerade as the default gateway. When the Linux machine of IP Masquerade receives the client's data packet, it rewrites it and replaces the source address with its own IP address. Replace the source port number with a new port number, and record the process; when a response packet is received, if the port number is the port number previously specified, the packet will be rewritten and the Replace the destination IP address and destination port number with the originally recorded client IP address and port number before sending to the client.

2 System hardware design

The system takes S3C2410X microprocessor as the core, external expansion memory, Ethernet controller, switch controller, with necessary debugging interface, power circuit and clock generation circuit. The hardware structure block diagram is shown in Figure 1.

(1) Microprocessor and storage system

S3C2410X is a low-cost, low-power, high-performance microprocessor developed by SAMSUNG, which is used in PDA and Internet equipment. The operating frequency is 200M, which can meet the high-speed processing requirements. The system has expanded one 64MB NANDF1ash chip and two SDRAM chips. The NAND F1ash chip stores the bootloader bootloader and Linux kernel, and executes initialization code from the system after power-on reset.

(2) Ethernet control chip

DM9000 is a cost-effective Ethernet control chip with a universal processing interface Ethernet MAC controller, which can be connected to 10Base-T UTP3 / 4/5 and 100Base-T UTP5 interfaces to meet the requirements of high-speed access networks and also supports Interconnect with other transceivers of MII interface through MII interface.

(3) Switch control chip

RTL8305S is the newly designed 5-port 10 / 100Mbps high-speed Ethernet switching control chip of Realtek in Taiwan. The five ports are divided into three groups (X group, Y group, fifth port), which can be flexibly configured through related pins; integrated 5 MAC (Media Access Controller), 5 physical layer transceivers, 1M SRAM and 1K MAC address memory area, effectively reducing table lookup time and dump time, suitable for high-speed LAN switches; each port can be Supports 100Mbps 100BASE-TX high-speed Ethernet transmission or 10Mbps 10BASE-T Ethernet transmission. (4) System implementation

The S3C2410X microprocessor connects FLASH and SDRAM through the system bus to form a storage system. After the system is powered on, the microprocessor reads the initialization program from FLASH. SDRAM provides temporary storage space for program operation and data processing and forwarding. The Ethernet control chip DM9000 is connected to the Internet via a single-port isolation transformer and RJ45 interface. DM9000 is connected to the PORT4 port of the switch control chip RTL8305SC through MII (Independent Media Interface). The RTL8305SC is connected to a LAN hub, switch or computer via a 4-port isolation transformer and four RJ-45 interfaces for data exchange or microprocessor-controlled and wide area network connection.

The interface circuit of DM9000 and S3C2410X and RJ45 is shown in Figure 2. The pin INT of the DM9000E chip is connected to the external interrupt signal EINT14 of the S3C2410X chip. The S3C2410X chip select signal nGCS4 and the address line MA2 are respectively connected to the AEN pin and CMD pin of the DM9000. SA6 to SA0 correspond to the address bus, and SA9 and SA8 pins are set to high level, SA7 pin is set to low level, used for chip select DM9000; 3C2410X nOE pin is connected to DM9000 read pin IOR #, nWE lead Connect the write pin IOW # of DM9000 to the S3C2410X data line MD [0..15] and the data line SD [0..15] of DM9000 to realize data transmission. Set the fifth port of RTL8305S as an MII interface and connect with the Ethernet control chip DM9000R MII interface. RTL8305S and four-port isolation transformer and RJ45 interface are similar to Figure 2.

3 System software construction

Software construction mainly includes Linux operating system transplantation and NAT technology implementation.

3.1 Linux operating system porting

(1) Bootloader transplantation

Bootloader is the initialization code highly related to the system hardware, and has the dual responsibility of initializing the hardware and booting the operating system. This article uses the most widely used boot code U-BOOT in embedded system development. The specific steps of migration: 1 Modify the configuration files corresponding to the target platform. 2 Create the corresponding configuration file. 3 Modify the makefile of U-BOOT, add the compilation support to the target system, and run the following commands $ make clean, $ makesmdk2410-config, $ make all to generate the target file. Finally, the u-boot.bin file is burned to the zero address of Flash through the JTAG interface, and the system can be booted after reset.

(2) Linux kernel construction, transplantation and root file system implementation

1 Modify the makefile. 2 Use the make manuconfig command to configure the kernel. 3 Use the make dep and makezImage commands to compile the kernel to obtain the zImage file of the kernel compressed image file. 4 Bootloader The bootloader moves the Linux kernel to the Flash of the target system through the Ethernet interface. 5 Build the root file system.

3.2 Netfilter framework analysis and NAT technology implementation

Netfilter is a framework for Linux * kernel to implement data * filtering, packet processing and NAT functions. It defines a set of hook functions for each network protocol (IPv4, IPv6, etc.) (IPv4 has 5 hook functions). Any module in the kernel can register and hook the hook functions in the protocol. These hook functions are in the packet flow Called when passing the protocol stack, the registered module can check, modify, and discard data packets and instruct Netfilter to send the data packets to the user space queue for asynchronous processing. A packet passes through the Netfilter system according to the process shown in Figure 3.

Netfilter system

The data packet enters the system from the left. After IP verification, the data packet is processed by the first hook function NF_IP_PRE_ROUTING [1]; then it enters the routing code, which determines whether the packet needs to be forwarded or sent to the local machine; if The data packet is sent to the machine, then the data is processed by the hook function NF_IP_LOCAL_IN and passed to the upper layer protocol; if the data packet should be forwarded, it is processed by NF_IP_FORWARD [3]; the sent data packet passes the last hook function After NF_IP_POST_ROUTING [4] is processed, it is transmitted to the network.

After the locally generated data is processed by the hook function NF_IP_LOCAL_OUT [5], routing processing is performed, and then processed by NF_IP_POST_ROUTING [4] and then sent to the network. The Netfilter framework supports multiple NATs. NAT can generally be divided into source NAT and destination NAT. The source NAT modifies the source address of the packet when the packet passes NF_IP_POST_ROUTING. The masquerade is a special SNAT. The destination NAT modifies the destination address of the packet when the packet passes F_IP_LOCAL_OUT or NF_IP_PRE_ROUTING.

This article uses IPtables to implement IP masquerading, Port Forwarding, and ALG. IPtables is a packet selection system based on the Netfilter framework in the Linux2.4 kernel. Address translation will cause many application protocols that are sensitive to NAT to fail to work properly, and the address translation application gateway (NAT ALG, Application Level Gateway) replaces the IP address and port number in the payload to achieve transparent relay of the protocol . IPtables requires data packets to flow through a specified rule table, where the rules set are used to implement data filtering, network address translation and packet processing, so that multiple hosts share a legal IP address to access the Internet and implement filtering firewalls .

4 Conclusion

The author of this article is innovative: a SOHO router design scheme based on embedded Linux operating system is proposed. Compared with existing design schemes, this article uses ATM9TDMI + Linux architecture to design SOHO routers, which can meet the needs of high-speed access network users, and has higher system stability and user security.

Floor Brush is very important to Vacuum Cleaner. Floor brush and vacuum cleaner are just like hand and foot,none is dispensable. There are many kinds of brushes in the floor brushes. They're Metal Brush with trundle,plastic brush with trundle,Small Turbo Brush and do on. They all have diffenent functions. But they have a common point that is they're al using very easily. In the brushes,the most special brush is the small Turbo Brush . I will introduce the functions later. Now let's see some pictures of brushes blow.

floor brush1

floor brush2

floor brush3

floor brush4

floor brush5

SMALL BRUSH

Floor Brush

Floor Brush, Vacuum Floor Brush, Floor Cleaning Brush, Vacuum Cleaner Floor Brush

Ningbo ChinaClean Household Appliances Manufacture Co., Ltd. , https://www.chinaclean-elec.com