Linux Add NIC
1. Write Network card Configuration
Vim/etc/sysconfig/network-scripts/ifcfg-eth1
#NIC nameDevice=eth1#Network card TypeType=Ethernet#UUIDuuid=7fe1fb4d-a056-47df-9283-0ab7094abbf7#whether to start the Enable NIConboot=Yes#Select link network type static staticbootproto=Static#IP Addressipaddr=192.168.2.10#Sub-Networknetmask=255.255.255.0#Gatewaygetway=192.168.2.1Defroute=Yespeerdns=yespeerroutes=Yes#Enable IPV4Ipv4_failure_fatal=Yesipv6init=NoNAME="System eth1"
NIC configuration file
device=eth0 device name hwaddr=00:0c:29:ac:95: Physical Address of 0c device nm_controlled=no Whether the network interface is managed using NetworkManager, the default yesonboot=Yes if the network interface is turned on when the system or network service is started, the default noipaddr=192.168.1.1 define IP address netmask=255.255.255.0 define subnet masktype =Ethernet network type is ethernet Bootproto= None IP is obtained without using any of the startup protocols DHCP uses the DHCP protocol as the startup protocol to obtain the IP address by DHCP server using static IP address ipv6init=No whether the IPV6 configuration is supported userctl=No allows ordinary users to control theaddress of the gateway =192.168.1.254 Default gateways of the network interface DNS1 =222.222.222.222 Specifies the DNS server address that the host can look up
Detailed Description
2. Start the network card
Ifup eth1
Linux Add NIC