H3C 交换机设置请教

2022-05-03 22:10:49 +08:00
 lokamir

本人不是专业网络工程,但是无奈需要管理公司交换机(配置都是现成的,主要是看看哪些 ip 在线,有没有端口空闲) H3C 型号是 S5120 通过 console 口查看了一下配置

[R2]dis current-configuration

version 5.20, Release 2220P02

sysname R2

domain default enable gt

telnet server enable

dot1x authentication-method eap dot1x url http://10.80.7.254:8080/selfservice/index/install.html dot1x free-ip 10.80.7.254 255.255.255.255 dot1x free-ip 221.228.255.1 255.255.255.255

undo ip http enable

password-recovery enable

[R2]dis ip int b

*down: administratively down (s): spoofing Interface Physical Protocol IP Address Description Vlan600 down down 10.255.92.14 Vlan-inte...

对应这些信息分别是什么意思呀?最后一行 Vlan600 是啥? 我想开启 telnet 访问,不想每次都要跑去机房连 console ,但是看配置似乎显示 telnet 是开着的 网关的 ip 是多少,tenlet 要怎么连,请教各位大佬

1242 次点击
所在节点    问与答
9 条回复
gux928
2022-05-03 22:20:53 +08:00
h3c 官网的文档感觉还可以。可以考虑看下文档,然后开个 web 服务。我这拓扑简单,直接在 web 操作够用了。
smallfount
2022-05-03 22:37:02 +08:00
VLAN 600 的 vif 现在 admin 状态啊。
你这 dis cur 看着啥都没啊。。。

好歹做个 vlan 1 的 int 加个 IP 上去。。。5120 一般是做接入层所以也就不存在 3 层交换的配置。
写个 vlan interface 和默认路由就行。。
lokamir
2022-05-03 22:47:57 +08:00
@smallfount
我没有贴完,所有用户都是分在 vlan 350 里面,我要给 vlan 350 加 ip 还是要给 vlan 1 加 ip 啊?

[R2]dis current-configuration
version 5.20, Release 2220P02
#
sysname R2
#
domain default enable glgt
#
telnet server enable
#
dot1x authentication-method eap

dot1x url http://10.80.7.254:8080/selfservice/index/install.html

dot1x free-ip 10.80.7.254 255.255.255.255

dot1x free-ip 221.228.255.1 255.255.255.255

#
undo ip http enable
#
password-recovery enable
#
vlan 1
#
vlan 10
#
vlan 350
#
vlan 360
#
vlan 370
#
vlan 600
#
vlan 1001 to 1002
#
vlan 3000
#
radius scheme system

server-type extended

primary authentication 127.0.0.1 1645

primary accounting 127.0.0.1 1646

user-name-format without-domain
winterx
2022-05-04 01:42:15 +08:00
你贴的配置中,telnet 已经开启,但是没有贴上 vty 配置,telnet 需要与 vty 搭配使用

[h3c] vty 0 63
[h3c] local-user admin

配置完 vty 与管理账号后,telnet 地址对应你的 vlan 接口地址,同时你的 vlan 接口也没有配置 IP ,需要配置 vlan 接口,你没有贴网络拓扑图给不了准确地址,比如你接口是 GE0/0/1

[h3c]int vlan 1 这里是你接口 vlan
[h3c-vlan]ip address 192.168.1.1 vlan 接口地址
[h3c]int ge 0/0/1
[h3c-ge0/0/1]port type-link access
[h3c-ge0/0/1]port access vlan 1

然后本地 telnet 192.168.1.1 就可以了
lokamir
2022-05-04 07:43:21 +08:00
@winterx
大佬
[R2]dis vlan
Total 8 VLAN exist(s).
The following VLANs exist:
1(default), 350, 360, 370, 600, 1001-1002, 3000,

[R2]dis int b
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Main IP Description
NULL0 UP UP(s) --
Vlan600 DOWN DOWN 10.255.92.14

The brief information of interface(s) under bridge mode:
Link: ADM - administratively down; Stby - standby
Speed or 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 UP 100M(a) F(a) A 350
GE1/0/2 DOWN auto A A 350
GE1/0/3 UP 1G(a) F(a) A 350
GE1/0/4 DOWN auto A A 350
GE1/0/5 UP 1G(a) F(a) A 350
GE1/0/6 DOWN auto A A 350
GE1/0/7 DOWN auto A A 350
GE1/0/8 DOWN auto A A 350
GE1/0/9 DOWN auto A A 350
GE1/0/10 DOWN auto A A 350
GE1/0/11 UP 1G(a) F(a) A 350
GE1/0/12 DOWN auto A A 350
GE1/0/13 DOWN auto A A 350
GE1/0/14 DOWN auto A A 350
GE1/0/15 DOWN auto A A 350
GE1/0/16 DOWN auto A A 350
GE1/0/17 DOWN auto A A 350
GE1/0/18 UP 1G(a) F(a) A 350
GE1/0/19 DOWN auto A A 350
GE1/0/20 DOWN auto A A 350
GE1/0/21 DOWN auto A A 350
GE1/0/22 DOWN auto A A 350
GE1/0/23 DOWN auto A A 350
GE1/0/24 DOWN auto A A 350
GE1/0/25 DOWN auto A A 350
GE1/0/26 DOWN auto A A 350
GE1/0/27 DOWN auto A A 350
GE1/0/28 DOWN auto A A 350
GE1/0/29 DOWN auto A A 350
GE1/0/30 DOWN auto A A 350
GE1/0/31 UP 1G(a) F(a) A 350
GE1/0/32 DOWN auto A A 350
GE1/0/33 DOWN auto A A 350
GE1/0/34 DOWN auto A A 350
GE1/0/35 DOWN auto A A 350
GE1/0/36 UP 100M(a) F(a) A 350
GE1/0/37 DOWN auto A A 350
GE1/0/38 DOWN auto A A 350
GE1/0/39 DOWN auto A A 350
GE1/0/40 DOWN auto A A 350
GE1/0/41 DOWN auto A A 350
GE1/0/42 DOWN auto A A 350
GE1/0/43 DOWN auto A A 350
GE1/0/44 DOWN auto A A 350
GE1/0/45 ADM auto A A 350
GE1/0/46 DOWN auto A A 350
GE1/0/47 DOWN auto A T 1
GE1/0/48 ADM auto A A 1
GE1/0/49 ADM auto A T 1
GE1/0/50 ADM auto A T 1
GE1/0/51 UP 1G(a) F(a) A 350 To-ZX
GE1/0/52 ADM auto A T 1

[R2]dis this

sysname R2

domain default enable glgt

telnet server enable

dot1x authentication-method eap

dot1x url http://10.80.7.254:8080/selfservice/index/install.html

dot1x free-ip 10.80.7.254 255.255.255.255

dot1x free-ip 221.228.255.1 255.255.255.255

undo ip http enable

password-recovery enable

ip route-static 0.0.0.0 0.0.0.0 10.255.0.11

undo info-center enable

snmp-agent

snmp-agent local-engineid 800063A2033822D6DC9E06

snmp-agent community write glgtsnmp

snmp-agent sys-info version all

nqa schedule imclinktopologypleaseignore ping start-time now lifetime 630720000

load xml-configuration

我执行
[R2]ip address 192.168.1.1 之后
需要如何配置路由呢?
lokamir
2022-05-04 07:44:21 +08:00
我执行
[R2]ip address 10.92.0.1 之后
需要如何配置路由呢?
smallfount
2022-05-04 08:01:58 +08:00
@lokamir 任意一个 3 层接口都可以。。前提是你的 IP 的三层可达。
假设你的交换机端口全部都是 VLAN350....又你没有管理 VLAN.
我看到端口有 Trunk 的但是全部都是 ADM DOWN 手工关掉的情况。。。估计你这个是纯 2 层用的。
所以就只要做过一个 int vlan350...然后在 350 的 IP 里找一个空闲的不会被占的写成 VIF 的 IP.
正常如果你 VLAN 的 IF 在三层交换或者防火墙上配置正常的话,这时候就能 ping 到了(2 层 ARP 可达)。。然后做个 VTY 本地接口就行。。
winterx
2022-05-04 12:18:54 +08:00
@smallfount 正解
先[h3c] int vlan 350
然后[h3c-vlan]ip address 10.92.0.1 前提是这个 ip 没有被占用
就可以了
lokamir
2022-05-04 20:13:33 +08:00
@winterx
@smallfount
谢谢大家

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

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

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

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

© 2021 V2EX