Linux Network Management 2---(Network Environment View command, Network Test command)

Source: Internet
Author: User
Tags ftp protocol nslookup

1. Network Environment View Commands

  Ifconfig command

To view or temporarily modify network status commands

You can see the IP, subnet mask ... Information

  Shutting down and starting the network card

    ifdown Network card device name (e.g. Ifdown eth0): Disable the NIC device

    ifup Network card device name: Enable the NIC device

  Querying network status: Netstat

    Options:

-T: List TCP protocol ports

-U: List UDP protocol ports

-N: Do not use domain name and service name, but use IP address and port number

-L: Only the Network service is listed in the Listening state ( all UDP services are not listening, because TCP is a three-time handshake and needs to wait for feedback, and UDP is not required )

-A: List all network connections

    NETSTAT-RN:

-R: Lists the routing list with the same functionality as the route command

  Route command:

Route-n: View the list of routes (you can see the gateway)

Route add default GW 192.168.1.1: Temporarily set Gateway

  Domain Name Resolution command

nslookup [hostname or IP]: domain name and IP address resolution

For example: Nsloopkup www.baidu.com, you can view the IP address of the www.baidu.com ... Information

Enter the command nslookup, enter interactive mode, and then at > enter server, you can view the native DNS server

2. Network Test commands

  ping command

Ping IP address or domain name: Probe the network condition of the specified IP or domain name, theshorter the response time to my ping IP, the better the network condition! Some websites prohibit other machines from pinging them.

-C Number of times: Specifies the number of ping packets

  Telnet command

A remote administration command, but is not encrypted, so the encrypted SSH protocol has been replaced by the

    telnet IP address : Try remote login server for remote management, but generally its port is closed by default

Although it is not available for remote administration, it is now used to probe remote ports

    telnet [domain name or IP] [port]: Remote management and Port detection command, for example: Telnet 192.168.0.252 80, may not be detected if the other side does not open the port service, or use a firewall to "fire"

  traceroute [options] IP or domain name

Route Trace Command

-N: Use IP, do not use domain name, faster (because the process of DNS domain name resolution is not required)

Traceroute, like the ping command, is used for remote detection using the ICMP protocol (Internet Control Message Protocol)

  wget URL Address of the download file

commands for downloading files

  Tcpdump

    tcpdump-i eth0-nnx Port 21, can listen to 21 port (FTP service), when the user logged in using the FTP command, you can use the Tcpdump grab packet, through the captured package, you can see the user's user name and password (because the FTP protocol is also clear) , so it can be seen in the network environment, want to Telnet, FTP, HTTP this clear-text protocol is less secure ( password security )

    So use this command to crawl the network packet, analysis can get some more sensitive data, such as password ...

-I: Specify the NIC interface

-NN: Convert the domain name and service in the packet to IP and port

-X: Display the contents of the packet in 16 binary and ASCII code

Port: Specify the ports to listen on

Linux Network Management 2---(Network Environment View command, Network Test command)

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.