我在Ubuntu服务器14.04上configuration了错误的VLAN吗?

我的networking上有VLAN问题。
我已经安装了VMware vSphere Hypervisor 5.5的服务器Dell Poweredge R210 II。
接下来,我使用Ubuntu Server 14.04创build了一个虚拟机。
networking规划是从ISP到Ubuntu服务器(第一个NIC)的连接,然后是作为到G25的中继端口的Cisco SG200-26P。
交换机的前七个端口被configuration为VLAN端口G1-vlan 10,G2-vlan 20 … G7-vlan 70,作为untagged访问模式。

Ubuntu服务器configuration:

  • apt-get install vlan
  • / etc / network /这样的接口(其余的VLAN看起来是一样的)

auto eth1
iface eth1 inet static
地址192.168.1.2
networking掩码255.255.255.0
网关192.168.1.1

iface vlan10 inet静态
地址192.168.10.1
networking掩码255.255.255.0
networking192.168.1.0
广播192.168.10.55
vlan_raw_device eth1

  • 启用IP转发:编辑/etc/sysctl.conf文件:我将net.ipv4.ip_forward从0更改为1
  • modprobe 8021q
  • 启用/ proc / sys / net / ipv4 / ip_forward

  • 的/ proc /网/ VLAN

当我连接我的笔记本电脑与静态IP地址192.168.10.10networking掩码255.255.255.0网关192.168.10.1到G1端口(vlan10)我无法ping我的网关。 我有一个DHCPconfiguration文件

例如vlan10

#vlan10 subnet 192.168.10.0 netmask 255.255.255.0 { range 192.168.10.2 192.168.10.100; option routers 192.168.10.1; option domain-name "eth1_vlan10"; 

我的笔记本甚至无法从DHCP获取IP地址。

我在第二台计算机上安装了相同的configuration( <ubuntu server with 2 NIC card>它的performance相同。 我该怎么办?

我看你跑modprobe 8021q ; validation是否加载了8021q模块: lsmod | grep 8021q lsmod | grep 8021q

使用来自Ubuntu的VLAN Wiki和interfaces文件的manpage的 信息似乎表明你的vlanconfiguration应该是:

 auto eth1.10 iface eth1.10 inet static address 192.168.10.1 netmask 255.255.255.0 network 192.168.10.0 broadcast 192.168.10.255 vlan-raw-device eth1 

最后,你没有提到你的虚拟交换机是如何configuration的。 这听起来像你应该有一个虚拟交换机连接到ISP网卡,一个连接到内部网卡。 第一个虚拟交换机可能不应该指定任何VLAN,但是第二个虚拟交换机将需要configuration的VLAN编号(除了192.168.1.0/24networking,我将假设它是VLAN 1?)。 我相信这个文件应该提供你所需要的细节。

你真的开始虚拟接口?

我在接口文件中看到,你自动启动eth0,但不是vlan10设备。