VMware installation Redhat Configuring a static IP connection network

Source: Internet
Author: User

1. Virtual Machine Network Mode select NAT mode to ensure the local Host network connection is OK

2. View the local virtual machine segment: VMware Click Edit--Virtual network edit->DHCP settings to see their starting IP address as 192.168.252.128

3. Configure /etc/sysconfig/network-scripts/ifcfg-eno16777736

VI /etc/sysconfig/network-scripts/ifcfg-eno16777736

Type=ethernet
bootproto=static     #dhcp为动态获取IP改为静态static
Defroute=yes
ipv4_failure_fatal= No
Ipv6init=yes
Ipv6_autoconf=yes
Ipv6_defroute=yes
Ipv6_failure_fatal=no
name=eno16777736
Uuid=e0e76cb3-37ad-4814-b554-4b6904a27a86
device=eno16777736
Onboot=yes                           #启用自动网络连接
Peerdns=yes
Peerroutes=yes
Ipv6_peerdns=yes
Ipv6_peerroutes=yes
ipaddr0=192.168.252.128       #设置本地虚拟机IP
prefix0=24                             #设置子网掩码  
gateway0=192.168.252.2   ;     #设置网关
dns1=114.114.114.114           #设置DNS 8.8.8.8 is a Google DNS server that sometimes doesn't work well at home
DNS2 =8.8.4.4                           #设置备用DNS 8.8.4.4
HWA ddr=00:0c:29:a9:49:5f   #本地虚拟机虚拟mac地址

4.service Network Restart Restart the Web service, ifconfig command to see if the IP address you just configured

Verification: Ping www.baidu.com--can ping Baidu IP and cannot ping the same domain name is generally a DNS problem, set to 114.114.114.114.

VMware installation Redhat Configuring a static IP connection network

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.