1. Before configuring the IP address, first use ifconfig to view the network card information and obtain the name of the network card 2. Enter the network card configuration directory cd /etc/sysconfig/network-scripts/, find the configuration file ifcfg-em2 3. Modify ifcfg-em2 as follows: TYPE="Ethernet" # Network type, no need to change, the default is Ethernet, meaning Ethernet PROXY_METHOD="none" # Proxy mode: closed BROWSER_ONLY="no" # Just browser: no BOOTPROTO="none" # Boot protocol for network card: DHCP [Chinese name: Dynamic Host Configuration Protocol] DEFROUTE="yes" # Default route: yesIPV4_FAILURE_FATAL="yes" # Disable IPV4 fatal error detection: noIPV6INIT="yes" # Whether IPV6 is automatically initialized: yesIPV6_AUTOCONF="yes" # Whether IPV6 is automatically configured: yesIPV6_DEFROUTE="yes" # Can IPV6 be the default route: yesIPV6_FAILURE_FATAL="no" # Disable IPV6 fatal error detection: noIPV6_ADDR_GEN_MODE="stable-privacy" # IPV6 address generation model: stable-privacy NAME="em2" # Network card physical device name UUID="b9cf0ca7-ddc9-4c55-9cea-ce04919f6514" # Universal unique identifier, each network card will have, can not be repeated, otherwise two Linux only one network card can be used DEVICE="em2" # Network card device name, must be the same as the `NAME` value ONBOOT="yes" # Whether to start the network card at boot, if you want the network card to start at boot or control the network card through `systemctl restart network` IPADDR="172.20.41.96" # IP address PREFIX="24" # Configure subnet mask GATEWAY="172.20.41.65" # Gateway DNS1="202.96.209.133" # DNS IPV6_PRIVACY="no" 4. Restart the network card after the modification is completed systemctl restart network The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of the pitfalls of MySQL 8.0
>>: Detailed explanation of the use of Teleport in Vue3
Table of contents What is ref How to use ref Plac...
Mainly used knowledge points: •css3 3d transforma...
Standalone hbase, let’s talk about it first. Inst...
Table of contents 1. What is the execution contex...
Table of contents Storage Engine Memory Managemen...
This article shares the specific code of js to ac...
How to achieve internationalization in React? The...
The <base> tag specifies the default address...
1. Function: xargs can convert the data separated...
cause The way to import external files into a min...
Table of contents Preface Implementation ideas Im...
ReactRouter implementation ReactRouter is the cor...
Preface In MySQL, multi-table join query is a ver...
This article mainly introduces the sample code of...
Event loop in js Because JavaScript is single-thr...