3

核心交换机的配置过程

 1 year ago
source link: https://bajie.dev/posts/20230324-huawei_switch/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

核心交换机的配置过程

2023-03-24 1 分钟阅读

换了公司,也搞起了桌面运维,配置交换机的过程记录一下,其实很简单,就是命令记不住。

拿到一台华为交换机,重新初始化后,配置如下:

<HUAWEI>dis cur
!Software Version V200R008C00SPC500
#
sysname HUAWEI
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password irreversible-cipher %^%#7:.iL]+u"4\j8ZFhGeg/-m.&"^0}kMznjk%>;BaUDO/'6m\X\=V8JGY:W;i,%^%#
 local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
#                                         
interface NULL0
#
user-interface con 0
 authentication-mode password
 set authentication password cipher $1a$~!;$-JF0-W$Z><1.F]<sF.R_NBj34CJ/JPe=/tZDMM(Ws3'9u%+$
user-interface vty 0 4
user-interface vty 16 20
#
return

一、配名称

sysname BJ_FANGHENG_JIERU

二、配置登录用户

1、aaa
local-user admin password irreversible-cipher Yy123459
local-user admin privilege level 3
local-user admin service-type telnet terminal ssh

2、user-interface con 0
authentication-mode aaa

3、user-interface vty 0 4
authentication-mode aaa
protocol inbound all

三、配置下联交换机端口

interface GigabitEthernet0/0/23
 description == H3cSW --> 24
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094

四、配置上联交换机端口

interface GigabitEthernet0/0/24
 description == RuijieRoute --> lan0
 port link-type access
 port default vlan 100

五、配置vlan地址

vlan 11
 interface Vlanif11
 ip address 10.8.0.7 255.255.254.0
 
vlan 100
 interface Vlanif100
 ip address 192.168.10.7 255.255.255.0

六、配置缺省路由

ip route-static 0.0.0.0 0.0.0.0 10.8.0.1

七、批量配置端口

port-group group-member GigabitEthernet0/0/1 to GigabitEthernet0/0/23
port link-type access
port default vlan 11
stp edged-port enable

八、lldp

lldp enable

九、dhcp

dhcp enable
ip pool 11
 gateway-list 10.8.0.1
 network 10.8.0.0 mask 255.255.254.0
 static-bind ip-address 10.8.0.4 mac-address 8005-88f1-fa62
 dns-list 114.114.114.114
 
interface Vlanif11
 description === Ke hu duan
 ip address 10.8.0.1 255.255.254.0
 dhcp select global

这样就完成了一台核心设备的简单配置


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK