使用Routerboard 450G我想configuration5个以太网端口如下:
在vlan1中,设备应具有IP 10.7.1.3/24。
但是,当我想ping路由器时,它是不可达的。 我按照以下方式configuration设备:
/接口以太网交换机打印 标志:我 - 无效 #名称types镜子源镜子目标开关所有端口 0 switch1 Atheros-8316无无有
/接口以太网打印 标志:X - 禁用,R - 运行,S - 奴隶 #名称MTU MAC地址ARP主端口切换 0 R ether1 1500 E4:8D:8C:18:D5:A1启用none switch1 1 S ether2 1500 E4:8D:8C:18:D5:A2启用ether1 switch1 2 S ether3 1500 E4:8D:8C:18:D5:A3启用ether1 switch1 3 S ether4 1500 E4:8D:8C:18:D5:A4启用ether1 switch1 4 RS ether5 1500 E4:8D:8C:18:D5:启用了ether1 switch1
/接口以太网交换机端口打印 标志:我 - 无效 #名称SWITCH VLAN-MODE VLAN-HEADER DEFAULT-VLAN-ID 0 ether1 switch1安全always-strip 3 1 ether2 switch1安全always-strip 1 2 ether3 switch1安全always-strip 2 3 ether4 switch1安全always-strip 2 4 ether5 switch1安全add-if-missing 0 5 switch1-cpu switch1后备保持原样
/接口以太网交换机vlan打印
标志:X - 禁用,I - 无效
#切换VLAN-ID端口
0 switch1 3 ether1
ether5
1 switch1 1 ether2
ether5
2 switch1 2 ether3
ether4
ether5
/ ip地址打印 标志:X - 禁用,I - 无效,D - dynamic #地址networking接口 0 10.7.1.3/24 10.7.1.0 ether2
端口5直接连接到输出vlan1-vlan3标记的pipe理型交换机。 路由器板不能ping通。
我错过configuration中的某些东西吗?或者我理解错误的概念吗? (据我的理解,将IP添加到ether2就足够了,因为它在ether5上切换到vlan1)
首先,路由器板只能与交换机的主接口进行通信。
其次,你需要用vlan接口来标记。
最后(取决于路由器板),您需要将switch1-cpu添加到switch1中VLAN 1的vlan端口列表中。
所以:
/int vlan add vlan-id=1 name=vlan1 interface=ether1
/ip addr add 10.7.1.3/24 interface=vlan1
和(取决于路由器 – 一定要先删除旧的条目):
/interface ethernet switch vlan add switch=switch1 ports=ether2,ether5,switch1-cpu vlan-id=1