Addressing the connectivity of Linux virtual machines to real-world machines

Source: Internet
Author: User
Tags uuid

I just ran into it and recorded it.

1. View IP Address
After the virtual machine is installed, view the IP address

2. Modify IP address configuration
Open Onboot Service

3. Restart the network card, check the IP address
Service Network restart
Ifconfig

4. Nat mode for Internet and access
Note: Now the Internet mode is NAT mode, you can see even if the virtual machine and the real machine is not the same network segment, but still able to access the Internet and access


5. Bridging mode for Internet and access
Note that the NAT mode is set to bridge mode, it is necessary to restart the network card service, this time to realize the Internet and access, here and Nat is different, the bridge mode gets the IP address is the real machine network IP address, if the real machine network address is not enough, it is easy to cause IP address conflict, Which makes it impossible for others to use the Internet.


6. Manually configure the IP address
Turn off the DHCP service, change the BOOTPROTO=DHCP to BOOTPROTO=DHCP, add the IP address manually, after modification, you must remember to save and restart the network card service

7. New session via SECURECRT


Hostname is the IP address of the virtual host, the SSH protocol default port 22, the user name provides the system login access account, here is the root of the virtual machine user root, can also be other users

Identification name, can be modified

8. Access the Linux system using the SSH protocol

The first login requires a password, which can be saved if needed

Login interface

9. Modify attribute Information

Modify the font size, the length of the flashing cursor, and the color

Modify font color, background color


Modified Font Interface

10, log information logging settings
Here need to modify the saved text code, or it will produce garbled, here I did not fix it, the late improvement

This is the log information of the record, each step of the operation is recorded

SSH2 Connection Summary

Environment:
1.
PC----Tp-link----GW (external network)

2.
Automatic PC Address acquisition

3.
Installing VMware Workstations 10.0

4.
VMnet1 VMnet8 No Tube

5.
Network connection: Bridging mode

6.
Ensure that the virtual machine can automatically obtain the IP address

Test network connectivity
1. Check the IP address acquired by the PC's local host, for example: ipconfig view IP address 192.168.1.100

2. View the IP address of the virtual machine as an example of centos6.5 virtual machine, for example: Ifconfig view IP Address
Ip=192.168.1.101

3. Ping the local host for the virtual machine
Ping 192.168.1.100

If you can ping the network connectivity is not a problem, if there is a problem, you need to check the IP address configuration of the virtual machine

4. Turn on the Onboot service to enable the network to work properly
Device=eth0
Hwaddr=00:0c:29:90:0c:b1
Type=ethernet
Uuid=d1155066-226b-47d3-a0fc-2de1c9bb05dd
Onboot=on
Nm_controlled=yes
Bootproto=dhcp

5. Configuring a static IP address
Vim/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0
Hwaddr=00:0c:29:90:0c:b1
Type=ethernet
Uuid=d1155066-226b-47d3-a0fc-2de1c9bb05dd
Onboot=on
Nm_controlled=yes
Bootproto=none
Ipaddr=192.168.1.101
netmask=255.255.255.0

ESC--->WQ

Service Network restart

Whether it is NAT Internet mode or bridge Internet mode, ensure that the real machine and the virtual machine can each other normal access is OK, this time can guarantee the configuration SSH2 service success

Addressing the connectivity of Linux virtual machines to real-world machines

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.