Raspberry Pi 3 Self-booting set USB NIC IP

Source: Internet
Author: User

1. Requirements:

The project needs to add a USB network card to the Respberry pi, which needs some network setup for this NIC when the Respberry pi is started.

2. Implementation options:

(1) Add the following code to the/etc/rc.local file:

if [-x/etc/mynet.conf]; Then/etc/mynet.conf &fi

(2) Complete the mynet.conf script and put it in the/etc/directory, the contents of mynet.conf are as follows:

#! /bin/bashwhile! IW Dev wlan1 Info &>/tmp/netlog;  Do sleep 0.2 did ifconfig wlan1 down IWS dev Wlan1 interface add ah0 type IBSS ifconfig ah0 up IW Dev ah0 ibss  Join Rpi-ah0 2462 ifconfig ah0 192.168.2.6 route add 192.168.1.102 GW 192.168.1.102 Dev wlan0 route add 192.168.2.102 GW 192.168.2.102 Dev Ah0

(3) Set mynet.conf file executable permission, open terminal Enter the following command:

sudo chmod 755/etc/mynet.conf


This article is from the "Wauoen" blog, make sure to keep this source http://7183397.blog.51cto.com/7173397/1834360

Raspberry Pi 3 Self-booting set USB NIC IP

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.