Created
September 22, 2019 08:53
-
-
Save kathy330/28f44a76e52eaa56e98dab82436bd69c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ping | |
to check connectivitiy to a host | |
$ ping host | |
Traceroute | |
used to discover the routes that packets actually take when traveling to their destination. | |
$ traceroute host | |
Telnet(obsolete) | |
used to connect form one host to another (remote login) via the internet network | |
SSH | |
allows establishing a secure channel between a local and a remote computer. | |
*ssh supports terminal protocols is typically used for remote administration of the SSH server computer via terminal console. it is used as an alternative to telnet. | |
$ ssh -l username hostname | |
$ ssh username@hostname | |
ifconfig | |
used to assign an address to a network interface and to configure or display the current network interface configuration information. | |
*Note: the directory /sbin is not the path of a typical ser. So you may have to type /sbin/ifconfig | |
netstat | |
allos to print the various data related to the network configuration of a station. | |
Option -i allows to print the state of the network interfaces | |
Option -r displays the kernel routing table | |
Option -n makes netsate print address as dotted quad IP numbers rather than the symbolic host and network names | |
netpref | |
provides test for both unidirectional throughput and end-to-end latency. | |
The calculation of these parameters is based on measuring the time necessary to transmit messages of fixed size by TCP. | |
$ netperf host [message_size [count]] | |
nslookup, dig, host | |
nslookup is used to find out the corresponding IP address of a host name( | |
$ nslookup redhat.com | |
dig is similar to nslookup, it is a tool for querying DNS nameservers for information about host address, | |
mail exchanges, nameservers, and related information. | |
More Info: https://www.thegeekstuff.com/2012/02/dig-command-examples/ | |
$ dig host | |
HEADER: | |
QUESTION SECTION: | |
ANSWER SECTION: | |
AUTHORITY SECTION: | |
ADDITIONAL SECTION: | |
Display particular section only | |
+nocomments; +noauthority, +noadditional, +nostats, +noanswer | |
e.g. only show the answer section | |
$ dig rehad.com +noall +answer | |
Query MX records using -t MX | |
$ dig redhat.com MX +noall +answer | |
$ dig -t MX redhat.com +noall +answer | |
Query NS Records using -t NS | |
$ dig redhat.com NS +noall +answer | |
$ dig -t NS redhat.com +noall +answer | |
View all DNS Records TYPES(A, MX, NS, etc) using dig -t ANY | |
$ dig redhat.com ANY +noall +answer | |
$ dig -t ANY redhat.com +noall +answer | |
View short Output using +short | |
$ dig redhat.com +short | |
$ dig redhat.com ns +short | |
DNS Reverse Look-up Using -x | |
$ dig -x 209.132.183.81 +short | |
Bluk DNS Query Using dig -f | |
1. create a txx file | |
$ vi names.txt | |
redhat.com | |
centos.org | |
2.using dig -f | |
$ dig -f names.txt +noall +answer | |
$ dig -f names.txt MX +noall +answer | |
Other Methods: | |
$ dig redhat.com +noall +answer centos.org ns +noall +answer | |
grep | |
the grep utility searches text files for a pattern and prints all lines that contain that pattern | |
if you want to search for a fixed string you should rather use fgrep |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment