Raspberry Pi Combat 1: Query their own intranet, external network IP

Source: Internet
Author: User

The complete effect of these 4 battles is: Let the Raspberry Pi send its own IP address to the mailbox automatically by mail.


Combat 2 : http://blog.csdn.net/make_app/article/details/47305179

Combat 3 : http://blog.csdn.net/make_app/article/details/47305337

Combat 4: http://blog.csdn.net/make_app/article/details/47305387

0. System Environment

Raspberry Pi A +, system wheezy

Input uname-a

This is my Linux raspberrypi 3.18.11+ #781 PREEMPT Tue Apr 18:02:18 BST armv6l gnu/linux

1.

Get your own intranet and extranet IP addresses

You can use the ifconfig and grep and cut and curl commands to

As follows:

Ifconfig | grep ' Bcast ' | cut-d b-f 1 >>/home/pi/desktop/ip.log

Curl Http://members.3322.org/dyndns/getip >>/home/pi/desktop/ip.log

The first sentence is to find your own intranet IP

The second sentence is to find your own external network IP




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Raspberry Pi Combat 1: Query their own intranet, external network 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.