the internet protocol - 1
TRANSCRIPT
159.334 Computer Networks159.334 Computer Networks
The Internet Protocol - 1
Professor Richard Harris
School of Engineering and AdvancedTechnology (SEAT)
Computer NetworksComputer Networks -- 1/1/22
159.334 Computer Networks159.334 Computer Networks
Presentation Outline
Format of IP packets
Internet addressing schemes
Allocation of hosts and subnets to meet requirementsfor IP network design.
Computer NetworksComputer Networks -- 1/1/33
159.334 Computer Networks159.334 Computer Networks
Learning Objectives
You will be able to:
Discuss the format of IP packets
Apply internet addressing to sample problems
Perform allocation of hosts and subnets to meetrequirements for IP network design.
Computer NetworksComputer Networks -- 1/1/44
159.334 Computer Networks159.334 Computer Networks
References
Tanenbaum, “Computer Networks”, 4th Edition
Forouzan, “Data Communications and Networking”, 4th
Edition
Cisco CCNA1 Module 10 - part 1
Stallings, William 2000 ‘Data and ComputerCommunications’, Prentice Hall, Sixth Edition
Russell, Travis 1997 ‘Telecommunications Protocols’,McGraw Hill
Computer NetworksComputer Networks -- 1/1/55
159.334 Computer Networks159.334 Computer Networks
3 Concepts Underpinning the Internet(Revision)
The key concepts that underpin the Internet are:
Addressing
People need to be able to send data to you through the network.This requires a method for identifying you as the intendedrecipient! Hence the need to have an address where you can bereached.
Routing
There needs to be a methodology to send messages around thenetwork based on prevailing network conditions, speeds of thelinks, availability of capacity etc.
Internet Protocol
All the devices in the network need to speak the same “language”and this is a protocol for ensuring that the messages can bedelivered correctly to their intended addressee.
The key concepts that underpin the Internet are:
Addressing
People need to be able to send data to you through the network.This requires a method for identifying you as the intendedrecipient! Hence the need to have an address where you can bereached.
Routing
There needs to be a methodology to send messages around thenetwork based on prevailing network conditions, speeds of thelinks, availability of capacity etc.
Internet Protocol
All the devices in the network need to speak the same “language”and this is a protocol for ensuring that the messages can bedelivered correctly to their intended addressee.
Note:Note: Each of these concepts is designed to be scalable to large networks
Computer NetworksComputer Networks -- 1/1/66
159.334 Computer Networks159.334 Computer Networks
Addressing - 1
An Internet Protocol address (“IP address”) corresponds to a host-interface card - ie a device that connects a computer to a network.
If a computer has more than one interface card it will require more thanone IP address.
IP addresses are set up in a two-part hierarchy:
Network number
Interface number (also called a host number)
Both the network and interface numbers are unique so that we canuniquely identify the device/card that is connected to the network.
Computer NetworksComputer Networks -- 1/1/77
159.334 Computer Networks159.334 Computer Networks
Addressing - 2
A central authority allocates a network operator with aunique network number range.
Once this number has been assigned, the operator canallocate a globally unique IP address with the prefix andthis allows decentralised control of the address space.
If addresses had not been based on this hierarchicalstructure, we would require a central authority to checkevery IP address for uniqueness!!!
Network Number102.54.94
Interface number97
rhino.acme.com
Computer NetworksComputer Networks -- 1/1/88
159.334 Computer Networks159.334 Computer Networks
Address Classes - 1
An important aspect of addressing is to work out how toallocate bits to the network and interface numbers.
If the Internet had many networks but few interfaces then itwould be better to allocate more bits to the network address. Ifthe opposite case prevailed, then we would obviously reversethe situation.
In IP Version 4, the addresses are 3232 bits in length:
If we use 24 bits for the address of the network number and theremaining 8 bits for the interface number then we could have 224
networks (16,772,216) and 28 = 256 interfaces per network.
A total of 4,294,967,296 computer cards/interfaces are possible!
Computer NetworksComputer Networks -- 1/1/99
159.334 Computer Networks159.334 Computer Networks
Address Classes - 2
Internet designers initially thought there would only be 256networks so the situation described would have beenreversed!
In fact, a rather more flexible scheme was adopted, viz:
Partition the address space into Class A, Class B, Class C andClass D addresses with different numbers of bits assigned tothe network and interface numbers in each class.
A Class A address has 8 bits for the network number and 24bits for the interface number.
A single large part of the Internet would use a Class Aaddress.
But by contrast, a Class C address has 24 bits of networknumber and only 8 bits of interface number. This means thatonly 256 hosts can be accommodated in a Class C network.
Computer NetworksComputer Networks -- 1/1/1010
159.334 Computer Networks159.334 Computer Networks
Address Classes - 3
The network can distinguishbetween the 4 classes of addressby the first few bits of the networknumber:
Class A - first bit is ‘0’
Class B - first two bits are ‘10’
Class C - first three bits are ‘110’
Class D - first four bits are ‘1110’
Class E - first four bits are ‘1111’Used for experimental purposesonly.
• Using these bits from the network number has the effect of reducing the overallnumber of networks in each of the classes.
• Class A networks are only 7 bits long so there can only be 128 large class networks.• Class B networks consists of 14 bits so there can only be 16,384 medium class
networks.
0
0
01
1
Class A
Class B
Class C
Class D
1
0
Class E
1
Computer NetworksComputer Networks -- 1/1/1111
159.334 Computer Networks159.334 Computer Networks
Address Classes - 4
As mentioned above, there are 5 classes of addressformat in the Internet.
The following table shows the allocations of bits forthese classes:
High order bits010
11011101111
Format7 bits net, 24 bits host14 bits net, 16 bits host21 bits net, 8 bits host28 bits multicast group #reserved for experiments
ClassABCDE
Computer NetworksComputer Networks -- 1/1/1212
159.334 Computer Networks159.334 Computer Networks
Exercise
Compute the number of Class C networks possible.
Hint: A class C address consists of 21 bits for thenetwork number and 8 bits for the interface number.Refer to previous slide…..
Your Answer:Your Answer:
Computer NetworksComputer Networks -- 1/1/1313
159.334 Computer Networks159.334 Computer Networks
Address Class Problems - 1
We have stated that IP Version 4 addresses are 32 bits long andcan theoretically address a total of 4,294,967,296 computercards/interfaces.
In practice, we find that after the central authority hands out theaddress space allocations, there is little control that can beexercised over how much of that space is used. In earlier times,Class A and B spaces were rather freely allocated and rathersparsely used and cannot be reclaimed.
To solve this problem, IP Version 6 - or IPng has been proposed -this will be discussed at another time.
Computer NetworksComputer Networks -- 1/1/1414
159.334 Computer Networks159.334 Computer Networks
Address Class Problems - 2
If a campus network had more than 256 nodes, it would need aClass B address. This provides 65,536 nodes in the address space,but this is a very large number and typically the campus networkwould not have this many hosts.
Thus, there is considerable wastage if we adopt this approach.
A solution is to use Classless Inter Domain Routing addresses(CIDR).
In this form of addressing, the network number can be an arbitrarynumber of bits long so that the size of the network can be bounded bysome power of 2.
Computer NetworksComputer Networks -- 1/1/1515
159.334 Computer Networks159.334 Computer Networks
Internet Addresses - 2
Addresses are usually represented as four decimalnumbers separated using dots.
Each number represents an octet of the address.For example, consider 10.0.0.1
The binary representations are
00001010 00000000 00000000 00000001
High order bits0
10110
11101111
Format7 bits net, 24 bits host14 bits net, 16 bits host21 bits net, 8 bits host28 bits multicast group #reserved for experiments
ClassABCDE
Computer NetworksComputer Networks -- 1/1/1616
159.334 Computer Networks159.334 Computer Networks
Internet Addresses - 3
The two level hierarchy (network and host numbers)were initially thought to be sufficient, but by 1984, itbecame clear that a third hierarchical level was neededand so the “subnet” was added to the hierarchy at thattime.
This leads to the following format:
Network number Subnet Host
Computer NetworksComputer Networks -- 1/1/1717
159.334 Computer Networks159.334 Computer Networks
Internet Addresses - 4
Consider a general B-class address as shown below. Byusing a more flexible arrangement when we want more than256 but fewer than 65,536 hosts, we could flexibly rearrangethe address like this:
Network number Subnet Host
Network number Subnet Host
Network number Subnet Host
More subnets and fewer hosts
Fewer subnets and more hosts
This flexibility is enabled using a device known as a subnet mask
Computer NetworksComputer Networks -- 1/1/1818
159.334 Computer Networks159.334 Computer Networks
Internet Addresses - 5
Here are some example B-class network options:
Network number 14 bits 2 bits
Network number 12 bits 4 bits
Network number 10 bits 6 bits
16,384 subnets 4 hosts
4,096 subnets 16 hosts
1,024 subnets 64 hosts
Network number 6 bits 10 bits
64 subnets 1,024 hosts
10
10
10
10
……………………………………………………
Computer NetworksComputer Networks -- 1/1/1919
159.334 Computer Networks159.334 Computer Networks
Internet Addresses - 6
The subnet field can have any length - it isspecified by a 32-bit “mask”.
You find an address belongs to a subnet bycomparison using a mask operation:
This means that all bits of the address for which thecorresponding mask bit is null are zeroed and the resultcompared to the subnet identifier.
Mask Address Net Subnet Host
0xFFFF00000xFFFFFE00
0xFFFFFFC0
10.27.32.100136.27.33.100136.27.34.141193.27.32.197
A: 10 27 32.100B: 136.27 16 (32) 1.100
136.27 17 (34) 0.141C: 193.27.32 3 (192) 5
Computer NetworksComputer Networks -- 1/1/2020
159.334 Computer Networks159.334 Computer Networks
Internet Addresses - 7
Here are three examples of the masks given on theprevious slide in their Hex, Binary and “Dot”formats: FFFF0000
1111 1111 1111 1111 0000 0000 0000 0000
255 . 255 . 0 . 0
Hex Format
Binary Format
Dot Format
FFFFFE00
255 . 255 . 254 . 0
1111 1111 1111 1111 1111 1110 0000 0000
Hex Format
Binary Format
Dot Format
FFFFFFC0
255 . 255 . 255 . 192
1111 1111 1111 1111 1111 1111 1100 0000
Hex Format
Binary Format
Dot Format
Computer NetworksComputer Networks -- 1/1/2121
159.334 Computer Networks159.334 Computer Networks
Exercise
Use the masks shown on the previous slide to show theNet/Subnet/Host results on the right hand side of thetable are correct.
Answer:Answer:
Computer NetworksComputer Networks -- 1/1/2222
159.334 Computer Networks159.334 Computer Networks
Answers - 1
First we convert the address into binary form:
10.27.32.100
0000 1010 0001 1011 0010 0000 0110 0100 Then we add the mask in binary form:
1111 1111 1111 1111 0000 0000 0000 0000 (Mask)
0000 1010 0001 1011 0000 0000 0000 0000 Then we perform the masking:
A-class address!
Result:
Net: 10 Subnet: 27 Comparison
Host: 32.100
We note that the length of the subnet mask here was the samelength as the length of a normal A-class address in this case.
We note that the length of the subnet mask here was the samelength as the length of a normal A-class address in this case.
Computer NetworksComputer Networks -- 1/1/2323
159.334 Computer Networks159.334 Computer Networks
Answers - 2
First we convert the address into binary form:
136.27.33.100
1000 1000 0001 1011 0010 0001 0110 0100 Then we add the mask in binary form:
1111 1111 1111 1111 1111 1110 0000 0000 (Mask: FFFFFE00)
1000 1000 0001 1011 0010 0000 0000 0000 Then we perform the masking:
B-class address!
Result:
Net: 136.27 Comparison
Host: 1.100Subnet: 16
Normal B-class address specification: 10 + 14 bit net address + 16 bits for hostsArrangement illustrated above:
10 + 14 bit net address + 7 bit subnet address + 9 bit host addressLeads to 128 subnet addresses and 512 hosts per subnet possible.
Normal B-class address specification: 10 + 14 bit net address + 16 bits for hostsArrangement illustrated above:
10 + 14 bit net address + 7 bit subnet address + 9 bit host addressLeads to 128 subnet addresses and 512 hosts per subnet possible.
Computer NetworksComputer Networks -- 1/1/2424
159.334 Computer Networks159.334 Computer Networks
Answers - 3
First we convert the address into binary form:
136.27.34.141
1000 1000 0001 1011 0010 0010 1000 1101 Then we add the mask in binary form:
1111 1111 1111 1111 1111 1110 0000 0000 (Mask: FFFFFE00)
1000 1000 0001 1011 0010 0010 0000 0000 Then we perform the masking:
B-class address!
Result:
Net: 136.27 Comparison
Host: 0.141Subnet: 17
Normal B-class address specification: 10 + 14 bit net address + 16 bits for hostsArrangement illustrated above:
10 + 14 bit net address + 7 bit subnet address + 9 bit host addressLeads to 128 subnet addresses and 512 hosts per subnet possible.
Normal B-class address specification: 10 + 14 bit net address + 16 bits for hostsArrangement illustrated above:
10 + 14 bit net address + 7 bit subnet address + 9 bit host addressLeads to 128 subnet addresses and 512 hosts per subnet possible.
Computer NetworksComputer Networks -- 1/1/2525
159.334 Computer Networks159.334 Computer Networks
Answers - 4
First we convert the address into binary form:
193.27.32.197
1100 0001 0001 1011 0010 0000 1100 0101 Then we add the mask in binary form:
1111 1111 1111 1111 1111 1111 1100 0000 (Mask: FFFFFFC0)
1100 0001 0001 1011 0010 0000 1100 0000 Then we perform the masking:
C-class address!
Result:
Net: 193.27.32 Comparison
Host: 5Subnet: 3
Normal C-class address specification: 110 + 21 bit net address + 8 bits for hostsArrangement illustrated above:
110 + 21 bit net address + 2 bit subnet address + 6 bit host addressLeads to 4 subnet addresses and 64 hosts per subnet possible.
Normal C-class address specification: 110 + 21 bit net address + 8 bits for hostsArrangement illustrated above:
110 + 21 bit net address + 2 bit subnet address + 6 bit host addressLeads to 4 subnet addresses and 64 hosts per subnet possible.
Computer NetworksComputer Networks -- 1/1/2626
159.334 Computer Networks159.334 Computer Networks
One more for you to try!
130.50.15.6
1000 0010 0011 0010 0000 1111 0000 0110
1111 1111 1111 1111 1111 1100 0000 0000 (Mask: FFFFFC00)
?-class address?
You do the rest!You do the rest!
Computer NetworksComputer Networks -- 1/1/2727
159.334 Computer Networks159.334 Computer Networks
Special Purpose Addresses - 1
It can be the case that a host does not know its IPaddress or the IP address of its neighbour - forexample when the host boots up.
Several addresses have been established forhandling this type of situation
When the network number is unknown, a hostcan use ‘0’ as a substitute.
The special address 0.0.0.0 means “the host onthis network”.
The special address can only be used as a sourceaddress - eg when the host is booting
An address of 0.X.Y.Z means the host X.Y.Z on thisnetwork.