Network management commands

Source: Internet
Author: User

Network-related configuration file:/etc/

/Etc/sysconfig/Network: contains the most basic network information of the host for system startup.

/Etc/sysconfig/network-Script: information about the network initialization when the system starts.

/Etc/hosts: ing host names to IP addresses

/Etc/host. conf: configure the control file of the Domain Name Service Customer Service.

/Etc/resolv. conf: configuration file of the Domain Name Service Customer Service, used to specify the location of the Domain Name Server

/Etc/services: sets network services for different ports on the host.

 

# Route // configure and view the configuration of the kernel route table

And destination indicate the destination IP address of the route

Geteway indicates the host name or IP address used by the gateway, and "*" indicates no gateway

Genmask indicates the network mask of the route

And flags indicate the routing Standard

-U indicates that the route is started

-H indicates that the target is a host.

-G indicates that the gateway is used.

-R indicates resetting the dynamic route.

-D Indicates Dynamic Route Installation

-M indicates modifying the route

-! Indicates that the route is denied.

Metric indicates the starting sales of the route Unit

, Ref indicates the number of other routes that depend on the current status of the route

And use indicate the number of route table entries used

Iface indicates the destination network of the packet sent by the route

 

# Traceroute www.baidu.com // display the route from data to the destination

 

Temporarily uninstall/load a network card

# Ifconfig eth0 up

# Ifconfig eth0 down

 

Temporarily change IP Address

# Ifconfig eth0 192.168.0.30 up

# Service network restart // when this statement is executed, the IP address is changed to the original IP address.

If you want to change the IP address permanently

# Ifcfg-ethx file in CD/etc/sysconfig/network-script

 

Check the running and switching levels. For 3 to 5, select the graphic interface or character interface.

# Runlevel

# Init 3

 

Check whether a service package is installed and install a service package.

# Rpm-Qa | grep service name

# Rpm-IVH service package. IPM

 

 

 

 

 

 

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.