In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces you how to set static ip in centOS7 bridge mode, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Choose the bridging mode for the virtual machine.
1. In the editor-virtual network editor, open the editor, as shown in the following two figures, select VMnet0, select bridge in the following type, that is, bridge, do not select automatic (automatic) for the network card, manually select the actual network card name of your current host, and then click apply to OK.
Note that the default setting of the virtual machine is automatic bridging, notebooks generally have 2 network cards, be sure to bridge to the network card that is now on the Internet, in order to avoid errors!
How to check the network card that is surfing the Internet? -- check the adapter settings of your computer and find the network card.
two。 Select the bridging mode (custom VMnet0) for the virtual machine, and determine.
Set the static ip manually in the virtual machine
Check the ip address of Linux first.
CentOS6 command: ifconfig
CentOS7 command: ip addr
Remember: record the name of the network card. This machine is ens33.
Take another look at the ip of the host window
Win+R-cmd-ipconfig/all
Native ip:192.168.3.9
Step 1: enter the terminal / etc/sysconfig/network-scripts/ directory
Step 2: modify the ifcfg-eth (xxx) file
Vim ifcfg-eth0
The ifcfg-ens33 of ps:centOS7 is the same as just recorded.
If you see that the name of the network card device in your linux distribution is not the same as mine, this is too normal, do not ask why, change, change is hope! (-), I'm just talking about CentOS, the distribution version of linux. I didn't say it was Ubuntu. Why did you say CentOS? We all know that RedHat is the most commonly used distribution of linux in enterprise applications, but there is a charge for RedHat. Why? This is a good service! Smaller companies probably use CentOS the most, so why use CentOS? This is because RedHat has acquired CentOS, and CentOS is now called the community version. In terms of doing services, RedHat first puts the services on the community version of CentOS. Through community feedback, when the technology is mature enough, new technologies or services will be added to RedHat, so using CentOS is actually indirectly using RadHat! This is what it looks like. Of course, you can go to Baidu to learn about it, not to mention letting you Google. It is really inadequate to surf the Internet in heaven, as long as you know it! Ha ha.
Press I to edit the file insert appears at the bottom of the command is ready for editing
The attributes that need to be modified are:
Replace ONBOOT=YES # no with yesBOOTPROTO=static # dhcp and add static: IPADDR=192.168.230.129 # static ip address is the same as the first three digits of IP in the host, and the last bit needs to be modified. Do not cause conflicts like host ip. GATEWAY=192.168.230.1 # default gateway is the same as physical host. NETMASK=255.255.255.0 # subnet mask is the same as physical host. DNS1=8.8.8.8 # DNS Just write the Google address.
Specific explanation
TYPE=Ethernet # Network card type: Ethernet proxy _ METHOD=none # proxy: closed status BROWSER_ONLY=no # just browser: no BOOTPROTO=dhcp # booting protocol of network card: DHCP [Chinese name: dynamic host configuration protocol] DEFROUTE=yes # default route: yes If you don't understand, Baidu keyword `default route` IPV4_FAILURE_FATAL=no # does not enable IPV4 fatal error detection: no IPV6INIT=yes # whether IPV6 initializes automatically: yes [there will be no impact, IPV6 is not used yet] whether IPV6_AUTOCONF=yes # IPV6 is automatically configured: yes [there will be no impact, no IPV6 is used yet] whether IPV6_DEFROUTE=yes # IPV6 can be a default route: yes [there will be no effect. IPV6 is not yet used] IPV6_FAILURE_FATAL=no # does not enable IPV6 fatal error detection: no IPV6_ADDR_GEN_MODE=stable-privacy # IPV6 address generation model: stable-privacy [this is only one strategy for generating IPV6] NAME=ens33 # network card physical device name UUID=f47bde51-fa78-4f79-b68f-d5dd90cfc698 # uses a unique identifier, which can be used for every network card and cannot be repeated. No, only one network card of two linux is available. The device name of DEVICE=ens33 # network card must be the same as the value of `NAME`. Whether ONBOOT=no # starts up or not. If you want to start the network card or control the network card through `systemctl restart network`, it must be set to `yes`
After setting up, press ESC to exit editing, then press shift+Z + Z to save and exit.
Restart network services
Service network restart
Fourth, test effect
Enter the command ping www.baidu.com (test external network)
Enter the command ping 192.168.2.153 (host ip)
The following message indicates success.
Fill in the picture summary (optional)
On how to set static ip in centOS7 bridge mode to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.