对于我抬头的东西,这不是重复的。 我需要使用交换机将多个Ubuntu 16.04计算机连接在一起。 我不希望他们连接到互联网,所以我没有路由器或ISP的信息。 我已经设置了手动IP,但不知道要为DNS和网关。 另外,我不知道交换机IP。
These are the IP's: 192.168.2.1, 192.168.2.2, and so on the mask: 255.255.255.0 for all the DNS: ? the gateway: ?
另一个问题是我不知道两个接口是用于两个网卡还是一个网卡也可以有多个接口。 请解释一下。
另外,我试图调整的接口(在/etc/network/interfaces )似乎处于非活动状态,因此不会在执行ipconfig时显示。
另外,你能否指定我应该编辑哪些文件,以及在configuration之后它们应该如何(有时候Ubuntu会自己编辑它们)?
目前,当我ping其他机器从一个我得到目的地主机无法访问。
谢谢
编辑:
/etc/network/interfaces文件现在:
auto lo iface lo inet loopback
它曾经是像:
auto lo iface lo inet loopback iface enp6s0 inet static address 192.168.2.2 netmask 255.255.255.0 gateway 192.168.2.1 auto enp6s0
你必须静态configuration一切。 在两台服务器上(接口的相关部分):
auto eth0 iface eth0 inet static address 192.168.2.2 # or 192.168.2.1 of course, depending netmask 255.255.255.0
如果安装了networkmanager,您可能需要删除它。
没有网关IP。
也没有DNS。 在/etc/hosts指定主机名称以方便使用
看看ethtool的输出(你可能需要安装它)和ifconfig -a来查看哪个接口是什么。 使用ethtool您还可以查看哪个接口安装了电缆。
你的交换机可能没有IP地址,因为它是一个pipe理交换机,你可能会提到它。