Master the process of configuring dhcp for a vswitch

Source: Internet
Author: User

It is not very common for vswitches to set up DHCP services. If you are not familiar with this, let's take a look at the content in the article and learn about the configuration. After configuring dhcp for a Cisco 3550 switch, we have discussed it on the network. According to the configuration described on the internet, after "ip helper-ADDRESS Switch configuration dhcp server ADDRESS, in the project, it is found that the client cannot obtain the IP address from the dhcp server configured on the switch. I recently configured 3550 as the dhcp server relay proxy configured on the switch.

I was confused for a long time at first. Later I searched for information online and asked everyone for help on the forum. I finally passed the test in the project. In order to avoid such problems in the project, I left and right, write the configuration process for your reference.

Network Environment: A 3550EMI switch is divided into three VLANs. vlan2 is the network where the server is located, named server, IP address segment is 192.168.2.0, subnet mask: 255.255.255.0, Gateway: 192.168.2.1, the Domain server is windows 2000 advance server.

At the same time, it is used as the dhcp server for vswitch configuration, DNS server, IP address 192.168.2.10, vlan3 is the network where client 1 is located, IP address segment is 192.168.3.0, subnet mask: 255.255.255.0, and Gateway: 192.168.3.1 is named work01, vlan4 is the network in which client 2 is located, named work02, IP address segment: 192.168.4.0, subnet mask: 255.255.255.0, Gateway: 192.168.4.1.3550, Ports 1-8 are allocated to VLAN 2, and ports 9-16 are allocated to VLAN 3, ports 17-24 are divided into VLAN 4.

The following describes how to configure dhcp for a vswitch:

Step 1: Create a VLAN

Switch> Vlan Database

Switch (Vlan)> Vlan 2 Name server

Switch (Vlan)> Vlan 3 Name work01

Switch (vlan)> Vlan 4 Name work02

Step 2: Enable the vswitch to configure dhcp relay proxy

If the following two commands are missing, use "ip helper-address dhcp server ADDRESS" in the VLAN to specify the DHCP server, and the client still cannot obtain the IP ADDRESS

Switch> Enable

Switch # Config t

Switch (Config) Service Dhcp

Switch (Config) Ip Dhcp Relay Information Option

Step 3: Set the vlan ip Address

Switch (Config)> Int Vlan 2

Switch (Config-vlan) Ip Address 192.168.2.1 255.255.255.0

Switch (Config-vlan) No Shut

Switch (Config-vlan)> Int Vlan 3

Switch (Config-vlan) Ip Address 192.168.3.1 255.255.255.0

Switch (Config-vlan) No Shut

Switch (Config-vlan)> Int Vlan 4

Switch (Config-vlan) Ip Address 192.168.4.1

255.255.255.0

Switch (Config-vlan) No Shut

Switch (Config-vlan) Exit

Note: Because the ports are not configured to VLAN2, 3, 4 at this time, each VLAN will be DOWN. After the ports are allocated to each VLAN, the VLAN will get up.

Step 4: set global port Parameters

Switch (Config) Interface Range Fa 0/1-24

Switch (Config-if-range) Switchport Mode Access

Switch (Config-if-range) Spanning-tree Portfast

Step 5 of configuring dhcp for a vswitch: add the port to VLAN2, 3, 4

/* Add Port 1-8 to VLAN 2 */

Switch (Config) Interface Range Fa 0/1-8

Switch (Config-if-range) Switchport Access Vlan 2

/* Add Port 9-16 to VLAN 3 */

Switch (Config) Interface Range Fa 0/9-16

Switch (Config-if-range) Switchport Access Vlan 3

/* Add Port 17-24 to VLAN 4 */

Switch (Config) Interface Range Fa 0/17-24

Switch (Config-if-range) Switchport Access Vlan 4

Switch (Config-if-range) Exit

/* After this step, each VLAN will get up */

Step 6: Set the dhcp server address in VLAN3 and 4

/* No DHCP server address must be specified in VLAN 2 */

Switch (Config) Int Vlan 3

Switch (Config-vlan) Ip Helper-address 192.168.2.10

Switch (Config) Int Vlan 4

Switch (Config-vlan) Ip Helper-address 192.168.2.10

Step 7 of configuring dhcp for a vswitch: Enable Routing

/* After a route is enabled, the hosts in each VLAN can access each other. To further control the access permission, apply the access control list */

Switch (Config) Ip Routing

Step 8 of vswitch dhcp settings: Finish and save the configuration

Switch (Config-vlan) End

Switch # Copy Run Start

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.