1 / 31

项目九 三层交换机路由配置

项目九 三层交换机路由配置. 1. 教学目标 □ 掌握三层交换机工作原理及其与路由器的区别,正确理解三层交换机在局域网中作用,熟练配置三层交换机相关参数,具体如下 : ( 1 )掌握三层交换机 Vlan 间路由建立方法 ( 2 )掌握三层交换机与路由器间静态路由配置技能 ( 3 )掌握三层交换机动态路由协议 RIP 及 OSPF 的配置技能. 2. 工作任务 □ 理解三层交换机在局域网结构中地位基础上,启动三层交换机路由功能,配置三层交换机静态、动态路由。. 模块 1 三层交换机 VLAN 间路由建立. 1 . 教学目标

Download Presentation

项目九 三层交换机路由配置

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 项目九 三层交换机路由配置

  2. 1.教学目标 □掌握三层交换机工作原理及其与路由器的区别,正确理解三层交换机在局域网中作用,熟练配置三层交换机相关参数,具体如下: (1)掌握三层交换机Vlan间路由建立方法 (2)掌握三层交换机与路由器间静态路由配置技能 (3)掌握三层交换机动态路由协议RIP及OSPF的配置技能

  3. 2.工作任务 □ 理解三层交换机在局域网结构中地位基础上,启动三层交换机路由功能,配置三层交换机静态、动态路由。

  4. 模块1 三层交换机VLAN间路由建立

  5. 1. 教学目标 □ 理解三层交换机工作原理 □ 掌握三层交换机Vlan间路由建立方法

  6. 2. 工作任务   某公司有两个主要部门:技术部和销售部,分处于不同的办公室,为了安全和便于管理对两个部门的主机进行了VLAN划分,技术部和销售部分处于不同VLAN。现由于业务需要销售部和技术部的主机能够相互访问,获得相应资源,两个部门的交换机通过一台三层交换机进行连接。

  7. 3. 相关实践知识   □在交换机上建立2个Vlan:Vlan10分配给技术部及Vlan20分配给销售部。为了实现两部门的主机能够相互访问,在三层交换机上开启路由功能,并在Vlan10中设置IP地址为192.168.10.1;在Vlan20中设置IP地址为192.168.20.1,查看三层交换机路由表,会发现在三层交换机路由表内有2条直连路由信息,实现在不同网络之间路由数据包,从而达到2个部门的主机可以相互访问 ,拓朴图如图9.1所示。

  8. 图9.1 三层交换机Vlan间路由建立

  9. 第1步:开启三层交换机路由功能 Switch#configure terminal Switch(config)#hostname s3550 S3550(conifg)#ip routing 第2步:建立Vlan,并分配端口 S3550(conifg)#vlan 10 S3550(config-vlan)#name sales S3550(config-vlan)#exit S3550(conifg)#vlan 20 S3550(config-vlan)#exit S3550(conifg)#

  10. S3550(conifg)#interface fastethernet 0/10 S3550(conifg-if)#switchport mode access S3550(conifg-if)#switchport access vlan 10 S3550(conifg-if)#exit S3550(conifg)# interface fastethernet 0/20 S3550(conifg-if)#switchport mode access S3550(conifg-if)#switchport access vlan 20 S3550(config-vlan)#exit S3550(config)#

  11. 第3步:配置三层交换机端口的路由功能 S3550(config)#interface vlan 10 S3550(conifg-if)#ip address 192.168.10.1 255.255.255.0 S3550(conifg-if)#no shutdown S3550(conifg-if)#exit S3550(config)#interface valn 20 S3550(conifg-if)#ip address 192.168.20.1 255.255.255.0 S3550(conifg-if)#no shutdown S3550(conifg-if)#end S3550# 第4步:查看路由表 S3550#show ip route 第5步:测试三层交换机Vlan间路由功能

  12. 4. 相关理论知识 □ 三层交换机上路由接口 (1)设置交换机路由口 通过命令开启三层交换机的接口的路由功能(默认是关闭的),然后可以在接口上配置IP地址 。 例如:设置端口fastethernet 0/20为路由口 switch(config)#interface fastethernet 0/20 switch(conifg-if)#no switchport switch(conifg-if)#ip address 192.168.20.1 255.255.255.0; switch(conifg-if)#no shutdown

  13. (2)交换虚拟口 (SVI) 在VLAN配置IP后,在三层交换机机上生成一个虚拟接口 。 例如:配置SVI10 switch(conifg)#vlan 10 switch(config)#interface vlan 10 switch(conifg-if)#ip address 192.168.10.1 255.255.255.0 switch(conifg-if)#no shutdown (3)开启三层交换机上的路由功能 switch(conifg)#ip routing

  14. □配置RIP路由协议 Router(config)#router rip Router(config-router)#network network-number 其中: network-number表示网络地址,如:192.168.1.0。

  15. 模块2 三层交换机与路由器间 静态路由的建立

  16. 1. 教学目标 □ 掌握三层交换机连接路由器的方法 □ 掌握三层交换机静态路由配置技能

  17. 2. 工作任务   某校园局域网由若干台交换机构成,现学校需要将校园网接入互联网,学校在出口使用一台路由器连接互联网。请做静态路由配置实现三层交换机通过SVI和路由器之间的互通。

  18. 3. 相关实践知识   □在三层交换机上划分2个Vlan,一个(Vlan10)与局域网主机PC1相连;另一个(Vlan20)与路由器相连。在二个Vlan中分别设置IP地址,Vlan10中的IP地址与主机PC1在一个网段内;Vlan20中的IP地址与相连接路由器接口的IP地址在一个网段内。在三层交换机和路由器内分别设置静态路由,这样两台主机再做相应配置就可以互通了,结构拓朴图如图9.2所示。

  19. 图9.2 三层交换机通过SVI与路由器连接

  20. 第1步:开启三层交换机路由功能 Switch#configure terminal Switch(config)#hostname s3550 S3550(conifg)#ip routing 第2步:建立Vlan,并分配端口 S3550(conifg)#vlan 10 S3550(config-vlan)#name sales S3550(config-vlan)#exit S3550(conifg)#vlan 20 S3550(config-vlan)#exit S3550(conifg)#

  21. S3550(conifg)#interface fastethernet 0/10 S3550(conifg-if)#switchport mode access S3550(conifg-if)#switchport access vlan 10 S3550(conifg-if)#exit S3550(conifg)# interface fastethernet 0/20 S3550(conifg-if)#switchport mode access S3550(conifg-if)#switchport access vlan 20 S3550(config-vlan)#exit S3550(config)#

  22. 第3步:配置三层交换机端口的路由功能 S3550(config)#interface Vlan 10 S3550(conifg-if)#ip address 192.168.10.1 255.255.255.0 S3550(conifg-if)#no shutdown S3550(conifg-if)#exit S3550(conifg)# S3550(config)#interface Vlan 20 S3550(conifg-if)#ip address 192.168.20.1 255.255.255.0 S3550(conifg-if)#no shutdown S3550(conifg-if)#exit S3550(conifg)#

  23. 第4步:路由器基本配置 Red-Giant(config)#hostname RouterA RouterA (config)#interface Fasterethernet 0 RouterA (config-if)#ip address 192.168.30.1 255.255.255.0 RouterA (config-if)#no shutdown RouterA (config-if)#Exit RouterA (config)#interface Fasterethernet 1 RouterA (config-if)#ip address 192.168.20.2 255.255.255.0 RouterA (config-if)#no shutdown RouterA (config-if)#Exit RouterA (config)#line VTY 0 4 RouterA (config-line)#login RouterA (config-line)#enable password 100 RouterA (config)#enable secret level 15 0 100

  24. 第5步:静态路由配置 S3550(conifg)#ip route 192.168.30.0 255.255.255.0 192.168.20.2 RouterA (config)#ip route 192.168.10.0 255.255.255.0 192.168.20.1 第6步:查看路由表 S3550#show ip route RouterA #show ip route

  25. 模块3 三层交换机与路由器间 动态路由协议的配置

  26. 1. 教学目标 □ 掌握三层交换机连接路由器配置方法 □ 掌握三层交换机动态路由配置技能

  27. 2. 工作任务   某校园局域网由若干台交换机构成,现学校需要将校园网接入互联网,学校在出口使用一台路由器连接互联网。请做动态路由协议RIP配置实现三层交换机通过SVI和路由器之间互通。

  28. 3. 相关实践知识   □在三层交换机上划分2个Vlan,一个(Vlan10)与局域网PC1相连;另一个(Vlan20)与路由器相连。在二个Vlan中分别设置IP地址,Vlan10中的IP地址与PC1在一个网段内;Vlan20中的IP地址与相连接路由器接口的IP地址在一个网段内。在三层交换机和路由器内分别配置动态路由协议RIP,这样两台PC再做相应配置就可以互通了,结构拓朴图如图9.4所示。

  29. 图9.4 三层交换机与路由器动态路由协议RIP配置图9.4 三层交换机与路由器动态路由协议RIP配置

  30. 第1步:三层交换机、路由器基本配置 第2步:动态路由协议RIP配置 S3550(conifg)#router rip S3550(conifg-router)#network 192.168.10.0 S3550(conifg-router)#network 192.168.20.0 S3550(conifg-router)#end S3550# RouterA (config)# router rip RouterA (config-router)#network 192.168.20.0 RouterA (config-router)#network 192.168.30.0 RouterA (config-router)#end S3550#show ip route RouterA #show ip route

  31. 项目结束

More Related