Layer-3 Switch VLAN/VTP/inter-VLAN routing/DHCP

Source: Internet
Author: User
Tags cisco switch


A typical LAN is to connect a core switch with a layer-3 Switch to several Branch switches (not necessarily with layer-3 switching ). We assume that the core switch name is com, and the Branch switches are par1, par2, and par3 respectively, which are connected to the core switch through the light module of port 1; assume that the vlan names are counter, market, and managing ...... Work to be done: A. Set vtp domain (both core and branch switch) B. Configure Relay (both core and branch switch) C. Create vlan (set on server) d. Route the switch port to vlan E, configure Layer-3 Switch www.2cto.com A, and set vtp domain. Vtp domain is called a management domain. All switches that exchange vtp update information must be configured with the same management domain. If all the switches are connected by a trunk, you only need to set a management domain on the core switch, and all the switches on the network are added to this domain, in this way, all the switches in the management domain can understand the vlan list of each other. Com # vlan database enters vlan configuration mode com (vlan) # vtp domain com sets vtp management domain name com (vlan) # vtp server set vswitch to server mode par1 # vlan database enters vlan configuration mode par1 (vlan) # vtp domain com set vtp management domain name com par1 (vlan) # vtp client set vswitch to client mode par2 # vlan database enters vlan configuration mode par2 (vlan) # vtp domain com set vtp management domain name com par2 (vlan) # vtp client set vswitch to client mode par3 # vlan database enters vlan configuration mode par3 (vlan) # vtp domain com set vtp management domain name com par3 (vlan) # vtp clien T. Set vswitch to client mode. Note: The core switch to server mode allows you to create, modify, and delete VLANs and other configuration parameters for the entire vtp domain on the vswitch, synchronize the latest vlan information transmitted by other switches in The vtp domain. The client Mode means that the vswitch cannot create, delete, or modify vlan configurations, nor store vlan configurations in nvram, however, the vlan information transmitted by other switches in The vtp domain can be synchronized. B. Configure relay to ensure that the management domain can cover all Branch switches. The Cisco switch can support any media as a trunk line. To achieve relay, you can use its unique isl tag. Isl (inter-switch link) is a protocol for transmitting vlan information and vlan data streams between switches, between switches and routers, and between switches and servers, by configuring isl encapsulation on the port directly connected to the vswitch, you can allocate and configure VLANs across the entire network. The core switch is configured as follows: com (config) # interface gigabitethernet 2/1 com (config-if) # switchport www.2cto.com (config-if) # switchport trunk encapsulation isl configure the relay protocol com (config-if) # switchport mode trunk com (config) # interface gigabitethernet 2/2 com (config-if) # switchport com (config-if) # switchport trunk encapsulation isl configure the relay protocol com (config-if) # switchport mode trunk com (config) # interface gigabitethernet 2/3 com (config-if) # switchport com (config-if) # switchport trunk encapsulation isl configure the relay protocol com (config-if) # switchport mode trunk
The configuration on the branch switch side is as follows: par1 (config) # interface gigabitethernet 0/1 par1 (config-if) # switchport mode trunk par2 (config) # interface gigabitethernet 0/1 par2 (config-if) # switchport mode trunk par3 (config) # interface gigabitethernet 0/1 par3 (config-if) # switchport mode trunk ...... Now, the management domain is set. C. Create a vlan. Once a management domain is created, you can create a vlan. Com (vlan) # vlan 10 name counter creates a vlan com (vlan) numbered 10 and named counter) # vlan 11 name market creates a vlan com (vlan) numbered 11 and named market # vlan 12 nam e management creates a vlan numbered 12 and named managing ...... Note that the vlan here is created on the core switch. In fact, as long as the vlan is created on any vtp vswitch with the server attribute in the management domain, it notifies all switches in the entire management domain through vtp. If you want to add a specific switch port to a vlan, you must set it on the switch to which the port belongs. D. Route the vswitch ports to the vlan www.2cto.com. For example, you need to route the ports par1, par2, par3 ...... Port 1 of the branch switch is allocated to the counter vlan, Port 2 is allocated to the market vlan, and Port 3 is allocated to the management vlan ...... Par1 (config) # interface fastethernet 0/1 Configure port 1 par1 (config-if) # switchport access vlan 10 belongs to the counter vlan par1 (config) # interface fastethernet 0/2 Configure port 2 par1 (config-if) # switchport access vlan 11 belongs to the market vlan par1 (config) # interface fastethernet 0/3 Configure port 3 par1 (config-if) # switchport access vlan 12 belongs to the management vlan par2 (config) # interface fastethernet 0/1 configures Port 1 par2 (config-if) # switchport access vlan 10 belongs to c Ounter vlan par2 (config) # interface fastethernet 0/2 Configure port 2 par2 (config-if) # switchport access vlan 11 belongs to market vlan par2 (config) # interface fastethernet 0/3 Configure port 3 par2 (config-if) # switchport access vlan 12 belongs to the management vlan par3 (config) # interface fastethernet 0/1 Configure port 1 par3 (config-if) # switchport access vlan 10 belongs to the counter vlan par3 (config) # interface fastethernet 0/2 configures Port 2 par3 (config-if) # switchport access Vlan 11 belongs to the market vlan par3 (config) # interface fastethernet 0/3 Configure port 3 par3 (config-if) # switchport access vlan 12 belongs to the management vlan ...... E. configure Layer-3 Switch. vlan division is complete. However, how does one implement layer-3 (Network Layer) switching between VLANs? In this case, we need to allocate Network (ip) addresses to each vlan. You can assign an IP address to a vlan in two ways: one is to assign a static IP address to all nodes in the vlan, and the other is to assign a dynamic IP address to all nodes in the vlan. The two cases are described below. Assume that the interface IP address assigned to the vlan counter is 172.16.58.1/24, the network address is 172.16.58.0, the interface IP address allocated to the vlan market is 172.16.59.1/24, and the network address is 172.16.59.0, the interface IP Address Assigned by vlan management is 172.16.60.1/24, and the network address is 172.16.60.0 ...... If an IP address is dynamically assigned, set the IP address of the dhcp server on the network to 172.16.1.11. (1) assign a static IP address to all nodes in the vlan. Www.2cto.com first sets the interface IP addresses of each vlan on the core switch. The core switch treats vlan as an interface, just like on a vro, as shown below: com (config) # interface vlan 10 com (config-if) # ip address 172.16.58.1 255.255.255.0 vlan10 interface ip com (config) # interface vlan 11 com (config-if) # ip address 172.16.59.1 255.255.255.0 vlan11 interface ip com (config) # interface vlan 12 com (config-if) # ip address 172.16.60.1 255.255.255.0 vlan12 interface ip address ...... Then, set the IP address that is consistent with the network address of the vlan on the computer of each access vlan, and set the default gateway as the interface address of the vlan. In this way, all VLANs can access each other. (2) Assign Dynamic IP addresses to all nodes in the vlan. First, set the interface IP addresses of each vlan and the IP addresses of the same dhcp server on the core switch, as shown below: com (config) # interface vlan 10 com (config-if) # ip address 172.16.58.1 255.255.255.0 vlan10 interface ip com (config-if) # ip helper-address 172.16.1.11 dhcp server ip com (config) # interface vlan 11 www.2cto.com (config-if) # ip address 172.16.59.1 255.255.255.0 vlan11 interface ip com (config-if) # ip helper-address 172.16.1.11 dhcp server ip com (config) # interface vlan 12 co M (config-if) # ip address 172.16.60.1 255.255.0 vlan12 interface ip com (config-if) # ip helper-address 172.16.1.11 dhcp server ip ...... On the dhcp server, set the network addresses to 172.16.58.0, 172.16.59.0, and 172.16.60.0 respectively, and set the "Router" option of these scopes to the interface IP address of the corresponding vlan. In this way, all VLANs can be exchanged. Finally, set the network in the computer of each access vlan and set the IP address option to automatically obtain the IP address.

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.