Mỗi mạng có nhu cầu riêng của nó, tuy nhiên cho dù đó là một mạng lưới rộng lớn hay nhỏ, định tuyến nội bộ, trong hầu hết các trường hợp, là điều cần thiết. Khả năng để phân chia mạng bằng cách tạo ra VLANs, do đó giảm broadcasts mạng và tính bảo mật ngày càng tăng. Các thiết lập phổ biến bao gồm một broadcast domain riêng biệt cho các dịch vụ quan trọng ngày càng nhiều.
Phương pháp này được thiết lập có hiệu quả nhất bằng cách cung cấp một liên kết trunk duy nhất giữa Switch và Router mà có thể mang lưu lượng truy cập của nhiều VLAN và trong đó các lưu lượng ấy lần lượt có thể được định tuyến bởi Router.
Bài Lab này sử dụng mô hình như sau:
Yêu cầu đặt ra: Sử dụng Router định tuyến giữa các VLAN, đảm bảo các VLAN kết nối được với nhau.
- Mô hình này tương tự như bài VLAN trunking protocol: Chúng ta sử dụng switch thứ nhất làm VTP server, hai switch còn lại là VTP client. Ở SWServer chúng ta chia làm 3 VLAN: VLAN10, VLAN20 và VLAN30 trong đó các port f0/3-10 gán vào VLAN10, f0/11-18 gán vào VLAN20, f0/19-24 gán vào VLAN30. Hai port còn lại f0/1-2 sử dụng làm mode trunk.
- Sau khi cấu hình các switch tương tự như ở bài VLAN trunking protocol chúng ta sẽ cấu hình cho router để định tuyến giữa các VLAN.
- Thực hiện các lệnh sau:
- Đặt IP cho các PC thuộc 3 VLAN khác nhau của 3 switch lần lượt là:
VLAN 10: 192.168.1.10
VLAN 20: 192.168.2.10
- Kiểm tra kết nối giữa các PC thuộc 3 VLAN khác nhau.
Như vậy công việc cấu hình Inter Vlan Routing đã hoàn tất.
Networks are constantly evolving, and in the past few years a number of trends have become apparent. First of all, the Internet Protocol (IP) has become the Layer 3 protocol of choice for modern networks, with other Layer 3 protocols such as Internetwork Packet Exchange (IPX) and AppleTalk rapidly being phased out. IP interconnects the Internet. The increasing reliance of organizations on the Internet has promoted IP as the Layer 3 protocol of choice. Secondly, local-area networks (LANs) have seen tremendous advances in terms of performance, bandwidth, and lowering cost. The LAN provides the medium over which users and devices connect to the internal IP network and the Internet hence is an important component of networking. LAN topologies have evolved from traditionally being single, flat broadcast domains into multi-virtual LAN (VLAN) topologies, with inter-VLAN routing required to enable communications between each VLAN. Multiple VLANs increase network efficiency by reducing broadcast domain size, as well as providing a mechanism to allow network layer access control to be applied between VLANs. Using multiple VLANs also means that the resiliency of the network relies less on Layer 2 protocols such as Spanning Tree Protocol (STP), and more upon Layer 3 routing protocols. Modern Layer 3 routing protocols are much more intelligent than STP and as a result can converge much more quickly in the event of a network failure. Finally, segmenting a LAN network into VLANs allows for the isolation of problems to a smaller segment of network, allowed for reduced impact on the network and easier fault finding.
All of the above factors have caused the requirements for inter-VLAN routing within LAN networks to soar over the past few years. Even though this book is primarily about switches, which are traditionally Layer 2-only devices, it is important to understand the basics of inter-VLAN routing. Possessing this knowledge helps you to understand Layer 3 switches, which are becoming cost-effective, high performance alternatives to traditional routers for routing IP traffic between LAN segments. Possessing a fundamental understanding of inter-VLAN is important if you are to design multilayer topologies that are stable, available, and scaleable.
This chapter introduces you to the basic inter-VLAN routing architectures, using both traditional Cisco routers and basic Cisco Layer 3 switching. You also learn about multilayer LAN topologies and how a hierarchical design allows for scalability and a redundant topology that in the event of failure converges quickly and efficiently with minimal disruption to the network.
The following scenarios are presented in this chapter:
- Scenario 5-1: Configuring Basic IP Routing
- Scenario 5-2: Configuring Layer 3 Switching
- Scenario 5-3: Implementing a Redundant Multilayer Topology
Inter-VLAN Routing Architectures
Within a LAN topology, inter-VLAN routing is used to route packets between different VLANs. Three common inter-VLAN routing architectures are used in modern LAN networks today:
- Router-on-a-stick using trunks
- Layer 3 switching
This section examines each of these in detail, outlining any restrictions or issues associated with each.
The router-on–a-stick architecture is the most basic method of inter-VLAN routing. In this architecture, a router is simply connected to each VLAN and forwards inter-VLAN traffic between the appropriate VLANs. Figure 5-1 shows this architecture.
Figure 5-1 Router-on–a-Stick
As you can see in Figure 5-1, the router has a physical Ethernet interface dedicated for each VLAN. If IP hosts on VLAN 100 need to communicate with hosts of VLAN 200, IP packets with the appropriate source and destination IP addresses are sent to the router, which looks up the destination IP address and forwards to the appropriate host on the destination VLAN. The router-on-a-stick architecture is simple to understand because the Layer 2 functions (provided by a switch) and Layer 3 functions (provided by a router) are physically separated.
The major issue with this architecture is performance. Because routers are software-based, they cannot route packets as fast as switches (hardware-based) can switch frames. Even if you are using high-performance routers, the physical interface connecting each VLAN to the router is a bottleneck because it can transmit packets only at 10 Mbps, 100 Mbps, or 1 Gbps depending on the interface type. This restriction means that the router becomes a performance bottleneck when routing between high-speed VLANs.
Another issue with this architecture is the number of routers and physical interfaces required to support multiple VLANs. A dedicated Ethernet interface is required per VLAN. Routers are low-density devices, meaning that there is a high cost per port and multiple routing devices might be required to support multiple VLANs, increasing the complexity of the network.
Finally, all inter-VLAN traffic must travel via the router. In Figure 5-1, even though the PCs in VLAN 100 and VLAN 200 are connected to the same switch, all inter-VLAN traffic between the PCs must be sent through the router, which is inefficient.
Router-on-a-Stick Using Trunks
As discussed in the last section, the router-on-a-stick architecture has physical limitations based upon a dedicated physical interface being required for each VLAN. This limitation can be removed by using trunk interfaces, where multiple VLANs are supported on a single physical interface by using tagging technologies such as 802.1Q or ISL. Rather than using physical interfaces to attach the router to each VLAN, virtual or logical interfaces are used to attach the router to each VLAN. Figure 5-2shows this architecture.
Figure 5-2 Router-on-a-Stick Using Trunks
In Figure 5-2, virtual interfaces (rather than physical interfaces) are used to connect the router to each VLAN. A single physical trunk interface transports tagged VLAN traffic to the router, with the tag determining to which virtual interface a frame should be forwarded for routing. Apart from the differences between using physical interfaces per VLAN as opposed to virtual interfaces per VLAN, this architecture is essentially identical to the traditional router-on-a-stick architecture and suffers the same performance limitations, because the routing engine is still software-based and the trunk interface is limited to 10 Mbps, 100 Mbps, or 1 Gbps.
Routing Using Layer 3 Switches
The architectures discussed thus far represent the traditional inter-VLAN routing architectures. The major issue with these architectures is performance—if gigabit speed routing is required between VLANs, extremely high performance and costly routers are required. A new form of inter-VLAN routing on the LAN has emerged in recent years called Layer 3 switching. With a Layer 3 switch, the traditionally separated Layer 2 and Layer 3 functions are combined into a single device, eliminating the bottleneck associated with the cable between a router and switch by replacing the cable with a high-speed backplane connection. Layer 3 switches also typically perform routing in specially designed hardware circuitry rather than software, using specialized hardware that can perform routing functions at high speed. This means that the performance of Layer 3 switches is much higher than traditional router-on-a-stick architectures. For example, if you use a Cisco 3640 series router in the router-on-a-stick architecture, you can achieve routing speeds of up to 40,000 packets per second. If you compare this with a Cisco Catalyst 3550-24-EMI Layer 3 switch, which is actually cheaper than a Cisco 3640 router, you can route packets at up to 6.6 million packets per second. This is obviously quite a difference and highlights the limitations of using router-on-a-stick architectures for inter-VLAN routing on the LAN. Of course, the Cisco 3640 router still has a place in the network; it supports a wide variety of diverse media, including serial and ATM connections for WAN connectivity; also supports advanced features such as firewalling, encryption, and so on—all of which are not supported on Cisco Catalyst switches.
The Layer 3 switch uses application-specific integrated circuits (ASICs), which are hardware chips that can route traffic at very high speeds. These ASICs are installed on the switching engine of a Layer 3 switch, which traditionally switches frames at Layer 2. The ASICs allow the switching engine to also switch frames that contain packets sent between different VLANs. Each ASIC is programmed with the information required to route traffic from one VLAN to another, without having to pass the traffic through the CPU of the routing engine. This information includes the egress port, egress VLAN, and new destination MAC address that should be written for the frame that is sent. Some form of route cache is normally used to store such information, with the ASIC searching the cache for routing information for the destination IP address of packets as they are received. How this information is programmed into the route cache depends on the Layer 3 switch architecture used; however, the end result is essentially the same.
In addition to the high-speed routing feature, these ASICs also can apply security access control list (ACL) filtering and Layer 3 quality of service (QoS) classification, all at wire-speed, meaning these useful features can be turned on without affecting performance.
The internal mechanics of Layer 3 switching are covered in more detail in Chapter 6, “Layer 3 Switching.”
When examining the architecture of a Layer 3 switch, it is important to understand that several different approaches to Layer 3 switching implemented by Cisco exist:
- Router-on-a-stick— Some chassis-based Catalyst switches (e.g., the Catalyst 4000 and 5000) support routing modules, which are effectively routers on a blade. Apart from having a high-speed connection to the switch backplane, the routing module is essentially a router-on-a-stick, with all routed traffic requiring processing through the routing module. This architecture is not really Layer 3 switching at all because the switch hardware has no special ASICs for Layer 3 switching; instead, it is a high-speed, router-on-a-stick architecture.
- Multilayer switching (MLS)— In this architecture, hardware-based ASICs on the switching component of the Layer 3 switch refer to a cache that is populated with the required information to route a packet received on one VLAN to another VLAN, without having to pass the packet through the routing engine. With MLS, the Layer 3 switching cache is populated after the first packet of a particular flow (connection) is received and the route processor is queried for routing information.
- Cisco Express Forwarding (CEF)— This architecture is identical to MLS in terms of the hardware-based ASICs referring to a Layer 3 cache for information as to how to route packets between VLANs without involving the router processor. CEF differs from MLS in terms of the way the Layer 3 cache is populated. CEF pre-populates the caches with full routing information, which means the route processor never needs to be queried for the initial routing information that is required in a MLS architecture.
In this chapter, you learn how to configure the Catalyst 4000 using the Layer 3 routing module in a router-on-a-stick architecture. You also learn how to configure Layer 3 switching on the Catalyst 3550, which is based upon a CEF architecture. In Chapter 6, you learn about MLS and CEF on the Catalyst 6000/6500 family of switches.