Chinaunix首页 | 论坛 | 博客

qsh

  • 博客访问: 3939061
  • 博文数量: 1015
  • 博客积分: 15904
  • 博客等级: 上将
  • 技术积分: 8572
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-04 19:16
文章分类

全部博文(1015)

文章存档

2019年(1)

2017年(1)

2016年(19)

2015年(27)

2014年(30)

2013年(95)

2012年(199)

2011年(72)

2010年(109)

2009年(166)

2008年(296)

分类: 网络与安全

2011-12-17 22:14:33

 
PVST+HSRP


1、初始化设备
en
conf t
no ip domain lookup
line con 0
exec-timeout 0 0
logging synchronous
2、起trunk端口,做以太网通道
--------------------- 3560-SW1的配置--------------------------------
interface FastEthernet0/2
switchport mode trunk
interface FastEthernet0/3
switchport mode trunk
interface FastEthernet0/4(interface range f0/2 - 4 )
switchport mode trunk (sw mo tr)
interface FastEthernet0/5
switchport mode trunk
channel-group 1 mode on
interface FastEthernet0/6
switchport mode trunk
channel-group 1 mode on
interface FastEthernet0/7
switchport mode trunk
channel-group 1 mode on
interface FastEthernet0/8(interface range f0/5 - 8)
switchport mode trunk (sw mo tr)
channel-group 1 mode on (channel-group 1 mode on )
----------------------3560-sw2的配置-------------------------------

interface FastEthernet0/2
switchport mode trunk
interface FastEthernet0/3
switchport mode trunk
interface FastEthernet0/4
switchport mode trunk
interface FastEthernet0/5
switchport mode trunk
channel-group 1 mode on
interface FastEthernet0/6
switchport mode trunk
channel-group 1 mode on
interface FastEthernet0/7
switchport mode trunk
channel-group 1 mode on
interface FastEthernet0/8
switchport mode trunk
channel-group 1 mode on
-----------------------2950-sw1的配置---------------------------------

interface FastEthernet0/1
switchport mode trunk
interface FastEthernet0/2
switchport mode trunk
3、进入vlan数据库模式,配置VTP协议,划分VLAN
--------------------- 3560-SW1的配置--------------------------------
vlan data
vtp do wang
vtp tran
vtp server
vlan 10 name cwb
vlan 20 name clb
vlan 30 name cgb
vlan 100 name srv
----------------------3560-sw2的配置-------------------------------
vlan data
vtp client
-----------------------2950-sw1的配置---------------------------------
vlan data
vtp client
in f0/10
sw acc vlan 10
在每台交换机上查看
show int trunk
show vtp status
show vlan-sw
4、配置IP地址
--------------------- 3560-SW1的配置--------------------------------
interface FastEthernet0/1
no switchport
ip address 192.168.1.2 255.255.255.252
interface Vlan10
ip address 192.168.10.254 255.255.255.0
interface Vlan20
ip address 192.168.20.254 255.255.255.0
interface Vlan30
ip address 192.168.30.254 255.255.255.0
interface Vlan100
ip address 192.168.100.254 255.255.255.0
--------------------- 3560-SW2的配置--------------------------------
interface FastEthernet0/1
no switchport
ip address 192.168.2.2 255.255.255.252
interface Vlan10
ip address 192.168.10.253 255.255.255.0
interface Vlan20
ip address 192.168.20.253 255.255.255.0
interface Vlan30
ip address 192.168.30.253 255.255.255.0
interface Vlan100
ip address 192.168.100.253 255.255.255.0
--------------------- 3640-R1的配置--------------------------------
interface Loopback1
ip address 1.1.1.1 255.255.255.0
interface Ethernet0/0
ip address 10.0.0.1 255.255.0.0
half-duplex
interface Ethernet0/1
ip address 192.168.1.1 255.255.255.252
half-duplex
interface Ethernet0/2
ip address 192.168.2.1 255.255.255.252
half-duplex
相关查看命令
show ip interface brief
show ip interface brief | in V
5、配置STP
-------------------------3560-SW1的配置-------------------------------
spanning-tree vlan 10 root primary
spanning-tree vlan 20 root primary
spanning-tree vlan 30 root secondary
spanning-tree vlan 100 root secondary
spanning-tree vlan 10 priority 8192
spanning-tree vlan 20 priority 8192
spanning-tree vlan 30 priority 16384
spanning-tree vlan 100 priority 16384
-------------------------3560-SW2的配置-------------------------------
spanning-tree vlan 10 root secondary
spanning-tree vlan 20 root secondary
spanning-tree vlan 30 root primary
spanning-tree vlan 100 root primary
spanning-tree vlan 10 priority 16384
spanning-tree vlan 20 priority 16384
spanning-tree vlan 30 priority 8192
spanning-tree vlan 100 priority 8192
查看命令
show spanning-tree brief
6、配置HSRP热备份路由协议
-------------------------3560-SW1的配置-------------------------------
interface Vlan10
standby 10 ip 192.168.10.252
standby 10 priority 200
standby 10 preempt
interface Vlan20
standby 20 ip 192.168.20.252
standby 20 priority 200
standby 20 preempt
interface Vlan30
standby 30 ip 192.168.30.252
standby 30 preempt
interface Vlan100
standby 100 ip 192.168.100.252
standby 100 preempt
-------------------------3560-SW2的配置-------------------------------
interface Vlan10
standby 10 ip 192.168.10.252
standby 10 preempt
interface Vlan20
standby 20 ip 192.168.20.252
standby 20 preempt
interface Vlan30
standby 30 ip 192.168.30.252
standby 30 priority 200
standby 30 preempt
interface Vlan100
standby 100 ip 192.168.100.252
standby 100 priority 200
standby 100 preempt
查看命令
show standby brief
show standby vlan vlan-id brief
7、配置路由
-------------------------3560-SW1的配置-------------------------------
router rip
version 2
network 0.0.0.0
no auto-summary
-------------------------3560-SW2的配置-------------------------------
router rip
version 2
network 0.0.0.0
no auto-summary

-------------------------3640-R1的配置--------------------------------
router rip
version 2
passive-interface Ethernet0/0(被动端口,不跑rip协议)
network 0.0.0.0
default-information originate(生成一条缺省路由)
no auto-summary
查看命令
show ip route
debug ip rip 跟踪rip包
9、测试
-------------------------3560-SW1的配置-------------------------------
service dhcp(开启DHCP服务,该服务默认是关闭的)
no ip dhcp conflict logging(关闭DHCP分配冲突,日志记录消息)
ip dhcp pool cwb(DHCP地址池,名称可以任意字符)
network 192.168.10.0 255.255.255.0(指定DHCP分配的网段和掩码)
default-router 192.168.0.252 (指定分配网关地址)
show ip dhcp poor
show run | begin ip dhcp
show ip dhcp binding(查看DHCP动态绑定信息)
show ip dhcp server statistics
clear ip dhcp binding
debug ip dhcp server events(DHCP工作过程)
打开虚拟机测试可以获得IP地址,实验成功
相关查看命令
show int trunk
show vtp status
show vlan-sw
show ip interface brief
show ip interface brief | in V
show spanning-tree brief
show standby brief
show standby vlan vlan-id brief
show ip route
debug ip rip 跟踪rip包
show ip dhcp poor
show arp 查看缓存表
show run | begin ip dhcp
show ip dhcp binding(查看DHCP动态绑定信息)
show ip dhcp server statistics
clear ip dhcp binding
debug ip dhcp server events(DHCP工作过程)
补充
从阻塞---转发 30妙太慢
上行速链路加快速度 1--3妙
在接口上配置
spanning-tree uplinkfast
速端口,在接入层端口(端口模式下)
spanning-tree portfast (1-3妙)
快速骨干,加速非直连(从50妙到30妙所以交换机都配置)
spanning-tree backbonefast

阅读(1225) | 评论(0) | 转发(0) |
0

上一篇:VTP修剪-转

下一篇:思科知识点总结-转

给主人留下些什么吧!~~