南天一柱 发表于 2018-7-22 12:11:37

cisco命令大全解释、注释(转载)

配置VLAN trunkconfigure terminal 进入配置状态  interface interface-Id 进入端口配置状态
  switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封装ISL 或 802.1Q 或自动协商
  switchport mode {dynamic {auto | desirable} | trunk} 配置二层trunk模式。
  dynamic auto—自动协商是否成为trunk
  dynamic desirable—把端口设置为trunk如果对方端口是trunk, desirable, 配置Native VLAN(802.1q)
  或自动模式,trunk—设置端口为强制的trunk方式,而不理会对方端口是否为trunk
  switchport access vlan vlan-id 可选) 指定一个缺省VLAN, 如果此端口不再是trunk
  switchport trunk native vlan vlan-id 指定802.1Q native VLAN号
  例:
  Switch# configure terminal
  Enter configuration commands, one per line. End with CNTL/Z.
  Switch(config)# interface fastethernet0/4
  Switch(config-if)# switchport mode trunk
  Switch(config-if)# switchport trunk encapsulation dot1q
  Switch(config-if)# end
  定义TRUNK允许的VLAN
  configure terminal子 进入配置状态
  interface interface-id 进入端口配置
  switchport mode trunk 配置二层口为trunk
  switchport trunk allowed vlan {add | all | except | remove} vlan-list可选) 配置trunk允许的VLAN.使用add, all, except, remove关健字
  no switchport trunk allowed vlan 允许所有VLAN通过
  例
  Switch(config)# interface fastethernet0/1
  Switch(config-if)# switchport trunk allowed vlan remove 2
  Switch(config-if)# end
  配置Native VLAN(802.1q)
  configure terminal 进入配置状态
  interface interface-id 进入配置成802.1qtrunk的端口
  switchport trunk native vlan vlan-Id 配置native VLAN号
  no switchport trunk native vlan 端口配置命令回到缺省的状态
  配置基于端口权值的负载均衡
  configure terminal 进入Switch 1配置状态
  vtp domain domain-name 配置VTP域
  vtp mode server 将Switch 1配置成VTP server.
  show vtp status 验证VTP的配置
  show vlan 验证VLAN
  configure terminal 进入配置状态
  interface fastethernet 0/1 进入F0/1端口
  switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封装
  switchport mode trunk 配置成trunk
  show interfaces fastethernet0/1 switchport 验证VLAN配置
  按以上步骤对想要负载均衡的接口进行配置
页: [1]
查看完整版本: cisco命令大全解释、注释(转载)