Layer-3 Switch for Cisco switches

Source: Internet
Author: User

Layer-3 Switch for Cisco switches

Although single-arm routing solves the communication problem between different VLANs, it also has its fatal defects:

-The single arm itself is the Backbone link of the network, which is easy to form a network bottleneck.

-The sub-interface relies on physical interfaces, and the application is not flexible

-You need to view the route table for each vlan forwarding, wasting device resources.

The problem above is caused by poor Routing Switching capabilities. To solve the routing problem between VLANs, we introduce the concept of layer-3 switching, which is called layer-2 switching + layer-3 forwarding. A layer-3 switch is equivalent to the integration of multiple single-arm routes and switches dedicated to handling inter-vlan routes.

Forwarding principles of layer-3 switches

Layer-3 switches use hardware to exchange and route data packets. To process high-level information of data packets, layer-3 switching has two architectures:

1> traditional MLS (Multilayer Switching)

After Application-Specific Integrated Circuit is used to route the first data packet of a data stream, the layer-3 engine processes the hardware switching component to provide a route for subsequent data packets. Generates MLS entry records and routes are exchanged multiple times at a time.

2> MLS Based on CEF (Cisco Express Forwarding)

CEF is a topology-based forwarding model. It adds all routing information to the forwarding information database (FIB) in advance to facilitate fast routing. Basic concepts include:

Forwarding information library (FIB): similar to a route table, records the relationship between IP addresses and VLANs.

Adjacent Relationship table: similar to the mac address table, which records the mac address of the host connected to the adjacent interface

Virtual Interface: a sub-interface independent of a physical interface. The vlan configuration gateway is enabled, and the physical interface belonging to the vlan can act as the vlan gateway dynamically.

Layer-3 Switch configuration

The layer-3 switch interface is a layer-2 interface by default, and the command switchport is converted to a layer-3 interface. On the contrary, no switchport is used to convert the routing interface into a switch interface. The following simulated graph configuration is used as an example.

Configuration steps:

1> Create a vlan on the L2 Switch and allocate the port. Configure the trunk for port f0/0 (command omitted)

2> Create a vlan on a layer-3 Switch and configure the interface encapsulation method specified by trunk

SW_3L (config) # int f0/0

SW_3L (config-if) # switchport trunk encapsulation dot1q

SW_3L (config-if) # switchport mode trunk

3> Configure the IP addresses of each vlan on a layer-3 Switch

SW_3L (config) # int vlan 10

SW_3L (config-if) # ip add 192.168.1.1 255.255.255.0

SW_3L (config-if) # no sh

Vlan20 and vlan30

4> enable routing on a layer-3 Switch and configure the interface ip Address

SW_3L (config) # ip routing

SW_3L (config) # int f1/0

SW_3L (config-if) # no switchport

SW_3L (config-if) # ip add 10.1.1.1 255.255.255.248

SW_3L (config-if) # no sh

5> Configure Default routes for layer-3 switches

SW_3L (config) # ip route 0.0.0.0 0.0.0.0 10.1.1.2

After the above configuration, the ip address and gateway can be set for the client, and the communication between different VLANs can be normal. DHCP relay forwarding can also be configured on a layer-3 Switch to facilitate client Address Configuration. This allows different VLANs to share one dhcp server. dhcp broadcast information can be forwarded between different VLANs. The configuration process is as follows:

First, select a vlan to configure the dhcp service as the dhcp server. The third section describes the configuration here.

Next, configure dhcp relay forwarding for each vlan except the vlan where the dhcp server is located. For example, the dhcp server now configures vlan3 in vlan2:

SW_3L (config) # int vlan3

SW_3L (config-if) # ip add 192.168.2.1 255.255.255.0 set vlan3 gateway address

SW_3L (config-if) # ip helper-address 192.168.2.100 dhcp server host address in vlan2

It should be noted that, like configuring the dhcp service on a single-arm route, we need to configure multiple address pools. The address pool should contain the gateway address of the corresponding vlan.

[Edit recommendations]

How to resolve layer-3 Switch faults how different VLANs implement routing Analysis on layer-3 switches [responsible for editing: Lin TEL :( 010) 68476606]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.