• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

Catalyst3500基本配置

发布: 2007-6-23 15:23 | 作者:   | 来源:   | 查看: 23次 | 进入软件测试论坛讨论

领测软件测试网

   
  Catalyst 3524
  
  对于Cisco的交换机和路由器来讲,虽然其不同型号的交换机的实现命令上有着很多的相似之处,但是,不同的交换机命令格式的差异却为网络设备的配置带来了一定的不便,因此,本人根据手头的交换机,进行一些基本操作的命令介绍,

同时也有具体的配置实例。希望对网友的实际工作和学习有所帮助。同时也很希望有机会与各位网友一起交流探讨!
  
  Catalyst 3524 switch IP 地址的配置
  直接进入默认的VLAN 1中进行配置命令如下:
  interface VLAN1
  ip address 172.16.1.3 255.255.0.0
  即可。
  
  在Catalyst 中控制对Te.net的访问
  bluestudy_a(config)#access-list 2 permit 172.16.0.0 0.0.255.255 (定义标准的访问列表)
  bluestudy_a(config)#line vty 0 15(进入telnet端口,最多允许16个telnet的会话)
  bluestudy_a(config-line)#access-class 2 in(应用上述定义的访问列表,即只有172.16.0.0/16的网段可以实现对交换机的telnet会话
  
  设置交换机的enable 密码
  bluestudy_a(config)#enable password bluestudy
  bluestudy_a(config)#enable secret bluestudy
  The enable secret you have chosen is the same as your enable password.
  This is not recommended. Re-enter the enable secret.
  注:对于如上的密码,secret的优先级更高,优先起作用。
  
  设置console口密码
  bluestudy_a(config)#line con 0
  bluestudy_a(config-line)#password bluestudy
  bluestudy_a(config-line)#
  
  设置对telnet的密码:
  bluestudy_a(config)#line vty 0 15
  bluestudy_a(config-line)#login
  bluestudy_a(config-line)#password bluestudy
  bluestudy_a(config-line)#
  
  设置登陆用户名和密码:
  
  bluestudy_a(config)#username bluestudy password bluestudy
  bluestudy_a(config)#
  
  
  bluestudy_a#show running
  
  Current configuration:
  !
  version 12.0
  no service pad
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname bluestudy_a
  !
  enable secret 5 $1$b1mb$p6XgV/PY9WqvJy9MrHZFG/
  enable password bluestudy
  !
  username bluestudy password 0 bluestudy
  !
  ip subnet-zero
  !
  interface FastEthernet0/1
  !
  interface FastEthernet0/2
  !
  interface FastEthernet0/3
  !
  interface FastEthernet0/4
  !
  interface FastEthernet0/5
  !
  interface FastEthernet0/6
  !
  interface FastEthernet0/24
  !
  interface GigabitEthernet0/1
  !
  interface GigabitEthernet0/2
  !
  interface VLAN1
  ip address 172.16.1.3 255.255.0.0
  no ip directed-broadcast
  no ip route-cache
  !
  access-list 2 permit 172.16.0.0 0.0.255.255
  !
  line con 0
  password bluestudy
  transport input none
  stopbits 1
  line vty 0 4
  access-class 2 in
  password bluestudy
  login
  line vty 5 15
  access-class 2 in
  password bluestudy
  login
  !
  end
  bluestudy_a#
  
   
  
   
  
  port channel 与 Spanning tree连接的区别
  
  bluestudy_a(config)#interface fastEthernet 0/1
  bluestudy_a(config-if)#port group 2
  bluestudy_a(config-if)#
  bluestudy_a(config)#interface fastEthernet 0/2
  bluestudy_a(config-if)#port group 2
  bluestudy_a(config-if)#
  
  bluestudy_b(config)#interface fastEthernet 0/23
  bluestudy_b(config-if)#port group 2
  bluestudy_b(config-if)#
  bluestudy_b(config)#interface fastEthernet 0/24
  bluestudy_b(config-if)#port group 2
  bluestudy_a(config-if)#
  
  这时在bluestudy_a与bluestudy_b之间连接的两条双较线的端口灯均是绿色,表示二者传输数据正常。
  
  现在我将双方之间的channel配置去掉
  bluestudy_a(config)#interface fastEthernet 0/1
  bluestudy_a(config-if)#no port group 2
  bluestudy_a(config-if)#
  bluestudy_a(config)#interface fastEthernet 0/2
  bluestudy_a(config-if)#no port group 2
  bluestudy_a(config-if)#
  
  bluestudy_b(config)#interface fastEthernet 0/23
  bluestudy_b(config-if)#no port group 2
  bluestudy_b(config-if)#
  bluestudy_b(config)#interface fastEthernet 0/24
  bluestudy_b(config-if)#no port group 2
  bluestudy_a(config-if)#
  
  然后打开Spanning tree
  bluestudy_a(config)#spanning-tree vlan 1
  bluestudy_a(config)#
  bluestudy_b(config)#spanning-tree vlan 1
  bluestudy_b(config)#
  
  在交换机b上查看Spanning tree状态
  bluestudy_b#show spanning-tree vlan 1
  
  Spanning tree 1 is executing the IEEE compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, address 0006.d74f.6700
  Configured hello time 2, max age 20, forward delay 15
  Current root has priority 32768, address 0006.5329.cd80
  Root port is 13, cost of root path is 19
  Topology change flag not set, detected flag not set, changes 30
  Times: hold 1, topology change 35, notification 2
  hello 2, max age 20, forward delay 15
  Timers: hello 0, topology change 0, notification 0
  
  Interface Fa0/1 (port 13) in Spanning tree 1 is FORWARDING
  Port path cost 19, Port priority 128
  Designated root has priority 32768, address 0006.5329.cd80
  Designated bridge has priority 32768, address 0006.5329.cd80
  Designated port is 37, path cost 0
  Timers: message age 1, forward delay 0, hold 0
  BPDU: sent 2, received 358
  
  Interface Fa0/2 (port 14) in Spanning tree 1 is BLOCKING
  Port path cost 19, Port priority 128
  Designated root has priority 32768, address 0006.5329.cd80
  Designated bridge has priority 32768, address 0006.5329.cd80
  Designated port is 38, path cost 0
  Timers: message age 0, forward delay 0, hold 0
  BPDU: sent 1, received 351
  Interface Fa0/3 (port 15) in Spanning tree 1 is down
  Port path cost 100, Port priority 128
  Designated root has priority 32768, address 0006.5329.cd80
  Designated bridge has priority 32768, address 0006.d74f.6700
  Designated port is 15, path cost 19
  Timers: message age 0, forward delay 0, hold 0
  BPDU: sent 1, received 0
  
  在交换机a上查看Spanning tree状态
  
  bluestudy_b#show spanning-tree vlan 1
  Interface Fa0/23 (port 37) in Spanning tree 1 is FORWARDING
  Port path cost 19, Port priority 128
  Designated root has priority 150, address 0006.d74f.6700
  Designated bridge has priority 150, address 0006.d74f.6700
  Designated port is 13, path cost 0
  Timers: message age 4, forward delay 0, hold 0
  BPDU: sent 453, received 119
  
  Interface Fa0/24 (port 38) in Spanning tree 1 is BLOCKING
  Port path cost 19, Port priority 128
  Designated root has priority 150, address 0006.d74f.6700
  Designated bridge has priority 150, address 0006.d74f.6700
  Designated port is 14, path cost 0
  Timers: message age 3, forward delay 0, hold 0
  BPDU: sent 440, received 118
  结果如上:一根通一根断
  
  
   
  
   
  
  对堆叠端口同样进行trunk封装
  bluestudy_a#config t
  Enter configuration commands, one per line. End with CNTL/Z.
  bluestudy_a(config)#interface gigabitEthernet 0/1(此端口为堆叠端口)
  bluestudy_a(config-if)#switchport mode trunk
  bluestudy_a(config-if)#
  bluestudy_b(config)#interface gigabitEthernet 0/1(此端口为堆叠端口)
  bluestudy_b(config-if)#switchport mode trunk
  bluestudy_b(config-if)#
  bluestudy_c(config)#interface gigabitEthernet 0/2(此端口为堆叠端口)
  bluestudy_c(config-if)#switchport mode trunk
  bluestudy_c(config-if)#
  bluestudy_d(config)#interface gigabitEthernet 0/2(此端口为堆叠端口)
  bluestudy_d(config-if

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网