Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ CentOS 6.5 three ways to configure the IP address     - MySQL dual master configuration (Database)

- rsync server set up (Server)

- CentOS yum source deployment (Linux)

- Spark and Hadoop comparison (Server)

- Java Cookie Comments (Programming)

- The practical application of Oracle synonyms + dblink (Database)

- JDK comes with tools JPS (Linux)

- Linux, security encryption to transfer files between machines (Linux)

- Two strokes to improve development productivity Struts2 (Programming)

- How to Install Xombrero 1.6.4 (minimalist Web browser) on Ubuntu and Archlinux (Linux)

- Linux IO redirection (Linux)

- C # mobile side and PC-side data exchange (Database)

- To install Jetty server configuration in detail (Server)

- How to compare PDF files on Ubuntu (Linux)

- To install Docker under Ubuntu 15.04 (Linux)

- MySQL Error Code Complete (Database)

- mydumper installation error process (Database)

- How to modify the Ubuntu terminal user name changed to red color (Linux)

- A command to install Sublime Text 3 on Manjaro / Archlinux (Linux)

- dd command: do hard disk IO performance test (Linux)

 
         
  CentOS 6.5 three ways to configure the IP address
     
  Add Date : 2018-11-21      
         
         
         
  Experimental Software Environment: Virtual Machine VMware Workstation10.0, CentOS 6.5 32-bit client Windows 7

1, automatically obtain IP address
Virtual machines using bridged mode, the equivalent of a physical machine connected to the network, the physical machine network DHCP server automatically assigns IP addresses.
#dhclient automatically obtain ip address command
#ifconfig card information inquiry system, ip address, MAC address
 
After assigned to ip address, physical machines ping ip address to check whether the ping.
 
2, manually set ip address
If the virtual machine does not automatically obtain IP, only manual configuration, configuration is as follows:
Enter the command
#vi / etc / sysconfig / network-scripts / ifcfg-eth0

NIC configuration file editing

After entering the above command carriage return, open the configuration file, use the arrow keys to move the cursor to the last line, press the letter key "O", enter edit mode, enter the following:
IPADDR = 192.168.4.10
NETMASK = 255.255.255.0
GATEWAY = 192.168.4.1
Also move the cursor to "ONBOOT = no" line, change to ONBOOT = yes
"BOOTPROTO = dhcp", change the BOOTPROTO = none
When finished, click the top left corner of the keyboard ESC key, enter: wq can be seen in the bottom left of the screen, press enter to save the configuration file.

After the need to restart the network service, the command is
#service network restart

After restarting the network, eth0 the ip to become effective, use the command # ifconfigeth0 View
Next, test the configured IP to ping in the physical machine using the shortcut keys WINDOWS + R to open the Run box, enter the command cmd, enter ping 192.168.4.10 is detected, the ping Description IP is configured correctly.
 
Note: Our physical machine where the network segment 192.168.4.0 network segment. When we do the experiment according to their own environment settings, maintaining virtual and physical machines in the same segment.

3, using NAT mode
Virtual machine network connection using NAT mode, the physical network connection Vmnet8.

Inside the virtual machine settings - network adapters, network connectivity options NAT mode.
Virtual Machine menu bar - Edit - Virtual Network Editor, select Vmnet8 NAT mode,

1. In the bottom of the set ip subnet to subnet mask 255.255.255.0 192.168.20.0
2. NAT is set up inside the gateway IP 192.168.20.2
3. Use local DHCP service to assign IP addresses to the virtual machine is not checked

After setting Click Apply to exit.

Physical network connection VMNet8 manually set ip address 192.168.20.1 subnet mask of 255.255.255.0
Gateway and DNS addresses 192.168.20.2 (ie, virtual machine NAT gateway address)
 
Edit linux network card eth0 configuration file
#vi / etc / sysconfig / network-scripts / ifcfg-eth0

After entering the above command carriage return, open the configuration file, use the arrow keys to move the cursor to the last line, press the letter key "O", enter edit mode, enter the following:
IPADDR = 192.168.20.3
NETMASK = 255.255.255.0
GATEWAY = 192.168.20.2
Also move the cursor to "ONBOOT = no" line, change to ONBOOT = yes
"BOOTPROTO = dhcp", change the BOOTPROTO = none
When finished, click the top left corner of the keyboard ESC key, enter: wq can be seen in the bottom left of the screen, press enter to save the configuration file.
 
DNS address settings, run the command
#vi /etc/resolv.conf

Move the cursor to an empty line, press the "O" key, enter the nameserver 192.168.20.2 exit press the ESC key, enter: wq Enter to save the configuration file.
Network Service Restart
#service network restart

After the restart
#ifconfig

Check configure ip address, physical address ping test whether this can pass.
     
         
         
         
  More:      
 
- C ++ inline functions (Programming)
- Oracle Client + PL SQL Developer enables remote access to the Oracle database (Database)
- Linux with Windows Explorer as a security system (Linux)
- Configuration OpenOCD + FT2232 under Ubuntu (Linux)
- MySQL fuzzy query: LIKE and REGEXP pattern mode (Database)
- Use PDFBox parse PDF file (Linux)
- Netcat Example (Linux)
- HAProxy performance under high concurrency (Server)
- Fragment Android developers learning to resolve (Programming)
- Use SocketServer write a sockets program (Programming)
- MySQL Installation Troubleshooting (Database)
- Linux command to view the system status (Linux)
- Ubuntu installed racing game Speed Dreams 2.1 (Linux)
- Shared directory settings between Linux and Linux (Linux)
- Supervisor Installation and Configuration (Server)
- CentOS7 management of systemd (Linux)
- Command-line based tools for better alternatives (Linux)
- Correlation Analysis: FP-Growth algorithm (Programming)
- Diagnose and resolve the SSH connection slow (Linux)
- Ubuntu terminal command - see the port occupied and off (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.