How to Set IP (red hat) and linuxhat in Linux

Source: Internet
Author: User

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.

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.