IP addressing By admin 16 July 2008 at 11:53 pm and have

IP Addressing Structure:
IPv4 Address = 32 bit # written as dotted decimals
Always paired with a 32 bit mask
Computers evaluate &
E.G. 10101000 <- high-order that side, -> low order this side.

Network = group of hosts with identical network addresses.
Some portion of the low-order bits = host address.
From our 32 bits, the # of bits used in the host portion determines how many hosts we can have in our network.
E.G. if 200 hosts in our network. We need enough bits in the host portion to make 200+ numbers
2^7 = 128, 2^8 = 256, therefore 8 bits minimum are required to get 200+ hosts.

Types of IPv4 Addresses:
Network address – refers to the entire network.
Lowest address in a range is reserved for this (the very first address of the network – 192.168.1.0).
Host portion of address has 0 for each host bit.
Broadcast address – for sending to all hosts.
Highest address in range. All host bits = 1s (192.168.1.255).
Host addresses – assigned to end devices.
Any value between the network and broadcast address.

Classify and Define IPv4 Addresses:

How many bits = network and how many = host portion?
The prefix length = the network portion.
E.G. 172.16.4.0/24 -> /24 means the first 24 bits are the network address.
This leaves 8 remaining bits (32-24) as the host portion.
In the subnet mask, 1s = network bits and 0s = hosts bits.

IP 1100 0000. 1010 1000. 0000 0001. 0000 0000
SM 1111 1111. 1111 1111. 1111 1111. 0000 0000

Changing the prefix changes the network address, host range and broadcast address for each network.

Calculating Addresses:

E.G. 172.160.20.0 /24 (so the last 7 bits = host bits).
The network address = all host bits are ‘0’.
10101100.00010000.00010100.00000000
172. 16. 20. 0
First host address = network address + 1.
10101100.00010000.00010100.00000001
172. 16. 20. 1
Broadcast address = host bits are all ‘1s’.
10101100.00010000.00010100.01111111.
172. 16. 20. 127

Simple rule: if 10000000 = 128 then 01111111 = 127

Last host address = broadcast address -1.

Classify and Define IPv4 Addresses:

Unicast – from one host to one host.
Broadcast – from one host to all hosts in the network.
Multicast – from one host to a selected group of hosts.
Source address will always be a Unicast address.

Unicast Transmission:

Normal host to host communication.
The host addresses assigned to the 2 end devices are used as the source and destination IPv4 addresses.
Unicast packets are forwarded through internetworks.
Communications between devices is unicast unless otherwise noted.

Broadcast Transmissions:

Used to send packets to all hosts in a network.
Uses a special broadcast address.
When a host receives a broadcast, it processes the packet as it would be a packet to its unicast address.
Used for special services/devices or when a host needs to provide information to all hosts.
E.G. ARP, DHCP requests, routing updates.
Broadcast packets are usually restricted to a local network.
2 types of broadcast:
Directed Broadcasts (all host bits = 1).
Sent to all hosts on a specific network. E.g. 172.16.4.255.
By default routers do not forward these (may be overridden).
Limited Broadcasts (ALL bits = 1).
Sent to all hosts on the local network. E.g. 255.255.255.255.
Routers never forward these!
Routers form the boundary for a broadcast domain.
Broadcast traffic should be limited so that it does not adversely affect performance of the network or devices.
Multicast Transmissions.
Designed to conserve the bandwidth.
To reach multiple hosts using unicasts, a host would need to send an individual packets to each host.
With multicast, the sorce can send a single packet that can reach thousands of destination hosts with minimum impact on the rest of the network.
E.G. Video/audio broadcasts, routing updates, software distribution, news feeds.
Hosts that receive multicasts are called multicast clients.
Multicast groups are represented by a single IP address.
IPv4 has set aside a special block of addresses just for IP multicasts.

Reserved IPv4 Addresses:

IPv4 addresses range from 0.0.0.0 to 255.255.255.255.255.
Not all usable for unicast communication.
Experimental addresses: 240.0.0.0 to 255.255.255.254.
Multicast addresses: 224.0.0.0 to 239.255.255.255.
Link local addresses: 224.0.0.0 to 224.0.0.255.
TTL = 1, Commonly used for routing protocols.
Globally scoped addresses: 224.0.1.0 to 238.255.255.255.
Usable across Internet (e.g. NTP).
Administratively scoped: 239.0.0.0 to 239.255.255.255.
AKA limited scope, (do NOT cross administrative boundaries).
Many addresses within the host range are reserved for special purposes.

Private IP Addresses:

Set aside for use in private networks.
Don’t have to be unique globally.
Class A 10.0.0.0 to 10.255.255.255 or 10.0.0.0 /8.
Class B 172.16.0.0 to 172.31.255.255 or 172.16.0.0 /12.
Class C 192.168.0.0 to 192.168.255.255 or 192.168.0.0 /16.
Packets using these should not appear on the Internet.
Devices at the perimeter must block or translate private IPs.
Even if these packets escaped to the Internet, there would be no routes to forward them to.
Use them if there are more devices then public addresses.

Network Address Translation (NAT):

Translates private addresses to public addresses.
Hosts with private addresses can access the Internet.
Implemented at the edge of the private network.
Allows hosts to “borrow” a public address temporarily.
Some limitations and performance issues.

Special-Use IPv4 Addresses:

Network and Broadcast Addresses.
Within a network, 1st and last addresses are reserved.
All host bits = zeros or all host bits = ones.
Default Route.
0.0.0.0 to 0.255.255.255 (0.0.0.0 /8) reserved.
Loopback.
127.0.0.1 (127.0.0.0 to 127.255.255.255).
Special address hosts use to talk to themselves.
Link-Local Addresses (169.254.0.0 to 169.254.255.255), used in MS2K.
TEST-NET Addresses (192.0.2.0 to 192.0.2.255).
Set aside for teaching and learning.
Should not appear on the Internet.

Network Classes Table

ip address table
Network Classes:

Originally an entity was assigned an entire A, B, or C block.
This is referred to as classful addressing.

Class A Blocks (/8)

Extremely large networks (>16 million hosts each).
½ of the address space, but only 120 networks!.

Class B Blocks (/16)

Large networks (>65,000 hosts ea. And 16,000 networks).

Class C Blocks (/24)

Small networks (maximum 254 hosts and 2 million networks).

Limits to the Class-based Systems:

Wasted many addresses, which exhausted IPv4 supply.
E.G. a company with 260 hosts needed a class B address.
The classful system was abandoned in 1990s, but there are many remnants of it in the networks today.
E.G. assign an IP address to a PC -> mask assumed.
Some routing protocols make similar assumptions.
Currently we use classless addressing.
Appropriate sized address blocks are assigned without regard to the unicast class.

Planning to Address the Network:

Address allocation requires well thought out design to:
Prevent duplication of addresses.
Provide and control access.
Monitor security and performance.
Special consideration must be given to servers, etc..
Different device types should be allocated to a block of addresses.

Static Address Assignment:

Manually configured. Minimum: IP, subnet mask, and Default Gateway.
Necessary to maintain an accurate list of the IP address assigned to each device (these are usually permanent).
Advantages:
Useful for printers, servers, firewalls, and other static devices.
Con provide increased control of network resources.
Disadvantages:
Time-consuming!.

Dynamic Address Assignment:

Uses DHCP and a DHCP server.
Reduces manual tasks and virtually eliminates entry errors.
Server requires a block of addresses (pool) be defined.
Addresses assigned to this pool should exclude addresses used for the other devices.
Addresses are leased for a period of time allowing for address reuse.

Assigning Addresses:

IANA is the master holder of the IP addresses.
Multicast addresses and IPv6 come directly from IANA.
Since mid-1990s Region Internet Registry (RIRs) have been delegated IPv4 authority. (ARIN North America Region).

ISPs:

Most customers obtain an IPv4 blocks from an ISP.
Generally supply (6 or 14) addresses with services.
Larger blocks are obtained based on justification.
ISPs “rent” these addresses to organizations.
Move ISP -> change address block.
ISPs use internal networks to provide DNS, email, etc..
ISPs are rated based on connectivity to the Internet backbone.

IPv6: (security suite)

IETF began IPv6 in early 90s to address:
Expanded addressing capabilities.
Improved packet handling.
Increased scalability and longevity.
QoS mechanisms.
Integrated security.
IPv6 offers:
128-bit addressing vice 32 bits.
Header simplification -> improve packet handling.
Improved options -> scalability / adaptability.
Flow labelling capability (new field) – as QoS mechanisms.
Authentication and privacy capabilities -> security.
A new protocol suite (e.g. ICMPv6, DHCPv6) and new routing protocols.
The increased header size impacts underlying infrastructure.
IPv6 has been designed to allow for years of growth.
But the transition has been slower then originally thought (not happening as fast as was thought).
3ffe:6a88:85a3:08d3:1319:8a2e:0370:7344. example
2001:0db8:0000:0000:0000:0000:1428:57ab. example

The Subnet Mask:

Corresponds to every IP address.
1-bits indicate the network portion of an IP address.
0-bits indicate the host portion.
The prefix length just tells us how many 1-bits there are.
E.G. 172.16.4.35 /27:
172 . 16 . 20 . 35
10101100.00010000.00010100.00100011
255 . 255 . 255 . 224
11111111.1111111.1111111.11100000
172 . 16 . 20 . 32
Subnet mask 1-bits must be contiguous starting at the left!
00000000 – 0
10000000 – 128
11000000 – 192
11100000 – 224
11110000 – 240
11111000 – 248
11111100 – 252
11111110 – 254
11111111 – 255
All 0s or all 1s means NO require binary manipulation req’d.

Find out more about ANDing IP addresses

Tags: vlan, cisco, switch, ip, router, wan


Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Live
  • Reddit
  • StumbleUpon
  • Technorati