--切VLAN

#vlan database
#vlan 2 name test2 //新增一個vid 2 name 叫 test2
#exit
#configure terminal
#int Gi1/0/25 //指定25PORT為vlan2
#switchport mode access
#switchport access vlan 2
#end

//儲存結果
#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]


--設定default gateway
ip default-gateway 1.1.1.1 <-- 輸入wan gateway
ip route 0.0.0.0 0.0.0.0 1.1.1.1

--開啟fiber port
#conf t
#int Gi1/0/25
#speed nonegotiate


--切子網路
# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface vlan2 //把子網路綁在vlan2上面
Switch(config-if)# ip address 1.1.1.1 255.255.255.240
Switch(config-if)# ip address 1.1.1.31 255.255.255.240 secondary
Switch(config-if)# no shutdown

--限頻寬
mls qos
!
ip access-list extended anytoany
permit ip any any
exit

***INPUT

class-map match-any upload-5m
match access-group name anytoany

policy-map UPLOAD-5M
class upload-5m
police 5120000 1024000 exceed-action drop

interface Gi1/0/x
service-policy input UPLOAD-5M

***OUTPUT
interface Gi1/0/x
speed 10
srr-queue bandwidth limit 20 <-- 表示 SPEED 的% 範圍 10-80

--查看port 狀態
#show int status

--關閉 port
#conf t
#int Gi1/0/1
#shutdown

--開啟 port
#conf t
#int Gi1/0/1
#no shutdown



arrow
arrow
    全站熱搜

    fireyoyo 發表在 痞客邦 留言(0) 人氣()