How to Set IP (red hat) and linuxhat in Linux
The two steps are as follows:
1: Use the setup command to set the IP address
Save ......
-- Return to the front, with DNS
Save and exit ......
2: restart the network service.
In the vmwarevirtual machine, how does one set IP addresses in LINUX (red hat )?
The Virtual Machine Nic is set as a bridge channel, and then the linux IP is set
Linux:
Ifconfig eth0 up (or service netconfig restart)
Netconfig
Set IP Gateway DNS after the interface appears
This is one and the other:
Ifconfig eth0 192.168.1.8 netmask 255.255.255.0
Route add default gw 192.168.1.1
Echo "nameserver 202.102.15.4">/etc/resolv. conf (modify DNS)
In this setting, the ip address and gateway of the computer will be restarted! Take effect once.
If you can always do it, the first friend is right! You need to modify the configuration file. Learn how to use VI
Vi/etc/sysconfig/network-scripts/ifcfg-eth0 (modify IP)
IPADDR = 192.168.1.18
NETMASK = 255.255.255.0
Vi/etc/sysconfig/network (modify gateway)
GATEWAY = 192.168.1.1
Echo "nameserver 202.102.15.4">/etc/resolv. conf (modify DNS)
Reference: blog.csdn.net/..2.aspx
In redhat linux enterprise 60, how should I configure the ip addresses used to connect machines?
DEVICE: indicates the network card name. The first block is eth0, the second is eth1, and so on.
HWADDR: sets the MAC address of the NIC, which is generally automatically detected.
NM_CONTROLLED: whether to use network manager for management. We recommend that you set it to no.
ONBOOT: whether to start the instance. We recommend that you set it to yes.
IPADDR: Set the IP address
----------------------------------------------------------------------------------
PREFIX: Set the subnet mask, for example, 192.168.1.1. The default subnet mask is 24. this parameter is used by default in version 6.0.
NETMASK: Set the subnet mask, for example, 192.168.1.1. The default subnet mask is 255.255.255.0.
The two parameters belong to the same concept and do not need to be set repeatedly.
Bytes -----------------------------------------------------------------------------------
DNS1: Set the preferred DNS address
GATEWAY: Set the GATEWAY address
Basically, you can set the above parameters.