VMware centOS7 Configuring static IP

Source: Internet
Author: User
Tags svn

1. Demand scenario:

An SVN is deployed on the centOS7, because CentOS7 is DHCP by default, so the IP will change every time, and SVN requires that the IP is immutable, otherwise it cannot be synchronized.

Online to find a blog reference: http://www.cnblogs.com/Leo_wl/p/5484136.html

2. Configure the network connection file under/etc/sysconfig/network-scripts/to:

Type="Ethernet"Bootproto="Static"Defroute="Yes"Peerdns="Yes"peerroutes="Yes"Ipv4_failure_fatal="No"Ipv6init="Yes"ipv6_autoconf="Yes"Ipv6_defroute="Yes"Ipv6_peerdns="Yes"ipv6_peerroutes="Yes"Ipv6_failure_fatal="No"NAME="eno16777736"UUID="440BDF0C-7E86-4586-B6B9-902A2E7B6CDA"DEVICE="eno16777736"Onboot="Yes"ipaddr="192.168.178.133the #静态 IPGATEWAY="192.168.1.1"NETMASK="255.255.255.0"DNS1="192.168.1.1"# Home of the telco router IP#HWADDR="00-50-56-c0-00-01"

3. Service network Restart performs the Network Service restart command, but the display fails:

 for  for details.

Find the problem based on the tips above, but no valuable information is found

4. Baidu This issue, http://tieba.baidu.com/p/3233996339 get advice

Recommendation I. Modify the way VMware network is connected, changed from NET mode (shared host mode) to bridged mode,

The service network restart boot was successful after the change. However, the address is automatically assigned

Recommendation Two. Copy the network connection file, ifcfg-eno16777736 to the new file Ifcfg-eth0

[Email protected]/etc/sysconfig/network-scripts # CP ifcfg-eno16777736 ifcfg-eth0[email protected]-xiluhua/ etc/sysconfig/network-Scripts # Service Network Restartrestarting Network (via Systemctl):                        [  OK  ] 

5. Again IP addr view, see Ethernet card eno16777736 below there are two IP, 134 and 133

[Email protected]/etc/sysconfig/network-Scripts # IP Addr1: Lo: <LOOPBACK,UP,LOWER_UP> MTU65536qdisc noqueue State UNKNOWN Link/loopbackxx:xx:xx:xx:xx:xxBrdxx:xx:xx:xx:xx:xxinet127.0.0.1/8Scope host lo valid_lft forever Preferred_lft Forever Inet6::1/ -Scope host Valid_lft forever Preferred_lft forever2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU theQdisc Pfifo_fast State up Qlen +Link/etherxx: 0c: in: a4:5f:1e BRD ff:ff:ff:ff:ff:ff inet192.168.178.134/ -Brd192.168.178.255ScopeGlobal Dynamic eno16777736 valid_lft 1798sec preferred_lft 1798sec inet192.168.178.133/ -Brd192.168.178.255Scope Global Secondarye no16777736 valid_lft forever Preferred_lft Forever3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> MTU theQdisc noqueue State down link/ether the: Wu:xx: c4:9c:8b BRD ff:ff:ff:ff:ff:ff inet192.168.122.1/ -Brd192.168.122.255ScopeGlobalvirbr0 Valid_lft Forever Preferred_lft Forever4: virbr0-nic: <BROADCAST,MULTICAST> MTU theQdisc pfifo_fast Master virbr0 State down Qlen -Link/ether the: Wu:xx: c4:9c:8b BRD FF:FF:FF:FF:FF:FF

6. Ping www.baidu.com Success

[Email protected]/etc/sysconfig/network-Scripts # ping Www.baidu.comPING www.a.shifen.com (115.239.211.112) About( -) bytes of data. -bytes fromWww.baidu.com (115.239.211.112): icmp_seq=1Ttl= -Time=8.04Ms -bytes from 115.239.211.112: icmp_seq=2Ttl= -Time=7.99Ms -bytes from 115.239.211.112: icmp_seq=3Ttl= -Time=8.50Ms -bytes from 115.239.211.112: icmp_seq=4Ttl= -Time=8.00Ms -bytes from 115.239.211.112: icmp_seq=5Ttl= -Time=7.89Ms

7. Windows

C:\users\administrator>ping192.168.178.133is pinging192.168.178.133Has +bytes of data: from192.168.178.133The reply: byte = +Time <1ms ttl= -from192.168.178.133The reply: byte = +Time <1ms ttl= -from192.168.178.133The reply: byte = +Time <1ms ttl= -

The configuration was successful.

The key step is the 4th step, recommendation two.

VMware centOS7 Configuring static IP

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.