How DHCP manages IP allocation automatically

Table of Contents
DHCP uses a four-step process (Discover, Offer, Request, Acknowledge) to lease IPs automatically from a pool.
It supports dynamic, automatic, and manual (reserved) allocation to avoid address conflicts and ease network management.
What is DHCP and why it matters
The service called Dynamic Host Configuration Protocol (DHCP) automatically assigns the IP addresses and other network information to devices. Without the DHCP, network have to manually configure the every device which is time-consuming and higher mistakes. Networks save time and reduce the likelihood of issues with DHCP.
DHCP makes networks easy to handle. It puts the work of giving devices IP addresses, gateways, and DNS in one place. This means every device can join and work with little help from staff.
Origins and standards behind DHCP
DHCP is defined in RFC 2131 for IPv4 networks. It evolved from an earlier protocol called BOOTP. The key additions include automatic allocation of reusable addresses and options for extra configuration parameters.
For IPv6, there is a related standard called DHCPv6. DHCPv6 handles IPv6 addresses, but also supports other configuration data.
Core components of DHCP
The main parts of a DHCP system:
DHCP server: device (or software) which holds the pool of available IP addresses and stores other configuration parameters (“options”).
DHCP client: device which asked the IP address and network configuration.
DHCP relay agent: helps clients on subnet or network segment which can talk to a server on another, forwarding messages as needed. Useful in networks with many subnets.
How DHCP works: the DORA process
When a device connects to a network and wants an IP address, DHCP uses a four-step process often called DORA:
Discover
The client sends a DHCPDISCOVER message as a broadcast on the network, asking if there is any DHCP server available. In order for servers to know who is requesting, it contain the MAC address.
Offer
A DHCP server that sees the discover message replies with a DHCPOFFER. This contains an available address from its pool plus the network parameters the client will use (subnet mask, gateway, DNS, lease duration etc.).
Request
The client chooses one of the offers it receives and sends a DHCPREQUEST message signalling that it wants to use the offered address and parameters. Other servers that offered addresses will see that request and stop offering.
Acknowledge
The server sends a DHCPACK message to confirm the lease. The client then sets up the IP address and network configuration which is allow it communicating correctly.
Lease time, renewal, rebinding: managing duration
The lease time is configured by the administrator. It can be hours, days, sometimes weeks. Shorter leases may be used for guest Wi-Fi or public networks; longer ones for stationary devices.
Renewal: When a client has used about half its lease period, it will attempt to renew (send a DHCPREQUEST directly to the server that granted the lease). If that the server is unreachable, then it may be rebinding later.
Expiration and reallocation: If client does not renew before expires, then the address is freed and can be assigned to another client. This ensures the efficient use of IP address pools.
Additional network configuration via DHCP options
DHCP does more than assign IP addresses. It can also deliver a variety of configuration parameters, often called options, such as:
- Subnet mask
- Default gateway (router)
- DNS server addresses
- Domain name
- NTP servers
- Vendor specific options (for certain types of device)
These options help clients configure themselves fully so they can work on the network properly immediately after lease.
Preventing conflicts and ensuring reliability
Automated systems can have risks. DHCP includes mechanisms to avoid problems.
Address conflicts: Before using an IP offered, in many implementations the client or server may probe (for example via ARP) to check whether the address is already in use. If it is, the client sends DHCPDECLINE to server.
Exclusions and reservations: Administrators can exclude certain IP addresses from the pool, reserve specific addresses for devices by binding them to their MAC addresses. Thus devices always receive the same IP.
Relay agents and multi-subnet support: A DHCP relay agent passes messages between clients and servers when they are on different subnets, the service can work across larger networks. That allows one DHCP server to manage clients in different network segments, preserves the correct allocation from right subnet pool.
Variations in implementations and policies
Different environments use DHCP in different ways. Some of the variations include:
- Scope size and fragmentation: The size of the address pool (scope) may be large or small. Smaller networks may just have one scope; large enterprise networks have many. Address space planning is crucial.
- Lease durations tuned to device stability: For devices that are always connected (servers, printers), leases tend to be longer. For mobile or transient devices (phones, guest devices), leases are shorter to enable reuse.
- Failover and redundancy: Many DHCP implementations allow two or more DHCP servers to work together so that if one fails, another can take over. Ensures continuous IP allocation service.
- Security policies: Some networks restrict which MAC addresses can get leases. Some monitor DHCP messages. They also use DHCP snooping on switches to find rogue DHCP servers.
Common challenges in DHCP and how to avoid them
Even with automation, DHCP can face issues. Here are some common ones and best practices to avoid them:
Running out of available IP addresses in the pool due to too many devices.
Solution: size your pool appropriately; remove old leases; adjust lease times.
Incorrect lease times. Too long → IPs tied up when devices disconnect; too short → excessive traffic, overhead renewing leases.
Solution: monitor usage, adjust times per subnet/device type.
Multiple DHCP servers or misconfigured relays send conflicting settings.
Solution: clearly define scopes, use server authorisation, avoid overlapping scopes.
Security risks: rogue DHCP servers assigned wrong addresses and misdirect traffic.
Solution: use DHCP snooping on switches; only allow authorised servers.
Examples of DHCP in real-world situations
In home network, the router works as the DHCP server. When phone, laptop, or smart TV is turned on, it gets an IP by itself, user does not type one in.
In enterprise Wi-Fi or guest networks, many devices connect and leave again. DHCP with short lease times helps ensure IPs are not wasted on devices no longer connected.
Internet service providers (ISPs) use DHCP for assigning public IPs or customer gateway IPs. Sometimes addresses remain constant for months; sometimes they change. DHCP options and policies shape that behaviour.
In large campuses with many VLANs/subnets, DHCP relay agents and multiple servers allow central management.
How DHCP manages automatic allocation specifically
Automatic allocation is one of the ways DHCP assigns addresses. It is different from dynamic or manual:
In automatic allocation, the server permanently assigns an IP address to a client from the set defined by the administrator. The “permanently” word means that once assigned, the address is expected to be same if client returns, but the server tracks past assignments so that it can try to give the same IP again.
The difference to dynamic allocation is that dynamic leases could change over time (if device disconnected long enough, or lease expires and not renewed) whereas automatic tries to give the same address where possible.
Administrators may prefer automatic allocation for devices that are long-lived but still want them managed via DHCP rather than manually setting static addresses
Technical details: ports, message types, options
To understand how DHCP works fully, here are some nuts and bolts:
DHCP operates over UDP: the server listens on UDP port 67; clients use port 68.
Messages have specific types: DISCOVER, OFFER, REQUEST, ACK, NAK, DECLINE, RELEASE, INFORM etc.
Options are carried inside messages. Options include standard ones (subnet mask, router, DNS etc.), and vendor specific ones. They allow flexibility.
For networks with multiple subnets, relay agents set a field called GIADDR to tell the server which subnet the client is in; that helps server pick the correct pool for allocation.
Trusted IPv4 Leasing for Business Growth
Get enterprise-grade IPv4 space quickly, with seamless deployment and end-to-end management.
Get Started with i.leaseFAQs
What happens if two devices request the same IP address via DHCP?
DHCP servers are designed to prevent that. The server keeps track of leases in a database. If a client requests an IP address already in use, server can reply with DHCPNAK. Also clients or server may use ARP probes to check address conflict before using.
Can a DHCP client keep the same IP address every time it connects?
Yes. If the client’s lease is still valid and the server uses automatic or dynamic allocation and tracks previous assignments, then the client often gets the same IP. Also using manual reservation ensures consistency.
How long is a typical DHCP lease time?
It varies. For mobile or guest devices, it might be an hour or less. For stable devices (servers, desktops) leases may last days. ISPs may use leases lasting one day to a week.
Does DHCP work the same way for IPv6?
Not exactly the same, but similar principles apply. DHCPv6 handles IPv6 addresses and prefixes, and supports configuration options. Some networks use stateless address autoconfiguration (SLAAC) alongside DHCPv6.
What distinguishes intra-RIR transfers from inter-RIR transfers?
An intra-RIR transfer occurs within a single registry’s region, requiring approval only from that registry. An inter-RIR transfer moves addresses between two registries, requiring both to approve.
相关文章

全球企业租赁IP地址的五大好处
租赁 IP 地址对全球企业意味着什么? IP 地址租赁并不是一次性购买整个 IPv4 或 IPv6 地址块,而是向供应商租用这些地址。这种方式可以让企业快速获得不同地区的地址资源。由于 IPv4 资源短缺,这对跨国企业尤其重要。 通过租赁,企业可以更容易满足扩展需求和短期项目需求,同时把原本需要大量资本投入的成本,转化为更容易管理的运营支出。随着 IPv4 免费地址池已经完全耗尽,从区域互联网注册机构(RIR)或经纪商处租用 IP 地址,已经成为一种常见策略。 无需大量资本支出即可快速扩展 租赁 IP 地址最明显的优势之一,是财务灵活性。 企业不必花费数万甚至数十万英镑购买 /18 或 /19 地址块,而是可以按需租用实际需要的地址数量。近期分析显示,IPv4 地址租赁价格约为每个 IP 每月 0.30 至 2.50 美元,而购买即使是较小的地址块,也可能需要每个 IP 35 至 60 美元。 这对初创公司或正在部署临时基础设施的组织尤其有价值,因为它可以降低前期成本,并让预算更有效地用于其他业务领域。 地理多样性与更好的本地化 对于全球业务而言,拥有看起来位于目标市场的 IP 地址,可以显著改善服务交付效果。 租赁允许企业快速获得来自不同地区的 IP 地址块。Pacific Connect 指出,地理多样性有助于建立本地化的线上存在,并支持特定地区的营销或内容策略。 无论是需要在多个大洲建立节点的 CDN,还是希望呈现“本地化”形象的电商平台,IP 租赁都能提供更强的地理灵活性。 部署速度与运营敏捷性 购买 IP 地址块通常需要数周甚至数月时间,过程涉及注册机构转让和复杂文件流程。 相比之下,租赁速度更快。部分租赁平台可以在数天甚至数小时内完成设置。LARUS 表示可在 48 小时内交付 IPv4 地址空间,包括授权书(Letter of Authorisation, LOA)和全球路由设置。 这种即时性对企业非常关键,尤其是在应对突然增加的容量需求时,例如启动营销活动、扩展基础设施到新站点,或在旺季扩大支持能力。 地址清洁度与安全运营 可靠的租赁供应商通常会进行黑名单检查,并提供滥用管理服务,以保护客户免受问题 IP 地址段的影响。 InterLIRRead more Related Posts 全球企业租赁IP地址的五大好处 租赁 IP 地址对全球企业意味着什么? IP 地址租赁并不是一次性购买整个 IPv4 或 IPv6 地址块,而是向供应商租用这些地址。这种方式可以让企业快速获得不同地区的地址资源。由于 IPv4 资源短缺,这对跨国企业尤其重要。 通过租赁,企业可以更容易满足扩展需求和短期项目需求,同时把原本需要大量资本投入的成本,转化为更容易管理的运营支出。随着 IPv4 免费地址池已经完全耗尽,从区域互联网注册机构(RIR)或经纪商处租用 IP 地址,已经成为一种常见策略。 无需大量资本支出即可快速扩展 租赁 IP 地址最明显的优势之一,是财务灵活性。 公共 IP vs 私有 IP:企业在扩展基础设施前需要了解什么 公共 IP 地址和私有 IP 地址都能帮助设备在网络之间通信,但它们的用途不同。公共 IP 地址用于将设备、服务器或网络连接到互联网。私有 IP 地址则用于本地网络或内部网络之中。 对于企业而言,这一区别很重要,因为 IP 规划会影响托管、云基础设施、VPN 访问、网络安全、远程办公、客户平台以及网络增长。小型办公室可能只需要在路由器后方使用简单的私有地址,而托管服务提供商、SaaS 公司、VPN 平台或数据中心,则可能需要稳定的公共 IP 资源来支持面向互联网的服务。 了解公共 IP 地址和私有 大多数企业为何会意外面临 IPv4 地址分配失败的风险 IPv4 稀缺性已被广泛理解。许多企业仍然低估的是:地址资源如何被治理和维护所带来的连续性风险。 企业往往在持续使用 IPv4 资源的同时,并没有完全看清支撑这些分配的连续性条件。 对租赁、转让和供应商管理型基础设施的依赖不断增加,正在将 IPv4地址分配 重塑为一个长期治理问题。 IPv4地址分配已悄然成为连续性问题 对许多企业 IT 团队来说,IPv4 地址看起来仍然在运营上保持稳定。 应用程序仍然可以访问。云平台继续扩展。连接服务供应商在没有明显中断的情况下提供服务。从外部看,互联网似乎仍像过去一样运行。 然而,在这种运营稳定性之下,IPv4地址分配的结构已经发生了根本变化。 可自由分配的 IPv4 空间耗尽早已不是新闻。American Registry for .related-post {} .related-post .post-list { text-align: left; } .related-post .post-list .item { margin: 5px; padding: 10px; } .related-post .headline { font-size: 18px !important; color: #999999 !important; } .related-post .post-list .item .post_thumb { max-height: 220px; margin: 10px 0px; padding: 0px; display: block; } .related-post .post-list .item .post_title { font-size: 16px; color: #3f3f3f; margin: 10px 0px; padding: 0px; display: block; text-decoration: none; } .related-post .post-list .item .post_excerpt { font-size: 13px; color: #3f3f3f; margin: 10px 0px; padding: 0px; display: block; text-decoration: none; } @media only screen and (min-width: 1024px) { .related-post .post-list .item { width: 30%; } } @media only screen and (min-width: 768px) and (max-width: 1023px) { .related-post .post-list .item { width: 90%; } } @media only screen and (min-width: 0px) and (max-width: 767px) { .related-post .post-list .item { width: 90%; } }

公共 IP vs 私有 IP:企业在扩展基础设施前需要了解什么
公共 IP 地址和私有 IP 地址都能帮助设备在网络之间通信,但它们的用途不同。公共 IP 地址用于将设备、服务器或网络连接到互联网。私有 IP 地址则用于本地网络或内部网络之中。 对于企业而言,这一区别很重要,因为 IP 规划会影响托管、云基础设施、VPN 访问、网络安全、远程办公、客户平台以及网络增长。小型办公室可能只需要在路由器后方使用简单的私有地址,而托管服务提供商、SaaS 公司、VPN 平台或数据中心,则可能需要稳定的公共 IP 资源来支持面向互联网的服务。 了解公共 IP 地址和私有 IP 地址的工作方式,有助于企业设计安全、可扩展并为增长做好准备的网络。 什么是公共 IP 地址? 公共 IP 地址是面向互联网的地址,可以从私有网络外部访问。它允许服务器、路由器、防火墙、云平台和在线服务与更广泛的互联网进行通信。 例如,企业网站、电子邮件服务器、VPN 网关或客户应用程序可能会使用公共 IP 地址,以便用户和系统能够在线访问它。 公共 IP 地址通常由互联网服务提供商、云服务提供商、托管服务提供商或 IP 资源提供商分配。根据网络设计方式,它们可以是静态的,也可以是动态的。 静态公共 IP 会长期保持不变。这对于服务器、远程访问、白名单、DNS 记录、VPN 和企业应用程序非常有用。 动态公共 IP 可能会定期变化。这对于普通浏览可能没有问题,但通常不太适合需要稳定访问的企业服务。 什么是私有 IP 地址? 私有 IP 地址用于本地网络内部。它允许同一内部环境中的设备彼此通信,而不会直接暴露在公共互联网中。 私有 IP 地址通常用于笔记本电脑、手机、打印机、办公室服务器、路由器、摄像头以及企业内部系统。 例如,办公室员工可以使用私有 IP 地址连接到共享打印机、文件服务器、内部仪表板或本地应用程序。这些地址保留在公司网络内部,通常不会对外部世界可见。 私有 IP 地址规划有助于企业组织内部设备、减少公共暴露,并改善网络分段。 对于需要路由的使用场景,出租方可以提供授权书(Letter of Authorization,LOA),使承租方能够通过自己的网络使用 BGP 宣告该 IP 区块。根据具体安排,也可能需要 ROA 或 Related Posts 全球企业租赁IP地址的五大好处 租赁 IP 地址对全球企业意味着什么? IP 地址租赁并不是一次性购买整个 IPv4 或 IPv6 地址块,而是向供应商租用这些地址。这种方式可以让企业快速获得不同地区的地址资源。由于 IPv4 资源短缺,这对跨国企业尤其重要。 通过租赁,企业可以更容易满足扩展需求和短期项目需求,同时把原本需要大量资本投入的成本,转化为更容易管理的运营支出。随着 IPv4 免费地址池已经完全耗尽,从区域互联网注册机构(RIR)或经纪商处租用 IP 地址,已经成为一种常见策略。 无需大量资本支出即可快速扩展 租赁 IP 地址最明显的优势之一,是财务灵活性。 IP publique vs IP privée : ce que les entreprises doivent savoir avant de faire évoluer leur infrastructure Les adresses IP publiques et privées aident toutes deux les appareils à communiquer sur les réseaux, mais elles remplissent des 企业入站与出站 IPv4 租赁完整指南 租赁 IPv4 地址可以转移部分伴随完全所有权而来的风险。例如,购买地址可能会让组织暴露于价格波动、长期贬值风险以及信誉管理责任之中。通过 i.Lease 进行租赁,企业可以降低这些风险暴露,并在明确期限内维持可预测的成本,从而支持更可靠的预算规划和风险管理实践。这种方式也简化了基础设施管理,因为租赁供应商通常会负责滥用监控、信誉检查和注册机构协调,使承租方能够专注于核心业务功能,而不是 IP 资产管理。IPv4 租赁并不限于单一行业。托管服务商、云平台、电信公司、SaaS 公司和网络安全企业都可以从租赁中受益。例如,托管服务商可以在无需大量前期投资的情况下扩展服务器部署,而网络安全公司则可以根据客户需求灵活增加地址空间,而无需承诺完全购买。在销售、营销和监管测试中,租赁允许组织在特定地区试运行部署,而无需投入大量资本。这种战略灵活性支持创新,同时帮助企业在 IPv4 稀缺持续存在的市场中保持韧性。利用 i.Lease 进行 IPv4 租赁管理的好处非常清楚:具成本效益的访问、快速部署、信誉安全、可扩展性、地理多样性和持续支持。在 IPv4 地址稀缺且直接购买成本高昂的环境中,通过值得信赖的平台进行租赁,使组织能够维持连接、按需扩展基础设施,并高效管理资源。通过将 IPv4 租赁视为基础设施规划的重要组成部分,而不是临时替代方案,企业可以在应对 IPv4 .related-post {} .related-post .post-list { text-align: left; } .related-post .post-list .item { margin: 5px; padding: 10px; } .related-post .headline { font-size: 18px !important; color: #999999 !important; } .related-post .post-list .item .post_thumb { max-height: 220px; margin: 10px 0px; padding: 0px; display: block; } .related-post .post-list .item .post_title { font-size: 16px; color: #3f3f3f; margin: 10px 0px; padding: 0px; display: block; text-decoration: none; } .related-post .post-list .item .post_excerpt { font-size: 13px; color: #3f3f3f; margin: 10px 0px; padding: 0px; display: block; text-decoration: none; } @media only screen and (min-width: 1024px) { .related-post .post-list .item { width: 30%; } } @media only screen and (min-width: 768px) and (max-width: 1023px) { .related-post .post-list .item { width: 90%; } } @media only screen and (min-width: 0px) and (max-width: 767px) { .related-post .post-list .item { width: 90%; } }

企业入站与出站 IPv4 租赁完整指南
租赁 IPv4 地址可以转移部分伴随完全所有权而来的风险。例如,购买地址可能会让组织暴露于价格波动、长期贬值风险以及信誉管理责任之中。通过 i.Lease 进行租赁,企业可以降低这些风险暴露,并在明确期限内维持可预测的成本,从而支持更可靠的预算规划和风险管理实践。 这种方式也简化了基础设施管理,因为租赁供应商通常会负责滥用监控、信誉检查和注册机构协调,使承租方能够专注于核心业务功能,而不是 IP 资产管理。 IPv4 租赁并不限于单一行业。托管服务商、云平台、电信公司、SaaS 公司和网络安全企业都可以从租赁中受益。例如,托管服务商可以在无需大量前期投资的情况下扩展服务器部署,而网络安全公司则可以根据客户需求灵活增加地址空间,而无需承诺完全购买。 在销售、营销和监管测试中,租赁允许组织在特定地区试运行部署,而无需投入大量资本。这种战略灵活性支持创新,同时帮助企业在 IPv4 稀缺持续存在的市场中保持韧性。 利用 i.Lease 进行 IPv4 租赁管理的好处非常清楚:具成本效益的访问、快速部署、信誉安全、可扩展性、地理多样性和持续支持。在 IPv4 地址稀缺且直接购买成本高昂的环境中,通过值得信赖的平台进行租赁,使组织能够维持连接、按需扩展基础设施,并高效管理资源。 通过将 IPv4 租赁视为基础设施规划的重要组成部分,而不是临时替代方案,企业可以在应对 IPv4 市场现实的同时,实现运营稳定性和财务可预测性。 入站与出站 IPv4 租约:企业完整指南 在 Internet Protocol version 4(IPv4)枯竭后的时代,对于需要地址空间但不想直接拥有地址资产的组织来说,租赁已经变得非常重要。虽然 IPv6 仍在逐步采用,但由于兼容性需求、旧有基础设施以及较慢的迁移经济性,IPv4 仍然深深嵌入全球路由体系中。 对于企业而言,理解入站和出站 IPv4 租赁之间的区别,对于管理成本、安全性和运营连续性至关重要。本指南将结合实际背景解释两者,并与业界关于注册层脆弱性和连续性风险的更广泛观察保持一致。 什么是IPv4租约? IPv4 租赁是指按约定期限租用 IPv4 地址空间,而不是直接购买地址块。企业根据合同条款从出租方(拥有可用 IPv4 地址容量的组织或经纪商)租赁地址,合同条款授予其使用权。 租赁之所以被广泛使用,是因为全球 IPv4 地址池多年来一直处于枯竭状态。2011 年,互联网号码分配机构 (IANA) 将最后剩余的地址块分配给了区域互联网注册管理机构 (RIR),此后,企业再也无法按需获得大量新的地址分配。 入站 IPv4 地址租赁—引入地址 入站租赁是指企业从供应商处获取 IPv4 地址,用于自身业务使用。 企业为什么选择入站租赁 当组织现有的 IPv4 资源不足以支持以下需求时,通常会选择入站租赁: 扩展数字服务 支持新的基础设施 维持依赖 IPv4 的应用程序 Related Posts 全球企业租赁IP地址的五大好处 租赁 IP 地址对全球企业意味着什么? IP 地址租赁并不是一次性购买整个 IPv4 或 IPv6 地址块,而是向供应商租用这些地址。这种方式可以让企业快速获得不同地区的地址资源。由于 IPv4 资源短缺,这对跨国企业尤其重要。 通过租赁,企业可以更容易满足扩展需求和短期项目需求,同时把原本需要大量资本投入的成本,转化为更容易管理的运营支出。随着 IPv4 免费地址池已经完全耗尽,从区域互联网注册机构(RIR)或经纪商处租用 IP 地址,已经成为一种常见策略。 无需大量资本支出即可快速扩展 租赁 IP 地址最明显的优势之一,是财务灵活性。 What a Continuity-Backed IPv4 Marketplace Actually Means What is a continuity-backed IPv4 marketplace?A continuity-backed IPv4 marketplace is an IPv4 trading and leasing model designed to ensure IPv4 公共 IP vs 私有 IP:企业在扩展基础设施前需要了解什么 公共 IP 地址和私有 IP 地址都能帮助设备在网络之间通信,但它们的用途不同。公共 IP 地址用于将设备、服务器或网络连接到互联网。私有 IP 地址则用于本地网络或内部网络之中。 对于企业而言,这一区别很重要,因为 IP 规划会影响托管、云基础设施、VPN 访问、网络安全、远程办公、客户平台以及网络增长。小型办公室可能只需要在路由器后方使用简单的私有地址,而托管服务提供商、SaaS 公司、VPN 平台或数据中心,则可能需要稳定的公共 IP 资源来支持面向互联网的服务。 了解公共 IP 地址和私有 .related-post {} .related-post .post-list { text-align: left; } .related-post .post-list .item { margin: 5px; padding: 10px; } .related-post .headline { font-size: 18px !important; color: #999999 !important; } .related-post .post-list .item .post_thumb { max-height: 220px; margin: 10px 0px; padding: 0px; display: block; } .related-post .post-list .item .post_title { font-size: 16px; color: #3f3f3f; margin: 10px 0px; padding: 0px; display: block; text-decoration: none; } .related-post .post-list .item .post_excerpt { font-size: 13px; color: #3f3f3f; margin: 10px 0px; padding: 0px; display: block; text-decoration: none; } @media only screen and (min-width: 1024px) { .related-post .post-list .item { width: 30%; } } @media only screen and (min-width: 768px) and (max-width: 1023px) { .related-post .post-list .item { width: 90%; } } @media only screen and (min-width: 0px) and (max-width: 767px) { .related-post .post-list .item { width: 90%; } }