Subnetwork



File:Subnetting.png

IP Subnet Calculator



192.168.1.33 /25
{(192.168.1).1} 0000000 - sabram 7 bits p hosts
                                           2^7=128 por rede -2(rede/broadcast)
255.255.255.128                                            126 endereços uteis por rede

192.168.1.0/25 -> endereço da 1º rede
          ip's uteis -> 192.168.1.1
                         -> 192.168.1.126
192.168.1.127/25 -> endereço de broadcast do 1º rede

192.168.1.128/25 -> endereço da 2º rede
              ip's uteis -> 192.168.1.129
                             -> 192.168.1.254
192.168.1.255/25 -> endereço de broadcast do 2º rede



Identifique a classe, o  endereço de rede e determine o endereço de broadcast.

1.     172.16.2.160 255.255.255.192

Divisao em 4 sub-redes:

                 1ºrede     [0-63]       – ip’s úteis [172.16.2.1]-[172.16.2.62]

                  2ºrede     [64-127] – ip’s úteis [172.16.2.65]-[172.16.2.126]

                  3ºrede   [128-191] – ip’s úteis [172.16.2.129]-[172.16.2.190]

                  4ºrede   [192-255] – ip’s úteis [172.16.2.193]-[172.16.2.254]

Classe – B

Endereço rede – 172.16.2.128/26

Endereço broadcast – 172.16.2.191/26

2.     212.172.38.72 255.255.255.192

       1ºrede     [0-63]      – ip’s úteis [212.172.38.1]-[ 212.172.38.62]

       2ºrede   [64-127]   – ip’s úteis [212.172.38.65]-[212.172.38.126]

       3ºrede   [128-191] – ip’s úteis [212.172.38.129]-[ 212.172.38.190]

       4ºrede   [192-255] – ip’s úteis [212.172.38.193]-[ 212.172.38.254]

Classe – C

Endereço rede –212.172.38.128/26

Endereço broadcast –212.172.38.191/26

 

 

3.     212.172.38.0 255.255.192.0

      1ºrede     [0-63]       – ip’s úteis [212.172.38.1]-[ 212.172.38.62]

      2ºrede     [64-127] – ip’s úteis [212.172.38.65]-[ 212.172.38.126]

      3ºrede   [128-191] – ip’s úteis [212.172.38.129]-[ 212.172.38.190]

      4ºrede   [192-255] – ip’s úteis [212.172.38.193]-[ 212.172.38.254]

Classe – B

Endereço rede –212.172.38.128/26

Endereço broadcast –212.172.38.191/26

 

Efectue a divisão em subnetting de acordo com a notação ‘/’.
Indique a primeira rede, o endereço de broadcast e o intervalo de endereços de hosts para a mesma rede.

1.     207.19.24.0/27 255.255.255.224

207. 19.24. 11100000 2^3=8 logo 8 subredes

                                               2^5=32 logo 32 ip’s por subredes

                 2^(posição activa)-> 2^7+2^6+2^5=128+64+32=224

                 Dividir 0-255 em 8 porçoes

                 Sub-redes: 0-31| 32-63|64-95\96-127|128-|

2.     209.42.21.0/29


Network addressing

Computers and devices that are participating in a network such as the Internet each have a logical address. Usually this address is unique to each device and can either be dynamically (from a network server) or statically (by an administrator) configured. An address fulfills the functions of identifying the host and locating it on the network. It allows a device to communicate with other devices connected to the network. The most common network addressing scheme is Internet Protocol version 4 (IPv4), but its successor, IPv6 is in early deployment stages. An IPv4 address consists of 32 bits, for human readability written in a form consisting of four octets separated by full stops (dots), called dot-decimal notation. An IPv6 address consists of 128 bits.

In order to facilitate routing a data packet across multiple networks, the address is divided into two parts:

  • Network prefix: A contiguous group of high-order bits that are common among all hosts within a network.
  • Host identifier: The remaining low-order bits of the address that are not designated in the network prefix. This part specifies a particular device in the local network.

The network prefix may be written in a form identical to that of the address itself. In IPv4, this is called the subnet mask of the address. For example, to specify the most-significant 18 bits of an address, i.e. in binary, 11111111.11111111.11000000.00000000, one writes this as 255.255.192.0.

An alternate form of specification of the routing prefix, is to simply count the number of bits in the routing prefix and append that number to the address with a slash (/) separator:

  • 192.168.0.0, netmask 255.255.0.0
  • 192.168.0.0/16

This latter notation is used preferentially in Classless Inter-Domain Routing and is called CIDR notation. In IPv6 this is the only acceptable form to denote routing prefixes.

[edit] The subnetting operation

The process of subnetting involves the separation of the network and subnet portion of an address from the host identifier. This is performed by a bitwise AND operation between the IP address and the subnet prefix or bit mask. The result yields the network address, and the remainder is the host identifier.

The following example is based on IPv4 networking. The operation may be visualized in a table using binary address formats.


Dot-decimal notation Binary form
IP address 192.168.5.130 11000000.10101000.00000101.10000010
Subnet Mask 255.255.255.0 11111111.11111111.11111111.00000000
Network Portion 192.168.5.0 11000000.10101000.00000101.00000000
Host Portion 0.0.0.130 00000000.00000000.00000000.10000010

In IPv4, subnet masks consist of 32 bits, usually a sequence of ones (1) followed by a block of 0s. The last block of zeros (0) designate that part as being the host identifier.

Subnetting is the process of designating bits from the host portion and grouping them with the network portion. This divides a network into smaller subnets. The following diagram modifies the example by moving two bits from the host portion to the subnet number to form a smaller subnet:


Dot-decimal notation Binary form
IP address 192.168.5.130 11000000.10101000.00000101.10000010
Subnet Mask 255.255.255.192 11111111.11111111.11111111.11000000
Network Portion 192.168.5.128 11000000.10101000.00000101.10000000
Host Portion 0.0.0.2 00000000.00000000.00000000.00000010

[edit] Subnetting in IPv4 networks

Internet Protocol version 4 uses specially designated address formats to facilitate recognition of special address functionality. The first and the last subnets obtained by subnetting have traditionally had a special designation and, early on, special usage implications.[2] In addition, IPv4 uses the all ones host address, i.e. the last address within a network, for broadcast transmission to all hosts on the link.

[edit] Subnet zero and the all-ones subnet

The first subnet obtained from subnetting has all bits in the subnet bit group set to zero (0). It is therefore called subnet zero. Using subnet zero for addressing was discouraged at one point due to the confusion created by having a network and subnet with the same address. According to RFC 950, "It is useful to preserve and extend the interpretation of these special (network and broadcast) addresses in subnetted networks. This means the values of all zeros and all ones in the subnet field should not be assigned to actual (physical) subnets."

The last subnet obtained from subnetting has all bits in the subnet bit group set to one (1). This is therefore called the all-ones subnet. Although it was always possible to use this subnet, RFC 950 also discouraged its use due to possible confusion with the broadcast address.

The practice of avoiding subnet zero and the all-ones subnet eventually became obsolete with RFC 1878,[3] published in 1995. It explicitly states: "This practice is obsolete! Modern software will be able to utilize all definable networks."

[edit] Subnet and host counts

The number of subnetworks available, and the number of possible hosts in a network may be readily calculated. In the example (above) two bits were borrowed to create subnetworks, thus creating 4 (22) possible subnets.

Network Network (binary) Broadcast address
192.168.5.0/26 11000000.10101000.00000101.00000000 192.168.5.63
192.168.5.64/26 11000000.10101000.00000101.01000000 192.168.5.127
192.168.5.128/26 11000000.10101000.00000101.10000000 192.168.5.191
192.168.5.192/26 11000000.10101000.00000101.11000000 192.168.5.255

The RFC 950 specification reserves the subnet values consisting of all zeros (see above) and all ones (broadcast), reducing the number of available subnets by two. However, due to the inefficiencies introduced by this convention it was abandoned for use on the public Internet, and is only relevant when dealing with legacy equipment that does not implement CIDR. The only reason not to use the all-zeroes subnet is that it is ambiguous when the prefix length is not available. All CIDR-compliant routing protocols transmit both length and suffix. RFC 1878 provides a subnetting table with examples.

The remaining bits after the subnet are used for addressing hosts within the subnet. In the above example the subnet mask consists of 26 bits, leaving 6 bits for the host identifier. This allows for 64 combinations (26), however the all zeros value and all ones value are reserved for the network ID and broadcast address respectively, leaving 62 addresses.

In general the number of available hosts on a subnet is 2n-2, where n is the number of bits used for the host portion of the address.

RFC 3021 specifies an exception to this rule when dealing with 31-bit subnet masks (i.e. 1-bit host identifiers). In such networks, usually point-to-point links, only two hosts (the end points) may be connected and a specification of network and broadcast addresses is not necessary.

Possible subnets within a /24 (traditional Class C) block are:

CIDR notation Network Mask Available sub-networks Available Hosts per network Total usable hosts
/24 255.255.255.0 1 256 254
/25 255.255.255.128 2 128 126
/26 255.255.255.192 4 64 62
/27 255.255.255.224 8 32 30
/28 255.255.255.240 16 16 14
/29 255.255.255.248 32 8 6
/30 255.255.255.252 64 4 2
/31 255.255.255.254 128 2 2 *

*only applicable on point-to-point links

[edit] Subnetting in IPv6 networks

The design of the IPv6 address space differs significantly from IPv4. The primary reason for subnetting in IPv4 is to improve efficiency in the utilization of the relatively small address space available, particularly to enterprises. No such limitations exist in IPv6, as the address space available even to end-users is large.

An IPv6 subnet always has 64 bits in its host portion. It therefore has a /64 routing prefix (the 64 most-significant bits). Although it is technically possible to use smaller subnets, they are impractical for local area networks because stateless address autoconfiguration of network interfaces (RFC 4862) requires a /64 address. IPv6 does not implement special address formats for broadcast traffic or network numbers, and thus all addresses in a subnet are valid host addresses.

The recommended allocation for an IPv6 customer site is an address space of 80 address bits (prefix /48), but it may be as small as 72 bits (/56 allocation) for a residential customer network.[4] This provides 65,536 subnets for a site, or a minimum of 256 subnets for a residential network. Subnetting in IPv6 is used to route traffic between the global allocation spaces and within customer network between subnets and the larger Internet. Subnetting in IPv6 is also based on the concepts of Classless Inter-Domain Routing and the standard CIDR notation is used with IPv6 addresses.

[edit] See also

[edit] References

  1. ^ RFC 950, Internet Standard Subnetting Procedure, J. Mogul, J. Postel (August 1985)
  2. ^ Subnet Zero and the All-Ones Subnet (Cisco documentation)
  3. ^ RFC 1878, Variable Length Subnet Table For IPv4, T. Pummill, B. Manning (December 1995)
  4. ^ http://www.getipv6.info/index.php/IPv6_Addressing_Plans ARIN IPv6 Information Wiki
  • RFC 1812 Requirements for IPv4 Routers
  • RFC 917 Utility of subnets of Internet networks
  • RFC 1101 DNS Encodings of Network Names and Other Type
  • Blank, Andrew G. TCP/IP Foundations Technology Fundamentals for IT Success. San Francisco, London: Sybex, Copyright 2004.
  • Lammle, Todd. CCNA Cisco Certified Network Associate Study Guide 5th Edition. San Francisco, London: Sybex, Copyright 2005.
  • Groth, David and Toby Skandier. Network + Study Guide, 4th Edition. San Francisco, London: Wiley Publishing, Inc., Copyright 2005.

[edit] External links



Subpáginas (1) VLSM vs. CIDR
Comments