Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network...

49
Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been Where We’ve Been Chapter 1—Review Chapter 1—Review Paul Flynn
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    214
  • download

    1

Transcript of Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network...

Page 1: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Application

Presentation

Session

Transport

Network

Data-Link

Physical

THE OSI MODEL

Where We’ve BeenWhere We’ve Been

Chapter 1—ReviewChapter 1—Review

Paul Flynn

Page 2: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Table of ContentsTable of Contents EnterpriseEnterprise

Review the OSI ModelReview the OSI Model

EncapsulationEncapsulation

LAN Devices & LAN Devices & TechnologiesTechnologies

Transport LayerTransport Layer

IP AddressingIP Addressing

Go There!

Go There!

Go There!

Go There!

Go There!

Go There!

Page 3: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

A New Word!—EnterpriseA New Word!—Enterprise

A corporation, agency, A corporation, agency, school, or other school, or other organization that works organization that works to tie together its data, to tie together its data, communication, communication, computing, and file computing, and file serversservers..

Page 4: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Your Job as a Network GuruYour Job as a Network Guru Help Enterprises meet their needs by:Help Enterprises meet their needs by:

Interconnecting their LANs so that geographically Interconnecting their LANs so that geographically remote services can be accessedremote services can be accessed

Ensuring users get high bandwidth access over their Ensuring users get high bandwidth access over their LANs (i.e. Replacing hubs with switches; 10Mbps LANs (i.e. Replacing hubs with switches; 10Mbps NICs with 10/100 Mbps NICs)NICs with 10/100 Mbps NICs)

Implementing new technologies as they emerge like Implementing new technologies as they emerge like e-commerce, video conferencing, voice over IP, and e-commerce, video conferencing, voice over IP, and distance learning.distance learning.

Page 5: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Application

Presentation

Session

Transport

Network

Data-Link

Physical

THE OSI MODEL

Review The ModelReview The Model

Open Systems Interconnected Open Systems Interconnected Reference ModelReference Model

Table of Contents

Page 6: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Why A Layered Model?Why A Layered Model? Reduces complexityReduces complexity Standardizes interfacesStandardizes interfaces Facilitates modular Facilitates modular

engineeringengineering Ensures interoperable Ensures interoperable

technologytechnology Accelerates evolutionAccelerates evolution Simplifies teaching & learningSimplifies teaching & learning

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 7: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Host Layers vs. Media LayersHost Layers vs. Media Layers

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Host Layers

Provides accurate data delivery

between computers

Application

Presentation

Session

Transport

Page 8: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Host Layers vs. Media LayersHost Layers vs. Media Layers

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Media Layers

Controls physical delivery of the

message over the network

Network

Data-Link

Physical

Page 9: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Application LayerApplication Layer Provides network services Provides network services

(processes) to applications(processes) to applications.. For example, a computer on a For example, a computer on a

LAN can save files to a server LAN can save files to a server using a network redirector using a network redirector supplied by NOSs like Novell.supplied by NOSs like Novell.

Network redirectors allow Network redirectors allow applications like Word and applications like Word and Excel to “see” the network.Excel to “see” the network.

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 10: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Presentation LayerPresentation Layer Provides data representation Provides data representation

and code formatting.and code formatting. Code formatting includes Code formatting includes

compression and encryptioncompression and encryption Basically, the presentation Basically, the presentation

layer is responsible for layer is responsible for representing data so that the representing data so that the source and destination can source and destination can communicate at the communicate at the application layer.application layer.

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 11: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Session LayerSession Layer Provides inter-host communication by Provides inter-host communication by

establishing, maintaining, and establishing, maintaining, and terminating sessionsterminating sessions..

Session uses dialog control and dialog Session uses dialog control and dialog separation to manage the sessionseparation to manage the session

Some Session protocols:Some Session protocols: NFS (Network File System)NFS (Network File System) SQL (Structured Query Language)SQL (Structured Query Language) RCP (Remote Call Procedure)RCP (Remote Call Procedure) ASP (AppleTalk Session Protocol)ASP (AppleTalk Session Protocol) SCP (Session Control Protocol)SCP (Session Control Protocol) X-windowX-window

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 12: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Transport LayerTransport Layer Provides reliability, flow control, and Provides reliability, flow control, and

error correctionerror correction through the use of TCP. through the use of TCP. TCP segments the data, adding a TCP segments the data, adding a

header with control information for header with control information for sequencing and acknowledging packets sequencing and acknowledging packets received.received.

The segment header also includes The segment header also includes source and destination ports for upper-source and destination ports for upper-layer applicationslayer applications

TCP is connection-oriented and uses TCP is connection-oriented and uses windowing.windowing.

UDP is connectionless. UDP UDP is connectionless. UDP does notdoes not acknowledge the receipt of packets.acknowledge the receipt of packets.

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 13: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Network LayerNetwork Layer Responsible for Responsible for logically logically

addressingaddressing the packet and the packet and path path determinationdetermination..

Addressing is done through Addressing is done through routedrouted protocols such as IP, IPX, protocols such as IP, IPX, AppleTalk, and DECnet.AppleTalk, and DECnet.

Path Selection is done by using Path Selection is done by using routingrouting protocols such as RIP, protocols such as RIP, IGRP, EIGRP, OSPF, and BGP.IGRP, EIGRP, OSPF, and BGP.

Routers operate at the Network Routers operate at the Network LayerLayer

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 14: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Data-Link LayerData-Link Layer Provides Provides access to the mediaaccess to the media Handles error notification, Handles error notification,

network topology issues, and network topology issues, and physically addressing the physically addressing the frame.frame.

Media Access Control Media Access Control through either...through either...

Deterministic—token passingDeterministic—token passing Non-deterministic—broadcast Non-deterministic—broadcast

topology (collision domains)topology (collision domains) Important concept: CSMA/CDImportant concept: CSMA/CD

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 15: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Physical LayerPhysical Layer Provides electrical, Provides electrical, mechanical, procedural and mechanical, procedural and functional means for functional means for activating and maintaining activating and maintaining links between systemslinks between systems..

Includes the medium through Includes the medium through which bits flow. Media can which bits flow. Media can be...be...

CAT 5 cableCAT 5 cable Coaxial cableCoaxial cable Fiber Optics cableFiber Optics cable The atmosphereThe atmosphere

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 16: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Application

Presentation

Session

Transport

Network

Data-Link

Physical

THE OSI MODEL

EncapsulationEncapsulation

Peer-to-Peer CommunicationsPeer-to-Peer Communications

Table of Contents

Page 17: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Peer-to-Peer CommunicationsPeer-to-Peer Communications Peers communicate using the PDU of their Peers communicate using the PDU of their layer. For example, the network layers of the layer. For example, the network layers of the source and destination are peers and use source and destination are peers and use packets to communicate with each other.packets to communicate with each other.

Application Application

Presentation Presentation

Session Session

Transport Transport

Network Network

Data-Link Data-Link

Physical Physical

Data

SegmentsPacketsFramesBits

DataData

Page 18: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Encapsulation ExampleEncapsulation Example You type an email message. You type an email message.

SMTP takes the SMTP takes the datadata and and passes it to the Presentation passes it to the Presentation Layer.Layer.

Presentation codes the Presentation codes the datadata as ASCII.as ASCII.

Session establishes a Session establishes a connection with the connection with the destination for the purpose destination for the purpose of transporting the of transporting the datadata..

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 19: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Encapsulation ExampleEncapsulation Example Transport Transport segmentssegments the the data using TCP and hands data using TCP and hands it to the Network Layer for it to the Network Layer for addressingaddressing

Network addresses the Network addresses the packetpacket using IP. using IP.

Data-Link then encaps. the Data-Link then encaps. the packet in a packet in a frameframe and and addresses it for local addresses it for local delivery (MACs)delivery (MACs)

The Physical layer sends The Physical layer sends the the bitsbits down the wire. down the wire.

Application

Presentation

Session

Transport

Network

Data-Link

Physical

Page 20: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Application

Presentation

Session

Transport

Network

Data-Link

Physical

THE OSI MODEL

LAN Devices & TechnologiesLAN Devices & Technologies

The Data-Link & Physical The Data-Link & Physical LayersLayers

Table of Contents

Page 21: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

DevicesDevices What does it do?What does it do?

Connects LAN Connects LAN segments;segments;

Filters traffic based on Filters traffic based on MAC addresses; andMAC addresses; and

Separates collision Separates collision domains based upon domains based upon MAC addresses.MAC addresses.

What layer device?

Page 22: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

DevicesDevices What does it do?What does it do?

Since it is a multi-port Since it is a multi-port bridge, it can alsobridge, it can also

Connect LAN segments;Connect LAN segments; Filter traffic based on MAC Filter traffic based on MAC

addresses; andaddresses; and Separate collision Separate collision

domainsdomains However, switches also However, switches also

offer offer full-duplex, dedicated full-duplex, dedicated bandwidthbandwidth to segments or to segments or desktops.desktops.

What layer device?

Page 23: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

DevicesDevices What does it do?What does it do?

Concentrates LAN Concentrates LAN connections from connections from multiple devices into multiple devices into one locationone location

Repeats the signal (a Repeats the signal (a hub is a multi-port hub is a multi-port repeater)repeater)

What layer device?

Page 24: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

DevicesDevices What does it do?What does it do?

Interconnects networks Interconnects networks and provides broadcast and provides broadcast controlcontrol

Determines the path using Determines the path using a routing protocol or static a routing protocol or static routeroute

Re-encapsulates the Re-encapsulates the packet in the appropriate packet in the appropriate frame format and switches frame format and switches it out the interfaceit out the interface

Uses logical addressing Uses logical addressing (i.e. IP addresses) to (i.e. IP addresses) to determine the pathdetermine the path

What layer device?

Page 25: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Media TypesMedia Types

Page 26: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

LAN TechnologiesLAN Technologies

Three Most Common

Used Today in

Networking

Page 27: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Ethernet/802.3Ethernet/802.3 Cable Specifications:Cable Specifications:

10Base10Base22 Called Thinnet; uses coaxCalled Thinnet; uses coax Max. distance = 185 meters (almost Max. distance = 185 meters (almost 2200)00)

10Base10Base55 Called Thicknet; uses coaxCalled Thicknet; uses coax Max. distance = Max. distance = 5500 meters00 meters

10Base10BaseTT Uses Uses TTwisted-pairwisted-pair Max. distance = 100 metersMax. distance = 100 meters

10 means 10 Mbps10 means 10 Mbps

Page 28: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Ethernet/802.3Ethernet/802.3 Ethernet is broadcast topology.Ethernet is broadcast topology.

What does that mean?What does that mean? Every devices on the Ethernet segment sees every frame.Every devices on the Ethernet segment sees every frame. Frames are addressed with source and destination ______ Frames are addressed with source and destination ______

addresses.addresses. When a source does not know the destination When a source does not know the destination oror wants to wants to

communicate with every device, it encapsulates the frame communicate with every device, it encapsulates the frame with a with a broadcastbroadcast MAC address: MAC address: FFFF.FFFF.FFFFFFFF.FFFF.FFFF

What is the main network traffic problem caused by What is the main network traffic problem caused by Ethernet broadcast topologies?Ethernet broadcast topologies?

Page 29: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Ethernet/802.3Ethernet/802.3 Ethernet topologies are also shared Ethernet topologies are also shared

media.media. That means media access is controlled on That means media access is controlled on

a “first come, first serve” basis.a “first come, first serve” basis. This results in collisions between the data This results in collisions between the data

of two simultaneously transmitting devices.of two simultaneously transmitting devices. Collisions are resolved using what Collisions are resolved using what

method?method?

Page 30: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Ethernet/802.3Ethernet/802.3 CSMA/CD (Carrier Sense Multiple Access with Collision CSMA/CD (Carrier Sense Multiple Access with Collision

Detection)Detection) Describe how CSMA/CD works:Describe how CSMA/CD works:

A node needing to transmit listens for activity on the media. If A node needing to transmit listens for activity on the media. If there is none, it transmits.there is none, it transmits.

The node continue to listen. A collision is detected by a spike The node continue to listen. A collision is detected by a spike in voltage (a bit can only be a 0 or a 1--it cannot be a 2)in voltage (a bit can only be a 0 or a 1--it cannot be a 2)

The node generates a jam signal to tell all devices to stop The node generates a jam signal to tell all devices to stop transmitting for a random amount of time (back-off algorithm).transmitting for a random amount of time (back-off algorithm).

When media is clear of any transmissions, the node can When media is clear of any transmissions, the node can attempt to retransmit.attempt to retransmit.

Page 31: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Address Resolution ProtocolAddress Resolution Protocol In broadcast topologies, we need a way to resolve In broadcast topologies, we need a way to resolve

unknown destination MAC addresses.unknown destination MAC addresses. ARP is protocol where the sending device sends out a ARP is protocol where the sending device sends out a

broadcast ARP request which says, “What’s you MAC broadcast ARP request which says, “What’s you MAC address?”address?”

If the destination exists on the same LAN segment as the If the destination exists on the same LAN segment as the source, then the destination replies with its MAC address.source, then the destination replies with its MAC address.

However, if the destination and source are separated by a However, if the destination and source are separated by a router, the router will not forward the broadcast (an router, the router will not forward the broadcast (an important function of routers). Instead the router replies important function of routers). Instead the router replies with its own MAC address.with its own MAC address.

Page 32: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Application

Presentation

Session

Transport

Network

Data-Link

Physical

THE OSI MODEL

Transport LayerTransport Layer

A Quick ReviewA Quick Review

Table of Contents

Page 33: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Transport Layer FunctionsTransport Layer Functions Synchronization of the connectionSynchronization of the connection

Three-way handshakeThree-way handshake Flow ControlFlow Control

““Slow down, you’re overloading my memory buffer!!”Slow down, you’re overloading my memory buffer!!” Reliability & Error RecoveryReliability & Error Recovery

Windowing: “How much data can I send before Windowing: “How much data can I send before getting an acknowledgement?”getting an acknowledgement?”

Retransmission of lost or unacknowledged segmentsRetransmission of lost or unacknowledged segments

Page 34: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Transport’s Two ProtocolsTransport’s Two Protocols TCPTCP

Transmission Control Transmission Control ProtocolProtocol

Connection-orientedConnection-oriented Acknowledgment & Acknowledgment &

Retransmission of Retransmission of segmentssegments

WindowingWindowing Applications:Applications:

EmailEmail File TransferFile Transfer E-CommerceE-Commerce

UDPUDP User Datagram User Datagram

ProtocolProtocol ConnectionlessConnectionless No No

AcknowledgementsAcknowledgements Applications: Applications:

Routing ProtocolsRouting Protocols Streaming AudioStreaming Audio GamingGaming Video ConferencingVideo Conferencing

Page 35: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Application

Presentation

Session

Transport

Network

Data-Link

Physical

THE OSI MODEL

IP AddressingIP Addressing

Subnetting ReviewSubnetting Review

Table of Contents

Page 36: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Logical AddressingLogical Addressing At the network layer, we use logical, hierarchical At the network layer, we use logical, hierarchical

addressing.addressing. With Internet Protocol (IP), this address is a 32-With Internet Protocol (IP), this address is a 32-

bit addressing scheme divided into four octets.bit addressing scheme divided into four octets. Do you remember the classes 1st octet’s value?Do you remember the classes 1st octet’s value?

Class A: 1 - 126Class A: 1 - 126 Class B: 128 - 191Class B: 128 - 191 Class C: 192 - 223Class C: 192 - 223 Class D: 224 - 239 (multicasting)Class D: 224 - 239 (multicasting) Class E: 240 - 255 (experimental)Class E: 240 - 255 (experimental)

Page 37: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Network vs. HostNetwork vs. Host

N H H H

Class A: 27 = 126 networks; 224 > 16 million hosts

N N H H

Class B : 214 = 16,384 networks; 216 > 65,534 hosts

N N N H

Class C : 221 > 2 million networks; 28 = 254 hosts

Page 38: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Why Subnet?Why Subnet? Remember: we are usually dealing with a Remember: we are usually dealing with a

broadcast topology.broadcast topology. Can you imagine what the network traffic Can you imagine what the network traffic

overhead would be like on a network with 254 overhead would be like on a network with 254 hosts trying to discover each others MAC hosts trying to discover each others MAC addresses?addresses?

Subnetting allows us to segment LANs into Subnetting allows us to segment LANs into logical broadcast domains called subnets, logical broadcast domains called subnets, thereby improving network performance.thereby improving network performance.

Page 39: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Stealing BitsStealing Bits In order to subnet, we must steal or “borrow” bits from In order to subnet, we must steal or “borrow” bits from

the host portion on the IP address.the host portion on the IP address. First, we must to determine how many subnets we First, we must to determine how many subnets we

need need andand how many hosts per subnet. how many hosts per subnet. We do this through the power of 2We do this through the power of 2

For example, I need 8 subnets from a Class C:For example, I need 8 subnets from a Class C: 2244 = 16 - 2 = 14 subnets = 16 - 2 = 14 subnets Remember: we subtract 2 because these subnets are not usedRemember: we subtract 2 because these subnets are not used

How many host do we have?How many host do we have? It’s a Class C, so 4 bits are left: 2It’s a Class C, so 4 bits are left: 244 = 16 - 2 = 14 hosts = 16 - 2 = 14 hosts Remember: we subtract 2 because one address is the subnet Remember: we subtract 2 because one address is the subnet

address and one is the broadcast addressaddress and one is the broadcast address

Page 40: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Subnet MaskSubnet Mask We determine the subnet mask by adding up the decimal We determine the subnet mask by adding up the decimal

value of the bits we borrowed.value of the bits we borrowed. In the previous Class C example, we borrowed 4 bits. Below In the previous Class C example, we borrowed 4 bits. Below

is the host octet showing the bits we borrowed and their is the host octet showing the bits we borrowed and their decimal values.decimal values.

128 64 32 16 8 4 2 1

1 1 1 1

We add up the decimal value of these bits and get 240. That’s the last non-zero octet of our subnet mask.So our subnet mask is 255.255.255.240

Page 41: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Last Non-Zero OctetLast Non-Zero Octet Memorize this table. You should be able to:Memorize this table. You should be able to:

Quickly calculate the last non-zero octet when given the number of Quickly calculate the last non-zero octet when given the number of bits borrowed.bits borrowed.

Determine the number of bits borrowed given the last non-zero octet.Determine the number of bits borrowed given the last non-zero octet. Determine the amount of bits left over for hosts and the number of Determine the amount of bits left over for hosts and the number of

host addresses available.host addresses available.

Bits Borrowed

Non-Zero Octet Hosts

2 192 623 224 304 240 145 248 66 252 2

Page 42: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

CIDR NotationCIDR Notation CClassless lassless IInternterddomain omain RRouting is a method of outing is a method of

representing an IP address and its subnet mask with representing an IP address and its subnet mask with a prefix.a prefix.

For example: 192.168.50.0/27For example: 192.168.50.0/27 What do you think the 27 tells you?What do you think the 27 tells you?

27 is the number of 1 bits in the subnet mask. Therefore, 27 is the number of 1 bits in the subnet mask. Therefore, 255.255.255.224255.255.255.224

Also, you know 192 is a Class C, so we borrowed 3 bits!!Also, you know 192 is a Class C, so we borrowed 3 bits!! Finally, you know the magic number is 256 - 224 = 32, so Finally, you know the magic number is 256 - 224 = 32, so

the first useable subnet address is 197.168.50.32!!the first useable subnet address is 197.168.50.32!! Let’s see the power of CIDR notation.Let’s see the power of CIDR notation.

Page 43: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

202.151.37.0/26202.151.37.0/26 Subnet mask?Subnet mask?

255.255.255.255.255.255.192192 Bits borrowed?Bits borrowed?

Class C so 2 bits borrowedClass C so 2 bits borrowed Magic Number?Magic Number?

256 - 256 - 192192 = 64 = 64 First useable subnet address?First useable subnet address?

202.151.37.64202.151.37.64 Third useable subnet address?Third useable subnet address?

64 + 64 + 64 = 192, so 202.151.37.19264 + 64 + 64 = 192, so 202.151.37.192

Page 44: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

198.53.67.0/30198.53.67.0/30 Subnet mask?Subnet mask?

255.255.255.255.255.255.252252 Bits borrowed?Bits borrowed?

Class C so 6 bits borrowedClass C so 6 bits borrowed Magic Number?Magic Number?

256 - 256 - 252252 = 4 = 4 Third useable subnet address?Third useable subnet address?

4 + 4 + 4 = 12, so 198.53.67.124 + 4 + 4 = 12, so 198.53.67.12 Second subnet’s broadcast address?Second subnet’s broadcast address?

4 + 4 + 4 - 1 = 11, so 198.53.67.114 + 4 + 4 - 1 = 11, so 198.53.67.11

Page 45: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

200.39.89.0/28200.39.89.0/28 What kind of address is 200.39.89.32?What kind of address is 200.39.89.32?

Class C, so 4 bits borrowedClass C, so 4 bits borrowed Last non-zero octet is 240Last non-zero octet is 240 Magic number is 256 - 240 = 16Magic number is 256 - 240 = 16 32 is a multiple of 16 so 200.39.89.32 is a subnet 32 is a multiple of 16 so 200.39.89.32 is a subnet

address--the second subnet address!!address--the second subnet address!! What’s the broadcast address of 200.39.89.32?What’s the broadcast address of 200.39.89.32?

32 + 16 -1 = 47, so 200.39.89.4732 + 16 -1 = 47, so 200.39.89.47

Page 46: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

194.53.45.0/29194.53.45.0/29 What kind of address is 194.53.45.26?What kind of address is 194.53.45.26?

Class C, so 5 bits borrowedClass C, so 5 bits borrowed Last non-zero octet is 248Last non-zero octet is 248 Magic number is 256 - 248 = 8Magic number is 256 - 248 = 8 Subnets are .8, .16, .24, .32, ect.Subnets are .8, .16, .24, .32, ect. So 194.53.45.26 belongs to the third subnet address So 194.53.45.26 belongs to the third subnet address

(194.53.45.24) and is a host address.(194.53.45.24) and is a host address. What broadcast address would this host use to What broadcast address would this host use to

communicate with other devices on the same subnet?communicate with other devices on the same subnet? It belongs to .24 and the next is .32, so 1 less is .31 It belongs to .24 and the next is .32, so 1 less is .31

(194.53.45.31)(194.53.45.31)

Page 47: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

No Worksheet Needed!No Worksheet Needed! After some practice, you should never need a After some practice, you should never need a

subnetting worksheet again.subnetting worksheet again. The only information you need is the IP address and The only information you need is the IP address and

the CIDR notation.the CIDR notation. For example, the address 221.39.50/26For example, the address 221.39.50/26 You can quickly determine that the first subnet You can quickly determine that the first subnet

address is 221.39.50.64. How?address is 221.39.50.64. How? Class C, 2 bits borrowedClass C, 2 bits borrowed 256 - 192 = 256 - 192 = 6464, so 221.39.50.64, so 221.39.50.64

For the rest of the addresses, just do multiples of 64 For the rest of the addresses, just do multiples of 64 (.64, .128, .192).(.64, .128, .192).

Page 48: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

The Key!!The Key!!

MEMORIZE THIS TABLE!!!MEMORIZE THIS TABLE!!!Bits Borrowed

Non-Zero Octet Hosts

2 192 623 224 304 240 145 248 66 252 2

Page 49: Institute of Technology Sligo - Dept of Computing Application Presentation Session Transport Network Data-Link Physical THE OSI MODEL Where We’ve Been.

Institute of Technology Sligo - Dept of Computing

Practice On Your OwnPractice On Your Own Below are some practice problems. Take out a sheet of paper and calculate...Below are some practice problems. Take out a sheet of paper and calculate...

Bits borrowedBits borrowed Last non-zero octetLast non-zero octet Second subnet address and broadcast addressSecond subnet address and broadcast address

1.1. 192.168.15.0/26192.168.15.0/262.2. 220.75.32.0/30220.75.32.0/303.3. 200.39.79.0/29200.39.79.0/294.4. 195.50.120.0/27195.50.120.0/275.5. 202.139.67.0/28202.139.67.0/286.6. Challenge:Challenge: 132.59.0.0/19 132.59.0.0/197.7. Challenge:Challenge: 64.0.0.0/16 64.0.0.0/16

Answers