Shell script detects surviving hosts in LAN

Source: Internet
Author: User

<1>

d211 Admin # for I in {3..254}; Do ping-c 1 192.168.1. $i &>/dev/null && echo 192.168.1. $i is alive ;d One
192.168.1.5 is alive
192.168.1.7 is alive

<2>

Fping-a-G 192.168.5.1 192.168.5.177-s-N >lele.txt

-A Show systems that is alive.

- G Generate a target list from a supplied IP netmask, or a starting and ending IP. Specify the net mask or start/end in the targets portion of the command line.

Ex. To ping the class C 192.168.1.x, the specified command line could look like either:

Fping-g 192.168.1.0/24 or fping-g 192.168.1.0 192.168.1.255

- s                 Print cumulative statistics upon exit. -n same as-d.

- D Use the DNS to lookup address of return ping packet. This allows give fping a list of IP
Addresses as input and print hostnames in the output.

Shell script detects surviving hosts in LAN

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.