Research and Implementation of ADSL Gateway Based on ATM
As the content on the Internet becomes more and more colorful, people's demand for transmission bandwidth is gradually increasing, and the 56K bandwidth of traditional modems is increasingly overwhelmed. How to make full use of existing telephone line resources to obtain sufficient bandwidth? ADSL (Asymmetric Digital Subscriber Loop) is a good answer. ADSL technology uses the bandwidth higher than the voice band of the telephone line (4K ~ 1.1MHz), uses discrete multi-tone modulation technology to modulate high-speed digital signals (traditional Modem is to modulate digital signals with voice audio), the downlink rate can reach 8Mbit / s, the uplink can reach 1.5Mbit / s. With the continuous advancement of VLSI and DSP technology, DSL technology has also become increasingly mature. ADSL completes A / D, D / A conversion, and uses FFT / IFFT for DMT and convolutional code modulation, which not only achieves high bandwidth utilization, but also ensures low bit error transmission characteristics. The ADSL gateway we designed uses Itex's Apollo 3 ADSL PCI solution as the Internet access part, and the other side uses Ethernet or wireless LAN to connect multiple users. The interface is RJ-45 and wireless access point (AP) antenna. The flexible and convenient networking method can be widely used in home and small office access. In terms of software, we adopt the method of customizing the Linux kernel according to the hardware structure, and integrate the necessary driver modules as the operating system of the gateway. The AP module driver also provides application functions such as DHCP, SNMP, and IP firewall.1. Hardware architecture
1. AMD microcontroller overall architecture
AMD's ElanSC520 is powerful and suitable for use as a protocol processor and network processor in an embedded environment. It is compatible with PC / AT, supports 32-bit PCI external bus, and its low latency and low price make it obtain Has been widely used. ElanSC520 integrates an industrial-grade X86 processor, which provides a good interface and easy portability for software that adapts to the X86 structure, supports multiple operating systems including Linux and Windows, and a built-in high-speed PCI bus interface It conforms to the PCI V2.2 specification and can expand 1 to 5 PCI bus devices. It decides which PCI device to communicate with through its internal PCI bus arbitration mechanism. The maximum transfer rate of the PCI bus can reach 132MB / s. In the design of the ADSL gateway device, we used three PCI bus devices, which share the PCI bus to communicate with ElanSC520. The ElanSC520 microcontroller also has high-performance SDRAM and ROM / FLASH interfaces, as well as a UART serial interface for configuration and debugging, which can be connected to an analog terminal. The hardware architecture of ADSL gateway based on ATM is shown in Figure 1:
Figure 1: ADSL hardware architecture
2. ADSL access equipment
The ADSL access terminal uses Itex's Apollo 3 PCI solution. Its chipset includes line driver, analog front end and digital transceiver to complete the transmission and reception filtering, amplification, A / D and D / A conversion of signals on the telephone line , FFT / IFFT and other digital signal processing, and communicate with ElanSC520 through PCI bus. This set of chips integrates the PCI to UTOPIA (standard cell interface) conversion function into the DMT transceiver and ATM framer, and integrates the line receiver into the analog front end. Because the control is done by the main processor, Apollo3 does not require additional storage devices and controllers, minimizing the control requirements on the board, thereby greatly reducing power consumption. The chipset conforms to the following protocol standards: G.992.1 (G.DMT), G.992.2 (G.LITE), G.994 (G.HS), T1.413 Issue 2 (1998)
Its structure is shown in Figure 2:
Figure 2: ADSL line access terminal structure
The signal comes in through the RJ-11 telephone line interface, and the receiving end is sent to the receiving part through the receiving filter for filtering and signal amplification, after A / D conversion, FFT demodulation, and sent to the processor for processing; while at the sending end, the processor The resulting digital signal undergoes DMT modulation via IFFT, then passes through the line driver module, and is filtered and sent to the telephone line for transmission.
3. Ethernet interface
Ethernet uses Realtek's RLT8029AS chip, which is compatible with NE2000 and conforms to the standard 802.3CSMA / CD protocol specification. Its full-duplex feature allows simultaneous transmission and reception, integrated Manchester codec, can be used for diskless workstations.
4. WLAN_AP interface
In order to facilitate the laptop computer to share the phone line to access the Internet, we also provide a WLAN_AP interface on the user side, which can be easily used for wireless LAN networking. Here, we use TI's PCI1410A bridge chip to convert the PCI signal to a PCMCIA signal and connect to the wireless. The network card encapsulates the data packets into frames that comply with the IEEE802.11b protocol for transmission.
Second, the software architecture
Due to the stability, openness, and scalability of the Linux operating system, it is widely used in embedded systems. However, because Linux allows non-preemptive operation, it cannot be a complete real-time system. It is real-time in a statistical sense. In the design of the ADSL gateway, we can give real-time signals a high priority, thus ensuring fair process scheduling as a whole.
To build an embedded operating system, we first consider that in an embedded application environment, there is neither much memory nor much external memory available. The operating system must be stored in limited memory Flash, so we must customize us according to the hardware architecture. Required Linux kernel. Since the ADSL access terminal is based on ATM, we need to add a patch to the kernel for PPP over ATM. For supporting the Internet on the basis of ATM, it can actually be attributed to the problem of how to support TCP / IP on ATM. That is how ATM carries IP packets. In the ADSL gateway application, to share the ADSL line to access the Internet, it follows the point-to-point protocol, so the driver of the ADSL access end is actually a PPP over ATM module, which will be used as a loadable module of the kernel. The process is called, and the Ethernet driver and WLAN_AP driver are used to transmit IP packets in Ethernet and wireless media, that is, 802.3 and 802.11 frame formats are used to encapsulate IP packets, so that the protocol stack of the ADSL gateway is as shown in the figure. 3 shown.
Figure 3: Protocol stack of ADSL gateway
In Figure 3, AAL5 is the ATM adaptation layer, and RFC1483 is the fifth type of multi-protocol encapsulation specification for the ATM adaptation layer. It describes how to carry multi-protocol services between the host, bridge device, and routing device in the ATM end system. In the ADSL gateway, according to the ITU protocol specification, the signal is output in the form of ATM cells after a series of transformations, so we need to turn the signal into a packet that can be recognized by the upper layer protocol on the basis of the ATM adaptation layer, thereby determining the packet Whether to forward, discard or receive. According to the RFC1483 protocol, there are two forms of multi-protocol encapsulation, one is LLC encapsulated multi-protocol, ie LLC-SNAP mode, which carries multiple protocols on the same VC, the protocol type is included in the LLC header, and the other is VC- In MUX mode, different protocols use different VCs, you do not need to indicate the protocol type in the protocol header, and which specific VC carries which protocol is determined during link initialization. This method reduces link overhead , But in the case of a limited number of virtual connections, LLC multiplexing is still used. This function is realized by loading the PPPOA module in the Linux kernel.
The PPP package includes three types of information:
* Link Control Protocol (LCP) is used to negotiate link parameters, packet size, and authentication type
* Network Control Protocol (NCP) indicates the information of high-level protocol, which can be IP, IPX and its control protocol.
* Data Frame
The protocol followed by ADSL is based on ATM, that is, the physical layer is a protocol that modulates high-speed data signals, RS coding, scrambling codes and other physical layers on the telephone line. Above the physical layer, it is output in ATM cell format, and For ADSL gateways, PPP over ATM AdapTIon Layer 5 (AAL5) RFC2364 uses AAL5 as the framing protocol, supports PVC, SVC, PPPOA is the basic part of the ADSL protocol stack, it depends on RFC1483, working in LLC-SNAP or VC -In MUX mode, the process of encapsulating PPP packets at the customer premises equipment (CPE) is to transmit data on the ADSL loop and DSLAM using the PPPoA protocol. The protocol data unit of the public part of the AAL5 Convergence Sublayer (CPCS) is shown in Figure 4:
The CPCS-PDU Payload part is the data part of the AAL5 protocol, with a maximum of 216-1 bytes. This is because it is limited in the LENGTH field of the following two bytes. There are 48 bytes in the PAD, which is just the data field of a cell, which is generated by the SAR (Segmentation Reassembly) sublayer. The CPI field is filled up to make the CPCS-PDU TRAILER into 64 bits, and the CRC uses 32 bits. Cyclic redundancy check code.
In our ADSL gateway design, taking into account the limited number of virtual connections, we use the LLC encapsulated multi-protocol mode, namely LLC-SNAP mode, whose CPCS-PDU Payload field is shown in Figure 4. include:
* LLC header: 3 bytes, two of which specify a destination SAP (0xFE) and source SAP (0xFE), followed by the frame type, Un-numbered InformaTIon = 0x03
* Network Layer protocol IdenTIfier (NLPID), PPP is used here, and its type value is 0xCF
* PPP protocol identification field is one and two bytes
* PPP information field
* PPP filled domain
For users in the local area network, the Ethernet port and the Wireless LAN antenna are interconnected with the gateway. Among them, Ethernet and Wireless LAN use different network segments. What the gateway needs to do is look at the user's IP packet. If it is sent to the local area network, It depends on whether it is the same network segment. If it is, it is discarded. If it is not, it is sent to another network segment, that is to say, it acts as a bridge in the local packet service communication. If it is not sent to the local area network, but the packet sent to the WAN is forwarded through the PPP port to achieve its routing function. The Ethernet driver and WLAN driver are also loaded into the Linux kernel as a loadable module in Linux.
In order to implement the application gateway function, we also implemented a firewall based on IP address filtering, network address resolution, simple network management, dynamic host address allocation, and WEB server according to actual needs.
When recompiling the kernel, remove the support for hard disk, mouse, video card, and keyboard, and keep only a simple file system, and put it on the Flash, so that the gateway operating system can be upgraded online. The core of the kernel is mainly for memory management, startup and interruption. Compile the PPPoA module, Ethernet and WLAN driver module into the kernel. The message drive mode is used between the kernel program and the network device interface. The three modules correspond to three message queues and three communication routines. Each routine is responsible for monitoring the corresponding port. Data (corresponding to a message queue), when a message is received, the process is transferred to the processing program to perform memory refresh, data frame header processing, and sending messages. If there is no message in the message queue, the process releases the CPU to other processes . Because the values ​​of some registers (DCR, SPR, etc.) and peripheral I / O space are mapped to physical memory space, these memories should be locked in the TLB, and the memory allocation for the three PCI devices should be judged. Whether the memory space overlaps with the locked memory space. In addition, we use the serial port (RS-232) as the debugging interface in the hardware design. You can test the system commands in the shell, run the application, or use GDB to debug the application. In addition, the shell is also used to configure the system. The configuration includes configuring global parameters to the command line interface of the gateway, and the dial-up PPP over ATM port, Ethernet and WLAN ports need to be configured. Before configuration, you need to confirm that the ADSL line is connected to the DSLAM. You must have a static IP address or the ISP is responsible for dynamic IP address allocation. When the gateway is started, the BIOS powers on self-test, loads the file system, guides the gateway operating system, the ADSL line performs handshake operation, initializes the link, and enters SHOWTIME.
3. Further work and prospects
The ADSL gateway integrates ADSL modem and application network. It not only completes the analog modulation and demodulation work of ADSL access, but also realizes the functions of resource sharing, simple network management and network security on this basis. Prospective technology.
Fork Type Terminals,Insulated Bullet Sockets Terminals,Insulated Bullet Terminals,Type Fork Insulate Terminal
Taixing Longyi Terminals Co.,Ltd. , https://www.lycopperlugs.com