1. Modify the IP address
Vim/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:
2. Modify the Gateway
Edit/etc/sysconfig/Network
Networking = Yes
Hostname = vmlinux --- Host Name
Gateway = 192.168.1.2 --- gateway DNS:
3. Modify DNS
Edit/etc/resolv. conf
Nameserver 202.103.224.68
4. Modify Nic Mac
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 aa bb cc dd EE
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.
Linux Command: ifconfig Function Description: displays or sets network devices
Syntax: ifconfig [network device] [down up-allmulti-ARP-promisc] [add <address>] [del <address>] [
Note: ifconfig can be used to set the status of network devices or display the current settings. In this way, you have successfully changed the IP address, gateway, DNS, and MAC address of RedHat Enterprise Edition.