Android Implementation of pppoe dial-up Internet access (I) Overview

Source: Internet
Author: User

Recently, we have implemented the pppoe dial-up Internet access function on Android. Generally, it is unlikely to be used. However, in some regions in mainland China, an AP may not support DHCP, or when the Android system is loaded on some platforms, you may need to port and expand this function. Pppoe is not introduced anymore. The following describes how to set up and operate my experiment environment:

Personal email:Xiaokeweng@gmail.com


(1) experiment environment construction

Description: In this example, an android handheld device that supports WiFi is connected to the LAN through WiFi, and pppoe-server is also linked to the local LAN, therefore, the network path from the client to the server is established. An accessible path is a basic prerequisite.

(1) Hardware

client: HTC handheld terminal
router: TP-LINK wireless router
server: Ubuntu system Pc
LAN: local LAN

(hardware environment)

(2) software conditions

first, the client must support PPP. The path on my terminal is/system/bin/pppd, and then the RP-pppoe (roaringpenguin-pppoe) is installed on the PC ), then, the PC is used as the pppoe-server. In reality, the configured pppoe-server is generally a dual-nic. One Nic is responsible for forwarding data in the proxy LAN, and the other is responsible for dropping data packets to the Internet, however, we have had a hard time, just for the sake of experiment, so our LAN can access the internet. On the PC, we finally use iptables to send packets (Network Address Translation) from pppoe through the pppx interface through iptables) to the ethx that can access the Internet. Android does not have pppoe executable files. Therefore, after transplantation, the executable files compiled by RP-pppoe are transplanted and named pppoe under/system/bin. That is:

Android: pppoe, pppd

PC: RP-pppoe

data packet path: client-> aP (TP-LINK)-> Lan-> PC-> nat-> LAN


(2) Run Verification Method

(1) run the pppoe-D command after ADB shell in the terminal, which will enable pppoe to initiate the padi broadcast package during the discovery process in the local LAN and capture the network adapter ethx on the PC, if padi is broadcast, the link has passed.

(Pppoe-service captures the padi broadcast package)

(2) Configure pppoe-server as expected, which will be explained in detail later.

(3) execute commands on the android terminal as expected, and a PPP link is established. Run netcfg on the terminal. Run ifconfig on the PC to view the pppx interface.

(Client iface)

(Server iface ppp0)

(4) configure the default route to pppx and DNS on the android terminal, so that the terminal data packets will be sent out of pppx. Then, configure the server iptables and add rules, nat uses packets from pppoe to ethx with Internet access permissions. packet capture analysis is used to determine whether the data link meets expectations.

After the above steps, you can use pppoe to access the Internet. The above is just a rough book. The detailed steps will be explained in detail in the following blog.

Related Article

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.