rgfwwq 发表于 2015-6-29 09:53:22

网络设备配置与管理---VLAN间路由实现部门间通信

问题1:三层交换机的路由共有几种实现方式?1) 虚拟交换接口(svi)2) 路由接口(routed port)3) 三层聚合链路(L3 Aggregate Link) 接口
问题2:描述单臂路由的实现原理?
单臂路由是在二层交换机上进行vlan 划分的,然后通过一条中继链路连接路由器的一个接口(通常路由需要使用至少两个接口来实现路由功能,而现在只需要一个接口,就像一条胳膊在发挥作用,所以 称之为单臂路由),在路由器上通过配置子接口和802.1Q 协议封装最终实现在vlan 信息和子网一一对应,即实现vlan 间的路由功能。

问题3:SVI的含义是什么?如何实现VLAN间路由?
交换机虚拟接口(Switch Virtual Interface,SVI)代表一个由交换端口构成的VLAN(其实就是通常所说的VLAN接口),以便于实现系统中路由和桥接的功能。一个交换机虚拟接口对应一个VLAN,当需要路由虚拟局域网之间的流量或桥接VLAN之间不可路由的协议,以及提供IP主机到交换机的连接的时候,就需要为相应的虚拟局域网配置相应的交换机虚拟接口,其实SVI就是指通常所说的VLAN接口,只不过它是虚拟的,用于连接整个VLAN,所以通常也把这种接口称为逻辑三层接口,也是三层接口。三层可以划分vlan给vlan设置一个地址当网关 ,实现vlan间的路由也可以在二层创建vlan,三层通过虚拟子接口 创建单臂路由,实现vlan间的路由问题4:路由接口和SVI接口实现路由什么不同
svi接口说白了就是vlan接口,在上面配上ip,然后把二层端口加入进来,以前的设备不能直接在端口 上配ip,就用svi接口方式来配ip,实现三层连接。而路由接口,是直接在端口上设置ip来实现路由
    问题5:交换机的VLAN有哪些类型?
1) 业务vlan2) 互联vlan   3)管理vlan工作任务描述某公司现有两个部门,每个部门各有100台左右的计算机,所有计算机位于同一子网,现在发现整个网络的通信质量很差,请问如何进行网络改造以提高网络通信质量。工作任务实施网络拓扑结构设计(粘贴PT的拓扑图)方案一:SW1连接A部门的计算机,SW2连接B部门计算机,两台二层交换机不做任何配置,仅用于网络接入,而这两台二层交换机上行线路分别连接到RS交换机的一个VLAN,为RS的两个VLAN配置IP地址即可实现VLAN间路由功能。这种网络的规划和配置适合于A、B两部门的计算机相对独立的连接在各自的交换机上,仅需要解决的是两个部门之间的路由问题。      方案一配置:
Rs
RS#show runBuilding configuration...
Current configuration : 1307 bytes!version 12.2no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname RS!!!ip routing!!spanning-tree mode pvst!!interface FastEthernet0/1!(省略……)!interface FastEthernet0/23 switchport access vlan 2 switchport mode access!interface FastEthernet0/24 switchport access vlan 3 switchport mode access!interface GigabitEthernet0/1!interface GigabitEthernet0/2!interface Vlan1 no ip address shutdown!interface Vlan2 ip address 192.168.1.254 255.255.255.0!interface Vlan3 ip address 192.168.2.254 255.255.255.0!ip classless!!line con 0!line aux 0!line vty 0 4 login!!!end




试以及查看RS的路由
RS# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area       * - candidate default, U - per-user static route, o - ODR       P - periodic downloaded static route
Gateway of last resort is not set
C    192.168.1.0/24 is directly connected, Vlan2C    192.168.2.0/24 is directly connected, Vlan3
方案二:如果A、B部门的计算机由于地理位置的原因,分别连接在SW1和SW2交换机上,则需要将SW1和SW2的两条上行线路设置为Trunk线路,RS交换机采用VTP域的模式实现扩展VLAN的功能,然后在RS三层交换机上通过配置各个VLAN的IP地址实现两个VLAN之间的路由功能。方案二配置:RS
RS#show runBuilding configuration...
Current configuration : 1381 bytes!version 12.2no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname RS!!ip routing!!spanning-tree mode pvst!!interface FastEthernet0/1!(省略……)!interface FastEthernet0/23 switchport access vlan 2 switchport trunk encapsulation dot1q switchport mode trunk!interface FastEthernet0/24 switchport access vlan 3 switchport trunk encapsulation dot1q switchport mode trunk!interface GigabitEthernet0/1!interface GigabitEthernet0/2!interface Vlan1 no ip address shutdown!interface Vlan2 ip address 192.168.1.254 255.255.255.0!interface Vlan3 ip address 192.168.2.254 255.255.255.0!ip classless!!line con 0!line aux 0!line vty 0 4 login!!end

Sw1

Sw1#show runBuilding configuration...
Current configuration : 1091 bytes!version 12.1no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname Sw1!!spanning-tree mode pvst!interface FastEthernet0/1 switchport access vlan 2 switchport mode access!interface FastEthernet0/2 switchport access vlan 3 switchport mode access!interface FastEthernet0/3!(省略……)!interface FastEthernet0/24 switchport mode trunk!interface Vlan1 no ip address shutdown!!line con 0!line vty 0 4 loginline vty 5 15 login!!end

Sw2
Sw2#show runBuilding configuration...
Current configuration : 1091 bytes!version 12.1no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname Sw2!!spanning-tree mode pvst!interface FastEthernet0/1 switchport access vlan 2 switchport mode access!interface FastEthernet0/2 switchport access vlan 3 switchport mode access!interface FastEthernet0/3!(省略……)!interface FastEthernet0/24 switchport mode trunk!interface Vlan1 no ip address shutdown!!line con 0!line vty 0 4 loginline vty 5 15 login!!end试以及查看RS的路由
RS#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area       * - candidate default, U - per-user static route, o - ODR       P - periodic downloaded static route
Gateway of last resort is not set
C    192.168.1.0/24 is directly connected, Vlan2C    192.168.2.0/24 is directly connected, Vlan3
如果改为三层接口如何实现RS
show runBuilding configuration...
Current configuration : 1317 bytes!version 12.2no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname RS!!ip routing!!spanning-tree mode pvst!!interface FastEthernet0/1!(省略……)!interface FastEthernet0/23 no switchport ip address 192.168.1.254 255.255.255.0 duplex auto speed auto!interface FastEthernet0/24 no switchport ip address 192.168.2.254 255.255.255.0 duplex auto speed auto!interface GigabitEthernet0/1!interface GigabitEthernet0/2!interface Vlan1 no ip address shutdown!interface Vlan2 no ip address!interface Vlan3 no ip address!ip classless!!line con 0!line aux 0!line vty 0 4 login!!end工作扩展扩展ACL的配置由于购买三层交换机的投入较大,上述实验我们也可以采用一种较为省钱的方法来实现,就是采用单臂路由,这样只要加入一个路由器,就可以实现二层交换机各VLAN间的路由了。   具体配置:R1
R1#show runBuilding configuration...
Current configuration : 594 bytes!version 12.2no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname R1!!interface FastEthernet0/0 no ip address duplex auto speed auto!interface FastEthernet0/0.1 encapsulation dot1Q 2 ip address 192.168.1.254 255.255.255.0!interface FastEthernet0/0.2 encapsulation dot1Q 3 ip address 192.168.2.254 255.255.255.0!interface FastEthernet0/1 no ip address duplex auto speed auto shutdown!ip classless!!line con 0!line aux 0!line vty 0 4 login!!end
Switch

show runBuilding configuration...
Current configuration : 1094 bytes!version 12.1no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname Switch!!spanning-tree mode pvst!interface FastEthernet0/1 switchport access vlan 2 switchport mode access!interface FastEthernet0/2 switchport access vlan 3 switchport mode access!interface FastEthernet0/3!(省略……)!interface FastEthernet0/24 switchport mode trunk!interface Vlan1 no ip address shutdown!!line con 0!line vty 0 4 loginline vty 5 15 login!!end思考问题:问题1:单臂路由和三层交换机的VLAN间路由有什么不同?
单臂路由在大流量的情况下,会给路由器带来很大的负荷。
而三层交换机的VLAN间路由由交换机的三层转发引擎完成,其性能取决于交换机的背板转发速率,注意,因为一般的三层交换机都可以在多个端口上(注意:不是全部端口同时线速转发)轻松实现线速转发,可以获得很好的性能,VLAN间流量不必经过路由器,网络延时和抖动都很小,同时也极大程度的减轻上层接入路由器的负载。
页: [1]
查看完整版本: 网络设备配置与管理---VLAN间路由实现部门间通信