Dual-card configuration in Linux

Experiment Description: NIC configuration in two different segments of the virtual machine linux.

1, add a new card

image.png

2, after two network cards installed into the host after two network cards connected to view the information ifconfig. In vmnet8 under dhcp service can automatically configure the IP address for the new network card ens36, but can not obtain an IP address automatically in only the host

image.png

image.png

3, the two network cards are changed only host mode, two network cards coupled address different segments, it can function as a proxy server, and functions as a firewall

a, NIC configuration information ens33, and then restart the card into effect

[Root @ localhost ~] # vim / etc / sysconfig / network-scripts / ifcfg-ens33 configuration of card information ens33

[root @ localhost ~] # service    network restart  to restart the network card service

image.png


image.png

3, because there is no other network card configuration file ens36 the / etc / sysconfig / network-scripts / down, so the first copy of the configuration file, and then modify the configuration information

[Root @ localhost network-scripts] # ​​cp -p ifcfg-ens33 ifcfg-ens36 copy the configuration file to ens36   

[Root @ localhost ~] # vim / etc / sysconfig / network-scripts / ifcfg-ens33 configuration of card information ens33

[root @ localhost ~] # systemctl restart  Network    Restart card services

image.png

image.png

image.png

image.png


Dual card configuration different segments of the experiment.

Guess you like

Origin blog.51cto.com/14475876/2434846