Network Background development tools Tcpdump (Grab) route (routing) nslookup and host (routing) md5sum (version checksum)

Source: Internet
Author: User
Tags nslookup
tcpdump Grab Bag:

want to output dot decimal: tcpdump-n * * *
Want to output MAC address: TCPDUMP-E * * *
Catch target a package: tcpdump DST A//requires root permission, or sudo.

The contents of the network package, including the source IP address, port and destination IP, port, we can be based on the target IP and port filtering tcpdump capture results, the following command illustrates this usage:

Tcpdump-i eth0 DST 10.70.121.92 and Port 22

7. Specify the type of grab package

We can only catch some kind of protocol package, TCPDUMP support specifies the following protocol: Ip,ip6,arp,tcp,udp,wlan. The following example captures only the packets of the ARP protocol:

tcpdump- i eth0 ARP

8. Specify the bag-holding port

If you want to grab a packet for a particular port, you can use the following command:

Tcpdump-i eth0 Port 22

Route add Routes:
Routes added to a network segment: Route add-net desip Rouip Dev eth0
Routes added to an IP: route add-host desip Rouip Dev eth0

DNS query:
Nslookup www.baidu.com

You will see the IP address of Baidu and the address that is returned from that DNS server.

You can use Nslookup www.baidu.com | awk '/[0-9]. [0-9]. [0-9]. [0-9]/{print $} ' | awk-f# ' {print} ' extracts the IP address. First intercept the IP address, and then remove the port number.

Host Www.baidu.com

Will see Baidu's IP address, but do not know from that DNS server returned.

You can use host Www.baidu.com | awk '/[0-9]. [0-9]. [0-9]. [0-9]/{print $} ' extracts the IP address.

Version development to determine whether it is the same file:

md5sum * > FileName/Multiple current directory of all files for MD5 checksum, and officers transferred Guevara test results written in the filename.

MD5SUM-C filename//can determine if any files have been modified under the current directory.

If the file is modified, then md5sum-c filename will be seen to be unsuccessful if no modification will be seen to be successful.

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.