cisco思科交换机试验手册之-实验37交换机HSRP实验
- 格式:rtf
- 大小:314.63 KB
- 文档页数:10
交换机实验指导指导: 赖庆平一个VLAN的配置实验要求通过本实验理解并掌握VLAN的原理及其相关配置Switch>enable //一般模式Switch#configure terminal //特权模式Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface fastEthernet 0/2 //进入端口Switch(config-if)#switchport mode access //该端口设置成二层模式Switch(config-if)#switchport access vlan 10 //划入VLAN10 Question:在二层交换环境下,VLAN内的用户能相互通信吗?不同VLAN的用户能通信吗?Switch#show vlan //类似一张身份证VLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/1, Fa0/3, Fa0/4, Fa0/5Fa0/6, Fa0/7, Fa0/8, Fa0/9Fa0/10, Fa0/11, Fa0/12, Fa0/13 Fa0/14, Fa0/15, Fa0/16, Fa0/17 Fa0/18, Fa0/19, Fa0/20, Fa0/21 Fa0/22, Fa0/23, Fa0/242 007 active3 008 active4 switch active5 VLAN0005 active6 VLAN0006 active10 VLAN0010 active Fa0/2一个Trunk的配置实验要求通过本实验掌握VLAN的帧格式,何为中继链路?Switch(config-if)#switchport trunk encapsulation dot1q//2950不配置该项Switch(config-if)#switchport mode accessSwitch(config-if)#switchport mode trunkSwitch(config-if)# switchport trunk allowed vlan 10//只允许 VLAN10通过(默认情况下允许所有VLAN通过. )Question:进入特权下用show vlan 查看该端口(中继链路)在那个VLAN???一个STP的配置实验要求通过本实验掌握如何设置根交换,如何达到负载均衡?Switch(config)#spanning-tree vlan 1 root primary// 某交换机设置成VLAN 1的根交换interface FastEthernet0/23switchport trunk encapsulation dot1qswitchport mode trunkspanning-tree vlan 1 port-priority 32 //优先级是16的倍数spanning-tree vlan 1 cost 200 //COST值可以任意设置spanning-tree vlan 2 port-priority 16spanning-tree vlan 2 cost 100interface FastEthernet0/24switchport trunk encapsulation dot1qswitchport mode trunkspanning-tree vlan 1 port-priority 16spanning-tree vlan 1 cost 100spanning-tree vlan 2 port-priority 32spanning-tree vlan 2 cost 200Switch#show spanningInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Fa0/1 Desg FWD 19 128.1 P2pFa0/23 Root FWD 19 128.23 P2pFa0/24 Altn BLK 100 16.24 P2pQuestion: 查看(show spanning)是在根交换机上看还是在非根交换机上看呢?如果要达到负载均衡,应该如何去配置呢?如何去检验是否达到均衡了呢?一个VTP的配置实验要求了解VTP的工作环境,检验能否学习到服务端上的配置服务端的配置Switch(config)#vtp mode server //服务端Device mode already VTP SERVER.Switch(config)#vtp password 123456 //秘码Password already set to 123456Switch(config)#vtp domain 123456 //域名Changing VTP domain name from jyy to 123456Switch(config)#vtp version 1 //版本号VTP mode already in V1.Switch(config)#vtp pruning //剪切,减少洪泛Pruning switched on客户端的配置Switch(config)#vtp mode clint //服务端Device mode already VTP CLINTSwitch(config)#vtp password 123456 //秘码Password already set to 123456Switch(config)#vtp domain 123456 //域名Changing VTP domain name from jyy to 123456Switch(config)#vtp version 1 //版本号VTP mode already in V1.Switch(config)#vtp pruning //剪切,减少洪泛Pruning switched onQuestion:客户端和服务端连接端口应该如何配置呢?查看客户端能否和服务端同步?一个VLAN间通信的配置实验要求三层交换机的工作原理,什么是路由功能,掌握OSPF和RIP的原理及配置interface Vlan1ip address 192.168.1.1 255.255.255.0!interface Vlan2ip address 192.168.2.1 255.255.255.0!Switch(config)#interface fastEthernet 0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 2Switch(config)#ip routing //启用路由功能Switch(config)#router ospf 1Switch(config-router)#network 192.168.1.0 0.0.0.255 area 0Switch(config-router)#network 192.168.2.0 0.0.0.255 area 0QUESTION:在看VLAN1的用户能否和VLAN2的用户通信?一个单向访问控制列表配置实验要求理解单向访问的控制,理解ICMPip access-list extended laiinevaluate qingpingdeny ip any 192.168.1.0 0.0.0.255ip access-list extended laioutpermit icmp 192.168.1.0 0.0.0.255 any reflect qingping timeout 10 permit udp 192.168.1.0 0.0.0.255 any reflect qingping timeout 200 permit tcp 192.168.1.0 0.0.0.255 any reflect qingping timeout 300 permit ip any anyinterface Vlan1ip address 192.168.1.1 255.255.255.0ip access-group laiout in!interface Vlan2ip address 192.168.2.1 255.255.255.0ip access-group laiin in!interface Vlan100ip address 192.168.100.1 255.255.255.0ip access-group laiin in!QUESTION:访问控制列表和单向访问控制列表的区别在那儿?一个端口保护配置实验要求把特定的某台PC在特定帮定在指定端口Switch(config-if)#switchport mode access Switch(config-if)#switchport port-security Switch(config-if)#switchport port-security violation {protect | restrict | shutdown } Switch(config-if)#switchport port-security mac-address stickySwitch(config-if)#switchport port-security maximum 1Switch(config-if)# switchport port-security mac-address 00-90-F5-10-79-C1 Switch(config-if)#switchport port-security aging static //打开静态映射 Switch(config-if)#switchport port-security mac-address sticky XXXX.XXXX.XXXX //为端口输入特定的允许通过的mac地址STION :在实际工作环境中,某端口特定分配给某部门的某个用户,安全是不是更高一个AAA配置实验要求掌握授权\论证\统计原理aaa new-modelaaa authentication login default local-case line enable!username lai password 0 laiip subnet-zero!interface Vlan1ip address 192.168.1.10 255.255.255.0no ip route-cache!ip http server!line con 0line vty 0 15login authen deflautQUESTION: 在实际工作中如果接服务器,在交换机上应该如果配置呢?一个链路聚合配置实验要求掌握PAGP和LACP的应用做链路汇聚的端口必须是属于同一个VLAN或者都为Trunk口interface Port-channel 1 (创建汇聚组1)exitinterface fastEthernet 0/23channel-group 1 mode active (LACP模式)interface fastEthernet 0/24channel-group 1 mode active (LACP模式)把24号通道设置成为主通道lacp port-priority 100 设置该端口为主要流量通道(LACP port-priority 值越小优先级越高,同样值,端口编号小的更高)接上流量监控软件查看流量流向一个HSRP配置实验要求掌握双机热备的应用及原理interface Vlan1ip address 192.168.1.3 255.255.255.0standby 1 ip 192.168.1.1standby 1 priority 150standby 1 preempt!interface Vlan2ip address 192.168.2.3 255.255.255.0standby 2 ip 192.168.2.1standby 2 priority 100!router ripnetwork 192.168.1.0network 192.168.2.0查看交换机状态变化.在终端设备下观察通信情况一个VLAN映射配置实验要求理解ACL和VLAN映射的作用及应用spanning-tree mode pvstspanning-tree extend system-id!!vlan access-map lai 10action dropvlan access-map lai 20action dropmatch ip address 101vlan filter lai vlan-list 1access-list 101 permit ip host 192.168.8.1 host 192.168.8.2VLAN映射能控制本VLAN内用户的通信?。
拓扑Switch1 F0/0 <----> Switch2 F0/0Switch1 F0/1 <----> Switch3 F0/0Switch2 F0/1 <----> Switch3 F0/1Switch1 F0/2 <----> VPCS V0/1Switch2 F0/2 <----> VPCS V0/2Switch3 F0/2 <----> VPCS V0/3Switch3 F0/3 <----> VPCS V0/4Switch3 F0/4 <----> VPCS V0/5(模拟为三层交换机)Switch1 F0/0 F0/2 为三层接口F0/1 为二层接口(属于VLAN10)(模拟为三层交换机)Switch2 F0/0 F0/2 为三层接口F0/1 为二层接口(属于VLAN10)(模拟为二层交换机)Switch3 F0/0 - 5 为二层接口(属于VLAN10)在S1和S2 VLAN10 接口配置如下:S1:ip address 192.168.10.10 255.255.255.0standby 10 ip 192.168.10.1standby 10 priority 200standby 10 preemptS2:ip address 192.168.10.10 255.255.255.0standby 10 ip 192.168.10.1standby 10 priority 150standby 10 preempt虚拟主机IP地址设置:VPCS V0/1 IP=192.168.2.2 192.168.2.1/24VPCS V0/2 IP=192.168.3.2 192.168.3.1/24VPCS V0/3 IP=192.168.10.2 192.168.10.1/24VPCS V0/4 IP=192.168.10.3 192.168.10.1/24VPCS V0/5 IP=192.168.10.4 192.168.10.1/24实验结论:三层接口没有生成树,即只有S1的F0/1,S2的F0/1,S3的F0/0 - 5 运行生成树;第一种情况:当主网关失效的时候,备用网关便马上进行抢占,切换时间速度快(3-5秒左右);当主网关链路恢复的时候,接口因需要考虑生成树状态,不能马上进入转发状态,通常需要30秒时间过后,才能引发网关抢占,这段时间内两个网关都无法使用(即从主网关链路状态恢复为UP,然后经过生成树状态30秒,再加3-5秒抢占时间),可以通过给S1的F0/1,S2的F0/2配置PORTFAST特性以提高切换速度,或者交换机使用其它能够快速会聚的生成树协议。
HSRP 一网络拓扑图二实验思路1.vlan trunk 的配置2.ip地址配置3.DHCP DHCP中继配置4.HSRP配置三实验步骤ESW3的基本步骤ESW3#vlan databaseESW3(vlan)#vlan 10VLAN 10 modified:ESW3(vlan)#vlan 20VLAN 20 modified:ESW3(vlan)#vlan 30VLAN 30 modified:ESW3(vlan)#vlan 40VLAN 40 modified:ESW3(vlan)#exitESW3#configESW3(config)#interface f1/0ESW3(config-if)#switchport mode access ESW3(config-if)#switchport access vlan 10 ESW3(config-if)#interface f1/1ESW3(config-if)#switchport mode access ESW3(config-if)#switchport access vlan 20 ESW3(config-if)#interface f1/2ESW3(config-if)#switchport mode access ESW3(config-if)#switchport access vlan 30 ESW3(config-if)#interface f1/3ESW3(config-if)#switchport mode accessESW3(config-if)#switchport access vlan 40ESW3(config-if)#exitESW3(config)#interface fastEthernet 1/4ESW3(config-if)#switchport trunk encapsulation dot1q ESW3(config-if)#switchport mode trunkESW3(config-if)#interface fastEthernet 1/5ESW3(config-if)#switchport trunk encapsulation dot1q ESW3(config-if)#switchport mode trunkESW1的基本配置ESW1#vlan databaseESW1(vlan)#vlan 10VLAN 10 modified:ESW1(vlan)#vlan 20VLAN 20 modified:ESW1(vlan)#vlan 30VLAN 30 modified:ESW1(vlan)#vlan 40VLAN 40 modified:ESW1(vlan)#exitESW1(config)#interface fastEthernet1/2ESW1(config-if)#ip address 192.168.100.1 255.255.255.0 ESW1(config)#interface fastEthernet 1/0ESW1(config-if)#switchport trunk encapsulation dot1q ESW1(config-if)#switchport mode trunkESW1(config-if)#interface fastEthernet 1/1ESW1(config-if)#switchport trunk encapsulation dot1q ESW1(config-if)#switchport mode trunkESW1(config-if)#exESW1(config)#interface vlan 10ESW1(config-if)#ip address 192.168.10.1 255.255.255.0 ESW1(config-if)#standby 10 ip 192.168.10.254ESW1(config-if)# standby 10 priority 200ESW1(config-if)#standby 10 preemptESW1(config)#interface vlan 20ESW1(config-if)#ip address 192.168.20.1 255.255.255.0 ESW1(config-if)#standby 20 ip 192.168.20.254ESW1(config-if)# standby 20 priority 200ESW1(config-if)#standby 20 preemptESW1(config)#interface vlan 30ESW1(config-if)#ip address 192.168.30.1 255.255.255.0 ESW1(config-if)#standby 30 ip 192.168.30.254ESW1(config-if)#standby 30 priority 150ESW1(config-if)#standby 30 preemptESW1(config)#interface vlan 40ESW1(config-if)#ip address 192.168.40.1 255.255.255.0ESW1(config-if)#standby 40 ip 192.168.40.254 ESW1(config-if)#standby 40 priority 150ESW1(config-if)#standby 40 preemptESW1(config-if)#exESW1(config)#interface vlan 10ESW1(config-if)#ip helper-address 192.168.100.2 ESW1(config)#interface vlan 20ESW1(config-if)#ip helper-address 192.168.100.2 ESW1(config)#interface vlan 30ESW1(config-if)#ip helper-address 192.168.100.2 ESW1(config)#interface vlan 40ESW1(config-if)#ip helper-address 192.168.100.2 ESW2的基本配置ESW2#vlan databaseESW2(vlan)#vlan 10VLAN 10 modified:ESW2(vlan)#vlan 20VLAN 20 modified:ESW2(vlan)#vlan 30VLAN 30 modified:ESW2(vlan)#vlan 40VLAN 40 modified:ESW2(vlan)#exitESW2(config)#interface fastEthernet1/2ESW2(config-if)#ip address 192.168.200.1 255.255.255.0 ESW2(config)#interface fastEthernet 1/0ESW2(config-if)#switchport trunk encapsulation dot1q ESW2(config-if)#switchport mode trunkESW2(config-if)#interface fastEthernet 1/1ESW2(config-if)#switchport trunk encapsulation dot1q ESW2(config-if)#switchport mode trunkESW2(config-if)#exESW2(config)#interface vlan 10ESW2(config-if)#ip address 192.168.10.2 255.255.255.0 ESW2(config-if)#standby 10 ip 192.168.10.254ESW2(config-if)#standby 10 priority 150ESW2(config-if)#standby 10 preemptESW2(config)#interface vlan 20ESW2(config-if)#ip address 192.168.20.2 255.255.255.0 ESW2(config-if)#standby 20 ip 192.168.20.254ESW2(config-if)# standby 20 priority 150ESW2(config-if)#standby 20 preemptESW2(config)#interface vlan 30ESW2(config-if)#ip address 192.168.30.2 255.255.255.0 ESW2(config-if)#standby 30 ip 192.168.30.254ESW2(config-if)#standby 30 priority 200ESW2(config-if)#standby 30 preemptESW2(config)#interface vlan 40ESW2(config-if)#ip address 192.168.40.2 255.255.255.0 ESW2(config-if)#standby 40 ip 192.168.40.254ESW2(config-if)#standby 40 priority 200ESW2(config-if)#standby 40 preemptESW2(config-if)#exESW2(config)#interface vlan 10ESW2(config-if)#ip helper-address 192.168.200.2ESW2(config)#interface vlan 20ESW2(config-if)#ip helper-address 192.168.200.2ESW2(config)#interface vlan 30ESW2(config-if)#ip helper-address 192.168.200.2ESW2(config)#interface vlan 40ESW2(config-if)#ip helper-address 192.168.200.2R1的基本配置R1#configureR1(config)#interface ethernet 0/1R1(config-if)#ip address 192.168.100.2 255.255.255.0 R1(config-if)#no shutdownR1(config-if)#interface ethernet 0/0R1(config-if)#ip address 192.168.200.2 255.255.255.0R1(config-if)#no shutdownR1(config-if)#exitR1(config)#service dhcpR1(config)#ip dhcp pool vlan10R1(dhcp-config)# network 192.168.10.0 255.255.255.0 R1(dhcp-config)#default-router 192.168.10.1R1(dhcp-config)#dns-server 3.3.3.3R1(dhcp-config)#exitR1(config)#ip dhcp pool vlan20R1(dhcp-config)# network 192.168.20.0 255.255.255.0 R1(dhcp-config)#default-router 192.168.20.1R1(dhcp-config)#dns-server 3.3.3.3R1(dhcp-config)#exitR1(config)#ip dhcp pool vlan30R1(dhcp-config)# network 192.168.30.0 255.255.255.0 R1(dhcp-config)#default-router 192.168.30.1R1(dhcp-config)#dns-server 3.3.3.3R1(dhcp-config)#exitR1(config)#ip dhcp pool vlan40R1(dhcp-config)# network 192.168.40.0 255.255.255.0 R1(dhcp-config)#default-router 192.168.40.1R1(dhcp-config)#dns-server 3.3.3.3R1(dhcp-config)#exitR1(config)#ip route 192.168.10.0 255.255.255.0 192.168.100.1 R1(config)#ip route 192.168.10.0 255.255.255.0 192.168.200.1 R1(config)#ip route 192.168.20.0 255.255.255.0 192.168.100.1 R1(config)#ip route 192.168.20.0 255.255.255.0 192.168.200.1 R1(config)#ip route 192.168.30.0 255.255.255.0 192.168.100.1 R1(config)#ip route 192.168.30.0 255.255.255.0 192.168.200.1 R1(config)#ip route 192.168.40.0 255.255.255.0 192.168.100.1 R1(config)#ip route 192.168.40.0 255.255.255.0 192.168.200.1测试结果PC1 DHCP show ipPC1> dhcpDORA IP 192.168.10.2/24 GW 192.168.10.1PC1> show ipNAME : PC1[1]IP/MASK : 192.168.10.2/24GATEWAY : 192.168.10.1DNS : 3.3.3.3DHCP SERVER : 192.168.100.2DHCP LEASE : 86397, 86400/43200/75600MAC : 00:50:79:66:68:00LPORT : 10000RHOST:PORT : 127.0.0.1:10001MTU: : 1500PC2 DHCP show ipPC2> dhcpDORA IP 192.168.20.2/24 GW 192.168.20.1 PC2> show ipNAME : PC2[1]IP/MASK : 192.168.20.2/24 GATEWAY : 192.168.20.1DNS : 3.3.3.3DHCP SERVER : 192.168.100.2DHCP LEASE : 86394, 86400/43200/75600 MAC : 00:50:79:66:68:01LPORT : 10004RHOST:PORT : 127.0.0.1:10005MTU: : 1500PC3 DHCP show ipPC3> dhcpDORA IP 192.168.30.2/24 GW 192.168.30.1PC3> show ipNAME : PC3[1]IP/MASK : 192.168.30.2/24 GATEWAY : 192.168.30.1DNS : 3.3.3.3DHCP SERVER : 192.168.100.2DHCP LEASE : 86393, 86400/43200/75600 MAC : 00:50:79:66:68:02LPORT : 10002RHOST:PORT : 127.0.0.1:10003MTU: : 1500PC4 DHCP show ipPC4> dhcpDORA IP 192.168.40.2/24 GW 192.168.40.1 PC4> show ipNAME : PC4[1]IP/MASK : 192.168.40.2/24 GATEWAY : 192.168.40.1DNS : 3.3.3.3DHCP SERVER : 192.168.100.2DHCP LEASE : 86394, 86400/43200/75600MAC : 00:50:79:66:68:03LPORT : 10006RHOST:PORT : 127.0.0.1:10007MTU: : 1500PC1pingPC4PC1> ping 192.168.40.2 -t84 bytes from 192.168.40.2 icmp_seq=1 ttl=63 time=37.786 ms 84 bytes from 192.168.40.2 icmp_seq=2 ttl=63 time=31.251 ms 84 bytes from 192.168.40.2 icmp_seq=3 ttl=63 time=37.749 ms 84 bytes from 192.168.40.2 icmp_seq=4 ttl=63 time=15.626 ms 84 bytes from 192.168.40.2 icmp_seq=5 ttl=63 time=31.264 ms当f1/0接口关闭之后192.168.40.2 icmp_seq=6 timeout192.168.40.2 icmp_seq=7 timeout84 bytes from 192.168.40.2 icmp_seq=8 ttl=63 time=31.251 ms 84 bytes from 192.168.40.2 icmp_seq=9 ttl=63 time=37.282 ms 84 bytes from 192.168.40.2 icmp_seq=10 ttl=63 time=84.531 ms 84 bytes from 192.168.40.2 icmp_seq=11 ttl=63 time=31.253 ms84 bytes from 192.168.40.2 icmp_seq=12 ttl=63 time=31.250 ms 84 bytes from 192.168.40.2 icmp_seq=13 ttl=63 time=122.337 ms 84 bytes from 192.168.40.2 icmp_seq=14 ttl=63 time=31.248 ms五调试信息ESW1 show running-configESW1#show running-configBuilding configuration...Current configuration : 2971 bytes!version 12.3service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname ESW1!boot-start-markerboot-end-marker!!no aaa new-modelresource policy!memory-size iomem 5ip subnet-zerono ip icmp rate-limit unreachable ip tcp synwait-time 5!!ip cefno ip domain lookupno ip dhcp use vrf connected!!!!!!!!!!!!!!!vtp file nvram:vlan.dat!!no crypto isakmp ccm!!!!interface FastEthernet1/0 switchport mode trunkduplex fullspeed 100!interface FastEthernet1/1 switchport mode trunkduplex fullspeed 100interface FastEthernet1/2no switchportip address 192.168.100.1 255.255.255.0 duplex fullspeed 100!interface FastEthernet1/3duplex fullspeed 100!interface FastEthernet1/4duplex fullspeed 100!interface FastEthernet1/5duplex fullspeed 100!interface FastEthernet1/6duplex fullspeed 100!interface FastEthernet1/7 duplex fullspeed 100!interface FastEthernet1/8 duplex fullspeed 100!interface FastEthernet1/9 duplex fullspeed 100!interface FastEthernet1/10 duplex fullspeed 100!interface FastEthernet1/11 duplex fullspeed 100!interface FastEthernet1/12 duplex fullspeed 100interface FastEthernet1/13duplex fullspeed 100!interface FastEthernet1/14duplex fullspeed 100!interface FastEthernet1/15duplex fullspeed 100!interface Vlan1no ip addressshutdown!interface Vlan10ip address 192.168.10.1 255.255.255.0 ip helper-address 192.168.100.2standby 10 ip 192.168.10.254standby 10 priority 200standby 10 preemptinterface Vlan20ip address 192.168.20.1 255.255.255.0 ip helper-address 192.168.100.2standby 20 ip 192.168.20.254standby 20 priority 200standby 20 preempt!interface Vlan30ip address 192.168.30.1 255.255.255.0 ip helper-address 192.168.100.2standby 30 ip 192.168.30.254standby 30 priority 150standby 30 preempt!interface Vlan40ip address 192.168.40.1 255.255.255.0 ip helper-address 192.168.100.2standby preemptstandby 40 ip 192.168.40.254standby 40 priority 150!no ip http serverno ip http secure-serverip classless!!!no cdp log mismatch duplex!!!control-plane!!!!!!!!!banner exec ^C************************************************************* **This is a normal Router with a SW module inside (NM-16ESW)It has been preconfigured with hard coded speed and duplexTo create vlans use the command "vlan database" from exec mode After creating all desired vlans use "exit" to apply the configTo view existing vlans use the command "show vlan-switch brief"Warning: You are using an old IOS image for this router. Please update the IOS to enable the "macro" command!************************************************************* **^C!line con 0exec-timeout 0 0privilege level 15logging synchronousline aux 0exec-timeout 0 0privilege level 15logging synchronousline vty 0 4login!!endESW2 show running-configESW2#show running-configBuilding configuration...Current configuration : 3130 bytes!version 12.3service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption!hostname ESW2!boot-start-markerboot-end-marker!!no aaa new-modelresource policy!memory-size iomem 5ip subnet-zerono ip icmp rate-limit unreachable ip tcp synwait-time 5!!ip cefno ip domain lookupno ip dhcp use vrf connected!!!!!!!!!!!!!!!vtp file nvram:vlan.dat!!no crypto isakmp ccm!!!!interface FastEthernet1/0 switchport mode trunkduplex fullspeed 100!interface FastEthernet1/1 switchport mode trunkduplex fullspeed 100interface FastEthernet1/2no switchportip address 192.168.200.1 255.255.255.0 duplex fullspeed 100!interface FastEthernet1/3duplex fullspeed 100!interface FastEthernet1/4duplex fullspeed 100!interface FastEthernet1/5duplex fullspeed 100!interface FastEthernet1/6duplex fullspeed 100!interface FastEthernet1/7 duplex fullspeed 100!interface FastEthernet1/8 duplex fullspeed 100!interface FastEthernet1/9 duplex fullspeed 100!interface FastEthernet1/10 duplex fullspeed 100!interface FastEthernet1/11 duplex fullspeed 100!interface FastEthernet1/12 duplex fullspeed 100interface FastEthernet1/13duplex fullspeed 100!interface FastEthernet1/14duplex fullspeed 100!interface FastEthernet1/15duplex fullspeed 100!interface Vlan1no ip addressshutdown!interface Vlan10ip address 192.168.10.254 255.255.255.0 ip helper-address 192.168.200.2standby 10 ip 192.168.10.254standby 10 priority 150standby 10 preemptinterface Vlan20ip address 192.168.20.254 255.255.255.0 ip helper-address 192.168.200.2standby 20 ip 192.168.20.254standby 20 priority 150standby 20 preempt!interface Vlan30ip address 192.168.30.254 255.255.255.0 ip helper-address 192.168.200.2standby 30 ip 192.168.30.254standby 30 priority 200standby 30 preempt!interface Vlan40ip address 192.168.40.254 255.255.255.0 ip helper-address 192.168.200.2standby 40 ip 192.168.40.254standby 40 priority 200standby 40 preempt!no ip http serverno ip http secure-serverip classless!!!mac-address-table static 0000.0c07.ac1e interface FastEthernet1/1 vlan 30mac-address-table static 0000.0c07.ac28 interface FastEthernet1/1 vlan 40no cdp log mismatch duplex!!!control-plane!!!!!!!!!banner exec ^C************************************************************* **This is a normal Router with a SW module inside (NM-16ESW)It has been preconfigured with hard coded speed and duplexTo create vlans use the command "vlan database" from exec modeAfter creating all desired vlans use "exit" to apply the config To view existing vlans use the command "show vlan-switch brief"Warning: You are using an old IOS image for this router. Please update the IOS to enable the "macro" command!************************************************************* **^C!line con 0exec-timeout 0 0privilege level 15logging synchronousline aux 0exec-timeout 0 0privilege level 15logging synchronousline vty 0 4login!!endESW3 show running-configESW3#show running-configBuilding configuration...Current configuration : 2415 bytes!version 12.3service timestamps debug datetime msec service timestamps log datetime msec no service password-encryptionno service dhcp!hostname ESW3!boot-start-markerboot-end-marker!!no aaa new-model!resource policy!memory-size iomem 5ip subnet-zerono ip routingno ip icmp rate-limit unreachable ip tcp synwait-time 5!!no ip cefno ip domain lookupno ip dhcp use vrf connected!!!!!!!!!!!!!!!vtp file nvram:vlan.dat!!no crypto isakmp ccm!!!!interface FastEthernet1/0 switchport access vlan 10 duplex fullspeed 100interface FastEthernet1/1 switchport access vlan 20 duplex fullspeed 100!interface FastEthernet1/2 switchport access vlan 30 duplex fullspeed 100!interface FastEthernet1/3 switchport access vlan 40 duplex fullspeed 100!interface FastEthernet1/4 switchport mode trunkduplex fullspeed 100!interface FastEthernet1/5 switchport mode trunkduplex fullspeed 100!interface FastEthernet1/6 duplex fullspeed 100!interface FastEthernet1/7 duplex fullspeed 100!interface FastEthernet1/8 duplex fullspeed 100!interface FastEthernet1/9 duplex fullspeed 100!interface FastEthernet1/10 duplex fullspeed 100!interface FastEthernet1/11 duplex fullspeed 100!interface FastEthernet1/12 duplex fullspeed 100!interface FastEthernet1/13 duplex fullspeed 100!interface FastEthernet1/14 duplex fullspeed 100!interface FastEthernet1/15 duplex fullspeed 100!interface Vlan1no ip addressno ip route-cacheshutdown!no ip http serverno ip http secure-server ip classless!!!no cdp log mismatch duplex !!!control-plane!!!!!!!!!banner exec ^C************************************************************* **This is a normal Router with a SW module inside (NM-16ESW)It has been preconfigured with hard coded speed and duplexTo create vlans use the command "vlan database" from exec modeAfter creating all desired vlans use "exit" to apply the config To view existing vlans use the command "show vlan-switch brief"Warning: You are using an old IOS image for this router. Please update the IOS to enable the "macro" command!************************************************************* **^C!line con 0exec-timeout 0 0privilege level 15logging synchronousline aux 0exec-timeout 0 0privilege level 15logging synchronousline vty 0 4login!!endR1 show running-configR1#show running-configBuilding configuration...Current configuration : 2114 bytes!version 12.3service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption!hostname R1!boot-start-markerboot-end-marker!!no aaa new-model!resource policy!memory-size iomem 5ip subnet-zerono ip icmp rate-limit unreachableip tcp synwait-time 5!!ip cefno ip domain lookupno ip dhcp use vrf connected!ip dhcp pool vlan10network 192.168.10.0 255.255.255.0 default-router 192.168.10.1dns-server 3.3.3.3!ip dhcp pool vlan20network 192.168.20.0 255.255.255.0 default-router 192.168.20.1dns-server 3.3.3.3!ip dhcp pool vlan30network 192.168.30.0 255.255.255.0 default-router 192.168.30.1dns-server 3.3.3.3!ip dhcp pool vlan40network 192.168.40.0 255.255.255.0 default-router 192.168.40.1dns-server 3.3.3.3!!!!!!!!!!!!!!!!!no crypto isakmp ccm!!!!interface Ethernet0/0ip address 192.168.200.2 255.255.255.0 half-duplex!interface Ethernet0/1ip address 192.168.100.2 255.255.255.0 half-duplex!interface Ethernet0/2no ip addressshutdownhalf-duplexinterface Ethernet0/3 no ip addressshutdownhalf-duplex!interface Ethernet1/0 no ip addressshutdownhalf-duplex!interface Ethernet1/1 no ip addressshutdownhalf-duplex!interface Ethernet1/2 no ip addressshutdownhalf-duplex!interface Ethernet1/3 no ip addressshutdownhalf-duplex!no ip http serverno ip http secure-serverip classlessip route 192.168.10.0 255.255.255.0 192.168.100.1 ip route 192.168.10.0 255.255.255.0 192.168.200.1 ip route 192.168.20.0 255.255.255.0 192.168.100.1 ip route 192.168.20.0 255.255.255.0 192.168.200.1 ip route 192.168.30.0 255.255.255.0 192.168.100.1 ip route 192.168.30.0 255.255.255.0 192.168.200.1 ip route 192.168.40.0 255.255.255.0 192.168.100.1 ip route 192.168.40.0 255.255.255.0 192.168.200.1 !!!no cdp log mismatch duplex!!!control-plane!!!!!!!!!!line con 0exec-timeout 0 0privilege level 15 logging synchronous line aux 0exec-timeout 0 0privilege level 15 logging synchronous line vty 0 4login!!end六实验结论通过这系列实验,熟悉了HSRP的协议,加深了理解。
在思科模拟器Packet Tracer中实现HSRP 热备份路由实验作者:刘侃来源:《电脑知识与技术》2019年第13期摘要:基于对计思科HSRP 热备份路由协议的研究,探讨如何利用HSRP 的高可靠性特点,组建具有低故障率和高稳定性和企业局域网。
通过分析HSRP 网络结构、工作过程和网络设备的配置等方面内容,阐述了热备份路由器的工作原理、优势及配置过程,对于企业、学校等单位中心机房核心层的建设具有一定的参考价值。
关键词:HSRP;热备份;三层交换机;路由器;Packet Tracer中图分类号:TP3 ; ; ; ;文献标识码:A文章编号:1009-3044(2019)13-0048-02当下信息技术已渗透到企业办公、生产、管理各个环节,各种信息系统得到广泛的应用,这对网络的稳定性提出了更高的要求,所以承载这些信息系统的局域网络必须拥有低故障率和高稳定性,要实现这样的目标,必须合理地规划网络拓扑。
对核心层设备采用热备份可以大幅度提高网络可靠性,思科的HSRP协议正是这样一种3层冗余协议,它能实现在一个路由器失效的情况下,其全部任务可以被另一个备份路由器完全接管,使得网络通迅不会因为某个路由器的失效而中断,Packet Tracer模拟器可实现此实验。
1 HSRP相关概念HSPR(热备份路由协议)是思科私有协议,又称为第一跳冗余协议,能防止路由器单点失效而导致的网络故障。
HSRP协议要求至少有两台以上的路由器,这些路由器组成一个HSRP组,我们称之为“热备份组”,每个组生成一个虚拟路由器。
在任何时候,每个组内只有一活动(Active)路由器,数据包只能由活动路由器转发,如果该设备发生了故障,备份路由器将取而代之成为新的活动路由器,切换速度迅捷,所以网络内主机仍然保持连接,没有受到故障过多的影响。
要完成HSRP热备份路由配置,需了解一些基本概念。
1)虚拟路由器HSRP的虚拟路由器包含一个虚拟IP地址,以及虛拟的MAC地址。
千里之行,始于足下。
计算机网络》实验二 CISCO交换机的基本操作实验报告计算机网络》实验二 CISCO交换机的基本操作实验报告摘要:计算机网络的使用已经变得日常化,而交换机作为网络中常见的设备,对网络的稳定运行起着重要的作用。
本实验旨在通过对CISCO交换机的基本操作进行实践,加深对交换机工作原理的理解,掌握交换机的基本配置和网络故障排除等技能。
本文将详细介绍实验过程及结果,并对实验中所遇到的问题和解决方法进行讨论。
一、引言计算机网络是现代社会中信息传输的基础设施,其中交换机作为实现计算机之间进行数据传输和通信的关键设备,对网络的稳定运行起着重要的作用。
本实验通过对CISCO交换机的基本操作进行实践,旨在加深对交换机工作原理的理解,并掌握交换机的基本配置和故障排除等技能。
二、实验目的1. 掌握CISCO交换机的基本使用方法和操作步骤;2. 理解交换机的工作原理和基本配置;3. 能够进行交换机的基本配置和故障排除。
三、实验步骤及结果1. 实验环境准备(1) 操作系统:Windows 10;(2) 软件:PuTTY、CISCO交换机模拟器。
第1页/共3页锲而不舍,金石可镂。
2. 实验步骤(1) 打开PuTTY,通过SSH协议连接到CISCO交换机模拟器;(2) 输入用户名和密码以登录交换机;(3) 配置交换机的基本信息,如主机名、IP地址、子网掩码等;(4) 配置交换机的端口 VLAN 和端口模式;(5) 配置交换机的端口速率和双工模式;(6) 进行网络连通性测试,检查配置是否成功。
3. 实验结果及分析经过实验操作,成功登录CISCO交换机,并按照实验指导书要求进行了基本配置。
通过网络连通性测试,确认配置生效,并能正常进行数据传输和通信。
实验结果表明,基本操作步骤能够顺利实现,并取得了预期的实验效果。
四、问题与解决1. 问题1:无法连接到CISCO交换机。
解决方法:检查网络连接是否正常,重新配置PuTTY连接参数。
思科交换机hsrp配置思科交换机HSRP 配置1. HSRP典型的配置实例. HSRP单备份组举例(1)配置需求主机A把路由器A和路由器B组成的HSRP备份组作为自己的缺省网关,访问Internet,如主机B。
HSRP备份组构成:备份组号为0, 虚拟IP地址为,路由器A做活动路由器,路由器B做备份路由器, 允许抢占。
(2)配置步骤配置路由器A:Router1(config-if-Ethernet0)# standby ipRouter1(config-if-Ethernet0)# standby preemptRouter1(config-if-Ethernet0)# standby priority 120配置路由器B:Router2(config-if-Ethernet0)# standby ipRouter2(config-if-Ethernet0)# standby preempt(3)配置说明备份组配置后不久,就可以使用。
主机A可将缺省网关设为。
正常情况下,路由器A执行网关工作,当路由器A关机或出现故障,路由器B 将接替执行网关工作。
设置抢占方式,目的是当路由器 A Oracle_shujuku/' target='_blank'>恢复工作后,能够继续成为活动路由器执行网关工作。
. HSRP监视接口举例(1)配置需求如上图,即使路由器A仍然工作,但当其连接Internet的接口不可用时,可能希望由路由器B来执行网关工作。
可通过配置监视接口来实现上述需求。
为示例起见,备份组号为1,并增加授权字和计时器的配置,在该应用中不是必须的。
(2)配置步骤配置路由器A:Router1(config-if-Ethernet0)# standby 1 ipRouter1(config-if-Ethernet0)# standby 1 preemptRouter1(config-if-Ethernet0)# standby 1 priority 120Router1(config-if-Ethernet0)# standby 1 authentication RouterRouter1(config-if-Ethernet0)# standby 1 timers 5 15Router1(config-if-Ethernet0)# standby 1track serial0 30配置路由器B:Router2(config-if-Ethernet0)# standby 1 ipRouter2(config-if-Ethernet0)# standby 1 preemptRouter2(config-if-Ethernet0)# standby 1 authentication RouterRouter2(config-if-Ethernet0)# standby 1 timers 5 15(3)配置说明正常情况下,路由器A执行网关工作,当路由器A的接口serial0不可用时,路由器A的优先级降低30,低于路由器B优先级,路由器B将抢占成为活动路由器执行网关工作。
目录HSRP实验过程及报告 (2)实验环境: (2)实验拓扑: (2)实验目的: (2)实验过程: (3)1 配置交换机 (3)2 测试HSRP (5)3测试HSRP跟踪 (8)实验总结: (10)HSRP实验过程及报告实验环境:DynamipsGUI模拟器模拟出4台cisco3640三层交换机。
两台开启HSRP协议,设备之间使用Ethernetchannel绑定的两条线路互联。
其余两台交换机分别连接到这两台交换机。
实验拓扑:实验拓扑如图1实验目的:熟悉HSRP协议,验证HSRP网关冗余特性,测试HSRP抢占过程及HSRP接口跟踪。
实验过程:1 配置交换机在交换机SW1配置F0/0.F0/1接口加入channel-group 1 并将port-channel 1 配置为trunk模式。
SW1(config)#int range f0/0 - 1SW1(config-if-range)#channel-group 1 mode onCreating a port-channel interface Port-channel1SW1(config-if-range)#*Mar 1 01:23:58.639: %EC-5-BUNDLE: Interface Fa0/0 joined port-channel Po1 *Mar 1 01:23:58.935: %EC-5-BUNDLE: Interface Fa0/1 joined port-channel Po1 SW1(config-if-range)#*Mar 1 01:24:01.415: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to upSW1(config-if-range)#exitSW1(config)#int port-channel 1SW1(config-if)#switchport mode trunkSW1(config-if)#endSW1#sh etherchannel suFlags: D - down P - in port-channelI - stand-alone s - suspendedR - Layer3 S - Layer2U - in useGroup Port-channel Ports-----+------------+-----------------------------------------------------------1 Po1(SU) Fa0/0(P) Fa0/1(P)在交换机SW2上同样的配置。
cisco交换机实验报告
《Cisco交换机实验报告》
实验目的:通过对Cisco交换机的实验,掌握基本的交换机配置和管理技能,了解交换机的工作原理和功能。
实验内容:
1. 熟悉交换机的基本组成和工作原理
2. 学习交换机的基本配置和管理命令
3. 配置交换机的VLAN和端口安全
4. 理解交换机的链路聚合和STP协议
5. 实验网络故障排除和恢复
实验步骤:
1. 连接交换机并进行基本配置
2. 配置VLAN和端口安全
3. 配置链路聚合和STP协议
4. 模拟网络故障并排除
实验结果:
通过实验,我们成功掌握了Cisco交换机的基本配置和管理技能,了解了交换机的工作原理和功能。
在实验中,我们通过配置VLAN和端口安全,实现了对网络流量的控制和管理;通过配置链路聚合和STP协议,实现了对网络链路的优化和冗余;在模拟网络故障时,我们成功排除了故障并恢复了网络的正常运行。
结论:
通过本次实验,我们深入了解了Cisco交换机的工作原理和功能,掌握了基本的交换机配置和管理技能。
这些技能对于搭建和管理企业网络至关重要,能够提高网络的稳定性和安全性,为企业的信息化建设提供有力支持。
希望通过不断的实验和学习,我们能够进一步提升自己的技能水平,为网络建设和管理贡献自己的力量。
CISCO实战案例:HSRP的配置标签CISCO HSRP实验题目:HSRP的配置场景描述:公司对互联网的访问要求越来越高,决定采用冗余的路由器并申请了2条连接到互联网上,以保证互联网的访问实时畅通实验使用到的相关知识点总结1:standby zuhao ip ip –add 配置HSRP2:standby zuhao priority youxianjishuzhi 设置优先级3:standby zuhao preempt 设置占先权4:standby zuhao track genzongdeduankou jianqudezhi5: sh standby brief 查看HSRP配置注意所有配置都是再接口模式下配置的实验步骤:1.1:r1的配置:enaconf thost r1int e0/0ip add 100.0.0.1 255.0.0.0no shexitint e0/1ip add 192.168.10.1 255.255.255.0no shstandby 1 ip 192.168.10.3standby 1 priority 150standby 1 track e0/0 60standby 1 preemptstandby 2 ip 192.168.10.4standby 2 preemptexitexitwri2.1:r2的配置:enaconf thost r2int e0/0ip add 100.0.0.2 255.0.0.0no shexitint e0/1ip add 192.168.10.2 255.255.255.0no shstandby 1 ip 192.168.10.3standby 1 preemptstandby 2 ip 192.168.10.4standby 2 priority 150standby 2 track e0/0 60standby 2 preemptexitexit实验中遇到的问题及相应解决方法验证结果:r1#sh standby briP indicates configured to preempt.Interface Grp Prio P State Active Standby Virtual IPEt0/1 1 150 P Active local 192.168.10.2 192.168.10.3Et0/1 2 100 P Standby 192.168.10.2 local 192.168.10.4**************************************************************************** r2#sh standby e0/1 briInterface Grp Prio P State Active Standby Virtual IPEt0/1 1 100 P Standby 192.168.10.1 local 192.168.10.3Et0/1 2 150 P Active local 192.168.10.1 192.168.10.4**************************************************************************** sh r1的e0/0后:***************************************************r1#sh standby briP indicates configured to preempt.|Interface Grp Prio P State Active Standby Virtual IPEt0/1 1 90 P Speak 192.168.10.2 unknown 192.168.10.3 Et0/1 2 100 P Standby 192.168.10.2 local 192.168.10.4********************************************r1#sh standby briP indicates configured to preempt.|Interface Grp Prio P State Active Standby Virtual IPEt0/1 1 90 P Standby 192.168.10.2 local 192.168.10.3Et0/1 2 100 P Standby 192.168.10.2 local 192.168.10.4***********************************************r2#sh standby e0/1 bP indicates configured to preempt.|Interface Grp Prio P State Active Standby Virtual IPEt0/1 1 100 P Active local 192.168.10.1 192.168.10.3Et0/1 2 150 P Active local 192.168.10.1 192.168.10.4***********************************************。
HSRP基本实验
实验拓扑及相关配置:
实验步骤:
1.配置相关Ip,在路由器间启用OSPF协议
2.分别在R2和R3上配置HSRP
R2:
进入f1/0
设置组1的虚拟路由器的ip
设置优先级(默认为100)使R2成为活跃的网关。
设置抢占功能
设置追踪功能,当F0/0出故障后,R2的优先级自动下降20,让R3有机会成为活跃的网关。
R3:
3.将PC机的默认网关设置为虚拟路由器的IP。
从PC上ping R1可以通。
(第一个包因为要做ARP而丢失)。
用Traceroute可以看出此时是从R2走的。
接下来在PC上长ping R1 期间down掉R2的f0/0口,
在down掉R2后R3的状态由备用变为活跃状态:
观察ping的情况:
在R2 down掉后ping包出现一个U. ,U是R2的目标不可达,. 是R3在做ARP。