internet layer model layerscs.hac.ac.il/staff/martin/networks/slide05.pdf · computer networks —...
TRANSCRIPT
1Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Infrastructure
Layers
2Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Infrastructure
Change in point of viewInternet standards do not discuss Data Link + Physical LayersHardware developers define standards
Not Internet Aware
Internet Aware
Internet Layer Model
Data Link Layer — hardware managementPhysical Layer — hardware
Infrastructure
End-to-end IP routing + forwardingNetwork
Local + remote portsService requirements
Transport
Internet application Expects Internet services from OS
Application
Internet perspective
3Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Infrastructure layersBottom-up design
Physical layer (PHY)Defines physical transmission of bitsExploits a physical technology
Data Link layer (DL) defines management of Physical LayerHow to make physical technology do what we want
Infrastructure managementDelivering data messages — 10% of effortMaking hardware work correctly — 90% of effort
OAM = Operations+Administration+MaintenanceApplication assumes infrastructure "just works""Just works" ⇒
Reliability, availability, stability, serviceability, growth
InfrastructureEngineering perspective
physical bits
4Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Enormous investment in existing equipmentGlobal network of hardware nodes + transmission lines
Developed to provide many servicesInternet (IP-based unreliable connectionless) just one service
Most developed before Internet Telegraph — 1794Telephone — 1876Teletype modem — 1943Digital telephone — 1962Internet opened to public — 1992
Hardware updates Replacement of manufactured hardwareSlower than software updatesMore expensive than software updates
InfrastructureEconomic perspective
5Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Data Link FunctionsSimilar to transport layer functions
FramingAssemble network PDUs into hardware packetsAttach header + trailer for Data Link and Physical layers
Medium access + flow control + congestion control When / how transmitter sends data onto linkTransmitter avoids overflow of receiver bufferTransmitters avoid interfering with other transmitters
Error controlDetect / correct transmission bit errors
Local addressingConvert network addresses to hardware local addresses
Transport Reliability
Data LinkReliability
Data LinkReliability
6Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Data Link SublayersLogical Link Control (LLC) sublayer
Multiplexing of data sources / destinationsPacket type identificationError correctionFlow control
Medium Access (MAC) sublayerNetwork topologyMedium access management
Sharing medium among nodesPermission to transmit
Data frame structureHardware (MAC) addressingError detection
1
2MAC
Sublayer
Physical Layer
Data Link Layer
LLC Sublayer
7Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Interface to Data Link LayerInfrastructure layers
Typically implemented in hardware PHY — physical circuits for transmitter / link / receiverDL — embedded program in firmware (ROM) + controller
Host nodeNetwork interface Card (NIC)
Connection port to medium (link)ControllerTransceiver
Switching nodeSwitching fabricController + multiple transceivers + connection ports to medium (link)
DL layer interfaceInterface to OS level hardware driverNetwork PDU ↔ OS driver ↔ NIC / switch controller ↔ transceiver
8Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
FramingData frame format
Data link protocol managementHeader / Trailer format
Similar to headers at network and transport layersAddressing, error control, flow control, …
Physical layer hardware managementTransmission parameters
Bit rate, Baud rate, modulation method, …Transmitter / receiver synchronization
Clock training bits1010101010 … allows receiver clock to sync
Frame markingStart / Stop Fields Start field / byte countLose sync ⇒ drop frame + wait for new Start Field
TrailerDataHeader
9Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Frame Marking MethodsSTX / ETX
ASCII control codes
DLE in data streamByte stuffingTransmitter sends DLE as DLE DLEReceiver removes extra DLE
0x10Data Link EscapeDLE0x03End of TextETX0x02Start of TextSTX
DLE ETXRest of TrailerData Rest of HeaderDLE STX
10Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Frame Marking MethodsFlags
Start = Stop = 01111110 = 0x7E
7E in data streamByte / bit stuffingByte stuffing
Send 7E as 7E 7E — receiver removes extra 7EBit stuffing
Send 11111 as 111110 — receiver removes extra 0
01111110Rest of TrailerData Rest of Header01111110
11Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Error ControlCheck sequence
Transmitter Calculates hash of data Includes sequence in transmitted header / trailer
Receiver Calculates hash of data Compares received sequence with calculated sequence
12Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Error ControlParity (even parity)
Parity bit = XOR of data bits Data + parity = even number of 1 bits
Cyclic Redundancy Code (CRC)D = Data fieldG = Generator
Predetermined pattern of r+1 bits
R = Remainder of (D × 2r) / G (modulo 2 division) = CRC fieldGenerally (D × 2r + R) / G = 0
R = (D × 2r) / GD = data
13Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Modulo 2 Polynomial ArithmeticRepresent data bits as coefficients of polynomial
Arithmetic modulo 2 in each order (XOR)
Polynomial addition = subtraction
Polynomial multiplication / divisionMultiply / divide as usualModulo 2 arithmetic in each orderExamples
( )1 2 0
1 2 01 2 0
...
...n n
n nn n
D a a aD x a x a x a x
− −
− −− −
=
= × + × + ×
( ) ( ) ( )( ) ( )
1 0 1 01 0 1 0
1 01 1 0 0
... ...
...
n nn n
nn n
A x B x a x a x b x b x
a b x a b x
− −− −
−− −
± = × + + × ± × + + ×
= ⊕ × + + ⊕ ×
0 0 1 1 0 0 1 1 0 1+ = + = + = + =
( )( ) ( )
( ) ( )
3 2 5 3 3 5 3 5
5 2 3
1 1 1
1
x x x x x x x x x x x x
x x x x x
+ + = + + + = + + + = +
+ ÷ + = +14Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Modulo 2 Long Division
5
2
2 5
3
5 3
3
3
1
1
0
x xx
x x xx
x x
x xx
x
x
++
++
++
++
15Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Cyclic Redundancy Code (CRC)Why it works
Data
Shift left D r bits ⇒ D → D × 2r
Divide by G ⇒ D × 2r → D × 2r / G = Q + R / GQuotient QRemainder R
Transmit T = D × 2r + R
Receiver calculates T / GT / G = D × 2r / G + R / G = (Q + R / G) + R / G = Q + (R + R) / G
= Q + 0 / G = Q
D = data
0 … 0D = data
RD = data
16Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
CRC ExampleData stream
D = 1101011011Generator
G = 10011
Remainder R = 1110
TransmitT = 1101011011 1110
CRC check at receiver
1 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 0 0 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 0 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0
1 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 0 1 0 1 1 1 1 0 0 1 1 0 0 1 0 0 1 1 1 0 0 1 1 Zero remainder ⇒ no error 0 0
17Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
CRC Standards
12 11 3 2 1
16 15 2
16 15 5
32 26 23 22 16 12 11 10 8 7 5 4 2
( ) 1
( ) 1
( ) 1
( ) 1
CRC‐12
CRC‐16
CRC‐CCITT
CRC‐32
G x x x x x x
G x x x x
G x x x x
G x x x x x x x x x x x x x x x
= + + + + +
= + + +
= + + +
= + + + + + + + + + + + + + +
18Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Flow ControlGo Back N (GBN)
Transmit N frames Wait for ACKPiggybacking — transmit ACK signals in data frame
Sliding WindowN-bit SEQ numberWindow size — number of unACKed frames before stoppingSource window
SEQ numbers of unACKed framesFrames buffered at transmitter until ACKed
Destination windowSEQ numbers of frames to be acceptedFrames passed to network layer in SEQ order
Out-of-order frames bufferedFrames too far ahead of window rejected
Timeout — retransmit if no ACK after fixed time
19Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
High‐Level Data Link Control (HDLC)Family of data link protocols
Based on IBM SDLC Layer 2 protocol in mainframe SNA Originally for communication between CPUs and peripherals
Link Access Protocol (LAP)Versions of HDLC used in public network architectures
SLIP, PPPInternet point‐to‐point
IEEE 802.2Ethernet Logical Link Control (LLC)
LAPDISDN
LAPFFrame Relay
LAPBX.25
20Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
High‐Level Data Link Control (HDLC)Data link attributes in HDLC
Information, Supervisory, UnnumberedFrame types
3‐bit SEQ numberFlow control
16‐bit CRC‐CCITT or 32‐bit CRC‐32Error control
hardware level addressing possibleAddressing
0x7E flag with byte / bit stuffingFraming
21Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
HDLC Frame StructureGeneral HDLC frame
Address8 bit address ⇒ 256 hardware addresses
Control fieldSpecifies frame type / control
01111110 Address Control data CRC 01111110
8 8 8 ≥ 0 16 / 32 8
7 6 5 4 3 2 1 0
Information (data) 0 SEQ N(S) p/f NEXT N(R)
7 6 5 4 3 2 1 0
Supervisory (flow control) 1 0 type p/f NEXT N(R)
7 6 5 4 3 2 1 0
Unnumbered (management / connectionless) 1 1 type p/f subtype
22Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
HDLC Control FieldsFlow control
SEQ — sequence number of data frameNEXT — next expected SEQ (ACK all previous frames)
Type00 — ACK + Receiver Ready (RR)01 — Reject (REJ): retransmit all frames from N(R) 10 — Receiver Not Ready (RNR): ACK N(R) but stop sending11 — Selective Reject (SREJ): retransmit N(R)
7 6 5 4 3 2 1 0
Information (data) 0 SEQ N(S) p/f NEXT N(R)
7 6 5 4 3 2 1 0
Supervisory (flow control) 1 0 type p/f NEXT N(R)
7 6 5 4 3 2 1 0
Unnumbered (management / connectionless) 1 1 type p/f subtype
23Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
HDLC PollingPolling
Primary host initiates communicationSecondary host responds
Poll / Final (p/f) bitInvitation — primary to secondary with p = 1Response
Secondary sends I-frames to primary with f = 0Secondary sets f = 1 on last response frame
7 6 5 4 3 2 1 0
Information (data) 0 SEQ N(S) p/f NEXT N(R)
7 6 5 4 3 2 1 0
Supervisory (flow control) 1 0 type p/f NEXT N(R)
7 6 5 4 3 2 1 0
Unnumbered (management / connectionless) 1 1 type p/f subtype
24Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
HDLC Internet Dial‐Up ProtocolsSerial Line Internet Protocol (SLIP)
RFC 1055
Point-to-Point Protocol (PPP)Layer 2 protocol used between
Internet routersHost and Internet service provider (ISP)
Address = 11111111 = broadcastHDLC control = 11000000 = Unnumbered (connectionless data)Protocol
Protocol in data fieldNetwork protocol or link negotiation protocol (upper layer 2 sublayer)
0xC0IP datagram with byte stuffing (C0 → DB DC, DB→ DB DB)0xC0
01111110 11111111 11000000 Protocol Data CRC 01111110 8 8 8 8 or 16 ≥ 0 16 / 32 8
25Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
PPP Protocol OptionsStandard network protocols
IP, IPX, AppleTalk, …Datagram in data field
Control ProtocolsLink Control Protocol (LCP)
PPP optionsHeader compression (remove control / address fields)Size of protocol / CRC fields and data
Test Terminate
Network Control Protocol (NCP)Network layer options
ProtocolAddressHeader compression (encode header fields)
Authentication (ISP user / password exchange)
01111110 11111111 11000000 Protocol Data CRC 01111110 8 8 8 8 or 16 ≥ 0 16 / 32 8
26Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Shared Medium NetworksPhysical layer
Multiple nodes transmit on single mediumTime divisionFrequency divisionCode division
Shared physical medium ⇒ local area network (LAN)
Data link layerMedium access (MAC) sublayer
Allocates medium capacity among nodesError detectionNetwork topology
Logical link control (LLC) sublayerFrame typesFlow controlError correctionProtocol negotiation
1
2MAC
Sublayer
Physical Layer
Data Link Layer
LLC Sublayer
27Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Medium Access SharingTime division
Each host granted full bandwidth in allocated time slotTime slot allocated statistically or deterministically
ExamplesDeterministic — telephone switchingStatistical — Ethernet, WiFi, …
Frequency divisionEach host granted partial bandwidth in all time slotsExamples
Commercial radio / TVBluetooth
Code divisionEach host granted full bandwidth in all time slotsEach host transmits using different coding schemeExample
Cellular CDMA28Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Common Shared Medium Networks
ITU 2G / 3G cellular network
Wireless code‐division accessCDMA / CDMA2000
ITU 2G / 3G cellular network
Wireless time/frequency‐division accessGSM / UTMS
IEEE 802.16 metropolitan area network
Wireless time/frequency‐division accessWiMAX
IEEE 802.15 personal area network
Wireless frequency‐division accessBluetooth
IEEE 802.11 local area network
Wireless time‐division access
IEEE 802.3 local area network
Wired time‐division access
WiFi
Ethernet
29Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
What are IEEE 802 and ITU?Institute of Electrical and Electronics Engineers (IEEE)
Professional organization Coordinates technical standards for electronic equipment
IEEE 802 CommitteeStandards committee for Data Link and Physical LayerOEMs (original equipment manufacturers)
Develop hardware / software systems at infrastructure layersRequest standardization (recognition) from 802 committee
Other 802 standards802.1 — bridging (interconnecting different 802 LANs)802.2 — LLC sublayer for 802 LANs802.4 — Token Bus (LAN for manufacturing environments)802.5 — Token Ring (ring topology LAN)
International Telecommunication Union (ITU)UN standards committee Sets telephone and (non-Internet) WAN standards
30Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Time Division Medium Access Deterministic
PollingPrimary node initiates session (sends data to secondary)Secondary node responds (sends data to primary)Optional mode in WiFi
Token passingToken message passes from host to hostHost with token may transmit Token Ring, Token Bus, FDDI
Statistical Aloha
Hosts transmit at random / hope to avoid collisions
Carrier senseHosts listen for other transmissions / try to avoid collisions
ArbitrationDeterministic procedure chooses among random group of hosts
token
1 2
31Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
ALOHAnetBackground
First wireless packet data network (1971)Low data volume Connected University of Hawaii campuses (separate islands)
Protocol Host transmits when readyTwo frames overlap in time
Collision ⇒ both frames corruptedRetransmit after random wait
time
Node1234
t1 t2 t3 t4
collisions
32Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Utilization and Throughput
0
1time (seconds) to transmit 1 packet
maximum packets/second on medium =
actual packets/second transmitted by hosts
probability success (packet trans
R
GR
P
τ =
=τ
λ =
λ= = λτ
=
Capacity
Traffic
Utilization
Collisions
0
00
'
'
mitted without collision)
uncorrupted packets/secondP
PS GPR R
λ = λ =
λλ= = =
At receiver
Throughput
33Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
ALOHA ThroughputSuccess = no collisions
Previous packet starts at t2 < t3 – τNext packet starts at t4 > t3 + τInterval of no transmissions = t4 – t2 > 2τ
Packets obey Poisson statistics
time
Node1234
t1 t2 t3 t4
collisions
( ) ( ) ( )02 2 2
0
2! 0!
packets in secondsk
T GTP k T e P e e e
k−λ − τλ − τλ −λ τλ
= ⇒ = = =
S
G0.5
0.1842GS Ge−=
34Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Slotted ALOHA Central clock
Synchronize packet transmissionsTransmit new packet constructed between tk and tk + τ
CollisionTwo nodes construct packets in same interval
Probability of success (of my packet)No other packets constructed during interval τ
( )0
0 0! G GP e e e S Ge−τλ −τλ − −τλ
= = = ⇒ =
S
G1.0
0.368
35Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Carrier SenseCarrier Sense Multiple Access (CSMA)
Nodes listen for transmissions before transmittingNo transmission — node can transmitTransmission — node waits until end of transmission
Collision Multiple nodes transmit "at same time""Same time"
|t1 – t2| < Tpropagation
Collision Detection (CD)Nodes listen for collision
Corrupted data
On collisionAll nodes stop transmittingNodes jam transmissionNodes waits random backoff before retransmitting
Tpropagation
t1
t2
36Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
CSMA/CD Throughput
Tanenbaum, Fig. 4‐4
Persistent CSMANo carrier detected ⇒ node with data transmits
q-persistenceNode transmits with probability 0 < q < 1q < 1 ⇒ fewer collisions but longer latency
37Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Arbitration Deterministic medium access
Random group of nodes request accessOne node chosen by deterministic algorithm No collisionsEfficient throughput
Used within computer Peripheral Component Interconnect (PCI)
Multiple CPUs and peripherals compete for access to memoryPCI bridge allocates memory access efficiently
Intel Multibus IIMultiple nodes request bus access using pseudo-randomized IDHighest ID proceeds
Binary countdown switchMultiple hosts begin transmitting onto bus
Bus output = logical OR of all inputs
Host sends 0 but sees 1 on bus ⇒ host stops 38Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Ethernet Family of wired LAN systems
Defined at physical and data link layers Dominant / generic LAN technology
BackgroundDeveloped 1974 at Xerox PARCCommercialized by Xerox / Intel / Digital in 1980Standardized as IEEE 802.3 in 1982
10 Mb/s baseband transmissionBus topology — single coaxial cable < 2.5 kmCSMA/CD
Shared bus topology → CSMALong propagation delay on coaxial cable → CD
DevelopmentsBit rates: 10 Mbps → 100 Mbps → 1 Gbps → 10 Gbps → 100 Gbps Media: coaxial cable → hub (virtual bus on star) → switch
Ethernet switch — non-blocking N × N switch with no collisions
39Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Ethernet Topologies
Distributed CSMA/CD1980 – 1990 Original Ethernet design at 10 Mbps
Shared physical busCoaxial cable < 2.5 km
Coaxial cable
Tpropagation
t1
t2
( ) ( )
‐65
‐6
2.5 kmEnd‐to‐end propagation delay 8 10 sec
3 10 km/sec
Bits transmitted before carrier detect 10 Mb/s 8 10 sec 80 bits
= = ××
= × × =
40Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Ethernet Topologies
Centralized CSMA/CD1990 – presentFast Ethernet100 Mbps
Logical bus on physical starCentral hubMultiple cables < 100 mEach station (STA = node) receives logical OR of all inputsMultiple frames ⇒ collision
Passive hub
( ) ( )
‐78
‐7
200 mEnd‐to‐end propagation delay 7 10 sec
3 10 m/sec
Bits transmitted before carrier detect 100 Mb/s 7 10 sec 70 bits
= ≈ ××
= × × =
41Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Ethernet Topologies
Ethernet switch1995 – presentPhysical star100 Mbps → 1 Gbps → 10 Gbps → 100 GbpsFast N × N non-blocking switch
Hub learns MAC addresses at each switch portEach frame directed to port by destination address in frameLarge output buffer at each port
All stations can send at same timeNo collisions
Active hub
42Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
802.3 Ethernet Standards
1 Gb/s full duplex on 2 optical fibers
1000 Base SX1000 Base LX1000 Base BX1000 Base ZX
1 Gb/s full duplex on 2 twisted pairs1000 Base TX
100 Mb/s full duplex on 2 twisted pairs100 Base TX
100 Mb/s on 1 twisted pair100 Base T
100 Mb/s full duplex on optical fibers
100 Base FX100 Base SX100 Base BX100 Base LX
10 Mb/s on 1 twisted pair10 Base T
10 Mb/s on thin coaxial cable10 Base 2
10 Mb/s on thick coaxial cable10 Base 5
43Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Ethernet Frame
4 bytes46 – 1500 bytes2 bytes6 bytes6 bytes1 byte7 bytes
CRCDataType or Length
Src Address
Dest Address
StartPreamble
IP = 0x0800
AppleTalk = 0x809B
ARP = 0x0806
Length of data field (<1500)Length
CRC‐32CRC
Code identifying protocol in data field
Used in most Ethernet systems
Type codes > 1536 =0x600
Type
Hardware (MAC) address of node
48‐bit MAC addresses assigned by OEM and fixed in hardware
Broadcast address FF:FF:FF:FF:FF:FF (frame read by all STAs)
Address
10101011Start
7 bytes of 10101010 for sync of receiversPreamble
44Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
IEEE 802.2LLC sublayer for 802.3 Ethernet
Based on HDLCPermits connection oriented services at data link layer
802.2 I/S DSAP SSAP control data + pad
1 byte 1 byte 2 bytes 42 ‐ 1496 bytes
802.2 U DSAP SSAP control data + pad
1 byte 1 byte 1 bytes 43 ‐ 1497 bytes
Frame type + SEQ + ACK (I / S frames)
Frame type (U frame)Control
Source service access point (protocol / service at source)SSAP
Destination service access point (protocol / service at destination)DSAP
45Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Segmentation Ethernet bridge
2-port switchConnects 2 Ethernet segmentsReduces traffic in each segment
Initialization — promiscuous modeBridge passes every Ethernet frame
Listens as destination STARepeats Ethernet frame as source STA
Bridge learns network topologyBuilds table of source MAC addressesForwards only inter-segment frames
Ethernet LAN #1
Ethernet LAN #2
Bridge
46Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Relationship of Protocol LayersTypical network
Application Application 16‐bit
TCP Port
16‐bit TCP Port
32‐bit IP Address
32‐bit
IP Address 32‐bit
IP Address
32‐bit IP Address
32‐bit IP Address
32‐bit
IP Address 48‐bit
Ethernet Address
48‐bit
Ethernet Address
PPP PPP 48‐bit
Ethernet Address
48‐bit
Ethernet Address
Ethernet (PHY)
Ethernet (PHY)
PHY PHY Ethernet (PHY)
Ethernet (PHY)
Host Router Router Host
Locate router by IP address(uses default gateway)
Send to router by MAC addressEthernet always uses source / destination Ethernet addresses — not IP addresses
How does host find MAC address for router?
Point‐to‐point Locate host by IP addressSend to host by MAC address
47Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Address Resolution Protocol (ARP)Look-up MAC address by IP address (RFC 826)
Q: Who has IP = a.b.c.d ? (MAC layer broadcast)A: I am IP = a.b.c.d with MAC = u:v:w:x:y:z STAs store mappings in arp tableWindows / Linux arp –a prints arp table
ARP packet fields
Target protocol addressTPA
Target hardware address (ignored in requests)THA
Sender protocol addressSPA
Sender hardware addressSHA
1= request / 2 = replyOperation
Protocol length — length in octets of network addressPLEN
Hardware length — length in octets of MAC addressHLEN
Protocol type — network protocolPTYPE
Hardware type —MAC protocolHTYPE
48Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Example
STA‐1IP 207.2.45.7MAC 00:cd:ef:34:54:ab
Router‐AIP 207.2.45.1MAC ab:65:46:ad:98:fe
Router‐BIP 98.57.36.1MAC ab:65:46:54:23:12
STA‐2IP 98.57.36.32MAC 00:de:87:34:e5:b3
3
2
1
CRCTCP segmentSRC: 207.2.45.7
DST: 98.75.36.32
SRC: ab:65:46:54:23:12
DST: 00:de:87:34:e5:b3
CRCTCP segmentSRC: 207.2.45.7
DST: 98.75.36.32PPP
MAC Trailer
IP dataIP HeaderMAC Header
CRCTCP segmentSRC: 207.2.45.7
DST: 98.75.36.32
SRC: 00:cd:ef:34:54:ab
DST: ab:65:46:ad:98:fe
Frames between STA‐1 and STA‐2
1
2
3
49Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Advanced Switch / Router Interactions
Switch organizes STAs into LANIntra-LAN traffic
STAs use IP addresses as names for TCP/IP applicationsSTAs use ARP to translate IP to MAC addressSTAs send frames on LAN by MAC addressPackets contain MAC and IP address of local destination
Router organizes LAN into Internet ASInter-LAN traffic
STAs use IP addresses as names for TCP/IP applicationsLocal MAC addresses not available for remote STAs
STAs send frames via routerPackets contain
MAC address of router IP address of remote destination
Standard model
50Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Advanced Switch / Router Interactions
Standard subnetsubnet-1 and subnet-2 are LAN broadcast domains
Virtual LAN (VLAN)LAN switch configured to partition nodes into subnetsNo router needed for subnetting
Router Network
Subnet Subnet
Programmable Switch
Virtual LAN
51Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Advanced Switch / Router Interactions
Virtual Private Network (VPN)Private network implemented on public infrastructureAccess to private networks restricted by IPPossible encryption of data over public infrastructure
Internet
Private Network Private Network
Access Restricted by IP
Virtual Private Network
52Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Advanced Switch / Router Interactions
Standard IP model
Layer 3 switchingSwitched data link among routers
Connection-oriented virtual circuit networkFrame Relay, ATM, label switching, …
Traffic crosses router network at layer 2Saves time of layer 3 processingDatagram read / write, routing, TTLUsed for media streaming
Layer 3 Switching
Application TCP IP DL PHY
IP DL PHY
Application TCP IP DL PHY
IP DL PHY
IP DL PHY
IP DL PHY
Application TCP IP DL PHY
DL PHY
Application TCP IP DL PHY
DL PHY
DL PHY
DL PHY
53Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Advanced Switch / Router Interactions
Multiprotocol Label Switching (MPLS)
Header fieldsOne or more headers per frame — "stack" of labels
Connection-orientedSet (reserve) router path before data traffic beginsLabel Distribution Protocol (LDP)RSVP-TE — extension of Resource Reservation Protocol (RSVP)
MPLS-aware routersForward frames on preset route by label ID
Label switching
Data MAC trailerTCP HeaderIP HeaderMPLSMAC Header
8‐bit time to live fieldTTL1‐bit — if set, current label is last of "stack" of labels for frameStack flag3‐bit QoS (quality of service) fieldTraffic Class20‐bit IDLabel
54Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Tunneling in the OSI Model
NetworkLayer
(translation)
Data LinkLayer
(translation)
PhysicalLayer
(translation)
ApplicationLayer
PresentationLayer
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
Local PhysicalProtocol
ApplicationLayer
PresentationLayer
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
End-to-End Application Protocol
End-to-End Presentation Protocol
End-to-End Session Protocol
End-to-End Transport Protocol
Local NetworkProtocol
Local Data LinkProtocol
Local PhysicalProtocol
End User Intermediate System
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
Local SessionProtocol
Local TransportProtocol
Local NetworkProtocol
Local Data LinkProtocol
Host / Server
PhysicalLayer
Local NetworkProtocol
Local Data LinkProtocol
PhysicalLayer
(translation)
Proxy / Gateway
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
Local PhysicalProtocol
Local SessionProtocol
Local TransportProtocol
Local NetworkProtocol
Local Data LinkProtocol
55Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Small Office / Home Office (SOHO)LAN (Local Area Network) to WAN (Wide Area Network)
Ethernet
WiFi
ADSL
WiFi Access PointEthernet Switch
IP RouterADSL Modem
Cable‐based transmission protocol defined at PHY layerG.992.5ADSL
802.11
802.3
Wireless LAN protocol defined at DATA LINK and PHY layersWiFi
Cable‐based LAN protocol defined at DATA LINK and PHY layersEthernet
Internet
56Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Laptop Browser to Web Server — Simplified View
Access
IP
ADSL
WiFi Router
WiFi
IP
ADSL
Access
IP
ServerInternetLaptop
PHYPHY
Data LinkData LinkWiFi
IPIPIP
TCPTCP
HTTPHTTP
57Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
ADSL — Asymmetric Digital Subscriber LineHigh speed transmission on standard voice line
POTS — plain old telephone service24 Mbps downstream3.3 Mbps upstream
Ref: JDSU, ADSL Technology, JDS Uniphase Corporation, 2005
58Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
ADSL Access Network
Ref: Vodaphone, Wholesale Layer2 DSL (W‐DSL‐L2I), VTCW011 ‐ I 03/13
59Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Typical Bezeq ATU‐R
ADSL
33 MbpsIP
Routing802.3
Ethernet802.11WiFi
60Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Fast Internet Access
usermanagement
and IP datagramforwarding
IP datagramforwarding
Bezeq ISP
Internet routing
ADSL modem onpoint-to-point
channel
Server
IPnetwork
telephonenetwork
Client
switchedATM
network
61Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Fast Internet Protocols — Typical Campus CasePPP
Point to Point Protocol
Logon + connection management
PPPoE
PPP over Ethernet
Virtual point‐to‐point connection over shared LAN
Client opens private session with ISP
Client
Ethernet
802.3
PPPoE
PPP
IP
TCP
App
Router
802.3
PPPoE
PPP
62Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Fast Internet Protocols — Typical Campus CaseATM
Asynchronous Transfer Mode
Data Link protocol for broadband telephone services
Permits real time QoS
MPOA + AAL5
Adaptation protocols for ATM
ADSL
Physical bit transmission
Client
Ethernet
802.3
PPPoE
PPP
IP
TCP
App
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
Router
802.3
PPPoE
PPP
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
Bezeq
63Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Fast Internet Protocols — Typical Campus Case
Connection to ISP
Client runs Network Control Protocol (NCP) over PPP
CHAP (challenge handshake authentication protocol) —User Name + Password
ISP authorizes user and engages IP forwarding
Client
Ethernet
802.3
PPPoE
PPP
IP
TCP
App
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
Router
802.3
PPPoE
PPP
802.3802.3
PHY
PPPoE
ADSL
ATM
AAL5
MPOA
PPPoE
Bezeq
802.3
PHY
PPPoE
PPP
ISP
Connection to ISP
64Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Fast Internet Protocols — Typical Campus Case
IP forwarding
ISP forwards IP datagrams to server via Internet backbone
Client
Ethernet
802.3
PPPoE
PPP
IP
TCP
App
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
Router
802.3
PPPoE
PPP
802.3802.3
PHY
PPPoE
ADSL
ATM
AAL5
MPOA
PPPoE
Bezeq
802.3
PHY
PPP
IP
PHY
PPPoE
PPP
ISP
PHY
Server
PPP
IP
TCP
App
Connection to ISP
IP Routing
65Dr. Martin LandInfrastructure LayersComputer Networks — Hadassah College — Fall 2015
Fast Internet Protocols — Typical SOHO Case
Router/modem initiates connection to ISP
Runs NCP over PPP over PPPoE over Ethernet
Router provides always‐on Internet access over WiFi + Ethernet
Client
WiFi
802.11
IP
TCP
App
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
PPP
Router
WiFi
802.3802.3
PHY
PPPoE
ADSL
ATM
AAL5
MPOA
PPPoE
Bezeq
802.3
PHY
PPP
IP
PHY
PPPoE
PPP
ISP
PHY
Server
PPP
IP
TCP
App
Connection to ISP
IP Routing