Home Database Mysql Tutorial 3550之DHCP服务器的详尽配置实例

3550之DHCP服务器的详尽配置实例

Jun 07, 2016 pm 03:06 PM
dhcp Example Serve server Configuration

作DHCP 服务器 ,因为当时在 配置 3550作为DHCP中继代理时顺便测试了一把将3550 配置 为DHCP 服务器 并获通过,因此这里将 配置 过程写出来,供大家参考. 网络环境:一台3550EMI交换机,划分三个vlan,vlan2 为 服务器 所在网络,命名为server,IP地址段 为192.168

作DHCP服务器,因为当时在配置3550作为DHCP中继代理时顺便测试了一把将3550配置为DHCP服务器并获通过,因此这里将配置过程写出来,供大家参考.

网络环境:一台3550EMI交换机,划分三个vlan,vlan2 为服务器所在网络,命名为server,IP地址段

为192.168.2.0,子网掩码:255.255.255.0,网关:192.168.2.1,域服务器为windows 2000 advance server,

同时兼作DNS服务器,IP地址为192.168.2.10,vlan3为客户机1所在网络,IP地址段为192.168.3.0,子网掩码:255.255.255.0,网关:192.168.3.1命名为work01,vlan4为客户机2所在网络,命名为work02,IP地址段为

192.168.4.0,子网掩码:255.255.255.0,网关:192.168.4.1,

3550作DHCP服务器,端口1-8划到VLAN 2,端口9-16划分到VLAN 3,端口17-24划分到VLAN 4.

DHCP服务器实现功能:

各VLAN保留2-10的IP地址不分配置,例如:192.168.2.0的网段,保留192.168.2.2至192.168.2.10的IP地

址段不分配.

安全要求:

VLAN 3和VLAN 4 不允许互相访问,但都可以访问服务器所在的VLAN 2,

默认访问控制列表的规则是拒绝所有包.

配置命令及步骤如下:

第一步:创建VLAN:

Switch>en

Switch#Vlan Database

Switch(Vlan)>Vlan 2 Name server

Switch(Vlan)>Vlan 3 Name work01

Switch(vlan)>Vlan 4 Name work02

第二步:设置VLAN IP地址:

Switch#Config T

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

/*注意:由于此时没有将端口分配置到VLAN2,3,4,所以各VLAN会DOWN掉,待将端口分配到各VLAN后,V

LAN会起来*/

第三步:设置端口全局参数

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

Switch(Config-if-range)Switchport Mode Access

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

第四步:将端口添加到VLAN2,3,4中

/*将端口1-8添加到VLAN 2*/

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

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

/*将端口9-16添加到VLAN 3*/

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

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

/*将端口17-24添加到VLAN 4*/

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

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

Switch(Config-if-range)Exit

/*经过这一步后,各VLAN会起来*/

第?*剑号渲?550作为DHCP服务器

/*VLAN 2可用地址池和相应参数的配置,有几个VLAN要设几个地址池*/

Switch(Config)Ip Dhcp Pool Test01

/*设置可分配的子网*/

Switch(Config-pool)Network 192.168.2.0 255.255.255.0

/*设置DNS服务器*/

Switch(Config-pool)Dns-server 192.168.2.10

/*设置该子网的网关*/

Switch(Config-pool)Default-router 192.168.2.1

/*配置VLAN 3所用的地址池和相应参数*/

Switch(Config)Ip Dhcp Pool Test02

Switch(Config-pool)Network 192.168.3.0 255.255.255.0

Switch(Config-pool)Dns-server 192.168.2.10

Switch(Config-pool)Default-router 192.168.3.1

/*配置VLAN 4所用的地址池和相应参数*/

Switch(Config)Ip Dhcp Pool Test03

Switch(Config-pool)Network 192.168.4.0 255.255.255.0

Switch(Config-pool)Dns-server 192.168.2.10

Switch(Config-pool)Default-router 192.168.4.1

第六步:设置DHCP保留不分配的地址

Switch(Config)Ip Dhcp Excluded-address 192.168.2.2 192.168.2.10

Switch(Config)Ip Dhcp Excluded-address 192.168.3.2 192.168.3.10

Switch(Config)Ip Dhcp Excluded-address 192.168.4.2 192.168.4.10

第七步:启用路由

/*路由启用后,各VLAN间主机可互相访问*/

Switch(Config)Ip Routing

第八步:配置访问控制列表

Switch(Config)access-list 103 permit ip 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255

Switch(Config)access-list 103 permit ip 192.168.3.0 0.0.0.255 192.168.2.0 0.0.0.255

Switch(Config)access-list 103 permit udp any any eq bootpc

Switch(Config)access-list 103 permit udp any any eq tftp

Switch(Config)access-list 103 permit udp any eq bootpc any

Switch(Config)access-list 103 permit udp any eq tftp any

Switch(Config)access-list 104 permit ip 192.168.2.0 0.0.0.255 192.168.4.0 0.0.0.255

Switch(Config)access-list 104 permit ip 192.168.4.0 0.0.0.255 192.168.2.0 0.0.0.255

Switch(Config)access-list 104 permit udp any eq tftp any

Switch(Config)access-list 104 permit udp any eq bootpc any

Switch(Config)access-list 104 permit udp any eq bootpc any

Switch(Config)access-list 104 permit udp any eq tftp any

第九步:应用访问控制列表

/*将访问控制列表应用到VLAN 3和VLAN 4,VLAN 2不需要*/

Switch(Config)Int Vlan 3

Switch(Config-vlan)ip access-group 103 out

Switch(Config-vlan)Int Vlan 4

Switch(Config-vlan)ip access-group 104 out

第十步:结束并保存配置

Switch(Config-vlan)End

Switch#Copy Run Start
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The working principle and configuration method of GDM in Linux system The working principle and configuration method of GDM in Linux system Mar 01, 2024 pm 06:36 PM

Title: The working principle and configuration method of GDM in Linux systems In Linux operating systems, GDM (GNOMEDisplayManager) is a common display manager used to control graphical user interface (GUI) login and user session management. This article will introduce the working principle and configuration method of GDM, as well as provide specific code examples. 1. Working principle of GDM GDM is the display manager in the GNOME desktop environment. It is responsible for starting the X server and providing the login interface. The user enters

How to solve the problem that DHCP is not enabled in the local connection. Recommended solutions to the problem that the computer cannot access the Internet and prompts that the DHCP service is not enabled. How to solve the problem that DHCP is not enabled in the local connection. Recommended solutions to the problem that the computer cannot access the Internet and prompts that the DHCP service is not enabled. Mar 13, 2024 pm 12:07 PM

When many users use computers to connect to Ethernet, they will see the prompt "DHCP is not enabled" and don't know what to do. This is because the DHCP function is not enabled on the router. This article teaches you how to solve this problem. 1. Check the login information. To solve the problem of "DHCP is not enabled on the Ethernet", you need to log in to the router first. When logging in to a router, you usually need to obtain the router's gateway, username, and password information. This information is usually marked on the back of the router. The IP of the router is the so-called gateway address. The default gateway address of some routers is 192.168.1.1 or 192.168.0.1. The login account generally defaults to admin and the password is admin or 123456. 2. Log in to router management

How to configure Dnsmasq as a DHCP relay server How to configure Dnsmasq as a DHCP relay server Mar 21, 2024 am 08:50 AM

The role of a DHCP relay is to forward received DHCP packets to another DHCP server on the network, even if the two servers are on different subnets. By using a DHCP relay, you can deploy a centralized DHCP server in the network center and use it to dynamically assign IP addresses to all network subnets/VLANs. Dnsmasq is a commonly used DNS and DHCP protocol server that can be configured as a DHCP relay server to help manage dynamic host configurations in the network. In this article, we will show you how to configure dnsmasq as a DHCP relay server. Content Topics: Network Topology Configuring Static IP Addresses on a DHCP Relay D on a Centralized DHCP Server

Best Practice Guide for Building IP Proxy Servers with PHP Best Practice Guide for Building IP Proxy Servers with PHP Mar 11, 2024 am 08:36 AM

In network data transmission, IP proxy servers play an important role, helping users hide their real IP addresses, protect privacy, and improve access speeds. In this article, we will introduce the best practice guide on how to build an IP proxy server with PHP and provide specific code examples. What is an IP proxy server? An IP proxy server is an intermediate server located between the user and the target server. It acts as a transfer station between the user and the target server, forwarding the user's requests and responses. By using an IP proxy server

Understand Linux Bashrc: functions, configuration and usage Understand Linux Bashrc: functions, configuration and usage Mar 20, 2024 pm 03:30 PM

Understanding Linux Bashrc: Function, Configuration and Usage In Linux systems, Bashrc (BourneAgainShellruncommands) is a very important configuration file, which contains various commands and settings that are automatically run when the system starts. The Bashrc file is usually located in the user's home directory and is a hidden file. Its function is to customize the Bashshell environment for the user. 1. Bashrc function setting environment

What is the correct way to restart a service in Linux? What is the correct way to restart a service in Linux? Mar 15, 2024 am 09:09 AM

What is the correct way to restart a service in Linux? When using a Linux system, we often encounter situations where we need to restart a certain service, but sometimes we may encounter some problems when restarting the service, such as the service not actually stopping or starting. Therefore, it is very important to master the correct way to restart services. In Linux, you can usually use the systemctl command to manage system services. The systemctl command is part of the systemd system manager

What should I do if I can't enter the game when the epic server is offline? Solution to why Epic cannot enter the game offline What should I do if I can't enter the game when the epic server is offline? Solution to why Epic cannot enter the game offline Mar 13, 2024 pm 04:40 PM

What should I do if I can’t enter the game when the epic server is offline? This problem must have been encountered by many friends. When this prompt appears, the genuine game cannot be started. This problem is usually caused by interference from the network and security software. So how should it be solved? The editor of this issue will explain I would like to share the solution with you, I hope today’s software tutorial can help you solve the problem. What to do if the epic server cannot enter the game when it is offline: 1. It may be interfered by security software. Close the game platform and security software and then restart. 2. The second is that the network fluctuates too much. Try restarting the router to see if it works. If the conditions are OK, you can try to use the 5g mobile network to operate. 3. Then there may be more

How to install PHP FFmpeg extension on server? How to install PHP FFmpeg extension on server? Mar 28, 2024 pm 02:39 PM

How to install PHPFFmpeg extension on server? Installing the PHPFFmpeg extension on the server can help us process audio and video files in PHP projects and implement functions such as encoding, decoding, editing, and processing of audio and video files. This article will introduce how to install the PHPFFmpeg extension on the server, as well as specific code examples. First, we need to ensure that PHP and FFmpeg are installed on the server. If FFmpeg is not installed, you can follow the steps below to install FFmpe

See all articles