vlan 间路由 inter-vlan r outing

21
2006, Shenzhen Polytechnic. All rights reserved. 1 VLAN 间间间 Inter-VLAN Routing 间间间间间间间间间间间间间间间间

Upload: clove

Post on 04-Jan-2016

201 views

Category:

Documents


8 download

DESCRIPTION

VLAN 间路由 Inter-VLAN R outing. 深圳职业技术学院计算机系网络专业. 教学目标( Objectives ). 1. 介绍 VLAN 间路由 ( Introducing Inter-VLAN Routing ) 2. VLAN 互联问题及解决方案 ( Inter-VLAN Issues and Solutions ) 3. 独臂路由器( A Router on a Stick ) 4. Trunk 连接的路由器( Trunk-Connected Routers ) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: VLAN 间路由 Inter-VLAN  R outing

© 2006, Shenzhen Polytechnic. All rights reserved. 1

VLAN 间路由 Inter-VLAN Routing

深圳职业技术学院计算机系网络专业

Page 2: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 2

教学目标( Objectives )

1. 介绍 VLAN 间路由( Introducing Inter-VLAN Routing )2. VLAN 互联问题及解决方案( Inter-VLAN Issues and Solutions )3. 独臂路由器( A Router on a Stick )

4. Trunk 连接的路由器( Trunk-Connected Routers ) 5. 配置 VLAN 间路由( Configuring Inter-VLAN Routing )

Page 3: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 3

介绍 VLAN 间路由( Introducing Inter-VLAN Routing )

没有路由的辅助 VLAN1 和 VLAN200 不能通信。VLAN1 and 200 cannot communicate without assistance of a router.

Page 4: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 4

介绍 VLAN 间路由( Introducing Inter-VLAN Routing )

为了路由在一个非 Trunk 环境下 VLAN1 和 200 的信息,路由器必须用一个接口连接在 VLAN1 中,用一个接口连接在 VLAN200 中。To route traffic between vlan1 and vlan200 in a non-vlan-trunk environment ,a router must connect to a port in vlan 1 and a port in vlan 200.

Page 5: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 5

介绍 VLAN 间路由( Introducing Inter-VLAN Routing )

1. 当在一个广播域中的主机想要访问在另一个广播域中的主机,必须通过路由器。When a host in one broadcast domain wishes to communicate with a host in another broadcast domain, a router must be involved .

2. 如果一个 VLAN 跨越多个设备,在设备之间要用 Trunk 连接。If a VLAN spans across multiple devices a trunk is used to interconnect the devices.

Page 6: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 6

VLAN 互联问题( Inter-VLAN Issues )

当多个 VLAN 连接到一起时,几个技术问题随之出现When VLANs are connected together, several technical issues will arise. 1. 端用户设备需要到达非本地主机The need for end user devices to reach non-local hosts 2. 不同 vlan 的主机需要通信The need for hosts on different VLANs to communicate

Page 7: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 7

VLAN 互联解决方案( Inter-VLAN Solutions )

1. VLAN 间通信可以通过逻辑的或者物理的连接来解决。Inter-VLAN connectivity can be achieved through either logical or physical connectivity.

2. 逻辑连接涉及一个从交换机到路由器的单独 Trunk 连接 Trunk 链路携带多个 VLAN 的信息,这种拓扑称为独臂路由器。Logical connectivity involves a single connection, or trunk, from the switch to the router. That trunk can support multiple VLANs. This topology is called a router on a stick

3. 物理连接需要为每一个 VLAN 指定一个单独的物理接口。Physical connectivity involves a separate physical connection for each VLAN.

Page 8: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 8

逻辑和物理连接( Logical and Physical Connectivity )

Page 9: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 9

独臂路由器( A Router on a Stick )

Page 10: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 10

物理和逻辑接口( Physical and Logical Interfaces )

在传统情况下,有 4 个 VLAN 的网络需要交换机和路由器之间使用四个物理连接 In a traditional situation, a network with four VLANs would require four physical connections between the switch and the external router.

随着技术的发展,向 ISL 变得应用更为广泛,网络设计者开始在交换机和路由器之间的连接使用 Trunk 。As technologies such as Inter-Switch Link (ISL) became more common, network designers began to use trunk links to connect routers to switches.

Page 11: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 11

ISL and 802.1q

ISL 和 802.1Q 是快速以太口链路 Trunk 链路的封装格式。ISL and 802.1q are used to trunk VLANs over Fast Ethernet links 一个单一的 ISL 或 802.1Q 链路可以传输多个 VLAN 信息A single ISL or 802.1q link can support multiple vlans

Page 12: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 12

Trunk 连接的路由器( Trunk-Connected Routers)

在路由器的接口上封装 ISL 或 802.1q ,可以连接交换机的 Trunk 接口。 A ISL or 802.1q-enabled interface on the router connects to a trunk port on the switch.使用 Trunk 的主要好处是节省路由器和交换机的接口。不仅省钱,而且减少配置的复杂性。The primary advantage of using a trunk link is a reduction in the number of router and switch ports used. Not only can this save money, it can also reduce configuration complexity.

Page 13: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 13

将物理接口划分为子接口( Dividing Physical Interfaces into Subinterfaces )

Page 14: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 14

将物理接口划分为子接口( Dividing Physical Interfaces into Subinterfaces

1. 子接口是在物理接口上的逻辑接口。A subinterface is a logical interface within a physical interface.

2. 每一个子接口支持一个 VLAN, 可以指定一个 IP 地址Each subinterface supports one VLAN, and is assigned one IP address.

3. 为了完成 VLAN 间路由,必须为每个 VLAN 创建一个子接口In order to route between VLANs with subinterfaces, a subinterface must be created for each VLAN.

Page 15: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 15

配置 VLAN 间路由( Configuring Inter-VLAN Routing )

Page 16: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 16

配置 VLAN 间路由( Configuring Inter-VLAN Routing )

1. 在执行这些命令之前,每一个交换机和路由器都要确认它们支持 VLAN 封装。Before any of these commands are implemented, each router and switch should be checked to see which VLAN encapsulations they support.2. 为了正确的完成 VLAN 间路由,所有的路由器和交换机必须支持相同的封装。In order for inter-VLAN routing to work properly, all of the routers and switches involved must support the same encapsulation.

Page 17: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 17

在物理接口上定义子接口( Define Subinterfaces on a Physical Interface )

1. 定义子接口Identify the interface.

2. 定义 VLAN 封装Define the VLAN encapsulation.

3. 配置 IP 地址Assign an IP address to the interface.

Page 18: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 18

练习 1 ( Exercise1 )

Host A in the graphic is connected to a switch port assigned to VLAN 1.Which two settings on host A are required to allow connectivity with Host B onVLAN 2? (Choose two)A. IP address: 192.1.1.66 255.255.255.240B. IP address: 192.1.1.130 255.255.255.192C. IP address: 192.1.1.142 255.255.255.240D. Default gateway: 192.1.1.129 E. Default gateway: 192.1.1.65F. Default gateway: 192.1.1.1

Page 19: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 19

练习 2 ( Exercise2 )

Which of the following are valid configuration values for the host shown in thegraphic? (Choose three)A. host A IP address: 192.1.1.65 B. host A subnet mask: 255.255.255.224C. host B IP address: 192.1.1.125 D. host B default gateway: 192.1.1.65E. host C IP address: 192.1.1.166 F. host C subnet mask: 255.255.255.224

Page 20: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 20

VLAN 通过三层交换实现 VLAN 路由( Inter-VLAN Routing by Layer 3 Switching )

1. 打开路由功能( enable routing )Switch(config)#ip routing

2. 为该接口分配一个 IP 地址 (configuring IP address for SVI)

interface vlan 11

(路由器上配置的接口号与交换机上配置的 VLAN 号相对应)

ip address 10.1.1.254 255.255.255.0

Page 21: VLAN 间路由 Inter-VLAN  R outing

© 2006 Shenzhen Polytechnic. All rights reserved. 21

思考题( Questions )

1.VLAN 间的通信要借助第 层的设备?2. VLAN 互联问题及解决方案分别是什么?3. 什么是逻辑和物理连接?4. 什么是独臂路由器?5. 支持 VLAN 封装的两种方法是什么?6. 使用 Trunk 的好处是什么?7. 在物理接口上定义子接口的步骤是什么?