Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure static IP

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

I have written about how to configure dynamic IP, which is relatively simple compared with static ip, but it is dynamic after all. Every time the virtual machine is restarted, the ip address will change, which is very troublesome for the later cluster architecture. Then I'll tell you how to configure static ip.

I don't deserve the picture here. I'll try to describe it in detail.

First of all: vi / etc/sysconfig/network-scripts/ifcfg-eth0 (after entering, I edit the file and press Esc and then press: enter wq to exit)

Change the ONBOOT=yes in the file to ONBOOT=no to indicate self-startup.

If you see UUID in this file, delete it

You can change the BOOTPROTO in the file to none or static

Add DNS1=202.106.0.2 DNS2=8.8.8.8 to this file

And add IPADDR=192.168.*.* GATEWAT=192.168.*.* NETMASK=255.255.255.0 (note here that the gateway is the same as that on the physical machine, that is, the laptop. Click on the network connection at the lower right of the notebook, click Open Network and sharing Center, then click the connection network of access type, then go to the network connection status interface, and then click the details, you can see the ip address and gateway of the physical machine, write the gateway address to the file of the virtual machine, and add or subtract one ip to the virtual machine.)

Second: restart the network

/ etc/init.d/network resatrt or service network restart or ifdown eth* & & ifup eth*

Finally: exit the virtual machine from the full screen, you can see that there are two computers overlapping signs in the lower right corner of the virtual machine, enter the settings, click the network adapter, and change it to bridge. And close

There is an edit box in the VM software edit bar, open the virtual network editor VMnet bridging mode do not automatically, select the one with wirelee network and make sure that at least the static ip configuration is over.

Disclaimer: this static configuration is in the state of wireless connection, if you have a limited connection, in the final stage, just change the bridge to NAT mode.

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.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report