当前位置:网站首页>/etc/sysconfig/network-scripts configure the network card
/etc/sysconfig/network-scripts configure the network card
2022-07-31 23:23:00 【larance】
Recently, I want to precipitate some scattered knowledge points,Let's sort it out according to my weird logic.
Links to this article:
DHCP(动态主机配置协议)是一个局域网的网络协议.指的是由服务器控制一段lP地址范围,客户机登录服务器时就可以自动获得服务器分配的lP地址和子网掩码.
DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)通常被应用在大型的局域网络环境中,主要作用是集中的管理、分配IP地址,使网络环境中的主机动态的获得IP地址、Gateway地址、DNS服务器地址等信息,并能够提升地址的使用率.
一些名词解释
DEVICE="eth1"
网卡名称
NM_CONTROLLED="yes"
network mamager的参数 ,是否可以由NNetwork Manager托管
HWADDR=
MAC地址
TYPE=Ethernet
类型
PREFIX=24
子网掩码24位
DEFROUTE=yes
就是default route,是否把这个eth设置为默认路由
ONBOOT=yes
设置为yes,开机自动启用网络连接
IPADDR=
IP地址
BOOTPROTO=none
设置为none禁止DHCP,设置为static启用静态IP地址,设置为dhcp开启DHCP服务
NETMASK=255.255.255.0
子网掩码
DNS1=8.8.8.8
第一个dns服务器
BROADCAST
广播
UUID
唯一标识
TYPE=Ethernet
网络类型为:Ethernet
BRIDGE=
设置桥接网卡
GATEWAY=
设置网关
DNS2=8.8.4.4 #
第二个dns服务器
IPV6INIT=no
禁止IPV6
USERCTL=no
是否允许非root用户控制该设备,设置为no,只能用root用户更改
NAME="System eth1"
这个就是个网络连接的名字
MASTER=bond1
指定主的名称
SLAVE
指定了该接口是一个接合界面的组件.
NETWORK
网络地址
ARPCHECK=yes
检测
PEERDNS
是否允许DHCP获得的DNS覆盖本地的DNS
PEERROUTES
是否从DHCP服务器获取用于定义接口的默认网关的信息的路由表条目
IPV6INIT
是否启用IPv6的接口.
IPV4_FAILURE_FATAL=yes
如果ipv4配置失败禁用设备
IPV6_FAILURE_FATAL=yes
如果ipv6配置失败禁用设备
Next is the problem encountered at work:网卡配置

Join to say that we have newly added a network card eth1
1. cp ifcfg-eth0 ifcfg-eth1 Copy the original network card first
2. vi ifcfg-eth1 再参考 eth0 编辑 eth1 的配置
3. ifdown eht1
4. ifup eht1
5. systemctl restart network
6. ethtool eth1 See if it's actually connected
7. 也可以 ip addr 或者 ifconfig Name it to see if it is connected

边栏推荐
猜你喜欢

一款国外开发的高质量WordPress下载站模板主题

Shell common script: Nexus batch upload local warehouse script

网易云信圈组上线实时互动频道,「破冰」弱关系社交

In Golang go-redis cluster mode, new connections are constantly created, and the problem of decreased efficiency is solved

Unity - by casting and cloning method dynamic control under various UGUI create and display

Bionic caterpillar robot source code

景区手绘地图的绘制流程

【Acwing】第62场周赛 题解

Advanced Algebra _ Proof _ Any matrix is similar to an upper triangular matrix

How to reduce the gap between software design and implementation
随机推荐
面试突击69:TCP 可靠吗?为什么?
The article you worked so hard to write may not be your original
Judging decimal points and rounding of decimal operations in Golang
二叉树非递归遍历
输入输出优化
【1161. 最大层内元素和】
/usr/local/bin和/usr/bin的区别
Unity - by casting and cloning method dynamic control under various UGUI create and display
Shell常用脚本:Nexus批量上传本地仓库脚本
Niuke.com brush questions (1)
Program processes and threads (concurrency and parallelism of threads) and basic creation and use of threads
In Golang go-redis cluster mode, new connections are constantly created, and the problem of decreased efficiency is solved
Unity-LineRenderer显示一条线
「SDOI2016」征途 题解
对象缓存服务的思考和实现
C# Rectangle基本用法和图片切割
【Acwing】The 62nd Weekly Game Solution
(26) About menu of the top menu of Blender source code analysis
浏览器下载快捷方式到桌面(PWA)
一文带你了解 Grafana 最新开源项目 Mimir 的前世今生