RHEL6 server network configuration

Source: Internet
Author: User
1. Modify the ip address method in linuxRHEL6 (1) [root @ www ~] # System-config-network graphical configuration for IP Address Configuration (2) [root @ www ~] # Vi/etc/sysconfig/network-scripts/ifcfg-eth0 manually modify the ip address of eth0 NIC (1) DEVICE = eth0 ---------------- Nic name (2) BOOTPRO

1. Modify the ip address method in linux RHEL6
(1) [root @ www ~] # System-config-network
Configure IP addresses using graphical Configuration
(2) [root @ www ~] # Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Manually modify the ip address of the eth0 Nic
(1) DEVICE = eth0 ------------------ Nic name

(2) BOOTPROTO = none -------------- whether the network is obtained through DHCP or static IP. If it is DHCP, it is changed to dhcp. If it is static, it is changed to static.

(3) NM_CONTROLLED = no ----------- whether the network is affected by NetworkManager. In RHEL6, the NetworkManager function is added. We recommend that you disable it.

(4) ONBOOT = yes ---------------------- whether the network is started
(5) DNS1 = 172.16.2.1 ----------------------- DNS
(6) TYPE = Ethernet ------------------------ TYPE: Ethernet
(7) USERCTL = no -------------------------- none
(8) IPV6INIT = no ------------------------ whether IPV6 is enabled
(9) HWADDR = b8: 22: e3: 44: 36: 0e --------- hardware serial number, that is, the MAC address. If not, the system automatically adds

(10) IPADDR = 172.16.2.151 --------------- manually entered IP Address
(11) NETMASK = 255.255.255.0 --------------- Subnet Mask
(12) GATEWAY = 172.16.2.1 -------------------- GATEWAY
After modification, save and exit.

2. Configure whether the NIC is available and Host Name
[Root @ www ~] # Vim/etc/sysconfig/netwrok -- global configuration
NETWORKING = yes -------------------------- the global setting is used. If no is used, the network of the local machine is unavailable.
HOSTNAME = www.linuxidc.com ------------ host name. We recommend that you change it to x.x.com.

Then bind the IP address and Host Name
[Root @ www ~] # Vim/etc/hosts
Add IP address and Host Name
172.16.2.151 www.linuxidc.com


3. Activate NetworkManager
[Root @ www ~] # Service NetworkManager restart (or start)

Or
[Root @ www ~] #/Etc/init. d/NetworkManager restart (or start)

4. Activate the network
[Root @ www ~] # Service network restart (or start)
Or
[Root @ www ~] #/Etc/inie. d/networkrestart (or start)

5. Modify NDS configurations
[Root @ www ~] # Vi/etc/resolv. conf
Nameserver 8.8.8.8

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

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.