1. Network Tools: ifconfig, ping, netstate, Redhat command and graphical settings of ip, finger, nslookup, ifconfignetstate

Source: Internet
Author: User
Tags domain name server dns names nameserver nslookup nslookup command

1. Network Tools: ifconfig, ping, netstate, Redhat command and graphical settings of ip, finger, nslookup, ifconfignetstate
Zookeeper

1 ip ad view Nic ID

2. View Nic information in ifconfig

3. Disable the NIC

4. Start the NIC

5. configure a temporary ip address for etho

Sudo ifconfig ethoIP address

 


6. ping Command

Ping [Option] Host Name/IP Address

Check whether hosts on the network are working. It sends an ICMP ECHO_REQUEST packet to the host. Sometimes we want to download files from a host on the network, but we do not know whether the host is on, we need to use the ping command to check.

The meaning of each option in the command is as follows:

-The number of c stops when a specified number of packages are sent.

-D: Set the SO_DEBUG option.

-F sends a large number of network packets to a machine quickly to view its response.

-I: sets the interval of seconds to send a network packet to a machine. The default value is to send a packet once a second.

-L the number of packets is the fastest to send to the specified machine within the specified number of times (this option can only be used by Super Users ).

-Q: only the final result is displayed.

-R Directly sends packets to a machine without passing through the gateway. It usually checks whether the network interface of the local machine is faulty.

-S bytes indicates the number of data bytes to be sent. The default value is 56, plus an 8-byte ICMP header, which is a total of 64 ICMP data bytes.

 

7. netstat

Netstat [Option]

Displays network connection, route table, and network interface information, allowing you to know which network connections are currently in operation. The meaning of the options in the command is as follows:

-A displays all sockets, including those being monitored.

-C is re-displayed every one second until the user interrupts it.

-I displays information of all network interfaces in the same format as "ifconfig-e ".

-N is replaced by a network IP address to show network connection conditions.

-R displays the core route table in the same format as "route-e ".

-T shows the TCP connection status.

-U: displays the connections of the UDP protocol.

-V: displays ongoing work. -A displays all sockets, including those being monitored.

-C is re-displayed every one second until the user interrupts it.

-I: displays information about all network interfaces.

Tip: The LISTEN and LISTENING statuses can only be viewed using-a or-l.

Sudo netstat-anp | grep ftp

 

8. Set the IP address (redhat)

RedHat static IP Address Configuration

Modify the following three files in sequence:

/Etc/sysconfig/network

/Etc/sysconfig/network-scripts/ifcfg-eth0

/Etc/resolv. conf

 

Change the./etc/sysconfig/network file to the following Configuration:

Edit content:

B/etc/sysconfig/network-scripts/ifcfg-eth0

Configuration instructions:

DEVICE = eth0 # DEVICE name

NETMASK = 255.255.255.0 # Subnet Mask

IPADDR = 192.168.6.14 # IP Address

BOOTPROTO = static # [none | static | bootp | dhcp] Protocol not used during boot | static allocation | BOOTP protocol | DHCP protocol

ONBOOT = yes # [yes | no] whether the device is activated during boot

DNS1 = 192.168.6.1 # domain name resolution Server

PEERDNS = yes

 

Modify as follows:

C/etc/hosts

# Establishing a hosting relationship between hostName and ip address

# Multiple items can be created. The yourHostName of one of them should be the same as the HOSTNAME of STEP (A), that is, toto

# Otherwise, an exception occurs when you use InetAddress. getLocalhost (). The corresponding ip address ing cannot be found.

192.168.6.6 toto. localdomaintoto

The rule is: IP address host name. Domain Name Host Name (192.168.6.6to.localdomain toto)

 

D/etc/resolv. conf (this step can be left blank)

To access the DNS server for query, you need to set the/etc/resolv. conf file. If the IP address of the DNS server is 192.168.6.1, the content of the/etc/resolv. conf file should be:

Nameserver 192.168.6.1 # The DNS configuration is the same as [DNS1 = 211.99.25.1] in B]

E. Reboot takes effect

Make the IP address take effect

/Sbin/ifdown eth0

/Sbin/ifup eth0

 

Configure dns resolution (skip this step)

Echo "nameserver 192.168.6.1">/etc/resolv. conf

 

// Notify the gateway to update the information

/Etc/init. d/networkrestart or use service networkrestart

9 Redhat configuration IP Address

A carries out the redhat system as the root user.

B. Select system à preference à network connection. The pop-up result is as follows:

Click Edit: the effect is as follows:


10 nslookup

Nslookup name

Query the IP address of a machine and its corresponding domain name. It usually requires a Domain Name Server to provide domain name services. If you have configured a Domain Name Server, you can use this command to view the domain name corresponding to the IP addresses of different hosts.

When you use the nslookup command without parameters, the prompt ">" appears. Enter the IP address or domain name to be queried and press Enter. To exit the command, enter exit and press Enter.

For example:

Toto @ ubuntu :~ $ Nslookup

> Www.baidu.com

 

11 finger (sudo apt-getinstall finger)

Finger [-lmsp] user [user @ host…] Query user information. The user name, Home Directory, stagnation time, Logon Time, and logon shell information of a user in the system are usually displayed. To query user information on a remote machine, you need to add "@ host name" after the user name, in the format of [user name @ host name, however, the network host to be queried must run the finger daemon. The meanings of the options in the command are as follows:

-S displays the user's registration name, actual name, terminal name, write status, stagnation time, Logon Time, and other information.

-L in addition to the information displayed with the-s option, it also displays information such as the user's home directory, logon shell, email status, and under the user's home directory. plan ,. project and. the content of the forward file.

-P is the same as the-l option except that the. plan and. project files are not displayed.

Zookeeper
Pingipconfignetstattraceroutenslookup command formats and functions

I'm dizzy, so many,

PING
Options:
-T Ping the specified host until stopped.
To see statistics and continue-type Control-Break;
To stop-type Control-C.
-A Resolve addresses to hostnames.
-N count Number of echo requests to send.
-L size Send buffer size.
-F Set Don't Fragment flag in packet.
-I TTL Time To Live.
-V TOS Type Of Service.
-R count Record route for count hops.
-S count Timestamp for count hops.
-J host-list Loose source route along host-list.
-K host-list Strict source route along host-list.
-W timeout Timeout in milliseconds to wait for each reply.

IPCONFIG:
Ipconfig [/? |/All |/renew [adapter] |/release [adapter] |
/Flushdns |/displaydns |/registerdns |
/Showclassid adapter |
/Setclassid adapter [classid]
Options:
/? Display this help message
/All Display full configuration information.
/Release Release the IP address for the specified adapter.
/Renew Renew the IP address for the specified adapter.
/Flushdns Purges the DNS Resolver cache.
/Registerdns Refreshes all DHCP leases and re-registers DNS names
/Displaydns Display the contents of the DNS Resolver Cache.
/Showclassid Displays al ...... remaining full text>

248 think about ping, ipconfig, and netstate usage

The Ping command can be used to test the computer name and the IP address of the computer. It strictly connects to the other computer and sends "Internet message Control Protocol (ICMP)" to the other host) "echo request message to verify the IP-level connection with the peer's TCP/IP computer. The received response message is displayed along with the number of round-trip requests. Ping is the main TCP/IP command used to detect network connectivity, accessibility, and name resolution problems. If no parameter is specified, ping the command to display the help information.
Ipconfig command this diagnostic command displays all current TCP/IP network configuration values. The Special Purpose of this command on running the DHCP system allows you to determine the TCP/IP configuration value configured for DHCP.
Ipconfig [/all/renew [adapter]/release [adapter]
Parameters
/All
 

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.