Advanced Redhat and ubuntu Nic Configuration

Source: Internet
Author: User
Tags nameserver
In RedHatlinux, if you set the fixed ip address of the NIC in redhat-config-network under xwindow, the setting of the fixed ip address of the NIC does not work. If you set it, the ping will fail. Check some information, change/etc/sysconfig/network-scripts/ifcfg-eth0 (the first Nic is eth0), configure the dns file as/etc/resolv. conf, I keep the dhcp configuration. After configuration, use ifconfig RedHat to set a fixed ip address for the NIC in linux.

Previously, the redhat-config-network Setting of the NIC fixed ip address in xwindow did not work. After the redhat-config-network is set, the ping fails. Check some information, change/etc/sysconfig/network-scripts/ifcfg-eth0 (the first Nic is eth0), configure the dns file as/etc/resolv. conf, I keep the dhcp configuration. After configuration, use ifconfig eth0 down; ifconfig eth0 up. The following is a configuration file list:

#/Etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE = eth0
BOOTPROTO = static
BROADCAST = 192.168.1.255
IPADDR = 192.168.1.10
NETMASK = 255.255.255.0
NETWORK = 192.168.1.0
HWADDR = 52: 54: AB: 2F: CF: F0
GATEWAY = 192.168.1.1
ONBOOT = on
TYPE = Ethernet

#/Etc/resolv. conf
Nameserver 202.109.14.5
Nameserver 202.96.209.5
Search localdomain

Or run the following command: setup
Or:
Route add-net 192.168.1.50 netmask 255.255.255.0 dev eth0
Or:
Ifconfig eth0 192.168.1.50 netmask 255.255.255.0
Related Article

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.