Brick 2 Virtual Machine Network Configuration

Source: Internet
Author: User
Tags domain name server nameserver dns spoofing

Our lab is mainly for storage, and we will deal with storage for a lifetime. I suddenly think of how to store these blog spaces and other content?

Ii. Virtual Machine Network Configuration

To install a virtual machine, you never used to look at partition mounting. Alas, NC. Later, you need to look at it. Select the Bridge Mode for the network and install software development.

Three working modes:

Http://www.cnblogs.com/xiaochaohuashengmi/archive/2011/03/15/1985084.htmlvery well

A. bridged (bridging)

In this mode, the Virtual Operating System of VMware is like an independent host in the LAN, which can access any machine in the network. In the bridge mode, you need to manually configure the IP address and subnet mask for the virtual system, and also need to be in the same network segment as the host machine, so that the virtual system can communicate with the host machine. At the same time, because the virtual system is an independent host system in the LAN, You can manually configure its TCP/IP configuration information to access the Internet through the LAN gateway or router.

The relationship between a virtual system in the bridge mode and the host machine is like connecting two computers on the same hub. If you want them to communicate with each other, You need to configure the IP address and subnet mask for the virtual system. Otherwise, the communication will fail.

If you want to use VMware to create a virtual server in the LAN to provide network services for LAN users, you should select the bridge mode.

B. NAT (Network Address Translation)

The Nat mode enables the virtual system to use the NAT (Network Address Translation) function to access the public network through the network of the host machine. That is to say, you can use the NAT mode to access the Internet in a virtual system. In Nat mode, the TCP/IP configuration information of the virtual system is provided by the DHCP server of the vmnet8 (NAT) Virtual Network and cannot be modified manually, therefore, the virtual system cannot communicate with other real hosts in the local area network. The biggest advantage of using the NAT mode is that it is very easy for the virtual system to access the Internet. You don't need to configure anything else, just need the host machine to access the Internet.

In this mode, although the virtual machine and the real machine are not in the same network segment, when communicating with other hosts in the real network, the IP Address Header encapsulates the real machine IP address.

C. Host-only (only connected to the real machine)

In some special network debugging environments, you must isolate the real environment from the virtual environment. In this case, you can adopt the host-only mode. In host-only mode, all virtual systems can communicate with each other, but the virtual system and the real network are isolated.

Tip: in host-only mode, the virtual system and the host machine system can communicate with each other, equivalent to the two machines connected through twisted pair wires.

In host-only mode, the TCP/IP configuration information of the virtual system (such as the IP address, gateway address, and DNS server) is created by vmnet1 (host-only) DHCP servers in the virtual network are dynamically allocated.

If you want to use VMware to create a virtual system isolated from other machines in the network and perform some special network debugging, you can select the host-only mode.

Generally, if you want to change the host address to a static address or host name, you need to modify the following files:
/Etc/sysconfig/network-scripts/ifcfg-eth0 for specific Nic settings
/Etc/resolv. conf set DNS

/Etc/sysconfig/network set host name and Network Configuration
/Etc/hosts set the specified domain name resolution address

1. Modify the IP address

Modify the configuration file of the corresponding Nic IP Address

# Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Modify the following content

Device = eth0 # describe the device alias for the NIC, for example, it is eth0 in the ifcfg-eth0 File

Bootproto = none # Set the way for the NIC to obtain the IP address. The possible options are static, DHCP, or BOOTP, which respectively correspond to the IP address specified by the static state and the IP address obtained through the DHCP protocol, IP addresses obtained through the BOOTP protocol

Hwaddr = 00: 07: E9: 05: E8: B4 # physical address of the corresponding Nic

Ipaddr = 10.10.37.69 #

Ipv6init = No

Netmask = 255.255.255.0 # network mask corresponding to the network adapter

Gateway = 10.10.37.100 # gateway corresponding to the NIC

Onboot = yes # whether to set this network interface when the system starts. If it is set to yes, the device is activated when the system starts.

Type = "Ethernet"

UUID = "......"

2. Modify DNS

Modify the DNS configuration file of the corresponding Nic

# Vi/etc/resolv. conf

Modify the following content

Nameserver 10.10.1.2

Nameserver 8.8.8.8 # Google Domain Name Server

3. Modify the Gateway

Modify the gateway configuration file [root @ centos] # vi/etc/sysconfig/Network

Modify the following content

Networking = Yes (indicates whether the system uses the network, which is generally set to yes. If it is set to no, the network cannot be used, and many system service programs cannot be started)

Hostname = Zeng (set the Host Name of the local machine. The host name set here must correspond to the host name set in/etc/hosts)

Gateway = 10.10.1.2 (set the IP address of the gateway connected to the local machine. For example, the gateway is 10.0.0.2)

4. Restart the network configuration.

Service Network restart or/etc/init. d/network restart

Detailed source reference: http://www.jb51.net/LINUXjishu/66509.html

 

3. Read some shell

1. What is shell?

Shell refers to the software (command parser) that provides the user's interface, which receives user commands and then calls corresponding applications. It is also a programming language.

Shell is basically a command interpreter, similar to command.com in DOS. It receives user commands (such as LS) and then calls the corresponding application. The common shells include standard Bourne shell (SH) and c shell (CSH ).

There are two types: Interactive Shell and non-interactive shell. In non-interactive mode, shell does not interact with you, But reads commands stored in files and runs them. When it reads the end of the file, shell is terminated.

2. ssh, short for Secure Shell, is used for Logon. It is a security protocol created on the application layer and transport layer to provide a secure transmission and use environment for shell on the computer.

Traditional network service programs, such as FTP, pop, and telnet, are inherently insecure because they transmit data, user accounts, and user passwords in plaintext over the network, attackers are vulnerable to man-in-the-middle attacks. There is another person or a machine impersonating a Real Server to receive data from the user to the server, and then impersonating the user to pass the data to the Real Server.

SSH is a reliable protocol designed for remote logon sessions and other network services. The SSH protocol can effectively prevent information leakage during Remote Management. SSH can be used to encrypt all transmitted data and prevent DNS Spoofing and IP spoofing.

Another advantage of SSH is that the data transmitted can be compressed, so it can speed up transmission. SSH has many functions. It can replace telnet, provide a secure "channel" for FTP, pop, and even PPP ".

Refer to self-wiki.

 

 

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.