LINUX network configuration basics

Source: Internet
Author: User
LINUX network configuration basics have recently been working in Inspur, responsible for building the koji automated compilation environment, requiring a server to install the system and configure the network. as a result, the system suffers a severe blow, the machines in Inspur's IDC actually obtained IP addresses and Trojans through DHCP. I have lived for 25 years, even though I haven't been in the IT circle for two years... LINUX network configuration basics have recently been working in Inspur, responsible for building the koji automated compilation environment, requiring a server to install the system and configure the network. as a result, the system suffers a severe blow, the machines in Inspur's IDC were used to obtain IP addresses and Trojans through DHCP. I have lived for 25 years. although I haven't mixed up in the IT circle for two years, I have never heard of IT before, I have even seen a company's data center allocate IP addresses in this way. if you are interested in this company, please visit the 5th floor of The Golden Vision building in Beijing. I can take you to visit the most distinctive state-owned enterprise data center for free. Inspur (Beijing) Electronic Information Co., Ltd. has been sprayed, and you have to continue working. since no network administrator is responsible for allocating data centers, you cannot find a bird who tells you the network structure of the data center, even if a network Port finally receives a vro, you don't know it. it seems that the traffic is basically on the go, and communication is basically on the go.-TMD should not regard state-owned enterprises as standard companies, here we will do more work than the workshop. we will use DHCP to obtain the IP address, and then statically configure the obtained IP address to the current server... as a desktop system, you can use graphical tools to quickly configure the network connection. However, you cannot use X for servers or use graphical interfaces, if the network service script does not take effect in command interaction mode, it is necessary to manually configure the network by using commands to determine the problem. 1 Related Command: ifconfig route2 related configuration file: cat/etc/resolv. conf brief debugging analysis, start with step 4, NIC driver, IP/mask, Gateway, DNS1ifconfig-a to basically determine whether the NIC driver is normal, if you do not see the network device, check whether the kernel module is loaded. if OK, continue 1 ifconfig eth0 10.151.11.110 netmask 255.255.0.0 up to assign an IP address to the eth0 Nic, set the mask, activate it, and ping the gateway, check whether it can be connected to the vro. if OK, continue! 1 route add default gw mango-gw # after the default gateway IP command is successfully executed, you can view the current Kernel IP route table, for example: 1root @ isobuild: /home/panhaitao # routing IP routing table3Destination Gateway Genmask Flags Metric Ref Use routing 192.168.1.1 0.0.0.0 UG 0 0 0 eth05link-local * 255.255.0.0 U 1000 0 0 eth06192.168.1.0 * 255.255.255.0 U 0 0 0 eth01DNS configuration come to google's general DNS server, the modification takes effect immediately. ping baidu.com to test it! 1/etc/resolv. conf2nameserver 8.8.8.8 this refers to the basic manual network configuration through commands. if you need to add more rules to the route table, refer to 1 route add-net 192.57.66.0 netmask limit 255.0 gw ipx4 limited knowledge, I simply sorted out what I didn't understand before. For more details, see man route, and I will go back and look at the computer network theories of the year, more or less can help solve these specific problems

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.