SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Chapter 5
Link Layer
Computer
Networking: A Top
Down Approach
6th
edition
Jim Kurose, Keith Ross
Addison-Wesley
March 2012
A note on the use of these ppt slides:
We’re making these slides freely available to all (faculty, students, readers).
They’re in PowerPoint form so you see the animations; and can add, modify,
and delete slides (including this one) and slide content to suit your needs.
They obviously represent a lot of work on our part. In return for use, we only
ask the following:
 If you use these slides (e.g., in a class) that you mention their source
(after all, we’d like people to use our book!)
 If you post any slides on a www site, that you note that they are adapted
from (or perhaps identical to) our slides, and note our copyright of this
material.
Thanks and enjoy! JFK/KWR
All material copyright 1996-2012
J.F Kurose and K.W. Ross, All Rights Reserved
Link Layer 5-1
Intro to first lab:
GENI experimentation testbed and MAC-LEARNING
Local Area Networks: first stop for data
packets to reach their destination places
 Multiple end hosts connected to one shared
medium, possibly shorter distances, limited
number of stations, etc.
 IEEE 802 – standardize LANs
 802.3 – Ethernet CSMA/CD LAN
 Names, addresses, routes:
 Name: what sthg is, location-independent
 Address: where sthg is
 Route: independent of locations of source and
destination
 LAN/MAC (medium access control) addresses are
names
 48-bit address (IEEE address – MAC address): 3 octets
for fixed vendor code
Data Link Layer 5-2
Link Layer 5-3
Ethernet MAC addresses
 MAC (or LAN or physical or Ethernet) address:
 function: used ‘locally” to get frame from one interface to
another physically-connected interface (same network, in IP-
addressing sense)
 48 bit MAC address (for most LANs) burned in NIC
ROM, also software settable
 e.g.: 1A-2F-BB-76-09-AD
hexadecimal (base 16) notation
(each “number” represents 4 bits)
Link Layer 5-4
LAN addresses
each NIC adapter on LAN has a unique LAN address
adapter
Network Interface Card
NIC
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
(wired or
wireless)
Link Layer 5-5
LAN addresses (more)
 MAC address allocation administered by IEEE
 manufacturer buys portion of MAC address space
(to assure uniqueness)
 analogy:
 MAC address: like Social Security Number
 IP address: like postal address
 MAC flat address ➜ portability
 can move LAN card from one LAN to another
Link Layer 5-6
Ethernet
“dominant” wired LAN technology:
 cheap $20 for NIC
 first widely used LAN technology
 simpler, cheaper than token LANs and ATM
 kept up with speed race: 10 Mbps – 10 Gbps
Metcalfe’s Ethernet sketch
Link Layer 5-7
Ethernet: physical topology
 bus: popular through mid 90s
 all nodes in same collision domain (can collide with each
other)
 star: prevails today
 active switch in center
 each “spoke” runs a (separate) Ethernet protocol (nodes
do not collide with each other)
switch
bus: coaxial cable
star
Link Layer 5-8
Ethernet frame structure
sending adapter encapsulates IP datagram (or other
network layer protocol packet) in Ethernet frame
preamble:
 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011
 used to synchronize receiver, sender clock rates
dest.
address
source
address
data
(payload) CRCpreamble
type
Link Layer 5-9
Ethernet frame structure (more)
 addresses: 6 byte source, destination MAC addresses
 if adapter receives frame with matching destination
address, or with broadcast address (e.g. ARP packet), it
passes data in frame to network layer protocol
 otherwise, adapter discards frame
 type: indicates higher layer protocol (mostly IP but
others possible, e.g., Novell IPX, AppleTalk)
 CRC: cyclic redundancy check at receiver
 error detected: frame is dropped
dest.
address
source
address
data
(payload) CRCpreamble
type
Link Layer 5-10
Ethernet: unreliable, connectionless
 connectionless: no handshaking between sending and
receiving NICs
 unreliable: receiving NIC doesn’t send acks or nacks
to sending NIC
 data in dropped frames recovered only if initial
sender uses higher layer reliable data transfer
protocols (e.g., TCP), otherwise dropped data lost
 Ethernet’s MAC protocol: unslotted CSMA/CD with
binary backoff algorithm
Link Layer 5-11
802.3 Ethernet standards: link & physical layers
 many different Ethernet standards
 common MAC protocol and frame format
 different speeds: 2 Mbps, 10 Mbps, 100 Mbps, 1Gbps,
10G bps
 different physical layer media: fiber, cable
application
transport
network
link
physical
MAC protocol
and frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister
pair) physical layer
Link Layer 5-12
Link layer, LANs: outline
5.1 introduction, services
5.4 LANs
 switches
 VLANS
Link Layer 5-13
Ethernet switch
 link-layer device: takes an active role
 store, forward Ethernet frames
 examine incoming frame’s destination MAC
address, selectively forward frame to one-or-
more outgoing links when frame is to be
forwarded on segment, uses CSMA/CD to
access segment
 transparent
 hosts are unaware of presence of switches
 plug-and-play, self-learning
 switches do not need to be configured
 MAC learning is automated
Link Layer 5-14
Switch: multiple simultaneous transmissions
 hosts have dedicated, direct
connection to switch
 switches buffer packets
 Ethernet protocol used on each
incoming link, but no collisions;
full duplex
 each link is its own collision
domain
 switching: A-to-D and B-to-E can
transmit simultaneously,
without collisions switch with six interfaces
(1,2,3,4,5,6)
A
D
B
E C
F
1 2
345
6
Link Layer 5-15
Switch forwarding table
Q: how does switch know D
reachable via interface 4, E
reachable via interface 5?
switch with six interfaces
(1,2,3,4,5,6)
A
D
B
E C
F
1 2
345
6 A: each switch has a switch
table, each entry:
 (MAC address of destination host,
interface to reach host, time
stamp)
Q: how are entries created,
maintained in switch table?
 Self-learning
A
D
B
E C
F
1 2
345
6
Link Layer 5-16
Switch: self-learning
 switch learns which hosts
can be reached through
which interfaces only when
a frame is received on an
incoming LAN segment
 records sender/location
pair in switch table
A D
Source: A
Dest: D
MAC addr interface TTL
Switch table
(initially empty)
A 1 60
A
D
B
E C
F
1 2
345
6
Link Layer 5-17
Self-learning, forwarding: example
A D
Source: A
Dest: D
MAC addr interface TTL
switch table
(initially empty)
A 1 60
A DA DA DA DA D
 frame destination, D,
location unknown: flood
D A
 destination A location
known:
D 4 60
selectively send
on just one link
Strategy of the Bridge (Switch)
 Listen promiscuously, receiving every packet transmitted
 For each incoming packet, store the SOURCE address of
the packet in a cache (station cache) + incoming (ingress)
port
 For each packet, look up in station cache to match on the
DESTINATION address of the packet
 No match: forward the packet on all ports except the incoming
port (= flooding)
 Match:
• forward on the port/interface specified in the station cache
• If interface/port is the same as incoming port, DROP
 “Age” each entry in the station cache so they expire after
some time (aging time)
Data Link Layer 5-18
GENI experimentation testbed
and self-LEARning
FIRST LAB
Data Link Layer 5-19

Weitere ähnliche Inhalte

Was ist angesagt?

Chapter 6 - Computer Networking a top-down Approach 7th
Chapter 6 - Computer Networking a top-down Approach 7thChapter 6 - Computer Networking a top-down Approach 7th
Chapter 6 - Computer Networking a top-down Approach 7thAndy Juan Sarango Veliz
 
Chapter 3 - Computer Networking a top-down Approach 7th
Chapter 3 - Computer Networking a top-down Approach 7thChapter 3 - Computer Networking a top-down Approach 7th
Chapter 3 - Computer Networking a top-down Approach 7thAndy Juan Sarango Veliz
 
Chapter 2 - Computer Networking a top-down Approach 7th
Chapter 2 - Computer Networking a top-down Approach 7thChapter 2 - Computer Networking a top-down Approach 7th
Chapter 2 - Computer Networking a top-down Approach 7thAndy Juan Sarango Veliz
 
Chapter 5 - Computer Networking a top-down Approach 7th
Chapter 5 - Computer Networking a top-down Approach 7thChapter 5 - Computer Networking a top-down Approach 7th
Chapter 5 - Computer Networking a top-down Approach 7thAndy Juan Sarango Veliz
 
Chapter 7 - Computer Networking a top-down Approach 7th
Chapter 7 - Computer Networking a top-down Approach 7thChapter 7 - Computer Networking a top-down Approach 7th
Chapter 7 - Computer Networking a top-down Approach 7thAndy Juan Sarango Veliz
 
Chapter 9 - Computer Networking a top-down Approach 7th
Chapter 9 - Computer Networking a top-down Approach 7thChapter 9 - Computer Networking a top-down Approach 7th
Chapter 9 - Computer Networking a top-down Approach 7thAndy Juan Sarango Veliz
 
CS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit IIICS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit IIIpkaviya
 
Designing TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion ControlDesigning TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion Controlsoohyunc
 

Was ist angesagt? (20)

CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
Chapter 5 v6.01
Chapter 5 v6.01Chapter 5 v6.01
Chapter 5 v6.01
 
Chapter4 Network
Chapter4 NetworkChapter4 Network
Chapter4 Network
 
Chapter 6 - Computer Networking a top-down Approach 7th
Chapter 6 - Computer Networking a top-down Approach 7thChapter 6 - Computer Networking a top-down Approach 7th
Chapter 6 - Computer Networking a top-down Approach 7th
 
Chapter 3 - Computer Networking a top-down Approach 7th
Chapter 3 - Computer Networking a top-down Approach 7thChapter 3 - Computer Networking a top-down Approach 7th
Chapter 3 - Computer Networking a top-down Approach 7th
 
Chapter 2 - Computer Networking a top-down Approach 7th
Chapter 2 - Computer Networking a top-down Approach 7thChapter 2 - Computer Networking a top-down Approach 7th
Chapter 2 - Computer Networking a top-down Approach 7th
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
Chapter 3 v6.0
Chapter 3 v6.0Chapter 3 v6.0
Chapter 3 v6.0
 
Application Layer
Application LayerApplication Layer
Application Layer
 
CN_Lec 5_OSI
CN_Lec 5_OSICN_Lec 5_OSI
CN_Lec 5_OSI
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
Cs8591 Computer Networks
Cs8591 Computer NetworksCs8591 Computer Networks
Cs8591 Computer Networks
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Chapter 9 v6.0
Chapter 9 v6.0Chapter 9 v6.0
Chapter 9 v6.0
 
Chapter 5 - Computer Networking a top-down Approach 7th
Chapter 5 - Computer Networking a top-down Approach 7thChapter 5 - Computer Networking a top-down Approach 7th
Chapter 5 - Computer Networking a top-down Approach 7th
 
Chapter 7 - Computer Networking a top-down Approach 7th
Chapter 7 - Computer Networking a top-down Approach 7thChapter 7 - Computer Networking a top-down Approach 7th
Chapter 7 - Computer Networking a top-down Approach 7th
 
Chapter 9 - Computer Networking a top-down Approach 7th
Chapter 9 - Computer Networking a top-down Approach 7thChapter 9 - Computer Networking a top-down Approach 7th
Chapter 9 - Computer Networking a top-down Approach 7th
 
CS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit IIICS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit III
 
Designing TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion ControlDesigning TCP-Friendly Window-based Congestion Control
Designing TCP-Friendly Window-based Congestion Control
 
transport layer
transport layertransport layer
transport layer
 

Ähnlich wie Lecture2 mac learning

Ch 5- link layer in lan
Ch 5- link layer in lanCh 5- link layer in lan
Ch 5- link layer in lansufi1248
 
Chapter_5_CN Link Layer.ppt
Chapter_5_CN Link Layer.pptChapter_5_CN Link Layer.ppt
Chapter_5_CN Link Layer.pptk191469ZohaMobin
 
Chapter5 link layer and la ns
Chapter5 link layer and la nsChapter5 link layer and la ns
Chapter5 link layer and la nsKhánh Ghẻ
 
Chapter_6_v8.2.pptx osi model powerpoint
Chapter_6_v8.2.pptx osi model powerpointChapter_6_v8.2.pptx osi model powerpoint
Chapter_6_v8.2.pptx osi model powerpointjunkmailus22
 
Chapter 5 : Link Layer
Chapter 5 : Link LayerChapter 5 : Link Layer
Chapter 5 : Link LayerAmin Omi
 
link layer
link layerlink layer
link layerGS Kosta
 
Introduction to the OSI 7 layer model and Data Link Layer
Introduction to the OSI 7 layer model and Data Link LayerIntroduction to the OSI 7 layer model and Data Link Layer
Introduction to the OSI 7 layer model and Data Link LayerVNIT-ACM Student Chapter
 
Introduction to networking
Introduction to networkingIntroduction to networking
Introduction to networkingMohsen Sarakbi
 
Data centers architecture and design guide
Data centers architecture and design guideData centers architecture and design guide
Data centers architecture and design guideMattPeci
 
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTANMedium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTANirfan sami
 
Chapter_3_Networking.ppt
Chapter_3_Networking.pptChapter_3_Networking.ppt
Chapter_3_Networking.pptBlaqray1998
 
Chapter_3_Networking.ppt
Chapter_3_Networking.pptChapter_3_Networking.ppt
Chapter_3_Networking.pptBlaqray1998
 

Ähnlich wie Lecture2 mac learning (20)

Ch 5- link layer in lan
Ch 5- link layer in lanCh 5- link layer in lan
Ch 5- link layer in lan
 
Chapter_5_CN Link Layer.ppt
Chapter_5_CN Link Layer.pptChapter_5_CN Link Layer.ppt
Chapter_5_CN Link Layer.ppt
 
Chapter5 link layer and la ns
Chapter5 link layer and la nsChapter5 link layer and la ns
Chapter5 link layer and la ns
 
Ch5 data layer network
Ch5 data layer networkCh5 data layer network
Ch5 data layer network
 
Chapter_6_v8.2.pptx osi model powerpoint
Chapter_6_v8.2.pptx osi model powerpointChapter_6_v8.2.pptx osi model powerpoint
Chapter_6_v8.2.pptx osi model powerpoint
 
Link layer.ppt
Link layer.pptLink layer.ppt
Link layer.ppt
 
Chapter 5 : Link Layer
Chapter 5 : Link LayerChapter 5 : Link Layer
Chapter 5 : Link Layer
 
link layer
link layerlink layer
link layer
 
Chapter 5 my_ppt
Chapter 5 my_pptChapter 5 my_ppt
Chapter 5 my_ppt
 
Introduction to the OSI 7 layer model and Data Link Layer
Introduction to the OSI 7 layer model and Data Link LayerIntroduction to the OSI 7 layer model and Data Link Layer
Introduction to the OSI 7 layer model and Data Link Layer
 
Cisco doc
Cisco docCisco doc
Cisco doc
 
Introduction to networking
Introduction to networkingIntroduction to networking
Introduction to networking
 
Data centers architecture and design guide
Data centers architecture and design guideData centers architecture and design guide
Data centers architecture and design guide
 
Datacenters.pptx
Datacenters.pptxDatacenters.pptx
Datacenters.pptx
 
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTANMedium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
 
Chapter_3_Networking.ppt
Chapter_3_Networking.pptChapter_3_Networking.ppt
Chapter_3_Networking.ppt
 
Chapter_3_Networking.ppt
Chapter_3_Networking.pptChapter_3_Networking.ppt
Chapter_3_Networking.ppt
 
Lesson 1 slideshow
Lesson 1 slideshowLesson 1 slideshow
Lesson 1 slideshow
 
OSI model.pptx
OSI model.pptxOSI model.pptx
OSI model.pptx
 
Lan
LanLan
Lan
 

Kürzlich hochgeladen

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Kürzlich hochgeladen (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Lecture2 mac learning

  • 1. Chapter 5 Link Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you see the animations; and can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following:  If you use these slides (e.g., in a class) that you mention their source (after all, we’d like people to use our book!)  If you post any slides on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 1996-2012 J.F Kurose and K.W. Ross, All Rights Reserved Link Layer 5-1 Intro to first lab: GENI experimentation testbed and MAC-LEARNING
  • 2. Local Area Networks: first stop for data packets to reach their destination places  Multiple end hosts connected to one shared medium, possibly shorter distances, limited number of stations, etc.  IEEE 802 – standardize LANs  802.3 – Ethernet CSMA/CD LAN  Names, addresses, routes:  Name: what sthg is, location-independent  Address: where sthg is  Route: independent of locations of source and destination  LAN/MAC (medium access control) addresses are names  48-bit address (IEEE address – MAC address): 3 octets for fixed vendor code Data Link Layer 5-2
  • 3. Link Layer 5-3 Ethernet MAC addresses  MAC (or LAN or physical or Ethernet) address:  function: used ‘locally” to get frame from one interface to another physically-connected interface (same network, in IP- addressing sense)  48 bit MAC address (for most LANs) burned in NIC ROM, also software settable  e.g.: 1A-2F-BB-76-09-AD hexadecimal (base 16) notation (each “number” represents 4 bits)
  • 4. Link Layer 5-4 LAN addresses each NIC adapter on LAN has a unique LAN address adapter Network Interface Card NIC 1A-2F-BB-76-09-AD 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 71-65-F7-2B-08-53 LAN (wired or wireless)
  • 5. Link Layer 5-5 LAN addresses (more)  MAC address allocation administered by IEEE  manufacturer buys portion of MAC address space (to assure uniqueness)  analogy:  MAC address: like Social Security Number  IP address: like postal address  MAC flat address ➜ portability  can move LAN card from one LAN to another
  • 6. Link Layer 5-6 Ethernet “dominant” wired LAN technology:  cheap $20 for NIC  first widely used LAN technology  simpler, cheaper than token LANs and ATM  kept up with speed race: 10 Mbps – 10 Gbps Metcalfe’s Ethernet sketch
  • 7. Link Layer 5-7 Ethernet: physical topology  bus: popular through mid 90s  all nodes in same collision domain (can collide with each other)  star: prevails today  active switch in center  each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other) switch bus: coaxial cable star
  • 8. Link Layer 5-8 Ethernet frame structure sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame preamble:  7 bytes with pattern 10101010 followed by one byte with pattern 10101011  used to synchronize receiver, sender clock rates dest. address source address data (payload) CRCpreamble type
  • 9. Link Layer 5-9 Ethernet frame structure (more)  addresses: 6 byte source, destination MAC addresses  if adapter receives frame with matching destination address, or with broadcast address (e.g. ARP packet), it passes data in frame to network layer protocol  otherwise, adapter discards frame  type: indicates higher layer protocol (mostly IP but others possible, e.g., Novell IPX, AppleTalk)  CRC: cyclic redundancy check at receiver  error detected: frame is dropped dest. address source address data (payload) CRCpreamble type
  • 10. Link Layer 5-10 Ethernet: unreliable, connectionless  connectionless: no handshaking between sending and receiving NICs  unreliable: receiving NIC doesn’t send acks or nacks to sending NIC  data in dropped frames recovered only if initial sender uses higher layer reliable data transfer protocols (e.g., TCP), otherwise dropped data lost  Ethernet’s MAC protocol: unslotted CSMA/CD with binary backoff algorithm
  • 11. Link Layer 5-11 802.3 Ethernet standards: link & physical layers  many different Ethernet standards  common MAC protocol and frame format  different speeds: 2 Mbps, 10 Mbps, 100 Mbps, 1Gbps, 10G bps  different physical layer media: fiber, cable application transport network link physical MAC protocol and frame format 100BASE-TX 100BASE-T4 100BASE-FX100BASE-T2 100BASE-SX 100BASE-BX fiber physical layercopper (twister pair) physical layer
  • 12. Link Layer 5-12 Link layer, LANs: outline 5.1 introduction, services 5.4 LANs  switches  VLANS
  • 13. Link Layer 5-13 Ethernet switch  link-layer device: takes an active role  store, forward Ethernet frames  examine incoming frame’s destination MAC address, selectively forward frame to one-or- more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment  transparent  hosts are unaware of presence of switches  plug-and-play, self-learning  switches do not need to be configured  MAC learning is automated
  • 14. Link Layer 5-14 Switch: multiple simultaneous transmissions  hosts have dedicated, direct connection to switch  switches buffer packets  Ethernet protocol used on each incoming link, but no collisions; full duplex  each link is its own collision domain  switching: A-to-D and B-to-E can transmit simultaneously, without collisions switch with six interfaces (1,2,3,4,5,6) A D B E C F 1 2 345 6
  • 15. Link Layer 5-15 Switch forwarding table Q: how does switch know D reachable via interface 4, E reachable via interface 5? switch with six interfaces (1,2,3,4,5,6) A D B E C F 1 2 345 6 A: each switch has a switch table, each entry:  (MAC address of destination host, interface to reach host, time stamp) Q: how are entries created, maintained in switch table?  Self-learning
  • 16. A D B E C F 1 2 345 6 Link Layer 5-16 Switch: self-learning  switch learns which hosts can be reached through which interfaces only when a frame is received on an incoming LAN segment  records sender/location pair in switch table A D Source: A Dest: D MAC addr interface TTL Switch table (initially empty) A 1 60
  • 17. A D B E C F 1 2 345 6 Link Layer 5-17 Self-learning, forwarding: example A D Source: A Dest: D MAC addr interface TTL switch table (initially empty) A 1 60 A DA DA DA DA D  frame destination, D, location unknown: flood D A  destination A location known: D 4 60 selectively send on just one link
  • 18. Strategy of the Bridge (Switch)  Listen promiscuously, receiving every packet transmitted  For each incoming packet, store the SOURCE address of the packet in a cache (station cache) + incoming (ingress) port  For each packet, look up in station cache to match on the DESTINATION address of the packet  No match: forward the packet on all ports except the incoming port (= flooding)  Match: • forward on the port/interface specified in the station cache • If interface/port is the same as incoming port, DROP  “Age” each entry in the station cache so they expire after some time (aging time) Data Link Layer 5-18
  • 19. GENI experimentation testbed and self-LEARning FIRST LAB Data Link Layer 5-19