开发者社区> 问答> 正文

如何设置可访问IP段?

数据库可访问IP段设置帮助这样写: 10.23.12.24/24CIDR模式,无类域间路由,/24表示了地址中前缀的长度,范围[1,32]
这个什么CIDR看不懂,如果要设置 10.23.*.* IP段都可访问,请问要如何设置CIDR模式?

展开
收起
gdliwt 2014-02-21 08:43:45 6008 0
2 条回答
写回答
取消 提交回答
  • 找到了一张对照表,方便同仁:
    比如要设置10.10.*.*可访问,要设置为10.10.0.0/16


    CIDR
    IP/CIDRΔ 与最后一个地址的差值掩码主机数 (*)类别备注
    a.b.c.d/32 0.0.0.0255.255.255.25511/256 C
    a.b.c.d/31 0.0.0.1255.255.255.25421/128 Cd = 0 ... (2n) ... 254
    a.b.c.d/30 0.0.0.3255.255.255.25241/64 Cd = 0 ... (4n) ... 252
    a.b.c.d/29 0.0.0.7255.255.255.24881/32 Cd = 0 ... (8n) ... 248
    a.b.c.d/28 0.0.0.15255.255.255.240161/16 Cd = 0 ... (16n) ... 240
    a.b.c.d/27 0.0.0.31255.255.255.224321/8 Cd = 0 ... (32n) ... 224
    a.b.c.d/26 0.0.0.63255.255.255.192641/4 Cd = 0, 64, 128, 192
    a.b.c.d/25 0.0.0.127255.255.255.1281281/2 Cd = 0, 128
    a.b.c.0/24 0.0.0.255255.255.255.0002561 C
    a.b.c.0/23 0.0.1.255255.255.254.0005122 Cc = 0 ... (2n) ... 254
    a.b.c.0/22 0.0.3.255255.255.252.0001,0244 Cc = 0 ... (4n) ... 252
    a.b.c.0/21 0.0.7.255255.255.248.0002,0488 Cc = 0 ... (8n) ... 248
    a.b.c.0/20 0.0.15.255255.255.240.0004,09616 Cc = 0 ... (16n) ... 240
    a.b.c.0/19 0.0.31.255255.255.224.0008,19232 Cc = 0 ... (32n) ... 224
    a.b.c.0/18 0.0.63.255255.255.192.00016,38464 Cc = 0, 64, 128, 192
    a.b.c.0/17 0.0.127.255255.255.128.00032,768128 Cc = 0, 128
    a.b.0.0/16 0.0.255.255255.255.000.00065,536256 C = 1 B
    a.b.0.0/15 0.1.255.255255.254.000.000131,0722 Bb = 0 ... (2n) ... 254
    a.b.0.0/14 0.3.255.255255.252.000.000262,1444 Bb = 0 ... (4n) ... 252
    a.b.0.0/13 0.7.255.255255.248.000.000524,2888 Bb = 0 ... (8n) ... 248
    a.b.0.0/12 0.15.255.255255.240.000.0001,048,57616 Bb = 0 ... (16n) ... 240
    a.b.0.0/11 0.31.255.255255.224.000.0002,097,15232 Bb = 0 ... (32n) ... 224
    a.b.0.0/10 0.63.255.255255.192.000.0004,194,30464 Bb = 0, 64, 128, 192
    a.b.0.0/9 0.127.255.255255.128.000.0008,388,608128 Bb = 0, 128
    a.0.0.0/8 0.255.255.255255.000.000.00016,777,216256 B = 1 A
    a.0.0.0/7 1.255.255.255254.000.000.00033,554,4322 Aa = 0 ... (2n) ... 254
    a.0.0.0/6 3.255.255.255252.000.000.00067,108,8644 Aa = 0 ... (4n) ... 252
    a.0.0.0/5 7.255.255.255248.000.000.000134,217,7288 Aa = 0 ... (8n) ... 248
    a.0.0.0/4 15.255.255.255240.000.000.000268,435,45616 Aa = 0 ... (16n) ... 240
    a.0.0.0/3 31.255.255.255224.000.000.000536,870,91232 Aa = 0 ... (32n) ... 224
    a.0.0.0/2 63.255.255.255192.000.000.0001,073,741,82464 Aa = 0, 64, 128, 192
    a.0.0.0/1 127.255.255.255128.000.000.0002,147,483,648128 Aa = 0, 128
    0.0.0.0/0 255.255.255.255000.000.000.0004,294,967,296256 A

    -------------------------

    回 1楼(服务器之家) 的帖子
    谢谢热心帮助。
    2014-02-21 09:00:31
    赞同 展开评论 打赏
  • 10.23.12.24/16
    2014-02-21 08:59:10
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载