當前位置:首頁 » 存儲配置 » 銳捷自定義訪問列表如何配置

銳捷自定義訪問列表如何配置

發布時間: 2022-07-16 20:58:21

① 關於銳捷交換機配置

1、將USB轉串口網口數據線一頭插入交換機前面板的「consel」口。



注意事項:

四個網段也就是四個vlan的網關全部落在一台核心交換機上,就可以實現互通了,因為vlanif的地址在交換機里天生互通,然後核心交換機再以三層路由的方式到路由器出外網。最後的一台計算機或者設備可以通過外網訪問

② 銳捷交換機如何配置

交換機基本操作
1.進入特權模式
Switch>enable
Switch#
2.返回用戶模式
Switch#exit
Press
RETURN
to
get
started!
Switch>
配置模式:
全局配置模式[主機名(config)#]:配置交換機的整體參數
子模式:
1.線路配置模式[主機名(config-line)#]:配置交換機的線路參數
2.介面配置模式[主機名(config-if)#]:配置交換機的介面參數
1.進入全局配置模式下
Switch#configure
terminal
Switch(config)#exit
Switch#
2.進入線路配置模式
Switch(config)#line
console
0
Switch(config-line)#exit
Switch(config)#
3.進入介面配置模式
Switch(config)#interface
fastEthernet
0/1
Switch(config-if)#exit
Switch(config)#
從子模式下直接返回特權模式
Switch(config-if)#end
Switch#
交換機操作幫助特點:
1.支持命令簡寫(按TAB鍵將命令補充完整)
2.在每種操作模式下直接輸入「?」顯示該模式下所有的命令
3.命令空格
「?」顯示命令參數並對其解釋說明
4.字元「?」顯示以該字元開頭的命令
5.命令歷史緩存:
(Ctrl+P)顯示上一條命令,(Ctrl+N)顯示下一條命令
6.錯誤提示信息
交換機顯示命令:
顯示交換機硬體及軟體的信息
Switch#show
version
顯示當前運行的配置參數
Switch#show
running-config
顯示保存的配置參數
Switch#show
configure
常用交換機EXEC命令
將當前運行的配置參數復制到flash:Switch#write
memory
Building
configuration...
[OK]
Switch#
清空flash中的配置參數:Switch#delete
flash:config.text
Switch#
交換機重新啟動:Switch#reload
System
configuration
has
been
modified.
Save?
[yes/no]:n
Proceed
with
reload?
[confirm]
配置交換機主機名:Switch(config)#hostname
S2126G
S2126G(config)#
配置交換機口令:
1、
配置交換機的登陸密碼
S2126G(config)#enable
secret
level
1
0
star
「0」表示輸入的是明文形式的口令
2、
配置交換機的特權密碼
S2126G(config)#enable
secret
level
15
0
Star
「0」表示輸入的是明文形式的口令
常用交換機配置命令:
1、為交換機分配管理IP地址
S2126G(config)#interface
vlan
1
S2126G(config-if)#ip
address
{IP
address}
{IP
subnetmask}[secondary]
2、將介面啟用
S2126G(config-if)#no
shutdown
3、將介面關閉
S2126G(config-if)#shutdown
4、配置介面速率
S2126G(config-if)#speed
[10|100|auto]
5、配置介面雙工模式
S2126G(config-if)#plex
[auto|full|half
顯示介面狀態:S2126G#show
interfaces
測定目的端的可達性:S2126G>ping
{IP
address}
從Tftp伺服器下載配置參數:S2126G#
tftp
startup-config
管理交換機MAC地址表:
1、查看MAC地址表
S2126G#show
mac-address-table
2、配置MAC地址表記錄的生存時間(預設為300秒)
S2126G(config)#mac-address-table
aging-time
<10-1000000>
3、查看MAC地址表記錄的生存時間
S2126G#show
mac-address-table
aging-time
VLAN的配置:
1.添加一個VLAN
S2126G(config)#vlan
<1-4094>
S2126G(config-vlan)#
2.為VLAN命名(可選)
S2126G(config-vlan)#name
將交換機埠分配到VLAN
1.配置Port
VLAN
Switch(config-if)#switchport
access
vlan
<1-4094>
2.配置Tag
VLAN
Switch(config-if)#switchport
mode
trunk
1).配置本地(native)VLAN
Switch(config-if)#switchport
trunk
native
vlan
<1-4094>
2).從主幹鏈路中清除VLAN
Switch(config-if)#switchport
trunk
allowed
vlan
except
注:VLAN1不可被清除
VLAN的驗證:
1.顯示全部的VLAN:Switch#show
vlan
2.顯示單獨的VLAN
:Switch#show
vlan
id
<1-4094>
將VLAN信息保存到flash中:Switch#write
memory
從flash中清除VLAN信息:Switch#delete
flash:vlan.dat
RSTP的配置:
1.啟用生成樹:S2126G(config)#spanning-tree
2.配置交換機優先順序:S2126G(config)#spanning-tree
priority
<0-61440>
「0」或「4096」的倍數(RSTP
BPDU該值後12bit全0)
3.配置交換機埠優先順序:S2126G(config-if)#spanning-tree
port-priority
<0-240>
「0」或「16」的倍數(RSTP
BPDU該值後4bit全0)
4、生成樹hello時間的配置(由Root決定):S2126G(config)#spanning-tree
hello-time
<1-10>
5、生成樹的驗證:Switch#show
spanning-tree
Switch#show
spanning-tree
interface
<介面名稱>
<介面編號>
以上用於銳捷交換機的。交換機配置命令集>Enable
進入特權模式
#ExIT
返回上一級操作模式
#End
返回到特權模式
#write
memory

running-config
startup-config
保存配置文件
#del
flash:config.text
刪除配置文件(交換機及1700系列路由器)
#erase
startup-config
刪除配置文件(2500系列路由器)
#del
flash:vlan.dat
刪除Vlan配置信息(交換機)
#Configure
terminal
進入全局配置模式
(config)#
hostname
switchA
配置設備名稱為switchA
(config)#banner
motd
&
配置每日提示信息
&為終止符
(config)#enable
secret
level
1
0
star
配置遠程登陸密碼為star
(config)#enable
secret
level
15
0
star
配置特權密碼為star
Level
1為普通用戶級別,可選為1~15,15為最高許可權級別;0表示密碼不加密
(config)#enable
services
web-server
開啟交換機WEB管理功能
Services
可選以下:web-server(WEB管理)、telnet-server(遠程登陸)等查看信息
#show
running-config
查看當前生效的配置信息
#show
interface
fastethernet
0/3
查看F0/3埠信息
#show
interface
serial
1/2
查看S1/2埠信息
#show
interface
查看所有埠信息
#show
ip
interface
brief
以簡潔方式匯總查看所有埠信息
#show
ip
interface
查看所有埠信息
#show
version
查看版本信息
#show
mac-address-table
查看交換機當前MAC地址表信息
#show
running-config
查看當前生效的配置信息
#show
vlan
查看所有VLAN信息
#show
vlan
id
10
查看某一VLAN
(如VLAN10)的信息
#show
interface
fastethernet
0/1
switchport
查看某一埠模式(如F
0/1)
#show
aggregateport
1
summary
查看聚合埠AG1的信息
#show
spanning-tree
查看生成樹配置信息
#show
spanning-tree
interface
fastethernet
0/1
查看該埠的生成樹狀態
#show
port-security
查看交換機的埠安全配置信息
#show
port-security
address
查看地址安全綁定配置信息
#show
ip
access-lists
listname
查看名為listname的列表的配置信息
#show
access-lists埠的基本配置
(config)#Interface
fastethernet
0/3
進入F0/3的埠配置模式
(config)#interface
range
fa
0/1-2,0/5,0/7-9
進入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的埠配置模式
(config-if)#speed
10
配置埠速率為10M,可選10,100,auto
(config-if)#plex
full
配置埠為全雙工模式,可選full(全雙工),half(半雙式),auto(自適應)
(config-if)#no
shutdown
開啟該埠
(config-if)#switchport
access
vlan
10
將該埠劃入VLAN10中,用於VLAN
(config-if)#switchport
mode
trunk
將該埠設為trunk模式,用於Tag
vlan
可選模式為access
,
trunk
(config-if)#port-group
1
將該埠劃入聚合埠AG1中,用於聚合埠聚合埠的創建
(config)#
interface
aggregateport
1
創建聚合介面AG1
(config-if)#
switchport
mode
trunk
配置並保證AG1為
trunk
模式
(config)#int
f0/23-24
(config-if-range)#port-group
1
將埠(埠組)劃入聚合埠AG1中生成樹
(config)#spanning-tree
開啟生成樹協議
(config)#spanning-tree
mode
stp
指定生成樹類型為stp
可選模式stp
,
rstp
,
mstp
(config)#spanning-tree
priority
4096
設置交換機的優先順序為4096
,
優先順序值小為高。優先順序可選值為0,4096,8192,……,為4096的倍數。交換機默認值為32768VLAN的基本配置
(config)#vlan
10
創建VLAN10
(config-vlan)#name
vlanname
命名VLAN為vlanname
(config-if)#switchport
access
vlan
10
將該埠劃入VLAN10中
某埠的介面配置模式下進行
(config)#interface
vlan
10
進入VLAN
10的虛擬埠配置模式
(config-if)#
ip
address
192.168.1.1
255.255.255.0
為VLAN10的虛擬埠配置IP及掩碼,二層交換機只能配置一個IP,此IP是作為管理IP使用,例如,使用Telnet的方式登錄的IP地址
(config-if)#
no
shutdown
啟用該埠埠安全
(config)#
interface
fastethernet
0/1
進入一個埠
(config-if)#
switchport
port-security
開啟該埠的安全功能
1.配置最大連接數限制
(config-if)#
switchport
port-secruity
maxmum
1
配置埠的最大連接數為1,最大連接數為128
(config-if)#
switchport
port-secruity
violation
shutdown
配置安全違例的處理方式為shutdown,可選為protect
(當安全地址數滿後,將未知名地址丟棄)、restrict(當違例時,發送一個Trap通知)、shutdown(當違例時將埠關閉,並發送Trap通知,可在全局模式下用errdisable
recovery來恢復)
2.IP和MAC地址綁定
(config-if)#switchport
port-security
mac-address
xxxx.xxxx.xxxx
ip-address
172.16.1.1
介面配置模式下配置MAC地址xxxx.xxxx.xxxx和IP172.16.1.1進行綁定(MAC地址注意用小寫)三層路由功能(針對三層交換機)
(config)#
ip
routing
開啟三層交換機的路由功能
(config)#
interface
fastethernet
0/1
(config-if)#
no
switchport
開啟埠的三層路由功能(這樣就可以為某一埠配置IP)
(config-if)#
ip
address
192.168.1.1
255.255.255.0
(config-if)#
no
shutdown
三層交換機路由協議
(config)#
ip
route
172.16.1.0
255.255.255.0
172.16.2.1
配置靜態路由
注:172.16.1.0
255.255.255.0
為目標網路的網路號及子網掩碼
172.16.2.1
為下一跳的地址,也可用介面表示,如ip
route
172.16.1.0
255.255.255.0
serial
1/2(172.16.2.0所接的埠)
(config)#
router
rip
開啟RIP協議進程
(config-router)#
network
172.16.1.0
申明本設備的直連網段信息
(config-router)#
version
2
開啟RIP
V2,可選為version
1(RIPV1)、version
2(RIPV2)
(config-router)#
no
auto-summary
關閉路由信息的自動匯總功能(只有在RIPV2支持)(config)#
router
ospf
開啟OSPF路由協議進程(針對1762,無需使用進程ID)
(config)#
router
ospf
1
開啟OSPF路由協議進程(針對2501,需要加OSPF進程ID)
(config-router)#
network
192.168.1.0
0.0.0.255
area
0
申明直連網段信息,並分配區域號(area0為骨幹區域)IP
ACL:
交換機採用命名的訪問控制列表;分標准(stand)和擴展(extended)兩種
1.標准ACL
(config)#ip
access-list
stand
listname
定義命名標准列表,命名為listname,stand為標准列表
(config-std-nacl)#deny
192.168.30.0
0.0.0.255
拒絕來自192.168.30.0網段的IP流量通過
註:deny:拒絕通過;可選:deny(拒絕通過)、permit(允許通過)
192.168.30.0
0.0.0.255:源地址及源地址通配符;可使用any表示任何IP
(config-std-nacl)#permit
any
(config-std-nacl)#end
返回
2.擴展ACL
(config)#ip
access-list
extended
listname
定義命名擴展列表,命名為listname,extended為擴展
(config-ext-nacl)#deny
tcp
192.168.30.0
0.0.0.255
192.168.10.0
0.0.0.255
eq
www
拒絕源地址為192.168.30.0網段的IP訪問目的地址為192.168.10.0網段的WWW服務
註:deny:拒絕通過,可選:deny(拒絕通過)、permit(允許通過)
tcp:
協議名稱,協議可以是udp,
ip,eigrp,
gre,
icmp,
igmp,
igrp等等。
192.168.10.0
0.0.0.255:源地址及源地址通配符
192.168.30.0
0.0.0.255:目的地址及目的地址通配符
eq:操作符(lt-小於,eq-等於,gt-大於,neg-不等於,range-包含)
www:埠號,可使用名稱或具體編號
可以使用的協議名稱(或編號)和埠名稱(或編號)請打?查詢。
(config-ext-nacl)#permit
ip
any
any
允許其它通過
(config-ext-nacl)#end
返回
(config)#interface
vlan
10
進入埠配置模式
(config-if)#
ip
access-group
listname
in
訪問控制列表在埠下in方向應用;可選:in(入棧)、out(出棧)
(config-if)#end
返回
註:配置ACL時,若只想對其中部分IP進行限制訪問時,必須配置允許其流量通過,否則設備只會對限制IP進行處理,不會對非限制IP進行允許通過處理。

③ 銳捷MSTP配置

交換機
密碼
1234(config)#enable secret level 1 0 100
1234(config)#enable secret level 15 0 100
遠程登入密碼
1234(config)#line vty 0 4
1234(config-line)#password 100
1234(config-line)#end
交換機管理IP
1234(config)#interface vlan 1
1234(config-if)#ip address 192.168.1.10 255.255.255.0
1234(config-if)#no shutdown
修改交換機老化時間
1234(config)#mac-address-table aging-time 20
1234(config)#end
添刪vlan
1234(config)#vlan 888
1234(config-vlan)#name a888
1234(config)#no vlan 888
添加access口
1234(config)#interface gigabitEthernet 0/10
1234(config-if)#switchport mode access
1234(config-if)#switchport access vlan 10
切換assess trunk
1234(config-if)#switchport mode access
1234(config-if)#switchport mode trunk
指定特定一個native vlan
1234(config-if)#switchport trunk native vlan 10
配置trunk口的許可vlan列表
1234(config-if)#switchport trunk allowed vlan ?
add Add VLANs to the current list
all All VLANs
except All VLANs except the following
remove Remove VLANs from the current list
速成樹協議
1234(config)#spanning-tree
1234(config)#spanning-tree mode rstp/stp
配置網關:
switch(config)#ip default-gateway 192.168.1.254
交換機基本配置-常見查看命令
查看CPU利用率
show cpu
查看交換機時鍾
show clock
查看交換機日誌
show logging
查看交換機動態學習到的MAC地址表
show mac-address-table dynamic
查看當前交換機運行的配置文件
show running-config
查看交換機硬體、軟體信息
show version
查看交換機的arp表
show arp
顯示介面詳細信息的命令
show interfaces gigabitEthernet 4/1 counters
介面配置
Switch(config)#interface gigabitethernet 0/1
把介面工作模式改為光口。
Switch(config-if)#medium-type fiber
把介面工作模式改為電口。
Switch(config-if)#medium-type copper
速度/雙工配置
進入介面配置模式。
Switch(config)#interface interface-id
設置介面的速率參數,或者設置為auto。
Switch(config-if)#speed {10 | 100 | 1000 | auto }
設置介面的雙工模式。
Switch(config-if)#plex {auto | full | half}
例子
Switch(config)#interface gigabitethernet 0/1
Switch(config-if)#speed 1000
Switch(config-if)#plex full
光口不能修改速度和雙工配置,只能auto。
在故障處理的時候,如果遇到規律性的時斷時續或掉包,在排除其他原因後,可以考慮是否和對端設備的速率和雙工模式不匹配,尤其是兩端設備為不同廠商的時候。
VLAN
建立VLAN 100
Switch (config)#vlan 100
該VLAN名稱為ruijie
Switch (config)#name ruijie
將交換機介面劃入VLAN 中:
range表示選取了系列埠1-48,這個對多個埠進行相同配置時非常有用。
Switch (config)#interface range f 0/1-48
將介面劃到VLAN 100中。
Switch (config-if-range)#switchport access vlan 100
將介面劃回到默認VLAN 1中,即埠初始配置。
Switch (config-if-range)#no switchport access vlan
Switch(config)#interface fastEthernet 0/1
該埠工作在access模式下
Switch(config-if)#switchport mode access
該埠工作在trunk模式下
Switch(config-if)#switchport mode trunk
Switch(config)#interface fastEthernet 0/2
設定VLAN要修剪的VLAN。
Switch(config-if)#switchport trunk allowed vlan remove 2-9,11-19,21-4094
取消埠下的VLAN修剪。
Switch(config-if)#no switchport trunk allowed vlan
生成樹
開啟生成樹協議。
Switch(config)#spanning-tree
禁止生成樹協議。
Switch(config)#no spanning-tree
配置生成樹優先順序:
配置設備優先順序為4096。
Switch(config)#spanning-tree priority 4096
數值越低,優先順序別越高。
埠鏡像
配置G0/2為鏡像埠。
Switch (config)# monitor session 1 destination interface G 0/2
配置G0/1為被鏡像埠,且出入雙向數據均被鏡像。
Switch (config)# monitor session 1 source interface G 0/1 both
去掉鏡像1。
Switch (config)# no monitor session 1
埠聚合
Switch(config)#interface fastEthernet 0/1
把埠f0/1加入到聚合組1中。
Switch (config-if)#port-group 1
把埠f0/1從聚合組1中去掉
Switch (config-if)#no port-group 1
建立ACL:
建立ACL訪問控制列表名為ruijie,extend表示建立的是擴展訪
Switch(config)# Ip access-list exten ruijie
問控制列表。
添加ACL的規則:
禁止PING IP地址為192.168.1.1的設備。
Switch (config-ext-nacl)#deny icmp any 192.168.1.1 255.255.255.0
禁止埠號為135的應用。
Switch (config-ext-nacl)# deny tcp any any eq 135
禁止協議為www的應用。
Switch (config-ext-nacl)#deny udp any any eq www
允許所有行為。
Switch(config-ext-nacl)# permit ip any any
將ACL應用到具體的介面上:
Switch (config)#interface range f 0/1
把名為ruijie的ACL應用到埠f 0/1上。
Switch (config-if)#ip access-group ruijie in
從介面去除ACL。
Switch (config-if)#no ip access-group ruijie in
刪除ACL:
刪除名為ruijie的ACL。
Switch(config)#no Ip access-list exten ruijie
增加ACE項後,是增加到ACL最後,不可以中間插入,如果要調整ACE的順序,必須整個刪除ACL後再重新配置。
埠安全
Switch (config)#interface range f 0/1
開啟埠安全。
Switch(config-if)# switchport port-security
關閉埠安全。
Switch(config-if)# no switchport port-security
設置埠能包含的最大安全地址數為8。
Switch(config-if)# switchport port-security maximum 8
在介面fastethernet0/1配置一個安全地址00d0.f800.073c,並為其綁定一個IP地址192.168.1.1
Switch(config-if)# switchport port-security mac-address 00d0.f800.073c ip-address 192.168.1.1
刪除介面上配置的安全地址。
Switch(config-if)#no switchport port-security mac-address 00d0.f800.073c ip-address 192.168.1.1
防ARP攻擊
IP和MAC地址的綁定
Switch(config)#arp ip-address hardware-address [type] interface-id
Switch(config)#arp 192.168.12.111 00d0.f800.073c arpa g 0/1
綁定網關
進入指定埠進行配置。
Switch(config)#Interface interface-id
配置防止ip-address的ARP欺騙。
Switch(config-if)#Anti-ARP-Spoofing ip ip-address
防STP攻擊
進入埠Fa0/1。
Switch(config)# inter fastEthernet 0/1
打開該埠的的BPDU guard功能。
Switch(config-if)# spanning-tree bpguard enable
關閉該埠的的BPDU guard功能。
Switch(config-if)# spanning-tree bpguard diaable
埠關閉後只能shutdown然後再no shutdown
或者重新啟動交換機才能恢復!
防DOS/DDOS攻擊
進入埠Fa0/1。
Switch(config)# inter fastEthernet 0/1
預防偽造源IP的DOS攻擊的入口過濾功能。
Switch(config-if)#ip deny spoofing-source
關閉入口過濾功能只能在三層介面上配置。
Switch(config-if)#no ip deny spoofing-source
和ACL不能同時存在。
埠關閉後只能shutdown然後再no shutdown
或者重新啟動交換機才能恢復!
防IP掃描攻擊配置:
打開系統保護。
Switch(config)#system-guard enable
關閉系統保護功能。
Switch(config)#no system-guard
DHCP配置
打開DHCP Relay Agent:
Switch(config)#service dhcp
配置DHCP Server的IP地址:
Switch(config)#ip helper-address address
VRRP配置
Switch(config)#Interface interface-id
Switch(config-if)#Standby [group-number] ip ip-address
設置虛擬機的優先順序。
standby [group-number] priority priority
三層交換機配置
SVI:
把VLAN 10配置成SVI。
switch (config)#interface vlan 10
給該SVI介面配置一個IP地址
switch (config-if)#ip address 192.168.1.1 255.255.255.0
Routed Port:
switch (config)#interface fa 0/1
把f 0/1變成路由口。
switch (config-if)#no switch
路由配置:
添加一條路由。
switch (config)#ip route 目的地址 掩碼 下一跳
switch (config)#ip route 210.10.10.0 255.255.255.0 218.8.8.8

④ 路由器的訪問控制列表是怎樣設置的

在路由上建若干個訪問控制列表(ACL),然後配置好後把它們應用到相應埠,就能實現你的要求。
擴展型的ACL可以實現限制某些IP地址的某些服務或埠的攔截,比如電子郵件,FTP之類都是可以限制的,只能訪問某一站點也是可以實現的,只允許它們訪問限定的IP就行了。
具體的就是TELNET到你路由的介面,然後打命令去。具體命令想解釋清楚就太長了。。。也不知道你什麼情況沒法細說。
限制改IP也很容易實現,如果你用的WINDOWS的話,只要設置許可權就行了。具體的到「本地安全策略」里設,點
開始-運行-輸入「gpedit.msc」
在「本地策略」的「用戶權利指派」里有各用戶組的權利分配。如果對用戶組做調整,用「組策略」-開始-運行-「gpedit.msc」
可以把用戶劃分到不同的組以分配許可權。

⑤ 網路搭建初學者。求銳捷三層、二層交換機配置命令。銳捷路由器配置命令。盡量全一些。路由器的重啟方法。

銳捷網路交換機的配置命令集

交換機

>Enable 進入特權模式
#Exit 返回上一級操作模式
#End 返回到特權模式
#write memory 或 running-config startup-config 保存配置文件
#del flash:config.text 刪除配置文件(交換機及1700系列路由器)
#erase startup-config 刪除配置文件(2500系列路由器)
#del flash:vlan.dat 刪除Vlan配置信息(交換機)
#Configure terminal 進入全局配置模式
(config)# hostname switchA 配置設備名稱為switchA
(config)#banner motd & 配置每日提示信息 &為終止符
(config)#enable secret level 1 0 star 配置遠程登陸密碼為star
(config)#enable secret level 15 0 star 配置特權密碼為star
Level 1為普通用戶級別,可選為1~15,15為最高許可權級別;0表示密碼不加密
(config)#enable services web-server 開啟交換機WEB管理功能
Services 可選以下:web-server(WEB管理)、telnet-server(遠程登陸)等

查看信息
#show running-config 查看當前生效的配置信息
#show interface fastethernet 0/3 查看F0/3埠信息
#show interface serial 1/2 查看S1/2埠信息
#show interface 查看所有埠信息
#show ip interface brief 以簡潔方式匯總查看所有埠信息
#show ip interface 查看所有埠信息
#show version 查看版本信息
#show mac-address-table 查看交換機當前MAC地址表信息
#show running-config 查看當前生效的配置信息
#show vlan 查看所有VLAN信息
#show vlan id 10 查看某一VLAN (如VLAN10)的信息
#show interface fastethernet 0/1 switchport 查看某一埠模式(如F 0/1)
#show aggregateport 1 summary 查看聚合埠AG1的信息
#show spanning-tree 查看生成樹配置信息
#show spanning-tree interface fastethernet 0/1 查看該埠的生成樹狀態
#show port-security 查看交換機的埠安全配置信息
#show port-security address 查看地址安全綁定配置信息
#show ip access-lists listname 查看名為listname的列表的配置信息
#show access-lists

埠的基本配置
(config)#Interface fastethernet 0/3 進入F0/3的埠配置模式
(config)#interface range fa 0/1-2,0/5,0/7-9 進入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的埠配置模式
(config-if)#speed 10 配置埠速率為10M,可選10,100,auto
(config-if)#plex full 配置埠為全雙工模式,可選full(全雙工),half(半雙式),auto(自適應)
(config-if)#no shutdown 開啟該埠
(config-if)#switchport access vlan 10 將該埠劃入VLAN10中,用於VLAN
(config-if)#switchport mode trunk 將該埠設為trunk模式,用於Tag vlan
可選模式為access , trunk
(config-if)#port-group 1 將該埠劃入聚合埠AG1中,用於聚合埠

聚合埠的創建
(config)# interface aggregateport 1 創建聚合介面AG1
(config-if)# switchport mode trunk 配置並保證AG1為 trunk 模式
(config)#int f0/23-24
(config-if-range)#port-group 1 將埠(埠組)劃入聚合埠AG1中

生成樹
(config)#spanning-tree 開啟生成樹協議
(config)#spanning-tree mode stp 指定生成樹類型為stp
可選模式stp , rstp , mstp
(config)#spanning-tree priority 4096 設置交換機的優先順序為4096 , 優先順序值小為高。優先順序可選值為0,4096,8192,……,為4096的倍數。交換機默認值為32768

VLAN的基本配置
(config)#vlan 10 創建VLAN10
(config-vlan)#name vlanname 命名VLAN為vlanname
(config-if)#switchport access vlan 10 將該埠劃入VLAN10中
某埠的介面配置模式下進行
(config)#interface vlan 10 進入VLAN 10的虛擬埠配置模式
(config-if)# ip address 192.168.1.1 255.255.255.0 為VLAN10的虛擬埠配置IP及掩碼,二層交換機只能配置一個IP,此IP是作為管理IP使用,例如,使用Telnet的方式登錄的IP地址
(config-if)# no shutdown 啟用該埠

埠安全
(config)# interface fastethernet 0/1 進入一個埠
(config-if)# switchport port-security 開啟該埠的安全功能
1.配置最大連接數限制
(config-if)# switchport port-secruity maxmum 1 配置埠的最大連接數為1,最大連接數為128
(config-if)# switchport port-secruity violation shutdown
配置安全違例的處理方式為shutdown,可選為protect (當安全地址數滿後,將未知名地址丟棄)、restrict(當違例時,發送一個Trap通知)、shutdown(當違例時將埠關閉,並發送Trap通知,可在全局模式下用errdisable recovery來恢復)
2.IP和MAC地址綁定
(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx ip-address 172.16.1.1
介面配置模式下配置MAC地址xxxx.xxxx.xxxx和IP172.16.1.1進行綁定(MAC地址注意用小寫)

三層路由功能(針對三層交換機)
(config)# ip routing 開啟三層交換機的路由功能
(config)# interface fastethernet 0/1
(config-if)# no switchport 開啟埠的三層路由功能(這樣就可以為某一埠配置IP)
(config-if)# ip address 192.168.1.1 255.255.255.0
(config-if)# no shutdown
三層交換機路由協議
(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1 配置靜態路由
注:172.16.1.0 255.255.255.0 為目標網路的網路號及子網掩碼
172.16.2.1 為下一跳的地址,也可用介面表示,如ip route 172.16.1.0 255.255.255.0 serial 1/2(172.16.2.0所接的埠)
(config)# router rip 開啟RIP協議進程
(config-router)# network 172.16.1.0 申明本設備的直連網段信息
(config-router)# version 2 開啟RIP V2,可選為version 1(RIPV1)、version 2(RIPV2)
(config-router)# no auto-summary 關閉路由信息的自動匯總功能(只有在RIPV2支持)

(config)# router ospf 開啟OSPF路由協議進程(針對1762,無需使用進程ID)
(config)# router ospf 1 開啟OSPF路由協議進程(針對2501,需要加OSPF進程ID)
(config-router)# network 192.168.1.0 0.0.0.255 area 0
申明直連網段信息,並分配區域號(area0為骨幹區域)

IP ACL:
交換機採用命名的訪問控制列表;分標准(stand)和擴展(extended)兩種
1.標准ACL
(config)#ip access-list stand listname 定義命名標准列表,命名為listname,stand為標准列表
(config-std-nacl)#deny 192.168.30.0 0.0.0.255 拒絕來自192.168.30.0網段的IP流量通過
註:deny:拒絕通過;可選:deny(拒絕通過)、permit(允許通過)
192.168.30.0 0.0.0.255:源地址及源地址通配符;可使用any表示任何IP
(config-std-nacl)#permit any
(config-std-nacl)#end 返回
2.擴展ACL
(config)#ip access-list extended listname
定義命名擴展列表,命名為listname,extended為擴展
(config-ext-nacl)#deny tcp 192.168.30.0 0.0.0.255 192.168.10.0 0.0.0.255 eq www 拒絕源地址為192.168.30.0網段的IP訪問目的地址為192.168.10.0網段的WWW服務
註:deny:拒絕通過,可選:deny(拒絕通過)、permit(允許通過)
tcp: 協議名稱,協議可以是udp, ip,eigrp, gre, icmp, igmp, igrp等等。
192.168.10.0 0.0.0.255:源地址及源地址通配符
192.168.30.0 0.0.0.255:目的地址及目的地址通配符
eq:操作符(lt-小於,eq-等於,gt-大於,neg-不等於,range-包含)
www:埠號,可使用名稱或具體編號
可以使用的協議名稱(或編號)和埠名稱(或編號)請打?查詢。
(config-ext-nacl)#permit ip any any 允許其它通過
(config-ext-nacl)#end 返回
(config)#interface vlan 10 進入埠配置模式
(config-if)# ip access-group listname in 訪問控制列表在埠下in方向應用;可選:in(入棧)、out(出棧)
(config-if)#end 返回
註:配置ACL時,若只想對其中部分IP進行限制訪問時,必須配置允許其流量通過,否則設備只會對限制IP進行處理,不會對非限制IP進行允許通過處理。

⑥ 怎樣在銳捷交換機上配置vrrp、arp和mstp..

慢慢研究 、。。。。。。老師留的問題別老找槍手
交換機
密碼
1234(config)#enable secret level 1 0 100
1234(config)#enable secret level 15 0 100
遠程登入密碼
1234(config)#line vty 0 4
1234(config-line)#password 100
1234(config-line)#end
交換機管理IP
1234(config)#interface vlan 1
1234(config-if)#ip address 192.168.1.10 255.255.255.0
1234(config-if)#no shutdown
修改交換機老化時間
1234(config)#mac-address-table aging-time 20
1234(config)#end
添刪vlan
1234(config)#vlan 888
1234(config-vlan)#name a888
1234(config)#no vlan 888
添加access口
1234(config)#interface gigabitEthernet 0/10
1234(config-if)#switchport mode access
1234(config-if)#switchport access vlan 10
切換assess trunk
1234(config-if)#switchport mode access
1234(config-if)#switchport mode trunk
指定特定一個native vlan
1234(config-if)#switchport trunk native vlan 10
配置trunk口的許可vlan列表
1234(config-if)#switchport trunk allowed vlan ?
add Add VLANs to the current list
all All VLANs
except All VLANs except the following
remove Remove VLANs from the current list
速成樹協議
1234(config)#spanning-tree
1234(config)#spanning-tree mode rstp/stp
配置網關:
switch(config)#ip default-gateway 192.168.1.254
交換機基本配置-常見查看命令
查看CPU利用率
show cpu
查看交換機時鍾
show clock
查看交換機日誌
show logging
查看交換機動態學習到的MAC地址表
show mac-address-table dynamic
查看當前交換機運行的配置文件
show running-config
查看交換機硬體、軟體信息
show version
查看交換機的arp表
show arp
顯示介面詳細信息的命令
show interfaces gigabitEthernet 4/1 counters
介面配置
Switch(config)#interface gigabitethernet 0/1
把介面工作模式改為光口。
Switch(config-if)#medium-type fiber
把介面工作模式改為電口。
Switch(config-if)#medium-type copper
速度/雙工配置
進入介面配置模式。
Switch(config)#interface interface-id
設置介面的速率參數,或者設置為auto。
Switch(config-if)#speed {10 | 100 | 1000 | auto }
設置介面的雙工模式。
Switch(config-if)#plex {auto | full | half}
例子
Switch(config)#interface gigabitethernet 0/1
Switch(config-if)#speed 1000
Switch(config-if)#plex full
光口不能修改速度和雙工配置,只能auto。
在故障處理的時候,如果遇到規律性的時斷時續或掉包,在排除其他原因後,可以考慮是否和對端設備的速率和雙工模式不匹配,尤其是兩端設備為不同廠商的時候。
VLAN
建立VLAN 100
Switch (config)#vlan 100
該VLAN名稱為ruijie
Switch (config)#name ruijie
將交換機介面劃入VLAN 中:
range表示選取了系列埠1-48,這個對多個埠進行相同配置時非常有用。
Switch (config)#interface range f 0/1-48
將介面劃到VLAN 100中。
Switch (config-if-range)#switchport access vlan 100
將介面劃回到默認VLAN 1中,即埠初始配置。
Switch (config-if-range)#no switchport access vlan
Switch(config)#interface fastEthernet 0/1
該埠工作在access模式下
Switch(config-if)#switchport mode access
該埠工作在trunk模式下
Switch(config-if)#switchport mode trunk
Switch(config)#interface fastEthernet 0/2
設定VLAN要修剪的VLAN。
Switch(config-if)#switchport trunk allowed vlan remove 2-9,11-19,21-4094
取消埠下的VLAN修剪。
Switch(config-if)#no switchport trunk allowed vlan
生成樹
開啟生成樹協議。
Switch(config)#spanning-tree
禁止生成樹協議。
Switch(config)#no spanning-tree
配置生成樹優先順序:
配置設備優先順序為4096。
Switch(config)#spanning-tree priority 4096
數值越低,優先順序別越高。
埠鏡像
配置G0/2為鏡像埠。
Switch (config)# monitor session 1 destination interface G 0/2
配置G0/1為被鏡像埠,且出入雙向數據均被鏡像。
Switch (config)# monitor session 1 source interface G 0/1 both
去掉鏡像1。
Switch (config)# no monitor session 1
埠聚合
Switch(config)#interface fastEthernet 0/1
把埠f0/1加入到聚合組1中。
Switch (config-if)#port-group 1
把埠f0/1從聚合組1中去掉
Switch (config-if)#no port-group 1
建立ACL:
建立ACL訪問控制列表名為ruijie,extend表示建立的是擴展訪
Switch(config)# Ip access-list exten ruijie
問控制列表。
添加ACL的規則:
禁止PING IP地址為192.168.1.1的設備。
Switch (config-ext-nacl)#deny icmp any 192.168.1.1 255.255.255.0
禁止埠號為135的應用。
Switch (config-ext-nacl)# deny tcp any any eq 135
禁止協議為www的應用。
Switch (config-ext-nacl)#deny udp any any eq www
允許所有行為。
Switch(config-ext-nacl)# permit ip any any
將ACL應用到具體的介面上:
Switch (config)#interface range f 0/1
把名為ruijie的ACL應用到埠f 0/1上。
Switch (config-if)#ip access-group ruijie in
從介面去除ACL。
Switch (config-if)#no ip access-group ruijie in
刪除ACL:
刪除名為ruijie的ACL。
Switch(config)#no Ip access-list exten ruijie
增加ACE項後,是增加到ACL最後,不可以中間插入,如果要調整ACE的順序,必須整個刪除ACL後再重新配置。
埠安全
Switch (config)#interface range f 0/1
開啟埠安全。
Switch(config-if)# switchport port-security
關閉埠安全。
Switch(config-if)# no switchport port-security
設置埠能包含的最大安全地址數為8。
Switch(config-if)# switchport port-security maximum 8
在介面fastethernet0/1配置一個安全地址00d0.f800.073c,並為其綁定一個IP地址192.168.1.1
Switch(config-if)# switchport port-security mac-address 00d0.f800.073c ip-address 192.168.1.1
刪除介面上配置的安全地址。
Switch(config-if)#no switchport port-security mac-address 00d0.f800.073c ip-address 192.168.1.1
防ARP攻擊
IP和MAC地址的綁定
Switch(config)#arp ip-address hardware-address [type] interface-id
Switch(config)#arp 192.168.12.111 00d0.f800.073c arpa g 0/1
綁定網關
進入指定埠進行配置。
Switch(config)#Interface interface-id
配置防止ip-address的ARP欺騙。
Switch(config-if)#Anti-ARP-Spoofing ip ip-address
防STP攻擊
進入埠Fa0/1。
Switch(config)# inter fastEthernet 0/1
打開該埠的的BPDU guard功能。
Switch(config-if)# spanning-tree bpguard enable
關閉該埠的的BPDU guard功能。
Switch(config-if)# spanning-tree bpguard diaable
埠關閉後只能shutdown然後再no shutdown
或者重新啟動交換機才能恢復!
防DOS/DDOS攻擊
進入埠Fa0/1。
Switch(config)# inter fastEthernet 0/1
預防偽造源IP的DOS攻擊的入口過濾功能。
Switch(config-if)#ip deny spoofing-source
關閉入口過濾功能只能在三層介面上配置。
Switch(config-if)#no ip deny spoofing-source
和ACL不能同時存在。
埠關閉後只能shutdown然後再no shutdown
或者重新啟動交換機才能恢復!
防IP掃描攻擊配置:
打開系統保護。
Switch(config)#system-guard enable
關閉系統保護功能。
Switch(config)#no system-guard
DHCP配置
打開DHCP Relay Agent:
Switch(config)#service dhcp
配置DHCP Server的IP地址:
Switch(config)#ip helper-address address
VRRP配置
Switch(config)#Interface interface-id
Switch(config-if)#Standby [group-number] ip ip-address
設置虛擬機的優先順序。
standby [group-number] priority priority
三層交換機配置
SVI:
把VLAN 10配置成SVI。
switch (config)#interface vlan 10
給該SVI介面配置一個IP地址
switch (config-if)#ip address 192.168.1.1 255.255.255.0
Routed Port:
switch (config)#interface fa 0/1
把f 0/1變成路由口。
switch (config-if)#no switch
路由配置:
添加一條路由。
switch (config)#ip route 目的地址 掩碼 下一跳
switch (config)#ip route 210.10.10.0 255.255.255.0 218.8.8.8

⑦ 如何在銳捷2126G交換機配置訪問控制列表

能讓我看看你的配置嗎?
這樣很難幫你解決

回復你:
你在FA0/1口上讓45 41 44 59 都允許過去了
我就納悶了 你到底是想允許還是阻止呢??

熱點內容
我的世界ec伺服器消失了 發布:2024-10-07 21:48:30 瀏覽:661
pythonziptodict 發布:2024-10-07 21:36:09 瀏覽:790
linux操作系統教程 發布:2024-10-07 21:16:54 瀏覽:280
摩托音響怎麼配置 發布:2024-10-07 21:12:37 瀏覽:348
本田思域哪個配置好 發布:2024-10-07 21:04:11 瀏覽:347
演算法期末試卷 發布:2024-10-07 20:51:04 瀏覽:808
編譯期錯誤提示 發布:2024-10-07 20:07:23 瀏覽:296
阿里雲伺服器打開慢 發布:2024-10-07 20:06:33 瀏覽:577
磁存儲行業的前景 發布:2024-10-07 20:01:29 瀏覽:548
android對象序列化 發布:2024-10-07 20:01:28 瀏覽:760