Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Network configuration in Centos6

2025-01-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the example analysis of network configuration in Centos6, which is very detailed and has certain reference value. Friends who are interested must finish it!

Detailed explanation of Centos6 Network configuration example

Foreword:

To implement a permanent custom IP or to change the DNS, you need to modify the configuration file, mainly by modifying the following configuration file

/ etc/sysconfig/network-scripts/ifcfg-ethX, where the X in ifcfg-ethX represents the number of network cards, which is usually the first, that is, ifcfg-eth0

The following is an explanation of the configuration project, which shows the configuration files for customized IP and DNS

DEVICE=eth0# network card device name TYPE=Ethernet# network card type UUID=06c04617-25d9-4a88-aab0-d8f0028f80ca# device UUID number ONBOOT=yes# whether to boot automatically whether NM_CONTROLLED=yes# is managed by NetworkManager BOOTPROTO=none# startup type {none | dhcp} DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME= "System eth0" # Network name HWADDR=08:00:27:E5:F9:B4 # MAC address IPADDR=192.168.1.140# Custom ip PREFIX=24# Subnet Mask GATEWAY=192.168.1.1# Gateway DNS1=192.168.1.1# Master DNS DOMAIN=114.114.114.114 LAST_CONNECT=1430925668 # Last connection time

When using DHCP to automatically assign IP, simply set the

BOOTPROTO=none

Change to

BOOTPROTO=dhcp

That's it.

After modification, run the following command to restart the network service

[root@git network-scripts] # / etc/init.d/network restart above are all the contents of the article "sample Analysis of Network configuration in Centos6". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report