首页 | 互联网 | IT动态 | IT培训 | Cisco | Windows | Linux | Java | .Net | Oracle | 软件测试 | C/C++ | 嵌入式开发 | 存储世界 | 服务器
网络设备 | IDC | 安全 | 求职招聘 | 数字网校 | 网页设计 | 平面设计 | 技术专题 | 电子书下载 | 教学视频 | 源码下载 | 搜索 | 博客 | 论坛
欢迎光临中国IT实验室思科频道
Google
您现在的位置: 中国IT实验室 >> Cisco >> 网络管理 >> VLan >> 正文

实战:为交换机配置VLAN网络

    (二)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

上一页  [1] [2] [3] [4] 下一页

【责编:Zenghui】
中国IT教育
相关产品和培训
文章评论
 友情推荐精华
 专题推荐

 ·巧用网络流量 打造健康内网…
 ·无线路由器设置从入门到精通
 ·企业网管如何部署你的网络监控系统?
 ·负载均衡技术方案攻略
 ·中国IT实验室2007年技术热点盘点
 ·利用路由实现VPN的配置方法
 ·让你的局域网网速更上一层楼
 ·小命令大作用---Ping
 ·OSPF路由协议专题
 ·三层交换技术专题
 今日更新
 认证培训
 频道精选
 思科频道导航