二层交换机配置无法上网的问题

153 天前
 yiluqingshen
1 、这是交换机 VLAN 配置信息:

[H3C]dis vlan
Total VLANs: 25
The VLANs include:
1(default), 101-124

2 、配置信息:

[H3C]dis int br
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
InLoop0 UP UP(s) --
NULL0 UP UP(s) --
Vlan1 DOWN DOWN 192.168.0.233

Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
GE1/0/1 DOWN auto A A 101
GE1/0/2 DOWN auto A A 102
GE1/0/3 DOWN auto A A 103
GE1/0/4 DOWN auto A A 104
GE1/0/5 DOWN auto A A 105
GE1/0/6 DOWN auto A A 106
GE1/0/7 DOWN auto A A 107
GE1/0/8 DOWN auto A A 108
GE1/0/9 DOWN auto A A 109
GE1/0/10 DOWN auto A A 110
GE1/0/11 DOWN auto A A 111
GE1/0/12 DOWN auto A A 112
GE1/0/13 DOWN auto A A 113
GE1/0/14 DOWN auto A A 114
GE1/0/15 DOWN auto A A 115
GE1/0/16 DOWN auto A A 116
GE1/0/17 DOWN auto A A 117
GE1/0/18 DOWN auto A A 118
GE1/0/19 DOWN auto A A 119
GE1/0/20 DOWN auto A A 120
GE1/0/21 DOWN auto A A 121
GE1/0/22 DOWN auto A A 122
GE1/0/23 DOWN auto A A 123
GE1/0/24 DOWN auto A A 124
GE1/0/25 DOWN auto A A 1
GE1/0/26 DOWN auto A A 1
GE1/0/27 DOWN auto A A 1
GE1/0/28 DOWN auto A T 1

----------------------------------------------------------------------
华三二层交换机(型号:5024pv3-EI ),1-24 口划分 VLAN 101-124 为 access 口,28 口划分为 trunk 口连接路由器,无法上网,是什么意思呢?怎么解决?
交换机如果复位用默认 VLAN 1 ,又可以上网。
是不是二屋交换机不具有划分 VLAN 后不具有上网的属性啊? 在线等各位大神解答。
1302 次点击
所在节点    宽带症候群
38 条回复
makusuofute
153 天前
为什么要买这个 2 层呢?
如果买二层那么你的路由器要支持子接口或者 vlan
如果买三层只需要上联支持静态路由就可以了

依照你的描述
你上联口怎么提供对应的 vlan 信息呢?
trunk 口 有 pvid vlan1 和 vlan 1 ,101-124

你上联口只有 vlan1 没有其他 vlan 信息啊。
qinxi
152 天前
@defunct9 开 ssh, 让他试试
defunct9
152 天前
https://bajie.dev/posts/20230324-huawei_switch/

@qinxi 这个好在真搞过,现在让我这个系统工程师配个网络还真可以。
defunct9
152 天前
普及个概念,无论你二层三层,缺省路由还需需要有滴。
defunct9
152 天前
interface Vlanif100
description === Route
ip address 192.168.0.100 255.255.255.0
#
defunct9
152 天前
ip route-static 0.0.0.0 0.0.0.0 192.168.10.?指到路由器 ip 就行了
wuxiao2522
152 天前
你跑 PCDN ,如果有很多条线路的话,不用这么麻烦。举例:直接把 1 、2 、3 口划为 vlan100 ,再把路由器 lan 、pcdn 的设备接入这 3 个口,就行了。4 、5 、6 口划为 vlan101 ,同样的操作。
wuxiao2522
152 天前
但正常情况下,pcdn 单设备就能跑满带宽,直插光猫啊。都不需要交换机。你需要提供更多的需求和信息。
ppoozl
152 天前
你要端口隔离不需要配 VLAN 啊,H3C 自带端口隔离功能的
ppoozl
152 天前
port-isolate enable group 1
yiluqingshen
152 天前
@wuxiao2522 通过网心云 X86 服务器拨号,每条线路占用一个端口和拨一个账号,需要每个端口划分 VLAN 。
yiluqingshen
152 天前
@defunct9 把它配置到默认的 VLAN1 可行吗? 28 口允许所有 VLAN 通过
TESTFLIGHT2021
152 天前
一看就是 PCDN
defunct9
152 天前
默认 vlan 是有用的,尽量保持空闲吧。其余的随便用,28 应该是下联的级连口,连下级的。1 口是连上级的。抱歉给你定了规矩。
qbqbqbqb
151 天前
要基于 vlan 做端口隔离的话,是不能用 trunk/access 的配置的,应该全部配成 hybrid ,28 口允许所有 vlan ,其他口只允许自己的 PVID 和 28 口的 PVID ,全部配成 untagged 模式
yiluqingshen
148 天前
@qbqbqbqb
大佬,请问“其他口只允许自己的 PVID 和 28 口的 PVID ”;“28 口允许所有 vlan ”
是这样设置吗?是不是 28 口既要设置成 hybrid 接口类型并配置 PVID 且允许所有 vlan 通过。
欢迎纠错,谢谢。 以下以两个端口设置举例:

int g1/0/1

port link-type hybrid


port hybrid vlan 101 128 untagged

---------------------------------------------------------------

int g1/0/2

port link-type hybrid


port hybrid vlan 102 128 untagged

------------------------------------------------------------

28 口配置:


port link-type hybrid


port hybrid vlan 101 102 103 ……128 untagged
yiluqingshen
148 天前
补充:添加 PVID ,dis this 两个端口及 28 口
#1 口
[H3C-GigabitEthernet1/0/1]dis this
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid vlan 1 101 128 untagged
port hybrid pvid vlan 101
---------------------------------------------------------
#2 口

[H3C-GigabitEthernet1/0/2]dis this
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid vlan 1 102 128 untagged
port hybrid pvid vlan 102


--------------------------------------------------------
#28 口

[H3C-GigabitEthernet1/0/28]dis this
interface GigabitEthernet1/0/28
port link-type hybrid
port hybrid vlan 1 101 to 103 128 untagged
port hybrid pvid vlan 128
yiluqingshen
148 天前
@qbqbqbqb

按你的方式调好了。

1-26 口分别配置 hybrid;
port hybrid pvid vlan 1-26
28 口配置:port hybrid vlan 101 to 128 untagged
port hybrid pvid vlan 128

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1004139

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX