網(wǎng)工路由交換相關(guān)配置
思科2950交換機(jī)相關(guān)配置
基本操作
2950(config)#int vlan1
2950(config-if)#ip address 192.168.1.100 255.255.255.0 (VLAN1里面設(shè)置IP地址)
2950(config)#ip default-gateway 192.168.1.1 (設(shè)置默認(rèn)網(wǎng)關(guān))
2950(config)#ip name-server 192.168.1.1 (設(shè)置域名服務(wù)器)
2950(config)#ip domain-name wqs.com (設(shè)置域名)
端口配置
2950(config)#int f0/1 (進(jìn)入接口)
2950(config-if)#speed 100 (設(shè)置該接口速率為100Mb/s)
2950(config-if)#duplex ?
auto Enable AUTO duplex configuration
full Force full duplex operation
half Force half-duplex operation2950(config-if)#description to_router1
2950(config-if)#description to_router1 (設(shè)置端口描述)
2950#show interfaces fastethernet1 [status] (查看端口配置結(jié)果和狀態(tài))
MAC地址表相關(guān)命令
2950(config)#mac-address-table aging-time 100 (設(shè)置超時時間為100S)
2950(config)#mac-address-table permanent 000.0c01.bbcc f0/3 (加入永久地址)
2950(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 (加入靜態(tài)地址)
2950#show mac-address-table (查看整個MAC地址表)
2950#clear mac-address-table restricted static (清除限制性MAC址表)
VTP的配置
2950#vlan database (進(jìn)入VLAN配置模式)
2950(vlan)#vtp ? (查看VTP的子命令)
domain Set the name of the VTP administrative domain.
client Set the device to client mode.
server Set the device to server mode.
transparent Set the device to transparent mode.
password Set the password for the VTP administrative domain.
2950(vlan)#vtp domain server (設(shè)置本交換機(jī)為SEVER模式)
2950(vlan)#vtp domain wqs (設(shè)置域名)
2950(vlan)#vtp pruning (啟動修剪模式)
2950#show vtp status (查看VTP設(shè)置信息)
配置VLAN TRUNK端口
2950(config)#int f0/11 (進(jìn)入F端口)
2950(config-if)#switchport mode trunk (設(shè)置該端口為TRUNK模式)
2950(config-if)#switchport trunk encapsulation {dot1q | isl | negotiate }(設(shè)置TRUNK封裝)
創(chuàng)建VLAN
2950#vlan database (進(jìn)入VLAN配置模式)
2950(vlan)#vlan 2 (創(chuàng)建VLAN 2)
VLAN 2 added:
Name:VLAN0002 (系統(tǒng)默認(rèn)名)
2950(vlan)#vlan 3 name wg_bisheng (創(chuàng)建VLAN 3,名為網(wǎng)工必勝)
VLAN 3 added:
Name:wg_bisheng
2950(config)#int f0/9 (進(jìn)入接口配置模式)
2950(config-if)#switchport mode access (設(shè)置該接口為ACCESS模式)
2950(config-if)#switchport access vlan 2 (把端口9分配給VLAN2)
2950(config-if)#int f0/8
2950(config-if)#switchport mode access
2950(config-if)#switchport access vlan 3
2950(config-if)#
生成樹協(xié)議的配置
生成樹負(fù)載均衡實(shí)現(xiàn)方法(感謝黑客天使提醒)
1 使用STP端口權(quán)值實(shí)現(xiàn)。
2 使用STP路徑值實(shí)現(xiàn)
2950(config)#int f0/11
2950(config-if)#spanning-tree vlan 2 port-priority 10 (將VLAN2的端口權(quán)值設(shè)為10)
2950(config-if)#spanning-tree vlan 2 cost 30 (設(shè)置VLAN2生成樹路徑值為30)
路由器的一些設(shè)置
|
|