首页新闻资讯管理维护网络安全机房管理部署集成网管工具网管资料专题论坛 杂志
当前位置:首页 >> 管理维护 >> VLAN >> 为交换机配置VLAN网络(3)
为交换机配置VLAN网络(3)
来源:中国IT实验室 作者: 发布时间:2008-05-09
(二)CISCO2950交换机的配置

  Catalyst 2950 (Catalyst 2950G-48 Switch)

  Cat2950#show running-config
  Building configuration...

  Current configuration : 2883 bytes
  !
  version 12.1
  no service single-slot-reload-enable
  no service pad
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname Cat2950
  !
  ip subnet-zero
  !
  spanning-tree extend system-id
  !
  interface FastEthernet0/1
  no ip address
  !

  !--- Output suppressed.

  interface FastEthernet0/16
  no ip address
  !
  interface FastEthernet0/17
  description SERVER_2
  switchport access vlan 3
  switchport mode access
  no ip address
  spanning-tree portfast
  ! fa0/17是连接服务器_2的端口,属于VLAN3,而且设置为“spanning-tree portfast”模式

  !--- Output suppressed.
  !
  interface FastEthernet0/33
  description HOST_1

  !--- Configure HOST_1 to be the user VLAN, VLAN 2. fa0/33端口接入了用户主机_1所以设置为VLAN2

  switchport access vlan 2
  switchport mode access
  no ip address
  spanning-tree portfast
  !
  !--- Output suppressed.

  interface GigabitEthernet0/1
  switchport trunk encapsulation dot1q
  no ip address
  ! 因为端口g0/1是上连到CISCO3550交换机的,所以设置为TRUNK模式
  interface GigabitEthernet0/2
  no ip address
  !
  interface Vlan1
  no ip address
  no ip route-cache
  shutdown
  !
  interface Vlan10
  description MANAGEMENT

  !--- This IP address manages this switch.  (VLAN10是管理VLAN)

  ip address 10.1.10.2 255.255.255.0
  no ip route-cache
  !

  !--- Configure the default gateway so that the switch is reachable from other
  !--- VLANs/subnets. The gateway points to the VLAN 10 interface on the 3550.

  ip default-gateway 10.1.10.1
  ip http server
  !
  line con 0
  line vty 5 15
  !
  End

(责任编辑:JP)
阅读次数:
快速检索
推荐文章
 
网友评论
评论加载中…
 
友情链接 | 欢迎投稿 | 杂志发行 | 广告报价 | 人才招聘 | 服务条款 | 免责声明 | 隐私保护 | 关于网管员世界
CopyRight © 2001-2008 [网管员世界 www.365master.com] All Rights Reserved.
《网管员世界》杂志,专为网管服务的刊物!