Configure the IP address of RedHat

Source: Internet
Author: User
IP address and subnet mask:
Edit/etc/sysconfig/network-script/ifcfg-eth0
Device = eth0
Bootproto = static --- static or dynamic
Broadcast = 192.168.1.255
Ipaddr = 192.168.1.35 --- IP Address
Netmask = 255.255.255.0 --- Subnet Mask
Network = 192.168.1.0 --- network ID
Onboot = Yes

Gateway:
Edit/etc/sysconfig/Network
Networking = Yes
Hostname = vmlinux --- Host Name
Gateway = 192.168.1.2 --- Gateway

DNS:
Edit/etc/resolv. conf
Nameserver 61.147.37.1
Nameserver 61.177.7.1
Note: The above IP addresses must be changed to the IP address corresponding to your network configuration. Note the case before "=.

Change the MAC address in RedHat Linux
1. First, you must disable the NIC device. Otherwise, the system is reported to be busy and cannot be changed.
Command:/sbin/ifconfig eth0 down
2. Modify the MAC address.
Command:/sbin/ifconfig eth0 HW ether 00 aabbccddee
3. Enable Nic again
Command:/sbin/ifconfig eth0 up
The MAC address of the NIC is changed.

Another method is to modify the configuration file ifcfg-ethx of the NIC and add a similar format MAC address: hwaddr = 00: AA: BB: CC: DD: EE.

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.