Catalyst 3560 交换机中文简要配置手册(6)

2019-02-16 01:34

个VTP域的配置参数,同步本VTP域中其他交换机传递来的最新的VLAN信息;Client模式是指本交换机不能创建、删除、修改VLAN配置,也不能在NVRAM中存储VLAN配置,但可同步由本VTP域中其他交换机传递来的VLAN信息。 4.6 配置VLAN接口地址

到这里,VLAN已经基本划分完毕。但是,VLAN间如何实现三层(网络层)交换呢?这时就要给各VLAN分配网络(IP)地址了。给VLAN分配IP地址分两种情况,其一,给VLAN所有的节点分配静态IP地址;其二,给VLAN所有的节点分配动态IP地址。下面就这两种情况分别介绍。

假设给VLAN COUNTER分配的接口Ip地址为172.16.58.1/24,网络地址为:172.16.58.0, VLAN MARKET 分配的接口Ip地址为172.16.59.1/24,网络地址为:172.16.59.0, VLAN MANAGING分配接口Ip地址为172.16.60.1/24, 网络地址为172.16.60.0 ……

(1)给VLAN所有的节点分配静态IP地址。

首先在核心交换机上分别设置各VLAN的接口IP地址。核心交换机将vlan做为一种接口对待,就象路由器上的一样,如下所示:

switch(config)#interface vlan 10

switch (config-if)#ip address 172.16.58.1 255.255.255.0 VLAN10接口IP

switch (config)#interface vlan 11

switch (config-if)#ip address 172.16.59.1 255.255.255.0 VLAN11接口IP

switch (config)#interface vlan 12

switch (config-if)#ip address 172.16.60.1 255.255.255.0 VLAN12接口IP

再在各接入VLAN的计算机上设置与所属VLAN的网络地址一致的IP地址,并且把默认网关设置为该VLAN

的接口地址。这样,所有的VLAN也可以互访了。 第5章 交换机HSRP配置 『两台交换机主备的配置流程』

通常一个网络内的所有主机都设置一条缺省路由,主机发往外部网络的报文将通过缺省路由发往该网关设备,从而实现了主机与外部网络的通信。当该设备发生故障时,本网段内所有以此设备为缺省路由下一跳的主机将断掉与外部的通信。HSRP就是为解决上述问题而提出的,它为具有多播或广播能力的局域网(如以太网)设计。VRRP可以将局域网的一组交换机(包括一个Master即活动交换机和若干个Backup即备份交换机)组织成一个虚拟路由器,这组交换机被称为一个备份组。

虚拟的交换机拥有自己的真实IP地址(这个IP地址可以和备份组内的某个交换机的接口地址相同),备份组内的交换机也有自己的IP地址。局域网内的主机仅仅知道这个虚拟路由器的IP地址(通常被称为备份组的虚拟IP地址),而不知道具体的Master交换机的IP地址以及Backup交换机的IP地址。局域网内的主机将自己的缺省路由下一跳设置为该虚拟路由器的IP地址。于是,网络内的主机就通过这个虚拟的交换机与其它网络进行通信。当备份组内的Master交换机不能正常工作时,备份组内的其它Backup交换机将接替不能正常工作的Master交换机成为新的Master交换机,继续向网络内的主机提供路由服务,从而实现网络内的主机不间断地与外部网络进行通信。

Catalyst 3560 HSRP配置命令请见下表。

Command Purpose

Step 1 configure terminal Enter global configuration mode.

Step 2 interface interface-id Enter interface configuration mode, and enter the Layer 3 interface on which you want to enable HSRP.

Step 3 standby [group-number] ip [ip-address [secondary]] Create (or enable) the HSRP group using its number and virtual IP address. ? (Optional) group-number—The group number on the interface for which HSRP is being enabled. The range is 0 to 255; the default is 0. If there is only one HSRP group, you do not need to enter a group number. ? (Optional on all but one interface) ip-address—The virtual IP address of the hot standby router interface. You must enter the virtual IP address for at least one of the interfaces; it can be learned on the other interfaces. ? (Optional)

secondary—The IP address is a secondary hot standby router interface. If neither router is designated as a secondary or standby router and no priorities are set, the primary IP addresses are compared and the higher IP address is the active router, with the next highest as the standby router. Step 4 end Return to privileged EXEC mode.

Step 5 show standby [interface-id [group]] Verify the configuration.

Step 6 copy running-config startup-config (Optional) Save your entries in the configuration file.

Command Purpose

Step 1 configure terminal Enter global configuration mode.

Step 2 interface interface-id Enter interface configuration mode, and enter the HSRP interface on which you want to set priority.

Step 3 standby [group-number] priority priority [preempt [delay delay]] Set a priority value used in choosing the active router. The range is 1 to 255; the default priority is 100. The highest number represents the highest priority. ? (Optional) group-number—The group number to which the command applies. ? (Optional) preempt—Select so that when the local router has a higher priority than the active router, it assumes control as the active router. ? (Optional) delay—Set to cause the local router to postpone taking over the active role for the shown number of seconds. The range is 0 to 3600(1 hour); the default is 0 (no delay before taking over). Use the no form of the command to restore the default values.

Step 4 standby [group-number] [priority priority] preempt [delay delay] Configure the router to preempt, which means that when the local router has a higher priority than the active router, it assumes control as the active router. ? (Optional) group-number—The group number to which the command applies. ? (Optional) priority—Enter to set or change the group priority. The range is 1 to 255; the default is 100. ? (Optional) delay—Set to cause the local router to postpone taking over the active role for the number of seconds shown. The range is 0 to 3600 (1 hour); the default is 0 (no delay before taking over). Use the no form of the command to restore the default values.

Step 5 standby [group-number] track type number [interface-priority] Configure an interface to track other interfaces so that if one of the other interfaces goes down, the device's Hot Standby priority is lowered. ? (Optional) group-number—The group number to which the command applies. ? type—Enter the interface type (combined with interface number) that is tracked. ? number—Enter the interface number (combined with interface type) that is tracked. ? (Optional) interface-priority—Enter the amount by which the hot standby priority for the router is decremented or incremented when the interface goes down or comes back up. The default value is 10. Step 6 end Return to privileged EXEC mode.

Step 7 show running-config Verify the configuration of the standby groups.

Step 8 copy running-config startup-config (Optional) Save your entries in the configuration file

【SwitchA相关配置】 Switch# configure terminal Switch(config)# interface VLAN 100

Switch(config-if)# ip address 10.0.0.1 255.255.255.0 Switch(config-if)# standby 1 ip 10.0.0.3 Switch(config-if)# standby 1 priority 110 Switch(config-if)# standby 1 preempt Switch(config-if)# end

【SwitchB相关配置】 Switch# configure terminal Switch(config)# interface VLAN100

Switch(config-if)# ip address 10.0.0.2 255.255.255.0 Switch(config-if)# standby 1 ip 10.0.0.3 Switch(config-if)# standby 1 preempt

Switch(config-if)# end

【补充说明】

l 优先级的取值范围为0到255(数值越大表明优先级越高),但是可配置的范围是1到254。优先级0为系统保留给特殊用途来使用,255则是系统保留给IP地址拥有者。缺省情况下,优先级的取值为100。

第6章 路由协议配置 6.1.1 静态路由

静态路由是一种特殊的路由,它由管理员手工配置而成。通过静态路由的配置可建立一个互通的网络,但这种配置缺点在于:当一个网络故障发生后,静态路由不会自动发生改变,必须有管理员的介入。 在组网结构比较简单的网络中,只需配置静态路由就可以实现网络互连,仔细设置和使用静态路由可以防止路由振荡,缺点是有可能会产生路由黑洞。

静态路由包括可达路由的属性,正常的路由都属于可达路由这种情况,即IP报文按照目的地标示的路由被送往下一跳,这是静态路由的一般用法。 【Switch相关配置】 Switch# configure terminal

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# ip routing

Switch(config)#ip route next-network next-address 举例:

Switch(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2 6.1.2 RIP路由

RIP是一种基于距离矢量(Distance-Vector)算法的协议,它使用UDP报文进行路由信息的交换。RIP每隔30秒钟发送一次路由刷新报文,如果在180秒内收不到从某一网络邻居发来的路由刷新报文,则将该网络邻居的所有路由标记为不可达。如果在300秒之内收不到从某一网上邻居发来的路由刷新报文,则将


Catalyst 3560 交换机中文简要配置手册(6).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:中职机械类专业实践性教学活动浅思

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: