当前位置:网站首页>/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
边栏推荐
- 博弈论(Depu)与孙子兵法(42/100)
- Unity - LineRenderer show a line
- 逐步手撕轮播图3(保姆级教程)
- 编译型语言和解释型语言的区别
- 2022年CSP-J1 CSP-S1 第1轮初赛 报名指南
- #yyds dry goods inventory# Interview must brush TOP101: the entry node of the ring in the linked list
- 编程语言是什么
- SQL injection Less38 (stack injection)
- 「SDOI2016」征途 题解
- 程序进程和线程(线程的并发与并行)以及线程的基本创建和使用
猜你喜欢
消息队列消息存储设计(架构实战营 模块八作业)
Program processes and threads (concurrency and parallelism of threads) and basic creation and use of threads
Shell common script: Nexus batch upload local warehouse script
【Acwing】第62场周赛 题解
C#中引用类型的变量做为参数在方法调用时加不加 ref 关键字的不同之处
In Golang go-redis cluster mode, new connections are constantly created, and the problem of decreased efficiency is solved
逐步手撕轮播图3(保姆级教程)
网络安全--通过握手包破解WiFi(详细教程)
SVN服务器搭建+SVN客户端+TeamCity集成环境搭建+VS2019开发
硬件设备计算存储及数据交互杂谈
随机推荐
NgRx 里 first 和 take(1) 操作符的区别
一文概述:VPN的基本模型及业务类型
LeetCode 第 304 场周赛
Network security - crack WiFi through handshake packets (detailed tutorial)
一文带你了解 Grafana 最新开源项目 Mimir 的前世今生
【Acwing】第62场周赛 题解
网络安全--通过握手包破解WiFi(详细教程)
嵌入式开发没有激情了,正常吗?
MLP神经网络,GRNN神经网络,SVM神经网络以及深度学习神经网络对比识别人体健康非健康数据
IPD流程专业术语
SQL injection Less42 (POST type stack injection)
TypeScript 的组件
Document management and tools in the development process
《ArchSummit:时代的呐喊,技术人听得到》
/etc/sysconfig/network-scripts 配置网卡
C# Rectangle basic usage and picture cutting
Design of Fire and Anti-theft System Based on Single Chip GSM
/usr/local/bin和/usr/bin的区别
字符编码和浮点型计算精度丢失问题
Drawing process of hand-drawn map of scenic spots