How to configure a vswitch to implement layer-3 Switching

Source: Internet
Author: User


How to configure a switch to implement layer-3 switching first, let's take a look at how the switch sets the application environment of layer-3 switching technology. In order to enable communication between VLANs, single-arm routing is prone to bottlenecks. layer-3 switching can be used to achieve line rate forwarding. 1. What is layer-3 Exchange Technology? www.2cto.com simply says layer-3 exchange technology is layer-2 exchange technology + layer-3 forwarding technology. (The switch works on the second layer and the router works on the third layer.) The following figure shows the topology of the Three-layer switch.

3. configure a layer-3 Switch: 1. configure a route entry on the layer-3 Switch. (to configure a route entry on the layer-3 switch, you must first enable the routing function on the layer-3 switch, otherwise, the layer-3 Switch does not have the routing function. Switch (config) # ip routing 2 configures the vlan ip address, which is the same as the command for configuring the VLAN ip address on the layer-2, because layer-3 switches support routing between VLANs, IP addresses can be configured for each VLAN of the layer-3 switch. Switch (config) # interface vlan-id Switch (config) # ip addrees ip-address subnet-mask
3. The layer-3 switch interface configured on a layer-3 Switch belongs to VLAN 1 by default. If you need to connect a layer-3 switch to a vro, you need to configure a route interface on a vswitch interface. Swith (config) # interface www.2cto.com Switch (config) # no switchport Switch (config) # ip addrees ip-address subnet-mask Switch (config) # no shutdown 4 configure static or dynamic routing on a layer-3 Switch: The method for configuring Static Routing on a layer-3 switch is the same as that configured on a router. Dynamic: Router (config) # router rip Router (config-router) # network-number (declaring the directly connected CIDR Block) static: Router (config) # ip route (network destination network address) [mask subnet mask] {next hop router interface address through which addrees reaches the destination network} (simply put, where to go .. Add non-direct connection CIDR blocks .)
5. view the FIB table: Switch (config) show ip cef (CEF mainly contains two forwarding information tables) forwarding information database (fib): joining table: 6 view the joining table: switch (config) # show adfacency detail 7 experiment topology experiment requirements: the host in VLAN 1 can communicate with the host in VLAN 2 VLAN 3, 2 VLAN 3 cannot access 10.1.1.2 3 and cannot use single-arm routing. Only layer-3 switching is required. The experimental configuration is as follows: 1 in the sw-3l # vlan database sw-3l (vlan) # vlan 2 sw-3l (vlan) # vlan 3 sw-3l (vlan) # exit sw-3l (config) # ip routing sw-3l (config) # interface vlan 1 sw-3l (config-vlan) # ip address 192.168.1.1 255.255.255.0 sw-3l (config-vlan # no shutdown sw-3l (config) # interface vlan 2 sw-3l (config-vlan) # ip address 192.168.2.1 255.255.255.0 sw-3l (config-vlan # no shutdown www.2cto.com sw-3l (config) # interface vlan 3 sw-3l (config-vlan) # ip address 192.168.3.1 255.255.255.0 sw-3l (config-vlan # no shutdown sw-3l (config-if) # exit sw-3l (config) # interface f0/23 sw-3l (config-if) # no switchport sw-3l (config-if) # ip addrees 10.1.1.1 255.0.0.0 sw-3l (config-vlan # no shutdown sw-3L (config) # interface f0/24 sw-3L (config-if) # switchport mode trunk 2 in sw-2L # vlan database sw-2L (vlan) # vlan 2 sw-2L (vlan) # vlan 3 sw-2L (vlan exit sw-2L (config) # interface range f0/11-15 sw-2L (config-if-range) # switchport mode access sw-2L (config-if-range) # switchport access vlan 2 sw-2L (config-if-range) # exit sw-2L (config) # interface range f0/16-23 sw-2L (config-if-range) # switchport mode access sw-2L (config-if-range) # switchport access vlan 3 sw-2L (config-if-range) # exit sw-2L (config) # interface f0/24 sw-2L (config-if) # switchport mode trunk in the router (config) # interface f0/0 router (config) # ip address 10.1.1.2 route 0.0.0 router (config) # no shutdown www.2cto.com router (config) # router rip 1 Dynamic Route: router (config) # network 192.168.1.0 router (config) # network 192.168.2.0 2 or use static: router (config) # ip route 192.168.1.0 255.255.255 10.1.1.1 router (config) # ip route 192.168.2.0 255.255.255.255 10.1.1.1 3 if the host in VLAN 3 wants to access 10.1.1.2, add a route. Dynamic: router (config) # network 192.168.3.0 or: static: router (config) # ip route 192.168.3.0 255.255.255 10.1.1.1 this article is from the fat shark network

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.