Linux network card can be a life temporarily modified, or can be a GUI modification, but our most commonly used is to edit the configuration file to make it permanent, so that we do not need to be like a temporary modification of every boot to reset so much trouble, then let's look at this not troublesome network adapter configuration method It!
First we enter the configuration file for the NIC:
[[Email protected]~]# vi/etc/sysconfig/network-scripts/ifcfg-eth0//Enter edit
Device=eth0
hwaddr=00:0c:29:d0:00:08
Type=ethernet
uuid=3849f187-d7be-4641-9321-11786a83277e
Onboot=yes//self-booting, here means allow
Nm_controlled=yes
Bootproto=static//Here is the protocol, we set to static, the default is DHCP (dynamic)
ipaddr=192.168.12.12//Here is your IP
NETMASK =255.255.255.0//Here is the mask
Press ESC, and then press and hold shift+: Enter to save the
: Wq
Enter service network restart restart NIC
[Email protected] Desktop]# service network restart
Shutting down interface eth0: [OK]
Close Loopback interface: [OK]
Eject loopback interface: [OK]
Popup interface eth0: Active connection Status: activated
Active connection path:/ORG/FREEDESKTOP/NETWORKMANAGER/ACTIVECONNECTION/1
Determine
Input ifconfig view network card parameters
[[Email protected] Desktop]# ifconfig
Eth0 Link encap:ethernet HWaddr 00:0c:29:d0:00:08
inet addr:192.168.136.130 bcast:192.168.136.255 mask:255.255.255.0
Inet6 ADDR:FE80::20C:29FF:FED0:8/64 Scope:link
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:334 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2426 (2.3 KiB) TX bytes:15212 (14.8 KiB)
Interrupt:19 Base address:0x2024
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:294 errors:0 dropped:0 overruns:0 frame:0
TX packets:294 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27382 (26.7 KiB) TX bytes:27382 (26.7 KiB)
Completed.
This article is from the "Darker Notes" blog, so be sure to keep this source http://liumange.blog.51cto.com/9453694/1629059
NIC configuration for Linux