Linux configuration ip address

  
1 ifconfig: ifconfig eth0 192.168.1.123 netmask 255.255.255.02 setup: redhat series proprietary 3 configuration file mode configuration: configuration file 1----> NIC information file vi /etc/sysconfig/network-scripts /ifcfg-eth0 //Network card device name DEVICE=eth0 //mac address HWADDR=00:0C:29:91:A7:26 //Type is Ethernet TYPE=Ethernet //Unique identification code UUID=a75b9b26-7262-45a4 -875e-f5193e6318de //Whether it starts with the network service, eth0 takes effect ONBOOT=no //Whether it can be hosted by the network manager graphical management tool NM_CONTROLLED=yes //Whether to automatically get ip (none static dhcp) BOOTPROTO=dhcp //ip address IPADDR =192.168.1.123//Subnet mask NETMASK=255.255.255.0 //Gateway GATEWAY=192.168.1.1 //DNS DNS1=202.106.0.20 //ipv6 does not start IPV6INIT=no //Do not allow non-root users to control this NIC USERCTL =no configuration file 2----> hostname information file vi /etc/sysconfig/network NETWORKING=YESHOSTNAME=localhost.localdomain hostname The hostname you just modified temporarily changes the hostname, not To restart the profile 3 ---- & gt; DNS configuration file vi /etc/resolv.conf //can write multiple nameserver 202.106.0.20//default domain name search localhost
Copyright © Windows knowledge All Rights Reserved