q968 发表于 2018-7-10 11:29:41

Cisco 2960配置文档

  Switch>en
  Switch#conf t
  Enter configuration commands, one per line. End with CNTL/Z.
  Switch(config)#hostname CETSFIS-F-CS2960-1C-33
  CETSFIS-F-CS2960-1C-33(config)#exit
  CETSFIS-F-CS2960-1C-33#vlan data
  % Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.
  CETSFIS-F-CS2960-1C-33(vlan)#vlan 100 name Management-VLAN
  VLAN 100 added:
  Name: Management-VLAN
  CETSFIS-F-CS2960-1C-33(vlan)#vlan 2 name CET-C
  VLAN 2 added:
  Name: CET-C
  CETSFIS-F-CS2960-1C-33(vlan)#vlan 4 name CET-E
  VLAN 4 added:
  Name: CET-E
  CETSFIS-F-CS2960-1C-33(vlan)#vlan 34 name Area-F
  VLAN 34 added:
  Name: Area-F
  CETSFIS-F-CS2960-1C-33(vlan)#exit
  APPLY completed.
  Exiting....
  CETSFIS-F-CS2960-1C-33#conf t
  CETSFIS-F-CS2960-1C-3(config)#int vlan 1
  CETSFIS-F-CS2960-1(config-if)#shutdown
  CETSFIS-F-CS2960-1(config-if)#int vlan 100
  CETSFIS-F-CS2960-1(config-if)#no shutdown
  CETSFIS-F-CS2960-1(config-if)#ip address 10.114.0.33 255.255.255.0
  CETSFIS-F-CS2960-1(config-if)#exit
  CETSFIS-F-CS2960-1C-3(config)#ip default-gateway 10.114.0.254
  CETSFIS-F-CS2960-1C-3(config)#interface rang gi0/1 -2
  CETSFIS-F-CS(config-if-range)#switchport mode trunk
  CETSFIS-F-CS(config-if-range)#interface rang fa0/1 -48
  CETSFIS-F-CS(config-if-range)#switchport mode access
  CETSFIS-F-CS(config-if-range)#switchport access vlan 34
  CETSFIS-F-CS(config-if-range)#spanning-tree portfast
  %Warning: portfast should only be enabled on ports connected to a single
  host. Connecting hubs, concentrators, switches, bridges, etc... to this
  interface when portfast is enabled, can cause temporary bridging loops.
  Use with CAUTION
  %Portfast will be configured in 48 interfaces due to the range command
  but will only have effect when the interfaces are in a non-trunking mode.
  CETSFIS-F-CS(config-if-range)#exit
  CETSFIS-F-CS2960-1C-3(config)#vtp domain SFIS
  Changing VTP domain name from NULL to SFIS
  CETSFIS-F-CS2960-1C-3(config)#vtp mode transparent
  Setting device to VTP TRANSPARENT mode.
  CETSFIS-F-CS2960-1C-3(config)#snmp-server community netteam ro
  CETSFIS-F-CS2960-1C-3(config)#snmp-server community netteam%123 rw
  CETSFIS-F-CS2960-1C-3(config)#logging 10.114.5.88
  CETSFIS-F-CS2960-1C-3(config)#service timestamps log datetime localtime
  CETSFIS-F-CS2960-1C-3(config)#clock timezone gmt +8
  CETSFIS-F-CS2960-1C-3(config)#ntp server 10.114.5.100
  CETSFIS-F-CS2960-1C-3(config)#line vty 0 4
  CETSFIS-F-CS2960(config-line)#password xxxxxxx
  CETSFIS-F-CS2960(config-line)#login
  CETSFIS-F-CS2960(config-line)#exit
  CETSFIS-F-CS2960-1C-3(config)#enable secret xxxxxxx
  CETSFIS-F-CS2960-1C-3(config)#service password-encryption
  CETSFIS-F-CS2960-1C-3(config)#end
  CETSFIS-F-CS2960-1C-33#wr
  CETSFIS-F-CS2960-1C-3(config)#line console 0
  CETSFIS-F-CS2960(config-line)#logging synchronous
页: [1]
查看完整版本: Cisco 2960配置文档