Linux configuration Ifcfg-ethx

Source: Internet
Author: User
Tags nameserver linux

/etc/sysconfig/network includes host basic network information for system startup

/etc/sysconfig/network-script/This directory is the system to start the most initialized network information

/etc/sysconfig/network-script/ifcfg-eth0 Network configuration information

/ETC/XINETD.CONF defines a network service initiated by the super process xinetd

/etc/protocols set the protocol for the host to use and the protocol number of each protocol

/etc/services set the host's different port network services

Network Configuration Tool

Ifcfg-eth0 Configuration

2010-03-15 17:39

File:/etc/sysconfig/network-scripts/ifcfg-eth0

The following values are common in all basic configuration files:

* Device=name, where name is the name of the physical device (except for dynamically assigned PPP devices)

Its name is "logical name."

* Ipaddr=addr, here addr is the IP address.

* Netmask=mask, here Mask is a netmask.

* Network=addr, here addr is the network address.

* Broadcast=addr, here addr is the broadcast address.

* Gateway=addr, here addr is the gateway address.

* Onboot=answer, here answer take one of the following values:

o Yes-this device will be activated at boot time.

o No-this device is not activated when boot.

* Userctl=answer, here answer take one of the following values:

o Yes-a non-root user can control the device.

o No-the device is not allowed to be controlled by a non-root user.

* Bootproto=proto, here Proto take one of the following values:

o None--does not use the boot-time protocol.

o BOOTP-use BOOTP protocol.

o DHCP-use DHCP protocol.

*************************************************************************

/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0 Interface Name

Bootproto=none static configuration, if the value is "DHCP" is dynamically obtained, and Static is also the representation of a quiescent IP address

broadcast=192.168.10.255 broadcast address, automatically calculated by IP address and subnet mask

Hwaddr=00:13:d3:27:9f:80

ipaddr=192.168.10.238

Ipv6init=yes

Ipv6_autoconf=yes

netmask=255.255.255.0

network=192.168.10.0 Specifies the network, automatically calculated by IP address and subnet mask

Onboot=yes load automatically when powered on

gateway=192.168.10.1

Type=ethernet

Peerdns=yes

Userctl=no

Ifdown Eth0 shut down the network

Ifconfig eth0 down the network

Ifup eth0 Open Network

Ifconfig eth0 up Open Network

Set dns/etc/resolv.conf

NameServer 61.144.56.101

NameServer 202.96.128.166

[Yeger@yeger ~]$ cat/etc/resolv.conf

# Generated by NetworkManager

NameServer 202.96.128.86

NameServer 202.96.128.166

Other aspects

Service network start/starting network services

Service network stop//stops network services

Service Network restart//Restart network services

Service Network status//view Network Service status

Ifconfig eth0 192.168.10.222 netmask 255.255.255.0//Temporarily modify interface IP address (no need to reboot interface)

[Yeger@yeger ~]$ sudo ifconfig wlan0 192.168.21.199 netmask 255.255.255.0

[Yeger@yeger ~]$ ifconfig Wlan0

Wlan0 Link encap:ethernet hwaddr 00:02:72:77:bb:d1

inet addr:192.168.21.199 bcast:192.168.21.255 mask:255.255.255.0

Inet6 ADDR:FE80::202:72FF:FE77:BBD1/64 Scope:link

Up broadcast RUNNING multicast mtu:1500 metric:1

RX packets:3246 errors:0 dropped:0 overruns:0 frame:0

TX packets:1947 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:4514869 (4.3 MiB) TX bytes:177732 (173.5 KiB)

Wlan0 represents the first wireless Ethernet card

Link EnCap represents the name of the network adapter at the OSI Physical layer (physical Layer)

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.