Network Management and network management software

Source: Internet
Author: User
Tags nameserver

Network Management and network management software

  • Ifconfig outputs all active network interfaces in the current system

    Bytes

    • Link encap: Ethernet indicates that the encapsulation mode is Ethernet.
    • HWaddr indicates the hardware MAC address of the NIC
    • Current IP address of the inet addr Nic
    • Bcast is a broadcast address (calculated by IP address and mask)
    • Mask
    • Inet6 addr indicates IPV6 address
    • UP indicates that the ENI is currently active.
    • MTU indicates the maximum storage unit, that is, the maximum packet that the network adapter can transmit at a time.
    • RX indicates the received package
    • TX indicates the package sent
    • Collision indicates the number of conflicts. If the value is not 0, a network fault may occur.
    • Txqueuelen indicates the length of the transmission buffer.
  • Manually specify the IP address of eth1

    ifconfig eth1 192.168.31.119 netmask 255.255.255.0

    You can use the IP address and mask to calculate the broadcast address or set the broadcast address.

    ifconfig eth1 192.168.31.119 broadcast 192.168.31.255 netmask 255.255.255.0
  • Enable or disable the NIC manually

    ifconfig eth1 downifdown eth1ifconfig eth1 upifup eth1
  • The above configuration method can only be saved in the current kernel. Once the machine is restarted, this information will be lost, the network configuration file for RedHat and CentOS systems is the ifcfg-eth * file under the/etc/sysconfig/network-scripts directory.
    Bytes
    The configuration file for eth0 is a ifcfg-eth0, if there is a second physical Nic, its configuration file is a ifcfg-eth1, and so on.

  • View ifcfg-eth0 profiles
    Bytes

    • The DEVICE variable defines the DEVICE name.
    • The DWADDR variable defines the MAC physical address.
    • The BOOTPROTO variable defines how to obtain the IP address. Here, BOOTPROTO = static indicates the IP address that the system sets when enabling this Nic. If it is set to dhcp, the IP address will be obtained through dhcp.
    • The ONBOOT variable defines whether to activate the device at startup. yes indicates yes, and no indicates no.

    If you want to take effect immediately after modifying the configuration file, you can use either of the following methods:

    • Disable the port and then start
    ifconfig eth0 downifconfig eth1 up
    • Restart NETWORK SERVICE
    service network restart
  • Add/delete a default gateway: Generally, a route is the infrastructure of an IT device. Each network segment should have at least one gateway. in Linux, you can use the route command to add a default gateway.

    route add default gw 192.168.31.1route del default gw 192.168.31.1

    Similarly, if you only use the route command to add a gateway, once the system is restarted, the configuration information does not exist. You must write the configuration information to the relevant configuration file to save it, you can use the GATEWAY variable in the NIC configuration information to define the GATEWAY. You can also configure it in the/etc/sysconfig/network file.
    Bytes

  • After adding the default gateway, you can view the current route table of the system.
    Bytes

  • The hosts file/etc/hosts is the host file. The role of the host file is as follows:

    • CDN accelerates domain name resolution. When you access a website, the system first checks whether there are records in the hosts file. If the record exists, the corresponding IP address is directly resolved. At this time, you do not need to request the DNS server.

    • Easy for small LAN users to use internal devices: Because the LAN is too small, you do not have to set up a DNS server.

  • Network Test Tool ping

    Ping 192.168.31.182-c 3 // only send 3 packets

    Bytes

  • The host command is used to query DNS records. If the domain name is used as the host parameter, the IP address of the domain name is returned.
    Bytes
    The preceding command can have a second parameter, which must be an available DNS server. That is to say, you can use the specified DNS server to query the domain name, instead of using/ect/resolv. DNS query defined in the conf file
    Bytes
    Bytes

  • Technically, DNS is the database mapped to all hosts and IP addresses on the Internet. The configuration file for setting hosts as DNS clients is/etc/resolv. conf contains three keywords: nameserver, search, and domain.

    • Nameserver follows the IP address of the DNS server. It can be set to 2 ~ Three nameservers, but when the host queries the domain name, it first queries the first DNS. When the DNS is unavailable, it queries the second DNS.

    • Although more than three nameservers can be defined in the file, it does not make sense, because the system will never use the fourth nameserver, "Zhang Jun test gets the result 」

    • Search is followed by a domain name. Each host should strictly have an FQDN (globally qualified name), so the domain name will usually be very long. For example, if it is written as search google.com, then www represents www.google.com, this keyword can be followed by multiple domain names

    • The domain keyword is the same as the search keyword. The difference is that domain can only be followed by one domain name.

Common Network Fault Diagnosis

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.