使用Juniper EX3300交换机作为路由器?

我在数据中心有一台Juniper EX3300交换机。 我已经连接了一个上行链路端口(ge-0/1/0)到我的ISP的路由器。 我想configuration它,以便连接到与ge-0/1/0相同VLAN中的端口的所有设备都可以访问Internet。 我做了一些研究,而且我还没有真正到过。

我已经configuration了接口,如下所示:

ge-0/1/0 { ether-options { no-auto-negotiation; link-mode full-duplex; speed { 1g; } } unit 0 { family inet { address xx.xx.xx.xx/32; } } } 

其中xx.xx.xx.xx是我的ISP分配的“客户路由器端口IP”。

当我尝试提交时,出现以下错误:

 Interface ge-0/1/0.0 not enabled for switching 

有人可以告诉我什么是正确的方式来configuration它?

目前还不清楚是否需要拓扑A或B(我认为你需要B,但你的问题似乎要求A)

  Vlan10 Vlan10 A) [Users]----------[EX330]----------[ISP] xxxx/zz Vlan10 Vlan11 B) [Users]----------[EX330]---------------------------[ISP] yyyy/24 xx.xx.xx.109/30 .110/30 

一个)
这是一个平面的layer2 vlan,所有的计算机必须在ISP的子网上寻址。 Vlan-10用于你所有的机器,并把它们的默认网关设置为xxxx

我不知道你为什么在你的问题中使用/ 32掩码。 这是不可能的,因为这意味着你代理所有的目的地的ARP。 与您的提供商合作,了解您的实际networking掩码应该是什么(我假设zz,下面)

 delete interfaces ge-0/1/0 unit 0 delete interfaces ge-0/1/0 delete interfaces ge-0/1/1 unit 0 delete interfaces ge-0/1/1 set vlans vlan-10 vlan-id 10 set vlans vlan-10 interface ge-0/1/0 set vlans vlan-10 interface ge-0/1/1 set interfaces ge-0/1/0 unit 0 family ethernet-switching port-mode access set interfaces ge-0/1/1 unit 0 family ethernet-switching port-mode access set interfaces vlan unit 10 family inet address xxxx/zz set routing-options static route 0.0.0.0/0 next-hop xx.xx.xx.110 

B)
这涉及到两个不同的VLAN:10和11. Vlan-10用于所有的服务器,他们将默认网关设置为yyyy

 delete interfaces ge-0/1/0 unit 0 delete interfaces ge-0/1/0 delete interfaces ge-0/1/1 unit 0 delete interfaces ge-0/1/1 set vlans vlan-10 vlan-id 10 set vlans vlan-11 vlan-id 11 set vlans vlan-10 interface ge-0/1/0 set vlans vlan-11 interface ge-0/1/1 set interfaces ge-0/1/0 unit 0 family ethernet-switching port-mode access set interfaces ge-0/1/1 unit 0 family ethernet-switching port-mode access set interfaces vlan unit 11 family inet address xx.xx.xx.109/30 set interfaces vlan unit 10 family inet address yyyy/zz set routing-options static route 0.0.0.0/0 next-hop xx.xx.xx.110 

为Vlan-11中的服务器添加尽可能多的端口。 解决schemeB 必须使用某种forms的NAT,如果您的提供商没有足够的公共地址空间来同时包含Vlan10和Vlan11的子网