Upload
dumitrita
View
220
Download
0
Embed Size (px)
Citation preview
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
1/73
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
2/73
Table of Contents
Review the OSI Model
LAN Devices & Technologies
IP Addressing
CIDR Notation
Routing
Transport Layer
Go There!
Go There!
Go There!
Go There!
Go There!
Go There!
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
3/73
Arhitectura generala a Internetului
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
4/73
Arhitectura Internet - 2
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
5/73
Componente Internet
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
6/73
Protocol de retea - definitie
un protocol definete formatul i ordinea mesajelor schimbatentre dou sau mai multe entiti ce comunic ntre ele, precumi aciunile ce sunt ntreprinse odat cu transmiterea sau recepiaunui mesaj sau a unui alt eveniment.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
7/73
Application
Presentation
Session
Transport
Network
Data-Link
Physical
THE OSI MODEL
Review The Model
Open SystemsInterconnected Reference
Model
Table of Contents
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
8/73
Why A Layered Model?
Reduces complexity Standardizes interfaces
Facilitates modular
engineering Ensures interoperable
technology
Accelerates evolution
Simplifies teaching &learning
Application
Presentation
Session
Transport
Network
Data-Link
Physical
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
9/73
Application Layer
Provides network services(processes) to applications.
For example, a computer ona LAN can save files to a
server using a networkredirector supplied by NOSslike Novell.
Network redirectors allowapplications like Word andExcel to see the network.
Application
Presentation
Session
Transport
Network
Data-Link
Physical
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
10/73
Presentation Layer
Provides data representationand code formatting.
Code formatting includescompression and encryption
Basically, the presentationlayer is responsible forrepresenting data so that
the source and destinationcan communicate at theapplication layer.
Application
Presentation
Session
Transport
Network
Data-Link
Physical
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
11/73
Session Layer
Provides inter-hostcommunication by establishing,maintaining, and terminatingsessions.
Session uses dialog control and
dialog separation to manage thesession
Some Session protocols: NFS (Network File System)
SQL (Structured Query Language)
RCP (Remote Call Procedure)
ASP (AppleTalk Session Protocol)
SCP (Session Control Protocol)
X-window
Application
Presentation
Session
Transport
Network
Data-Link
Physical
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
12/73
Transport Layer
Provides reliability, flow control,and error correctionthrough theuse of TCP.
TCP segments the data, adding aheader with control information
for sequencing andacknowledging packets received.
The segment header alsoincludes source and destinationports for upper-layer applications
TCP is connection-oriented anduses windowing.
UDP is connectionless. UDP doesnot acknowledge the receipt of
packets.
Application
Presentation
Session
Transport
Network
Data-Link
Physical
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
13/73
Network Layer
Responsible for logicallyaddressingthe packet andpath determination.
Addressing is done through
routed protocols such as IP,IPX, AppleTalk, and DECnet.
Path Selection is done byusing routing protocols such
as RIP, IGRP, EIGRP, OSPF,and BGP.
Routers operate at theNetwork Layer
Application
Presentation
Session
Transport
Network
Data-Link
Physical
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
14/73
Data-Link Layer
Provides access to the media Handles error notification,
network topology issues, andphysically addressing the
frame.
Media Access Control througheither...
Deterministictoken passing
Non-deterministicbroadcasttopology (collision domains)
Important concept: CSMA/CD
Application
Presentation
Session
Transport
Network
Data-LinkPhysical
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
15/73
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
16/73
Peer-to-Peer Communications
Peers communicate using the PDU of theirlayer. For example, the network layers of thesource and destination are peers and usepackets to communicate with each other.
Application Application
Presentation Presentation
Session Session
Transport TransportNetwork Network
Data-Link Data-Link
Physical Physical
Data
Segments
Packets
Frames
Bits
Data
Data
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
17/73
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
18/73
Encapsulation Example
Transport segmentsthedata using TCP and hands itto the Network Layer foraddressing
Network addresses thepacketusing IP.
Data-Link then encaps. thepacket in a frameand
addresses it for localdelivery (MACs)
The Physical layer sends thebitsdown the wire.
Application
Presentation
Session
Transport
Network
Data-LinkPhysical
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
19/73
Application
Presentation
Session
Transport
Network
Data-LinkPhysical
THE OSI MODEL
LAN Devices &
TechnologiesThe Data-Link &Physical Layers
Table of Contents
Data-LinkPhysical
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
20/73
Devices
What does it do? Connects LAN
segments;
Filters traffic based
on MAC addresses;and
Separates collisiondomains based upon
MAC addresses.
What layer device?
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
21/73
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
22/73
Devices
What does it do? Concentrates LAN
connections frommultiple devices into
one location Repeats the signal (a
hub is a multi-portrepeater)
What layer device?
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
23/73
Devices
What does it do? Interconnects networks
and provides broadcastcontrol
Determines the path
using a routing protocolor static route
Re-encapsulates thepacket in the appropriateframe format and
switches it out theinterface
Uses logical addressing(i.e. IP addresses) todetermine the path
What layer device?
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
24/73
Media Types
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
25/73
LAN Technologies
Three Most
Common UsedToday in
Networking
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
26/73
Ethernet/802.3
Cable Specifications: 10Base2
Called Thinnet; uses coax
Max. distance = 185 meters (almost 200)
10Base5 Called Thicknet; uses coax
Max. distance = 500 meters
10BaseT Uses Twisted-pair
Max. distance = 100 meters
10 means 10 Mbps
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
27/73
Ethernet/802.3
Ethernet is broadcast topology. What does that mean?
Every devices on the Ethernet segment seesevery frame.
Frames are addressed with source anddestination ______ addresses.
When a source does not know the destinationor wants to communicate with every device, it
encapsulates the frame with a broadcastMACaddress: FFFF.FFFF.FFFF
What is the main network traffic problemcaused by Ethernet broadcast topologies?
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
28/73
Ethernet/802.3
Ethernet topologies are also sharedmedia.
That means media access is controlled
on a first come, first serve basis. This results in collisions between the
data of two simultaneously transmitting
devices. Collisions are resolved using what
method?
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
29/73
Ethernet/802.3
CSMA/CD (Carrier Sense Multiple Access withCollision Detection)
Describe how CSMA/CD works: A node needing to transmit listens for activity on
the media. If there is none, it transmits. The node continues to listen. A collision is
detected by a spike in voltage (a bit can only be a0 or a 1--it cannot be a 2)
The node generates a jam signal to tell all devices
to stop transmitting for a random amount of time(back-off algorithm).
When media is clear of any transmissions, thenode can attempt to retransmit.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
30/73
Address Resolution Protocol
In broadcast topologies, we need a way toresolve unknown destination MAC addresses.
ARP is protocol where the sending devicesends out a broadcast ARP request which
says, Whats you MAC address? If the destination exists on the same LAN
segment as the source, then the destinationreplies with its MAC address.
However, if the destination and source areseparated by a router, the router will notforward the broadcast (an important functionof routers). Instead the router replies with its
own MAC address.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
31/73
Application
Presentation
Session
Transport
Network
Data-LinkPhysical
THE OSI MODEL
IP Addressing
Subnetting Review
Table of Contents
Network
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
32/73
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
33/73
Network 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
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
34/73
Why Subnet?
Remember: we are usually dealing witha broadcast topology.
Can you imagine what the network
traffic overhead would be like on anetwork with 254 hosts trying todiscover each others MAC addresses?
Subnetting allows us to segment LANsinto logical broadcast domains calledsubnets, thereby improving networkperformance.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
35/73
Four Subnetting Steps
To correctly subnet a given networkaddress into subnet addresses, askyourself the following questions:
1. How many bits do I need to borrow?2. Whats the subnet mask?
3. Whats the magic number or multiplier?
4. What are the first three subnetworkaddresses?
Lets look at each of these questions indetail
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
36/73
1. How many bits to borrow?
First, you need to know how many bitsyou have to work with.
Second, you must know either how
many subnets you need or how manyhosts per subnet you need.
Finally, you need to figure out the
number of bits to borrow.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
37/73
1. How many bits to borrow?
How many bits do I have to work with? Depends on the class of your network
address.
Class C: 8 host bits
Class B: 16 host bits
Class A: 24 host bits
Remember: you must borrow at least 2 bits
for subnets and leave at least 2 bits forhost addresses.
2 bits borrowed allows 22- 2 = 2 subnets
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
38/73
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
39/73
1. How many bits to borrow?
Class C Example: 210.93.45.0 Design goals specify at least 5 subnets
so how many bits do we borrow?
How many bits in the host portion dowe have to work with (TB)?
Whats the BB in our TB = BB + BLformula? (8 = BB + BL)
2 to the what power will give us at least5 subnets?
23- 2 = 6 subnets
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
40/73
1. How many bits to borrow?
How many bits are left for hosts?TB = BB + BL
8 = 3 + BL
BL = 5 So how many hosts can we assign to
each subnet?
25- 2 = 30 hosts
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
41/73
1. How many bits to borrow?
Class B Example: 185.75.0.0 Design goals specify no more than 126 hostsper subnet, so how many bits do we need toleave (BL)?
How many bits in the host portion do we haveto work with (TB)?
Whats the BL in our TB = BB + BL formula?(16 = BB + BL)
2 to the what power will insure no more than126 hosts per subnet and give us the mostsubnets?
27- 2 = 126 hosts
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
42/73
1. How many bits to borrow?
How many bits are left for subnets?TB = BB + BL
16 = BB + 7
BL = 9 So how many subnets can we have?
29- 2 = 510 subnets
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
43/73
2. Whats the subnet mask?
We determine the subnet mask by adding upthe decimal value of the bits we borrowed.
In the previous Class C example, we borrowed3 bits. Below is the host octet showing the
bits we borrowed and their decimal values.
128 64 32 16 8 4 2 1
1 1 1
We add up the decimal value of these bits and get 224.Thats the last non-zero octet of our subnet mask.
So our subnet mask is 255.255.255.224
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
44/73
3. Whats the magic number?
To find the magic number or themultiplier we will use to determine thesubnetwork addresses, we subtract thelast non-zero octet from 256.
In our Class C example, our subnetmask was 255.255.255.224. 224 is ourlast non-zero octet.
Our magic number is 256 - 224 = 32
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
45/73
Last Non-Zero Octet
Memorize this table. You should be able to: Quickly calculate the last non-zero octet whengiven the number of bits borrowed.
Determine the number of bits borrowed given thelast non-zero octet.
Determine the amount of bits left over for hostsand the number of host addresses available.
Bits
Borrowed
Non-Zero
Octet Hosts
2 192 623 224 30
4 240 14
5 248 6
6 252 2
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
46/73
4. What are the subnets?
We now take our magic number anduse it as a multiplier.
Our Class C address was 210.93.45.0.
We borrowed bits in the fourth octet, sothats where our multiplier occurs 1st subnet: 210.93.45.32
2nd subnet: 210.93.45.64
3rd subnet: 210.93.45.96 We keep adding 32 in the fourth octet
to get all six available subnet addresses.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
47/73
Host & Broadcast Addresses
Now you can see why we subtract 2 whendetermining the number of host address.
Lets look at our 1st subnet: 210.93.45.32
What is the total range of addresses up to ournext subnet, 210.93.45.64?
210.93.45.32 to 210.93.45.63 or 32 addresses
.32 cannot be assigned to a host. Why?
.63 cannot be assigned to a host. Why? So our host addresses are .33 - .62 or 30 host
addresses--just like we figured out earlier.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
48/73
Application
Presentation
Session
Transport
Network
Data-LinkPhysical
THE OSI MODEL
CIDR Notation
A Different Way toRepresent a Subnet Mask
Table of Contents
Network
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
49/73
CIDR Notation
Classless Interdomain Routing is a method ofrepresenting an IP address and its subnetmask with a prefix.
For example: 192.168.50.0/27
What do you think the 27 tells you? 27 is the number of 1 bits in the subnet mask.
Therefore, 255.255.255.224
Also, you know 192 is a Class C, so we borrowed 3bits!!
Finally, you know the magic number is 256 - 224 =32, so the first useable subnet address is197.168.50.32!!
Lets see the power of CIDR notation.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
50/73
202.151.37.0/26
Subnet mask? 255.255.255.192
Bits borrowed? Class C so 2 bits borrowed
Magic Number? 256 - 192= 64
First useable subnet address? 202.151.37.64
Third useable subnet address? 64 + 64 + 64 = 192, so 202.151.37.192
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
51/73
198.53.67.0/30
Subnet mask? 255.255.255.252
Bits borrowed? Class C so 6 bits borrowed
Magic Number? 256 - 252= 4
Third useable subnet address? 4 + 4 + 4 = 12, so 198.53.67.12
Second subnets broadcast address? 4 + 4 + 4 - 1 = 11, so 198.53.67.11
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
52/73
200.39.89.0/28
What kind of address is 200.39.89.0? Class C, so 4 bits borrowed
Last non-zero octet is 240
Magic number is 256 - 240 = 16
32 is a multiple of 16 so 200.39.89.32 is asubnet address--the second subnetaddress!!
Whats the broadcast address of200.39.89.32?
32 + 16 -1 = 47, so 200.39.89.47
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
53/73
194.53.45.0/29
What kind of address is 194.53.45.26? Class C, so 5 bits borrowed Last non-zero octet is 248
Magic number is 256 - 248 = 8
Subnets are .8, .16, .24, .32, ect.
So 194.53.45.26 belongs to the third subnetaddress (194.53.45.24) and is a host address.
What broadcast address would this host use
to communicate with other devices on thesame subnet? It belongs to .24 and the next is .32, so 1 less is
.31 (194.53.45.31)
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
54/73
No Worksheet Needed!
After some practice, you should never need asubnetting worksheet again.
The only information you need is the IPaddress and the CIDR notation.
For example, the address 221.39.50/26
You can quickly determine that the firstsubnet address is 221.39.50.64. How?
Class C, 2 bits borrowed 256 - 192 = 64, so 221.39.50.64
For the rest of the addresses, just domultiples of 64 (.64, .128, .192).
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
55/73
The Key!!
MEMORIZE THIS TABLE!!!
Bits
Borrowed
Non-Zero
Octet Hosts
2 192 62
3 224 30
4 240 14
5 248 6
6 252 2
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
56/73
Practice On Your Own
Below are some practice problems. Take outa sheet of paper and calculate... Bits borrowed
Last non-zero octet
Second subnet address and broadcast address
1. 192.168.15.0/26
2. 220.75.32.0/30
3. 200.39.79.0/29
4. 195.50.120.0/275. 202.139.67.0/28
6. Challenge:132.59.0.0/19
7. Challenge:64.0.0.0/16
Answers
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
57/73
Application
Presentation
Session
Transport
Network
Data-LinkPhysical
THE OSI MODEL
Routing Basics
Path Determination &Packet Switching
Table of Contents
Network
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
58/73
A Routers Functions
A router is responsible for determiningthe packets path and switching thepacket out the correct port.
A router does this in five steps:1. De-encapsulates the packet
2. Performs the ANDing operation
3. Looks for entry in routing table
4. Re-encapsulates packet into a frame
5. Switches the packet out the correctinterface
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
59/73
Routed v. Routing Protocols
What is a routed protocol? Routed protocols are protocols that enable data to
be transmitted across a collection of networks orinternetworks using a hierarchical addressingscheme.
Examples include IP, IPX and AppleTalk.
A routable protocol provides both a network andnode number to each device on the network.Routers AND the address to discover the networkportion of the address.
An example of a protocol that is not routable isNetBEUI because it does not have a network/nodestructure.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
60/73
Routed v. Routing Protocols
What is a routing protocol?A routing protocol is a protocol that
determines the path a routed protocol willfollow to its destination.
Routers use routing protocols to create amap of the network. These maps allowpath determination and packet switching.
Maps become part of the routers routingtable.
Examples of routing protocols include: RIP,IGRP, EIGRP, & OSPF
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
61/73
S
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
62/73
Dynamic v. Static Routing
Dynamic routing refers to the process ofallowing the router to determine the path tothe destination.
Routing protocols enable dynamic routing
where multiple paths to the same destinationexist.
D i S i R i
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
63/73
Dynamic v. Static Routing
Static routing means that the networkadministrator directly assigns the path routerare to take to the destination.
Static routing is most often used with stub
networks where only one path exists to thedestination.
D f l R
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
64/73
Default Routes
A default route is usually to a border orgateway router that all routers on a networkcan send packets to if they do not know theroute for a particular network.
R ti P t l Cl
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
65/73
Routing Protocol Classes
Routing protocols can be divided intothree classes:
Distancevector: determines the routebased on the direction (vector) anddistance to the destination
Link-state: opens the shortest path first tothe destination by recreating an exact
topology of the network in its routing table Hybrid: combines aspects of both
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
66/73
Di t t R ti
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
67/73
Distance-vector Routing
Each router receives a routing table periodicallyfrom its directly connected neighboring routers.
For example, in the graphic, Router B receivesinformation from Router A. Router B adds a
distance-vector number (such as a number ofhops), and then passes this new routing table toits other neighbor, Router C.
Li k t t R ti
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
68/73
Link-state Routing
Link-state protocols maintain complex databasesthat summarize routes to the entire network.
Each time a new route is added or a route goesdown, each router receives a message and thenrecalculates a spanning tree algorithm and
updates its topology database.
C i th T
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
69/73
Comparing the Two
DISTANCE-VECTOR LINK-STATE
Views network topology from
neighbors perspective
Gets common view of entire
network topology
Adds distance vectors from
router to router
Calculates the shortest path to
other routers
Frequent, periodic updates:
slow convergence Event triggered updates: fastconvergencePasses copies of routing tables
to neighbors
Passes link-state routing updates
to all routers in the system.
H b id R ti
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
70/73
Hybrid Routing
Ciscos proprietary routing protocol,EIGRP, is considered a hybrid.
EIGRP uses distance-vector metrics.
However, it uses event-triggeredtopology changes instead of periodicpassing of routing tables.
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
71/73
Application
Presentation
Session
Transport
Network
Data-LinkPhysical
THE OSI MODEL
Transport Layer
A Quick Review
Table of Contents
Transport
T t L F ti
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
72/73
Transport Layer Functions
Synchronization of the connection Three-way handshake
Flow Control
Slow down, youre overloading mymemory buffer!!
Reliability & Error Recovery
Windowing: How much data can I sendbefore getting an acknowledgement?
Retransmission of lost or unacknowledgedsegments
T t T P t l
8/13/2019 6. Modelul OSI-IsO -Reprezentare Detaliata
73/73
Transports Two Protocols
TCP Transmission Control
Protocol
Connection-oriented
Acknowledgment &Retransmission ofsegments
Windowing
Applications: Email
File Transfer
E-Commerce
UDP User Datagram
Protocol
Connectionless
NoAcknowledgements
Applications:
Routing Protocols
Streaming Audio
Gaming
Video Conferencing