Ender。CCNAv3.0BuildingaMedium-SizedNetworkRoutingBetweenVLANsVLAN之间的路由EnderCCNAv3.0PurposeofInter-VLANRouting通过路由表在不同vlan间交换数据•AVLANcreatesaseparateswitchingsegment.•TrafficcannotbeswitchedbetweenVLANs.•VLANshavedifferentIPsubnets.•RoutingisnecessarytoforwardtrafficbetweenVLANs.EnderEnderCCNAv3.0OptionsforInter-VLANRoutingThesesolutionscanprovideinter-VLANrouting:•RouterwithaseparateinterfaceineachVLAN(不现实的方案)•Routerwithatrunklink(单臂路由)•Layer3switch(交换机的三层功能-SVI)EnderEnderCCNAv3.0OptionsforInter-VLANRouting(Cont.)Option:RouterwithaseparateinterfaceineachVLAN-用路由器的物理接口产生的直连进行vlan间路由(太浪费端口了!)Ender—4-26EnderCCNAv3.0OptionsforInter-VLANRouting(Cont.)Option:Routerwithatrunklink-单臂路由,通过子接口完成Ender—4-27EnderCCNAv3.0OptionsforInter-VLANRouting(Cont.)Option:Layer3switch-通过三层交换机的物理接口完成,同样过于浪费交换机的接口Ender—4-28EnderCCNAv3.0ConfiguringaRouterwithaTrunkLinkRouter(config)#interfaceGigabitEthernet0/0.10Router(config-if)#encapsulationdot1Q10Router(config-if)#ipaddress10.1.10.1255.255.255.0Router(config-if)#interfaceGigabitEthernet0/0.20Router(config-if)#encapsulationdot1Q20Router(config-if)#ipaddress10.1.20.1255.255.255.0ConfiguressubinterfacesandtrunkingontherouterEnder—4-29EnderCCNAv3.0ConfiguringRouterwithaTrunkLink(Cont.)Switch(config)#interfaceFastEthernet0/13Switch(config-if)#switchportmodetrunkSwitch(config-if)#interfaceFastEthernet0/1Switch(config-if)#switchportaccessvlan10Switch(config-if)#interfaceFastEthernet0/3Switch(config-if)#switchportaccessvlan20AssignsportstospecificVLANsandconfigurestheporttowardtherouterasatrunkEnder—4-30EnderCCNAv3.0ConfiguringRouterwithaTrunkLinkRouter#showvlansVirtualLANID:10(IEEE802.1QEncapsulation)vLANTrunkInterface:GigabitEthernet0/0.10ProtocolsConfigured:Address:Received:Transmitted:IP10.1.10.11118VirtualLANID:20(IEEE802.1QEncapsulation)vLANTrunkInterface:GigabitEthernet0/0.20ProtocolsConfigu...