Vous êtes sur la page 1sur 3

Traditionally, LAN routing has used routers with multiple physical interfaces.

E ach interface needed to be connected to a separate network and configured for a different subnet. In a traditional network that uses multiple VLANs to segment the network traffic into logical broadcast domains, routing is performed by connecting different ph ysical router interfaces to different physical switch ports. The switch ports co nnect to the router in access mode; in access mode, different static VLANs are a ssigned to each port interface. Each switch interface would be assigned to a dif ferent static VLAN. Each router interface can then accept traffic from the VLAN associated with the switch interface that it is connected to, and traffic can be routed to the other VLANs connected to the other interfaces. Traditional router and re multiple interfaces ng. inter-VLAN routing requires multiple physical interfaces on both the the switch. However, not all inter-VLAN routing configurations requi physical interfaces. Some router software permits configuring router as trunk links. This opens up new possibilities for inter-VLAN routi

"Router-on-a-stick" is a type of router configuration in which a single physical interface routes traffic between multiple VLANs on a network. As you can see in the figure, the router is connected to switch S1 using a single, physical netwo rk connection. The router interface is configured to operate as a trunk link and is connected t o a switch port configured in trunk mode. The router performs the inter-VLAN rou ting by accepting VLAN tagged traffic on the trunk interface coming from the adj acent switch and internally routing between the VLANs using subinterfaces. The r outer then forwards the routed traffic-VLAN tagged for the destination VLAN-out the same physical interface. Subinterfaces are multiple virtual interfaces, associated with one physical inte rface. These subinterfaces are configured in software on a router that is indepe ndently configured with an IP address and VLAN assignment to operate on a specif ic VLAN. Subinterfaces are configured for different subnets corresponding to the ir VLAN assignment to facilitate logical routing before the data frames are VLAN tagged and sent back out the physical interface. ======================================== INTERFACES AND SUB-INTERFACES Traditional routing requires routers to have multiple physical interfaces to fac ilitate inter-VLAN routing. The router accomplishes the routing by having each o f its physical interfaces connected to a unique VLAN. Each interface is also con figured with an IP address for the subnet associated with the particular VLAN th at it is connected to. By configuring the IP addresses on the physical interface s, network devices connected to each of the VLANs can communicate with the route r using the physical interface connected to the same VLAN. In this configuration , network devices can use the router as a gateway to access the devices connecte d to the other VLANs. The routing process requires the source device to determine if the destination d evice is local or remote to the local subnet. The source device accomplishes thi s by comparing the source and destination addresses against the subnet mask. Onc e the destination address has been determined to be on a remote network, the sou rce device has to identify where it needs to forward the packet to reach the des tination device. The source device examines the local routing table to determine where it needs to send the data. Typically, devices use their default gateway a s the destination for all traffic that needs to leave the local subnet. The defa

ult gateway is the route that the device uses when it has no other explicitly de fined route to the destination network. The router interface on the local subnet acts as the default gateway for the sending device. Once the source device has determined that the packet must travel through the lo cal router interface on the connected VLAN, the source device sends out an ARP r equest to determine the MAC address of the local router interface. Once the rout er sends its ARP reply back to the source device, the source device can use the MAC address to finish framing the packet before it sends it out on the network a s unicast traffic. Since the Ethernet frame has the destination MAC address of the router interface , the switch knows exactly which switch port to forward the unicast traffic out of to reach the router interface on that VLAN. When the frame arrives at the rou ter, the router removes the source and destination MAC address information to ex amine the destination IP address of the packet. The router compares the destinat ion address to entries in its routing table to determine where it needs to forwa rd the data to reach its final destination. If the router determines that the de stination network is a locally connected network, as would be the case in interVLAN routing, the router sends an ARP request out the interface physically conne cted to the destination VLAN. The destination device responds back to the router with its MAC address, which the router then uses to frame the packet. The route r then sends the unicast traffic to the switch, which forwards it out the port w here the destination device is connected. Both physical interfaces and subinterfaces are used to perform inter-VLAN routin g. There are advantages and disadvantage to each method. Port Limits: Physical interfaces are configured to have one interface per VLAN on the network . On networks with many VLANs, using a single router to perform inter-VLAN routi ng is not possible. Routers have physical limitations that prevent them from con taining large numbers of physical interfaces. Instead, you could use multiple ro uters to perform inter-VLAN routing for all VLANs if avoiding the use of subinte rfaces is a priority. Subinterfaces allow a router to scale to accommodate more VLANs than the physica l interfaces permit. Inter-VLAN routing in large environments with many VLANs ca n usually be better accommodated by using a single physical interface with many subinterfaces. Performance: Because there is no contention for bandwidth on separate physical interfaces, ph ysical interfaces have better performance when compared to using subinterfaces. Traffic from each connected VLAN has access to the full bandwidth of the physica l router interface connected to that VLAN for inter-VLAN routing. When subinterfaces are used for inter-VLAN routing, the traffic being routed com petes for bandwidth on the single physical interface. On a busy network, this co uld cause a bottleneck for communication. To balance the traffic load on a physi cal interface, subinterfaces are configured on multiple physical interfaces resu lting in less contention between VLAN traffic. Access Ports and Trunk Ports: Connecting physical interfaces for inter-VLAN routing requires that the switch p orts be configured as access ports. Subinterfaces require the switch port to be configured as a trunk port so that it can accept VLAN tagged traffic on the trun

k link. Using subinterfaces, many VLANs can be routed over a single trunk link r ather than a single physical interface for each VLAN. Cost: Financially, it is more cost-effective to use subinterfaces over separate physic al interfaces. Routers that have many physical interfaces cost more than routers with a single interface. Additionally, if you have a router with many physical interfaces, each interface is connected to a separate switch port, consuming ext ra switch ports on the network. Switch ports are an expensive resource on high p erformance switches. By consuming additional ports for inter-VLAN routing functi ons, both the switch and the router drive up the overall cost of the inter-VLAN routing solution. Complexity: Using subinterfaces for inter-VLAN routing results in a less complex physical co nfiguration than using separate physical interfaces, because there are fewer phy sical network cables interconnecting the router to the switch. With fewer cables , there is less confusion about where the cable is connected on the switch. Beca use the VLANs are being trunked over a single link, it is easier to troubleshoot the physical connections. On the other hand, using subinterfaces with a trunk port results in a more compl ex software configuration, which can be difficult to troubleshoot. In the router -on-a-stick model, only a single interface is used to accommodate all the differ ent VLANs. If one VLAN is having trouble routing to other VLANs, you cannot simp ly trace the cable to see if the cable is plugged into the correct port. You nee d to check to see if the switch port is configured to be a trunk and verify that the VLAN is not being filtered on any of the trunk links before it reaches the router interface. You also need to check that the router subinterface is configu red to use the correct VLAN ID and IP address for the subnet associated with tha t VLAN.

Vous aimerez peut-être aussi