Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux NIC configuration     - Tmux create the perfect terminal management tool under CentOS (Linux)

- MySQL restart process can not be taken lightly (Database)

- innodb storage engine backup tool --Xtrabackup (Database)

- Necessity in Java packages (Programming)

- Linux file content inspection - cat, tac, no, more, less, head, tail, od (Linux)

- CentOS 6.5_x64 install Oracle 11g R2 (Database)

- 30 Practical Linux system administrators will learn the command (Linux)

- Kali Linux resolve GPG error KEYEXPIRED 1425567400 (Linux)

- Use Swift remove the spaces in the string (Programming)

- Learn to read the source code of vmstat (Linux)

- Linux System Getting Started Learning: From VirtualBox from the client host access NAT (Linux)

- Encounter ORA-00600: internal error code, arguments: [4194] ORA-1552 (Database)

- How to upgrade the kernel to 3.13.7 on Ubuntu / Linux Mint (Linux)

- Oracle Linux 7.1 install Oracle 12C RAC (Database)

- HttpClient Tutorial (Programming)

- The new features of MySQL 5.7 Generated Column (index function) (Database)

- To resolve Ubuntu 14.04 Unity Desktop Environment Login freeze problem (Linux)

- Oracle Database High-Risk Vulnerability Warning (Database)

- Android Unzip the ZIP / GZIP data (based on the InflaterInputStream implementation) (Programming)

- Depth Java Singleton (Programming)

 
         
  Linux NIC configuration
     
  Add Date : 2018-11-21      
         
         
         
  Linux System version: CentOS 6.5

Linux System version: CentOS 7

Earlier, we use remote tools SecureCRT, to linux with the IP address (refer to himself: SecureCRT telnet management tools used) by "ifconfig eth0 + specific ip address" command, but the problem is that such a configuration:

It takes effect only temporarily, once restarted, the configuration;
Only the ip address and subnet mask can be connected to the network it is unable to connect to external networks.
If you want to connect to external networks, ip address, subnet mask, gateway, DNS indispensable. Today, in terms of how to CentOS with a real ip, and after set up, through the use of SecureCRT software, within the same local area network to another computer Win7 system can also remotely access Linux on this computer up. There are many ways, the following two methods are the bridge mode I use in a virtual machine. If you installed the dual system, the configuration method is the same. Taking into account the Centos 6.5 and Centos 7 have a little bit different, so to talk about here.

A, CentOS 6.5 (Server Edition) network card configuration:

[A] method directly modify the network card configuration file:

(1) Enter the following command, modify the network card configuration file:

vi / etc / sysconfig / network-scripts / ifcfg-eth0
Modify the following information:

E = eth0 // name card

HWADDR = 00: 0c: 29: 5c: 94: 74 // Physical Address

TYPE = Ethernet

UUID = 36c43db3-95a9-427c-af8f-ba130189de85

ONBOOT = yes // will ONBOOT = "no" to ONBOOT = "yes"

NM_CONTROLLED = yes

BOOTPROTO = none

IPADDR = 192.168.1.98 // IP address changes

NETMASK = 255.255.255.0 // modify the subnet mask

GATEWAY = 192.168.1.1 // modify gateway

DNS1 = 8.8.8.8 // modify DNS server

IPV6INIT = no

USERCTL = no
(2) Restart network services:

To take effect, you must restart the Linux or restart network services, we restart the network service, execute the following command:

service network restart
If the display is as follows, the configuration was successful, but also access to the Internet

NOTE: This configuration is a permanent effect.

[Two] easiest method to one of: the use of RedHat series comes with the tool setup command

NOTE: If you are not RedHat Linux distributions series, only through the configuration file to modify (ie, the above method a).

(1) modify ip:

Enter the following command:

setup
The following pop-up window

Third choice: network configuration. Pop up the following interface

The first is with ip, the second is with DNS. We chose the first menu, the following interface

Eth0 to configure this card ip, pop up the following interface

"*" Sign on behalf of automatic acquisition ip, if you want to automatically obtain, must be automatically assigned ip LAN server exists (ie, DHCP server), in the current environment, only manual configuration, we modify the parameters as follows

Press the spacebar, the "*" removed, then we can be switched by the tab key, and then set each field. This time configured.

(2) Open card services:

CentOS default card is not activated, we run the following command, modify the network card configuration file:

vi / etc / sysconfig / network-scripts / ifcfg-eth0
Then, ONBOOT = "no" to ONBOOT = "yes", the effect is as follows:

This time, the configuration is complete, you can access the Internet. And another Win7 system with a computer on the LAN can access remote Linux on this computer, and provided that Linux systems have ssh service, we are installing Linux version, are equipped with SSH, the default is OpenSSH

By the following command to check ssh version installed:

ssh -v
ssh version of CentOS 6.5 I installed the following information:

How you use ssh service, please refer to my other article: telnet management tools use SecureCRT

Two, Centos 7 (Server Edition) network card configuration:

Centos NIC profile 7 in a lot less stuff, so it is necessary to mention the following individual, but the configuration Centos 6.5 and is the same.

(1) Enter the following command, modify the network card configuration file:

vim / etc / sysconfig / network-scripts / ifcfg-eno16777736
The default configuration information is as follows:

TYPE = Ethernet

BOOTPROTO = dhcp

DEFROUTE = yes

IPV4_FAILURE_FATAL = no

IPV6INIT = yes

IPV6_AUTOCONF = yes

IPV6_DEFROUTE = yes

IPV6_FAILURE_FATAL = no

NAME = eth0

UUID = 2e09b0f4-ec1a-44b0-8066-7da7ce04ff02

ONBOOT = no

HWADDR = 00: 0C: 29: 46: 8C: C0

PEERDNS = yes

PEERROUTES = yes

IPV6_PEERDNS = yes

IPV6_PEERROUTES = yes
Content BOOTPROTO, and increase the content IPADDR, NETMASK, GATEWAY, DNS, the final results are as follows:

TYPE = Ethernet

BOOTPROTO = static // The "DHCP" to "static"

DEFROUTE = yes

IPV4_FAILURE_FATAL = no

IPV6INIT = yes

IPV6_AUTOCONF = yes

IPV6_DEFROUTE = yes

IPV6_FAILURE_FATAL = no

NAME = eth0

UUID = 2e09b0f4-ec1a-44b0-8066-7da7ce04ff02

ONBOOT = yes // The "no" to "yes"

HWADDR = 00: 0C: 29: 46: 8C: C0

PEERDNS = yes

PEERROUTES = yes

IPV6_PEERDNS = yes

IPV6_PEERROUTES = yes

IPADDR = 192.168.1.99 // add IP addresses

NETMASK = 255.255.255.0 // increase the subnet mask

GATEWAY = 192.168.1.1 // increase gateway

DNS1 = 8.8.8.8 // increase in DNS
(2) Restart network services:

To take effect, you must restart the Linux or restart network services, we restart the network service, execute the following command:

service network restart
If the display is as follows, the configuration was successful, but also access to the Internet
     
         
         
         
  More:      
 
- How to avoid two Chrome icon appears in ELementary OS Freya (Linux)
- How wifi-linux AP signal strength detection (Linux)
- CentOS 6.6 command-line automatic completion (Linux)
- Linux security-related basics (Linux)
- How to install or upgrade to the Linux kernel in Ubuntu 4.2 (Linux)
- Docker + Nginx + Tomcat7 simple load balancing configuration (Server)
- Analysis of MySQL Dockerfile 5.6 (Database)
- Go performed using iOS and Android programming (Programming)
- The difference between vi and nano (Linux)
- To build PHP environment (Nginx + MariaDB + PHP7) under CentOS 6.5 (Server)
- How to install Linux on a MacBook Pro Retina (Linux)
- Linux System Getting Started Learning: In RedHat Linux driver compiled Ixgbe (Linux)
- Composition and dynamic memory allocation C program (Programming)
- Java objects to garbage collection (Programming)
- GAMIT learning materials finishing (Linux)
- ActiveMQ5.10.2 version configuration JMX (Linux)
- How to Install Android Studio on Ubuntu 15.04 / CentOS7 (Linux)
- SSH port forwarding application (Server)
- Recover accidentally deleted Nginx logs (Server)
- Oracle11g build physical standby database (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.