我试图用两个网络适配器(eth0和eth1)在Linux中配置网络。我希望eth0's IP被静态地分配给本地网络,eth1由DHCP分配给互联网连接。
因此,机器应该能够通过eth0在同一个本地网络中平另一个VM,并且应该通过eth1访问互联网,而不需要交替的适配器连接。
我需要配置interfaces.conf (/etc/network/interface.conf)和NetworkManager配置文件,或者任何需要使其工作的配置文件。
发布于 2017-06-26 08:53:44
要启用网络接口:
vi /etc/network/interfaces在那里,对于相应的接口,写
# network card
auto eth0
iface eth0 inet static
address 192.168.1.250
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
auto eth1
iface eth1 inet dhcp(根据您的要求更改IP地址详细信息)
重新启动网络之后:
service networking restart或
sudo /etc/init.d/networking restarthttps://unix.stackexchange.com/questions/373399
复制相似问题