神州數碼交換機路由器常用命令總結

2021-10-25 16:39:01 字數 3309 閱讀 8379

神州數碼交換機常用命令操作(一)交換機

1.恢復出廠設定

set default

wrreload

2.宣告vlan and給vlan分配ip

vlan [編號] //vlan 10

sw i e 0/0/[編號-編號] //sw i e 0/0/1-10s

in vlan [編號] //in vlan 10

ip add

[ip位址] [子網掩碼] //ip add 192.168.1.1 255.255.255.0

3.靜態路由

ip route 0.0.0.

0 0.0.0.

0 [下一跳ip] //ip route 0.0.0.

0 0.0.0.

0 192.168.1.

24.rip協議路由

以vlan方法

router rip

network [自己的vlan ] //network vlan 10

以ip方法

router rip

network [ip段]

5.ospf協議路由

以vlan方法

router ospf

int vlan [編號] //int vlan 10

ip ospf enable area [編號] //ip ospf enable area 0

以ip方法

router ospf

network [自己的ip]/[閘道器] area 0 //network 192.168.1.1/24 area 0

開啟 telnet-server enable

telnet-user [使用者] password 0 [密碼]

(選做)7.stp生成樹協議

spanning-tree mode stp

(選做)8.鏈路聚合(手工)

spanning-tree mode mstp //開啟mstp生成樹協議

port-group [編號] // port-group 1

int e 0/0/[做鏈路的那幾個埠號] //int 0/0/1-2

port-group [編號] mode on // port-group 1 mode on

(選做)9.鏈路聚合(lacp動態生成)

spanning-tree mode mstp

port-group [編號]

(交換機a的配置)port-group [編號] mode active

(交換機b的配置)port-group [編號] mode passive

10.trunk

int e 0/0/[埠]

sw mode trunk //設定為trunk

sw trunk allowed vlan all //劃分到所有vlan

11.mac位址和埠繫結(單個)

int e 0/0/[埠]

sw port-security

sw port-security mac-address [mac位址]

12. mac位址和埠繫結(多個)

int e 0/0/[埠]

sw port-security maximum [安全mac位址個數如:3]

sw port-security mac-address [mac位址]

sw port-security mac-address [mac位址]

sw port-security mac-address [mac位址]

13. mac位址和埠繫結(動態學習)

int e 0/0/[埠]

sw port-security maximum

sw port-security maximum lock

sw port-security maximum convert

14.mac位址表繫結

mac-address-table static address [mac位址] vlan [編號] int e 0/0/[編號]

//解釋:讓mac位址只能在指定vlan中的指定埠中使用,其他的都不能使用(未測試)

(選做)15.mac位址過濾

mac-address-table blackhole address [mac位址] vlan [編號]

//解釋:讓mac位址在指定vlan中不能使用(未測試)

16.用am來繫結ip和mac

am enable

int e 0/0/[埠]

am mac-ip-pool [mac位址] [ip位址]

//驗證方法: show am

//解鎖:no am port

17.dhcp配置

service dhcp

ip dhcp pool [位址池名]

network-address [ip段如:192.168.1.0] [掩碼數如:24]

lease [租用天數]

default-router [閘道器ip]

dns-server [dns的ip]

18.acl ip訪問控制

ip access-list standard test

deny 192.168.1.100.0 0.0.0.0.255 //禁止ip段訪問

deny 192.168.200.11 0.0.0.0 //禁止單個ip訪問

deny tcp 192.168.200.0 0.0.0.255 any-destination d-port 23 //拒絕ip段telnet資料

permit 192.168.1.100.0 0.0.0.0.255 //允許ip段訪問

deny 192.168.200.11 0.0.0.0 //允許ip訪問

//下面2條是開啟acl

firewall enable

firewall default permit

//繫結acl到各個埠

int e 0/0/[埠]

ip access-group test in

//驗證方法

show access-group

(選做)19. web管理

ip http sever //開啟web服務

web-user [使用者名稱] password 0 [密碼] //新增管理使用者

神州數碼路由器常用命令操作(二)路由器

1. 恢復出廠設定

delete

wr reboot

2.進入埠給埠分配ip

a) int [段口]

b) ip add [ip] [子網掩碼]

c) no shu

3.靜態路由(預設路由)

交換機 路由器配置命令

交換機基本狀態 switch路由器名稱 switch 使用者模式 switch特權模式 switch config全域性配置模式 switch config if介面狀態 交換機口令設定 switch enable進入特權模式 switch config terminal進入全域性配置模式 swit...

華為路由器交換機配置命令大全

一 計算機命令 pcalogin root 使用root使用者 password linux 口令是linux shutdown hnow 關機 init0 關機 logout 使用者登出 login 使用者登入 ifconfig 顯示ip位址 ifconfigeth0 mask 設定ip位址 if...

計算機四級考試交換機路由器命令總結

備註 黑體為需要輸入的命令,表示多項選一。本總結只是命令的簡答總結,不包括命令的使用環境等。在機器型號方面3548和3500屬於同一作業系統。一般來講3500系列的配置要先進入各個檢視然後在各個檢視下配置,而6500需要在全域性模式下配置。注意各種命令的選項和內容組成。交換機命令 3548命令總結 ...