bgunderlay bgunderlay bgunderlay
123

IP计算器

Calculate

Subnet Mask

Available IP Blocks

Open marketplace

Approximate Rental PriceCost
Rent /24from €240
for a networkRent now
Rent /23from €115
for a networkRent now
Rent /22from €500
for a networkRent now
Rent /21/16Ask for an offerRent now
Approximate Purchase PriceCost
Buy /24from €41
per IPBuy now
Buy /23from €41
per IPBuy now
Buy /22from €38
per IPBuy now
Buy /21/16from €45 per IPBuy now
<script>
    function calculateCIDR() {
        var cidr = document.getElementById("cidrInput").value;
        var mask = parseInt(cidr.split('/')[1]);
        var ipBlocks = Math.pow(2, 32 - mask);
        var subnetMask = (0xFFFFFFFF << (32 - mask)) >>> 0;
        subnetMask = ((subnetMask >>> 24) & 0xFF) + "." +
                     ((subnetMask >>> 16) & 0xFF) + "." +
                     ((subnetMask >>> 8) & 0xFF) + "." +
                     (subnetMask & 0xFF);
        document.getElementById("result").innerHTML = subnetMask;
    }
</script>

此工具旨在帮助网络专业人士规划和优化其IP网络。通过我们的IP计算器,您可以快速高效地执行与子网相关的计算,包括子网划分、确定可用主机数、识别广播地址等功能。

如何使用计算器

  1. 输入IP地址。 首先在指定的字段中输入IP地址。我们的计算器支持IPv4和IPv6地址。
  2. 指定子网掩码。 输入您的IP地址的子网掩码。您可以通过输入前缀长度(例如,/24)或指定完整的子网掩码(例如,255.255.255.0)来完成此操作。
  3. 结果。 输入数据后,计算器将显示信息,包括网络地址、广播地址、可用IP地址范围和每个子网的主机数量。

IP计算器的功能

  • 子网细分。 根据提供的子网掩码,将任何给定的IP地址分解成可能的子网,并显示每个子网的结构详细信息。
  • CIDR转换。 在CIDR表示法和传统子网掩码之间轻松转换。
  • IPv4和IPv6兼容性。 无论您使用的是较旧的IPv4网络还是较新的IPv6网络,我们的工具都能够支持。
  • 高效实用性。 设计用于快速和准确的计算,以节省时间并减少人为错误的可能性。

联系我们! 如需进一步的帮助或支持,请随时通过 [email protected] 联系我们的支持团队。我们将帮助您进行网络规划和优化!

 如何创建子网和配置路由

随着网络基础设施规模和复杂性的增长,对有效 IP 地址管理和高效路由选择的需求变得至关重要。子网在将大型网络划分为更小、更易于管理的网段方面发挥着至关重要的作用,而路由则可确保流量在这些子网之间正确定向。了解如何创建子网和配置路由对于维护有序、可扩展和安全的网络至关重要。

什么是子网?

子网(subnetwork 的缩写)是 IP 网络中逻辑定义的一部分。通过子网,可以将大型网络分解成更小、更易于管理的部分。这不仅能提高网络性能,还能增强安全性并简化网络管理。子网划分有助于根据部门、地理位置或其他逻辑分组来组织网络。

每个子网都有自己的 IP 范围,并通过唯一的子网掩码加以区分,子网掩码定义了子网的大小及其地址范围。

子网划分为何重要?

子网划分有几个好处,包括

  1. 高效的 IP 地址管理

将大型网络划分为较小的子网,可确保更有效地使用 IP 地址,避免地址耗尽。

  1. 提高网络性能

通过在子网内分割流量,可以减少拥堵和延迟,从而提高整体网络性能。

  1. 加强安全

子网之间可以相互隔离,从而可以对网络不同部分之间的访问和流量进行更多控制。

  1. 简化故障排除

特定子网内的问题更容易识别和解决。

如何创建子网

步骤 1:确定网络规模和要求

创建子网前,必须确定每个子网内有多少台主机,以及需要多少个子网。每个子网的大小取决于它将包含的 IP 地址数,而 IP 地址数由子网掩码定义。

  • CIDR 符号

子网通常使用 CIDR(无类域间路由)符号定义,该符号规定了 IP 地址网络部分使用的位数。例如,定义为 192.168.1.0/24 的子网网络部分使用 24 位,主机地址使用 8 位(允许 254 个可用 IP 地址)。

步骤 2:计算子网掩码

子网掩码决定了分配给网络的位数和分配给主机地址的位数。分配给网络部分的位数越多,可用主机地址的数量就越少。

下面介绍如何根据需求计算子网:

子网掩码CIDR 符号可用主机
255.255.255.0/24254
255.255.255.128/25126
255.255.255.192/2662
255.255.255.224/2730

要创建子网,需要确定每个子网需要多少 IP 地址,然后选择合适的子网掩码。例如,如果每个子网需要 30 个 IP 地址,就可以选择 /27 子网掩码,这样就可以容纳 30 台主机。

步骤 3:分配子网地址

计算出适当的子网大小后,为每个子网分配 IP 范围。下面是一个将 192.168.1.0/24 网络划分为更小子网的例子:

子网范围可用 IP 地址
子网 1192.168.1.0/26192.168.1.1 – 192.168.1.62
子网 2192.168.1.64/26192.168.1.65 – 192.168.1.126
子网 3192.168.1.128/26192.168.1.129 – 192.168.1.190
子网 4192.168.1.192/26192.168.1.193 – 192.168.1.254

每个子网都有自己的可用 IP 地址范围,专供该网段内的设备使用。

如何配置子网之间的路由选择

创建子网后,需要配置路由,以允许这些子网之间进行通信。如果没有路由,不同子网中的设备将无法相互通信。

步骤 1:了解路由基础知识

路由是在网络或子网之间转发数据包的过程。路由器或第 3 层交换机负责根据数据包的目标 IP 地址决定将数据包发送到哪里。

  • 静态路由

将路由手动添加到路由表的方法。

  • 动态路由

使用 OSPF 或 RIP 等协议自动更新路由表。

步骤 2:配置静态路由

如果你的网络相对简单,可以使用静态路由。下面介绍如何在 Linux 上添加静态路由:

打开终端,使用以下命令添加路由:

sudo ip route add <目的地网络> via <网关 IP> dev <接口

例如

sudo ip route add 192.168.2.0/24 via 192.168.1.1 dev eth0

验证路由是否已添加:

ip route show

在 Windows 系统中,可以使用路由命令添加静态路由:

路由添加 <目标网络> 掩码 <子网掩码> <网关 IP>

例如

route add 192.168.2.0 mask 255.255.255.0 192.168.1.1

步骤 3:动态路由配置

对于拥有多个子网和路由器的大型网络,动态路由选择更为有效。OSPF(开放式最短路径优先)和 RIP(路由信息协议)等协议可以自动管理路由。

例如,要在 Cisco 路由器上启用 OSPF:

router ospf 1

network 192.168.1.0 0.0.0.255 area 0

network 192.168.2.0 0.0.0.255 area 0

这将自动路由两个子网之间的流量。

在云环境中配置路由

在 AWS 等云环境中,子网之间的路由是通过 VPC(虚拟私有云)控制台配置的。

第 1 步:在 AWS 中创建子网

  1. 导航至 AWS 中的 VPC 面板。
  2. 选择创建子网,并为每个子网指定 CIDR 块(IP 范围)。
  3. 将子网分配到可用性区域。

步骤 2:配置路由表

  1. 在 VPC 面板的路由表部分,创建一个新的路由表。
  2. 添加路由,指定流量应路由到哪个子网以及通过哪个网关(如 Internet 网关或 NAT 网关)。

例如,在两个子网之间路由流量:

  • 目的地:192.168.2.0/24
  • 目标当地

子网划分和路由选择

特点静态路由动态路由
配置手动配置路由按协议自动更新
最适合子网有限的小型网络具有多个子网的大型复杂网络
使用的协议ospf、rip、eigrp
可扩展性有限公司高度可扩展性
管理费用高(需要手动更改)低(自动更新路由)

子网划分和路由选择最佳实践

  • 根据需求规划子网

根据主机数量、地理位置或部门定义子网。

  • 为大型网络使用动态路由

在复杂的环境中,OSPF 等动态路由协议可简化路由管理。

  • 监控网络性能

定期监控路由配置的性能,以发现并解决瓶颈问题。

  • 安全子网通信

实施访问控制列表 (ACL) 和防火墙,确保子网之间的流量安全。

结论

创建子网和配置路由是任何网络管理员都必须掌握的技能。通过适当地将网络划分为子网,可以提高性能、增强安全性,并使网络管理更加高效。了解不同的路由选择(静态或动态),可以让您根据网络的规模和复杂程度选择最佳方法。

IP 计算器

子网掩码

可用 IP 块

打开市场
大致租赁价格 成本
租赁 /24

从 €115
每个网络

现在购买
租赁 /23

从 240€
每个网络

现在购买
租赁 /22

从 500€
每个网络

现在购买
租赁 /21/16

索要报价

现在购买
大致租赁价格 成本
购买 /24

从 €41
每个IP

现在购买
购买 /23

从 €41
每个IP

现在购买
购买 /22

从 €38
每个IP

现在购买
购买 /21/16

从 €45 每个IP

现在购买

This tool is designed to assist network professionals in planning and optimizing their IP networks. With our IP calculator, you can quickly and efficiently perform subnet-related calculations including subnet division, determining the number of available hosts, identifying broadcast addresses, and much more.

How to Use the Calculator

  1. Enter IP Address. Start by entering the IP address in the designated field. Our calculator supports both IPv4 and IPv6 addresses.
  2. Specify Subnet Mask. Enter the subnet mask for your IP address. You can do this by entering the prefix length (e.g., /24) or by specifying the full subnet mask (e.g., 255.255.255.0).
  3. Results. Once you input the data, the calculator will display information including the network address, broadcast address, range of usable IP addresses, and the number of hosts per subnet.

Features of the IP Calculator

  1. Subnet Breakdown. Decompose any given IP address into possible subnets based on the subnet mask provided, displaying detailed information about each subnet’s structure.
  2. CIDR Conversion. Convert between CIDR notations and traditional subnet masks easily.
  3. IPv4 and IPv6 Compatibility. Whether you’re working with older IPv4 networks or newer IPv6 networks, our tool is equipped to handle both.
  4. Efficient Usability. Designed for quick and accurate calculations to save time and reduce the potential for human error.

Contact Us!

For further inquiries or assistance, feel free to contact our support team at [email protected]. We are here to help you with your network planning and optimization needs!

The Local Internet Registry (LIR) and the End User

Understanding the Role and Responsibilities of a Sponsoring Local Internet Registry

Welcome to my latest blog post where we delve into the pivotal role of a Sponsoring Local Internet Registry (LIR) and their importance in managing end user relationships in the realm of Internet resource allocation. This article is inspired by an instructional video from the RIPE NCC, presented by IP resource analyst and part-time trainer, Yu and Mackey. We’ll break down the hierarchy of Internet resource management, the responsibilities of a sponsoring LIR, and best practices for maintaining a healthy and compliant operation.

The Hierarchy of Internet Resource Management

Before we dive into the specifics of a local internet registry’s duties, let’s establish the hierarchy that exists within internet resource management. At the top, we have IANA (the Internet Assigned Numbers Authority), which oversees global IP address allocation, among other critical functions. Below IANA are the five Regional Internet Registries (RIRs), each serving a different portion of the globe. RIPE NCC, for instance, covers Europe, Central Asia, and parts of the Middle East.

Members of an RIR, such as RIPE NCC, are recognized as Local Internet Registries. LIRs are responsible for the distribution and management of IP addresses within their region. They serve a variety of end users, which can include companies, charities, schools, or even individuals.

Responsibilities of a Sponsoring LIR

As a sponsoring LIR, there’s a myriad of responsibilities that you must uphold. Not only are you tasked with requesting and assigning Internet resources on behalf of your end users, but you also need to ensure that the registry remains updated, handle abuse-related matters, and perform due diligence ahead of any requests sent to the RIPE NCC. Additionally, you’ll represent your end user in any communication with the RIPE NCC.

Let’s look at these responsibilities in a structured format:

Action Responsibility Outcome Best Practice
Resource Request Request and assign Internet resources, such as IPv6 PI or AS numbers, on behalf of end users. End users receive necessary resources for their own infrastructure. Maintain communication with end users throughout the process.
Registry Maintenance Keep the RIPE database up-to-date with accurate end user information. Accurate reflection of end user details in the RIPE database. Report changes in business structure, name, or address promptly.
Abuse Handling Handle or delegate abuse complaints related to the end users’ network. Swift resolution of abuse complaints. Ensure end user contact information is reachable and updated.

Independent Resources and Transfers

It’s crucial to understand that independent resources, such as IPv6 provider-independent space or AS numbers, are owned by the end user, not the LIR. These resources can be transferred between sponsoring LIRs if, for instance, an end user changes their service provider. However, the LIR must ensure that these transfers are recorded accurately, and in cases where resources are no longer needed, they are returned to the RIPE NCC, not retained by the LIR.

IPv4 resources are a special case due to scarcity, and typically, end users will only receive IPv4 resources from the LIR’s own allocation. However, the LIR may assist the end user in obtaining IPv4 through the RIPE NCC’s Transfer Listing Service.

Updating the Registry and Handling Abuse Complaints

Keeping the RIPE registry up-to-date is not just good practice, it’s a requirement. Whether it’s a simple name change or a more significant event like a merger or acquisition, these changes need to be reported to the RIPE NCC promptly. This ensures the integrity of the registry and the rightful ownership and use of the resources.

Abuse complaints, which can arise from DDoS attacks, spam, or malware, need to be addressed either by the LIR or the end user. If the end user is unresponsive, the responsibility falls on the LIR. In extreme cases, where the end user is consistently unreachable, the LIR may consider terminating the sponsorship agreement.

Do’s and Don’ts for Sponsoring LIRs

To encapsulate the essence of a sponsoring LIR’s responsibilities, here’s a quick list of do’s and don’ts:

  • Do keep in touch with your end users to monitor their resource usage and changes in their status or structure.
  • Don’t allow end users to contact the RIPE NCC directly; the LIR should be the intermediary.
  • Do keep the RIPE NCC informed of all changes involving your end users.
  • Don’t use end users’ internet resources for your LIR’s operations.

Conclusion

In summary, a sponsoring LIR plays a critical role in managing internet resources for end users. By maintaining open communication lines, ensuring accurate registry data, handling abuse complaints, and performing due diligence, LIRs can provide excellent service while adhering to the rules set out by the RIPE NCC. Remember, the RIPE NCC is always available to assist with any questions or concerns related to your role as a sponsoring LIR.

If you’re involved in managing a local internet registry or are an end user seeking to understand your relationship with your LIR, I hope this article has been informative. For further guidance and resources, do not hesitate to reach out to the RIPE NCC directly.

Subnetting my coffee shop

Understanding Subnetting in Practical Terms: Designing Coffee Shop Networks

Welcome back to another blog post where we dive into the riveting world of network design. Today, we’re scratching the itch of a very interesting scenario: subnetting for coffee shops. I’ve been tasked with creating a network design that provides a robust and efficient IP addressing scheme for a series of new coffee shops. So, grab a cup of joe, and let’s embark on this caffeinated networking adventure together.

Introduction to the Scenario

Imagine you are launching a series of coffee shops, each requiring a distinct network to support employees, devices, and guests. You have a single /24 network at your disposal: 10.1.1.0/24. The goal is to carve out this network to accommodate three coffee shops, each with specific host requirements.

Each coffee shop consists of:

  • 5 employees
  • 1 server
  • 2 Raspberry Pis
  • 2 Wireless Access Points (WAPs)
  • Up to 20 guests at a time

Doing the math, that’s approximately 30 hosts, but let’s round it up to 40 hosts for some extra breathing room. The challenge is to create subnets based on these host requirements and not just arbitrary network divisions.

Technical Breakdown

The first step in subnetting, based on host requirements, involves determining the number of host bits needed to support the required number of devices. Using the principle that the number of hosts is 2n – 2 (where n is the number of host bits), we can deduce the correct subnet mask.

Hosts Needed Host Bits (n) Subnet Mask Usable Host Range
40 6 255.255.255.192 26 – 2 = 62

Based on our requirements, we need to save (or reserve) 6 bits for hosts. Therefore, if we start with a /24 network, we need to convert it into a /26 network, which will provide us with 64 IP addresses per subnet, 62 of which are usable for hosts. In binary, the subnet mask for a /26 network is 11111111.11111111.11111111.11000000, which translates to 255.255.255.192 in decimal notation.

Subnet Allocation

With our subnet mask determined, we can now allocate subnets for each coffee shop. Since we are dealing with a /26 subnet, we will increment our networks by 64 for each subnet. Here’s how the networks for the three coffee shops would be divided:

Coffee Shop Subnet Usable IP Range Broadcast Address
1 10.1.1.0/26 10.1.1.1 – 10.1.1.62 10.1.1.63
2 10.1.1.64/26 10.1.1.65 – 10.1.1.126 10.1.1.127
3 10.1.1.128/26 10.1.1.129 – 10.1.1.190 10.1.1.191

Conclusion

Subnetting can initially seem daunting, but when you apply it to a real-world situation like setting up networks for coffee shops, it becomes much more approachable. By breaking down the requirements, calculating the number of needed host bits, and determining the subnet mask, we’ve successfully created a subnetting scheme that ensures each coffee shop has a network tailored to its specific needs. Remember, practice makes perfect, and the more you work with subnetting, the more intuitive it becomes. So keep brewing up those network designs!