Centos60 (Final) version system originally installed on a virtual machine. after installation, it is not logged on to the virtual machine by default because the crt is used for each login, crt cannot be connected (Nic not started ). Next, let's modify and view the network card used. [Hcr @ slave2
Centos6.0 (Final) version system originally installed on a virtual machine. after installation, it is not logged on to the virtual machine by default because the crt is used for each login, crt cannot be connected (Nic not started ).
Next, modify it.
Check the network card used.
[Hcr @ slave2 ~] $ Ifconfig
Eth1 Link encap: Ethernet HWaddr 00: 0C: 29: 8C: BF: DF
Inet addr: 192.168.1.13 Bcast: 192.168.1.255 Mask: 255.255.255.0
Inet6 addr: fe80: 20c: 29ff: fe8c: bfdf/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 220 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 217 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 fig: 1000
RX bytes: 21357 (20.8 KiB) TX bytes: 26980 (26.3 KiB)
Interrupt: 19 Base address: 0x2000
Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Inet6 addr: 1/128 Scope: Host
Up loopback running mtu: 16436 Metric: 1
RX packets: 4 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 4 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 240 (240.0 B) TX bytes: 240 (240.0 B)
Then go to the linux network configuration Directory
[Hcr @ slave2 ~] $ Cd/etc/sysconfig/network-scripts modify the Nic configuration as follows (ONBOOT = yes auto-start configuration)
[Hcr @ slave2 network-scripts] $ cat ifcfg-eth1
DEVICE = "eth1"
NM_CONTROLLED = "yes"
ONBOOT = yes
TYPE = Ethernet
BOOTPROTO = none
DEFROUTE = yes
20174_failure_fatal = yes
IPV6INIT = no
NAME = "System eth1"
IPADDR = 192.168.1.13
PREFIX = 24
GATEWAY = 192.168.1.1
HWADDR = 00: 0C: 29: 8C: BF: DF
After the configuration, restart the crt connection operation. you do not need to log on to the VM every time.