当前位置:网站首页>VM virtual machine configuration dynamic IP and static IP access
VM virtual machine configuration dynamic IP and static IP access
2022-07-01 12:49:00 【51CTO】
VM Virtual machine configuration is dynamic ip And static ip visit
dynamic ip static state ip Configure the network adapters to NAT Pattern 
dynamic ip To configure
This is simpler .
Set up /etc/sysconfig/network-scripts/ A file in a directory ifcfg-ens33
The configuration file is as follows
then Virtual Network Editor Lower setup NAT Network check this item to use dynamic IP 了 
Set dynamic ip Range :
🥭 static state ip To configure
View our PC Default gateway of wireless network ( View by : Set up -》 View network properties ) How much is the , The virtual machine IP And gateway settings must be consistent with PC Wireless network gateway can realize communication in the same network segment 
In practical use, static IP, If the DHCP To automatically get IP Words As long as the network is disconnected WM Will regain the current IP Next IP, So it must be changed to static to prevent this embarrassing situation 0.0
static state ip The configuration file ifcfg-ens33 as follows
Follow the dynamic ip The difference is that
BOOTPROTO=static It's static IP The way ,
DNS1 Set to 114.114.114.114 Universal DNS
IPADDR static state ip Address
NETMASK Subnet mask
GATEWAY gateway
Be careful ip Set it to be in the same section as the gateway and subnet , At the same time, the subnet mask configuration file should also be consistent with the configuration .
If the gateway is set as the host, it is still ping No access to external network and host , Set the last bit of the gateway to .2, Such as :192.168.2.2

then Virtual Network Editor Lower setup NAT Network remember Don't check 
Remember to restart the network card configuration after configuration systemctl restart network.service
Set domain name resolution
Set static ip, Access to the Internet , But to perform ping www.baidu.com no , At this time, you need to configure domain name resolution vi /etc/resolv.conf
This is the end of this article ,
If you have any harvest, you are welcome to like, collect and pay attention to ️, Your encouragement is my biggest motivation .
If you have any wrong questions, you are welcome to point out .
Home page : Share a cup of no blog summaryKeep loving , Go to the next mountain and sea .

边栏推荐
- R language uses conf of yardstick package_ The mat function calculates the confusion matrix of the multiclass model on each fold of each cross validation (or resampling), and uses the summary to outpu
- leetcode:241. 为运算表达式设计优先级【dfs + eval】
- 硬阈值(Hard Thresholding)函数解读[通俗易懂]
- GID:旷视提出全方位的检测模型知识蒸馏 | CVPR 2021
- 手把手教你完成图像分类实战——基于卷积神经网络的图像识别
- Tencent security and KPMG released a regulatory technology white paper to analyze the "3+3" hot application scenarios
- Scene function of wooden frame
- flinkcdc要实时抽取oracle,对oracle要配置什么东西?
- Will it affect the original MySQL database to read the data of a MySQL table in full by flick MySQL CDC
- R language builds a binary classification model based on H2O package: using H2O GBM build gradient hoist model GBM, use H2O AUC value of AUC calculation model
猜你喜欢

我花上万学带货:3天赚3元,成交靠刷单

Fundamentals of number theory and its code implementation

晓看天色暮看云,美图欣赏

79. 单词搜索【dfs + 回溯visit + 遍历起点】
![[today in history] July 1: the father of time sharing system was born; Alipay launched barcode payment; The first TV advertisement in the world](/img/41/76687ea13e1722654b235f2cfa66ce.png)
[today in history] July 1: the father of time sharing system was born; Alipay launched barcode payment; The first TV advertisement in the world

Operator-1初识Operator

我选的热门专业,四年后成了“天坑”

Operations related to sequence table

MHA high availability cluster deployment and failover of database

【开发大杀器】之Idea
随机推荐
[brain opening] west tide and going to the world series
mysql统计账单信息(下):数据导入及查询
R language builds a binary classification model based on H2O package: using H2O GBM build gradient hoist model GBM, use H2O AUC value of AUC calculation model
手机便签应用
有没有大佬 遇到过flink监控postgresql数据库, 检查点无法使用的问题
Which securities company has a low, safe and reliable account opening commission
VM虚拟机配置动态ip和静态ip访问
Shell script imports stored procedures into the database
从数据库中更新一条数据,用cdc会同时获得op字段分别为d和c的两条数据吗?我记得之前是只有op为u
Exploration and practice of inress in kubernetes
Flinkcdc should extract Oracle in real time. What should be configured for oracle?
79. 单词搜索【dfs + 回溯visit + 遍历起点】
MHA high availability cluster deployment and failover of database
PG基础篇--逻辑结构管理(触发器)
Redis exploration: cache breakdown, cache avalanche, cache penetration
王兴的无限游戏迎来“终极”一战
强大、好用、适合程序员/软件开发者的专业编辑器/笔记软件综合评测和全面推荐
Digital signal processing -- Design of linear phase (Ⅱ, Ⅳ) FIR filter (2)
79. Word search [DFS + backtracking visit + traversal starting point]
ASP. Net core 6 from entry to enterprise level practical development application technology summary