config cisco switch

วิธี config switch cisco

หมายเหตุ***ก่อนเข้าใช้งาน command switch cisco และ running คำสั่งต่างๆต้อง login ก่อน ทุกครั้ง ตัวอย่าง

switch>en
switch>cisco(default password ของ switch cisco)
switch#

วิธีเปลี่ยน password หรือ create password ใหม่

switch#conf t
switch(config)#enable secret supertan(supertanคือพาสเวิร์ดที่เราตั้งใหม่)
switch(config)#end

วิธี set "VTP" mode server และ client

switch#conf t
switch(config)#vtp mode server
switch(config)#end

switch#conf t
switch(config)#vtp mode client
switch(config)#end
วิธีตั้งชื่อ "VLAN"

switch#conf t
switch(config)#vlan 200
switch(config-vlan)#name FRONT(FRONTคือชื่อที่เราต้องตั้ง)
switch(config)#end

วิธี Add port to VLAN ทำทุก swicth เหมือนกัน

switch#conf t
switch(config)#int gi0/1
switch(config-if)#switchport access vlan 200
switch(config-if)#switchport mode access
switch(config-if)#end

วิธีทำ trunk mode 

switch#conf t
switch(config)#int gi0/1
switch(config-if)#switchport mode trunk
switch(config-if)#end

วิธีตั้งค่า request dhcp

switch#conf t
switch(config)#int vlan 200
switch(config-vlan)#ip helper-address 192.168.xx.xxx(192.168.xx.xxx คือ ip ที่เราต้องการตั้ง)

วิธีตั้งชื่อ hostname 

switch#conf t
switch(config)#hostname SW_2960(SW_2960 คือ =ชื่อ hostname ที่ตั้ง)
SW_2960(config)#en

วิธีตั้งค่า ip ให้ switch

switch#conf t
switch(config)#int vlan xxx (ชื่อ vlan ที่เราสร้างมา เช่น vlan 200)
switch(config-if)#ip address 192.168.xx.xxx (192.168.xx.xxx คือ ip ที่เราต้องการตั้ง)

คำสั่งดูสถานะ vlan

switch#sh vlan

คำสั่งดูสถานะ vtp

switch#sh vtp status

คำสั่งดูสถานะ 

switch#sh running 

วิธีทำ trunk mode ของ switch 3560G

switch#conf t
switch(config)#int gi0/1
switch(config-if)#switchport trunk encapsulation dot1q
switch(config-if)#switchport mode trunk
switch(config-if)#end

วิธีทำ spanning-tree pordtfast  (ข้อดีทำให้ interface up เร็ว)

switch#conf t
switch#(config)#int fa0/1
switch#(config-if)#spanning-tree portfast

No comments:

Post a Comment