Static IP configuration record of openSUSE System in Virtual Machine

Source: Internet
Author: User

In a virtual machine, the openSUSE system uses static IP configuration records to connect to the host through NAT.

View VM ip status

View the current ip address range and gateway information.

 

In this way, you can obtain the gateway information and the ip address range that can be set.

Gateway: 192.168.141.2

Ip address range: 192.168.128-254

Use the following command to set the IP address

Linux-6v32:/etc/sysconfig/network # ifconfig eth0 192.168.141.201 netmask 255.255.255.0 up

Linux-6v32:/etc/sysconfig/network # route add default gw 192.168.141.2

Test whether the configuration is successful

Linux-6v32:/etc/sysconfig/network # ping www.baidu.com

PING www.a.shifen.com (115.239.210.26) 56 (84) bytes of data.

64 bytes from 115.239.210.26: icmp_req = 1 ttl = 128 time = 31.2 MS

64 bytes from 115.239.210.26: icmp_req = 2 ttl = 128 time = 35.6 MS

64 bytes from 115.239.210.26: icmp_req = 3 ttl = 128 time = 37.5 MS

Done

It seems so simple. It took my brother nearly a day to do a good job. In the process, I tried a variety of methods to set them. All of them ended in failure... But now we are still successful, and we will not accept the previous exploration.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.