当前位置:网站首页>/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

边栏推荐
猜你喜欢

How to reduce the gap between software design and implementation

2022-07-31:给出一个有n个点,m条有向边的图, 你可以施展魔法,把有向边,变成无向边, 比如A到B的有向边,权重为7。施展魔法之后,A和B通过该边到达彼此的代价都是7。 求,允许施展一次魔法

【ACM】2022.7.31训练赛

IDA PRO中汇编结构体识别

《ArchSummit:时代的呐喊,技术人听得到》

UOS - WindTerm use

Shell common script: Nexus batch upload local warehouse script

Interview assault 69: TCP reliable?Why is that?
SQL27 View user details of different age groups

Advanced Algebra _ Proof _ Any matrix is similar to an upper triangular matrix
随机推荐
[QNX Hypervisor 2.2 User Manual]9.14 set
A high-quality WordPress download site template theme developed abroad
周总结
Difference Between Stateless and Stateful
ICML2022 | 深入研究置换敏感的图神经网络
SQL injection Less38 (stack injection)
Fixed-length usage of nanopb string type based on RT1052 Aworks (27)
【云驻共创】【HCSD大咖直播】亲授大厂面试秘诀
[QNX Hypervisor 2.2 User Manual]9.16 system
(26)Blender源码分析之顶层菜单的关于菜单
SQL注入 Less42(POST型堆叠注入)
2022年CSP-J1 CSP-S1 第1轮初赛 报名指南
支付模块实现
如何减少软件设计和实现之间鸿沟
逐步手撕轮播图3(保姆级教程)
What is customer profile management?
The latest masterpiece!Alibaba just released the interview reference guide (Taishan version), I just brushed it for 29 days
SQL注入 Less38(堆叠注入)
Document management and tools in the development process
/etc/sysconfig/network-scripts 配置网卡