How to connect an embedded Linux platform to the Internet

Source: Internet
Author: User
Tags nslookup

 

First, let's talk about the sti7105 platform of St. Now you want to directly access the Internet on the target board, such as ping www.sohu.com. The target board is connected to a LAN that can directly access the internet. The gateway is 192.168.1.1, and the target board IP is 192.168.1.150. First, we need an Internet IP address for testing. Run NSLookup www.sohu.com in Windows cmd to obtain several IP addresses of souhu. For example, "121.14.0.19" can be pinged directly to 121.14.0.19 on the terminal of the target board! No route is set. Set the route as follows: Route add default GW 192.168.1.1 on Ping 121.14.0.19. It can be the same. Now, we have connected to the internet! Configure DNS. To implement DNS, you must install B IND package. Here, because the development package provided by St already exists, it will not be written into cross-compilation.Mainly configure it. /Etc/hosts: Edit:127.0.0.1 localhost. localdomain localhost/etc/host. conf: Edit order hosts, bind/etc/resolv. conf // as follows to add a DNS domain name resolution server. #
# Resolv. conf this file is the resolver configuration file
# See resolver (5 ).
# Nameserver 202.96.134.20.
After the nameserver 202.96.128.68 is saved, we can run NSLookup www.sohu.com to check whether the IP address of the souhu network can be displayed in windows. If it is displayed successfully, DNS can work properly. Run: Ping www.sohu.com. Attached , Bind cross-Compilation:
CD binding-9.6.1
Build_cc = GCC. /configure -- Host = arm-None-Linux-gnueabi -- prefix =/home/Terry/workdir/applications/common-lib/bind-9.6.1/install_arm/-- enable-epoll = No -- With-randomdev =   From: http://www.cublog.cn/u3/109710/showart_2149674.html
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.