Configuration of Centos 7 network and SSH in virtual machines

Source: Internet
Author: User

I. Configuration of the network

1. View MAC Address: The command to view IP information in Centos 7 has changed.

IP addr

2. Modify the network configuration to open the VM virtual machine's network settings.

The above information is counted:

IP address in: 192.168.222.128 to 192.168.222.254 choose one.

Subnet Mask: 255.255.255.0

Gateway 192.168.10.2

Broadcast address: 192.168.10.255

DNS 8.8.8.8

(2) Start to modify the network configuration file

cd/etc/sysconfig/network-scripts/ls

See if there's ifcfg-eno16777736 or something like that.

If you have this file, start editing the content.

Modify or add code

bootproto="Static"#获取IP的方式 as static ipaddr="192.168.10.128"#在地址池中选定IP之后写在这里NETMASK="255.255.255.0"#子网掩码GATEWAY="192.168.10.2"#网关BROADCAST=192.168.10.255#子网广播地址DNS1="8.8.8.8"#DNS # Other Basics do not need to be modified.

The configuration is now basically complete.

(3) Restart Network Service

Systemctl Restart Network.service

Try Ping www.baidu.com.

Centos 7 comes with an SSH service, so this machine directly connects to the IP you set by using the putty directly to use the default port of 22

Eg: My IP is: 192.168.10.128

It's done.

Configuration of Centos 7 network and SSH in virtual machines

Related Article

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.