Subnetting

Subnet Addressing

  • To better utilize IP address
  • Subnet addressing introduces another hierarchical(分层) level
  • Transparent to remote networks
  • Simplifies management of multiplicity(多样性) of LANs
  • Masking used to find subnet number(By devide Host ID into Subnet ID and Host ID)
    1092889-20171012192303090-1676574055.png

Subnetting Scheme(体系)

  1. Organization has Class B address (16 host ID bits) with network ID: 150.100.0.0
  2. Create subnets with up to 100 hosts each
  • We need one hundred hosts, so we need at least 7 bit(2^7=128>100)for host ID.
  • 7 bits sufficient for each subnet (IP mask 7 bits)
  • 16-7 = 9 bits for** subnet ID** (2^9 – 2 = 510 subnets)
  1. Apply subnet mask to IP addresses to help outside packet find corresponding subnet
  • Example: Find subnet for 150.100.12.176
  • Theory: We use "and operation" to get the subnet ID, compare every bit
  • IP address = 10010110 01100100 00001100 10110000
  • Mask = 11111111 11111111 11111111 10000000 (7 0s)
  • AND = 10010110 01100100 00001100 10000000
  • Subnet = 150.100.12.128
  • Subnet address used by routers within organization

Subnet Range

Given the subnet 150.100.12.128

  • IP address 150.100.12.128 is used to identify the subnetwork
  • IP address 150.100.12.255 is used to broadcast packets in the subnet
  • Range of the subnet IP address is between
    • IP address = 10010110 01100100 00001100 10000001
      to
      IP address = 10010110 01100100 00001100 11111110
      That is, 150.100.12.129 to 150.100.12.254

Subnet Example

1092889-20171012192542840-549835439.png

  • The subnetting can hide the configuration details from outside

    Routing with Subnetworks

  1. IP layer in hosts and routers maintain a routing table
  2. Originating host(源主机): To send an IP packet, consult routing table
  • If destination host is in same network, send packet directly using appropriate network interface
  • Otherwise, send packet indirectly; typically, routing table indicates a default router
  1. Router: Examine IP destination address in arriving packet
  • If destination IP address not own, router consults routing table to determine next-hop and associated network interface & forwards packet

转载于:https://www.cnblogs.com/vancasola/p/7658861.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值