Just knock a few orders today.
1. Network interface Parameters--ifconfig
This command can set the NIC interface IP address, subnet mask, etc.,
Ifconfig xx (NIC name) down-off NIC interface
ifconfig XX (network card name) up open NIC interface
2. View host parameters--Hostnamectl
Display or set host name
Hostnamectl Status Displays host name and host information
Hostnamectl set-ho
CentOSBut we will find that there is no ifcfg-eth0, using ifconfig-aWhat if we find that there is no eth0?We can find the network in the graphical interface//, of course, this method for future IP class operation or will encounter eth0 problemsBut for those eager to connect with the students is a help.Double click to enter, click Select Wired, open the network, CentOS
-, in/etc/sysconfig/network-scripts.
5. Use VI/etc/sysconfig/network-scripts/ifcfg-ens33 to edit the configuration file. After editing, save and exit.
Note: The Gateway should be the same as the gateway we mentioned earlier, otherwise it will not be able to access the Internet.
The above is what I have modified. Basically, you can access the Internet with these parameters. There are still many parameters
Install the CentOS system and view the network configuration.Input command: ifconfig127.0.0.1To turn on the networkEnter the Ifcfg-eth0 file.Input command: Vi/etc/sysconfig/network-scripts/ifcfg-eth0Note: The non-root account is required to add sudo, or enter the VI editor and no permission to edit.
Configure the dynamic IP.Configure the IP address by modifyi
Set IP address under Centos/linux1. Temporary entry into force settings 1.1 Modifying the IP address #ifconfig eth0 192.168.100.100 1.2 Modifying the gateway address #route add default GW 192.168.100.1 dev eth0 1.3 Modifying DNS # echo "NameServer 8.8.8.8" >>/etc/resolv.conf 2. Permanent Effect Settings 2.1IP address permanent setting takes effect# Vi/etc/sysconfig/network-scripts/ifcfg-eth0
CentOS minimal network configuration, centosminimalIn Minimal of Centos 6, the network card is onboot = "no" by default, and the NetworkManager-dependent option is set. NM_CONTROLLED = "yes ", in the case of minimal, NetworkManger, the default network management tool provide
1. Modify the host name[[email protected] ~]# Vim/etc/sysconfig/network Open the file, modify the following and saveNetworking=yes #使用网络Hostname=centos #设置主机名称[Email protected] ~]# hostname CentOS #立即生效2. Modify the NIC[Email protected] ~]# Vim/etc/sysconfig/network-scripts/ifcfg-eth0Open the file, modify the following
After the CentOS virtual machine has moved, the network card may not start.1.VI /etc/sysconfig/network-scripts/ Ifcfg-eth0Ifcfg-eth0 the previous MAC address in the config file, remove the line and restart the NIC2./etc/udev/rules.d/70-persistent-net.rules Restart the machine after deletionBecause this file is bound to the ne
First, configure the network, firewall, etc.Setup commandSecond, view the networkThe ifconfig, route, and IP commands of the CentOS application http://www.linuxidc.com/Linux/2013-05/83956.htmIfconfigRestart Network/ect/init.d/network restartor Ifup ethx (0,1,2), etc.View network
Introduced
When we configure CentOS, many cases need to be able to extranet, then need DNS parsing function, the default is not configured DNS information, so we have to configure DNS information
Cause
We are in search of CentOS configuration DNS information, a lot of is said in this file to configure "/etc/resolv.conf", we have added a nameserver after this can really ping the domain name, However, aft
0. Previous words: A long-troubled questionBefore often such problems, but because there is no solution, can only bite the bullet himself to install a new operating system, although it is a waste of time, but also reluctantly solved it.But there is a problem not to solve the overall bad, and then after a variety of search and ask netizens, find out the following this very good solution, tested, this method can be a perfect solution to this problem.
1. Problem arises: After cloning
Instance Environment
Virtual machines: VMware 11.1.0
System: CentOS 6.6
# ifconfig-a
2. # vi/etc/sysconfig/network-scripts/ifcfg-eth0 Press the I key to start the configurationWhat to modify :Identification 5 Onboot=no modified to Onboot=yes# is booting with the systemIdentification 7 BOOTPROTO=DHCP modified to Bootproto=static# IP Address allocation method, whether the DHC
Instance EnvironmentVirtual machines: VMware 11.1.0System: CentOS 6.6# ifconfig-a Wkiom1tvek_qib9xaagzcbkqshu513.jpg2. # vi/etc/sysconfig/network-scripts/ifcfg-eth0 Wkiom1tvfbkji6ziaadk63qaehq147.jpgPress the I key to start the configurationWhat to modify:Identification 5 Onboot=no modified to Onboot=yes# is booting with the systemIdentification 7 BOOTPROTO=DHCP modified to Bootproto=static# IP Address allo
/INTRO/DAYTIMETCPCLI.C) 1) compile with static link library:-l parameter plus Libunp.a remove Lib and back. A. Finally get the parameter-LUNP1 CD./2gcc 2) test the resulting executable file to get the current date of the machine:1 127.0. 0.1The following error occurs when you test:1 Connect Error:connection refused 3) This error indicates that the daytime service program is not open and can be xinetd to control the service connection request. The following opens the daytime service program vi
After VMWare installs CentOS minimal and wants to connect to it using ssh tools, the IP address cannot be found when the ifconfig command is called in CentOS, the default Nic is not activated for minimal. Therefore, you need to manually configure:
Edit file vi/etc/sysconfig/network-script/ifcfg-eth0
Set the attributes in the file as follows:
ONBOOT = "yes"
Solve the problem that the network cannot be connected after the centos 7 VM is restarted
Centos7 introduces a new network device naming method-consistent network device naming (consistent network device naming) due to systemd and udev ).
One virtual machine,
http://www.oschina.net/question/17_39276
The old version of the Redhat/centos defaults to install the system, will default to open the network card and set to boot.
But this feature has changed in the latest version 6 ... The NIC will disconnect by default after the reboot.That is to say, if the server reboots, it will forever break the network ...And it's hard
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.