Professional Documents
Culture Documents
Chapter 13
Chapter 13
Chapter 13
Fundamentals of Networking and
Network Protocols
General General
Colonel Colonel
Captain Captain
Sergeant Sergeant
Private Private
13.3.2 Internet Protocol Stack
Application Layer 5
Transport Layer 4
Network Layer 3
Link Layer 2
Physical Layer 1
13.3.2 Internet Protocol Stack
• Application: HTTP, SMTP, FTP, etc. Shield applications
using network from network details
• Transport: Breaks message into packets, handles things
like out of order packets, may deal with reliability
• Network: Responsible for routing, does best effort
delivery
• Link: Moves the packet using a protocol such as
Ethernet, Token Ring, and ATM
• Physical: Responsible for physically (electrically,
optically, etc.) moving the bits of the packet from one
node to the next.
13.3.2 Internet Protocol Stack
• Application: HTTP, SMTP, FTP, etc. Shield applications
using network from network details
• Transport: Breaks message into packets, handles things
like out of order packets, may deal with reliability
• Network: Responsible for routing, does best effort
delivery
• Link: Moves the packet using a protocol such as
Ethernet, Token Ring, and ATM
• Physical: Responsible for physically (electrically,
optically, etc.) moving the bits of the packet from one
node to the next.
13.3.2 Internet Protocol Stack
Manufacturers group their protocol software together into a
family and give it a nice name…
• Novell Corporation • Netware
• Banyan Systems • VINES
• Apple Computer • AppleTalk
• Digital Equipment • DECNET
• IBM • SNA
• “The Internet Biggie” • TCP/IP
13.3.2 Internet Protocol Stack
• Layer 5: Application-Sends application specific
messages
• Layer 4: Transport-Sends segments
• Layer 3: Network-Sends packets
• Layer 2: Datalink-Sends frames
• Layer 1: Physical-Sends bits
13.3.2 Internet Protocol Stack
13.4 Transport Layer
• Assume
– send (destination-address, message)
– receive (source-address, message)
• Functionality of transport layer
– Support arbitrary message size at the application
level
– Support in-order delivery of messages
– Shield the application from loss of messages
– Shield the application from bit errors in
transmission.
13.4 Transport Layer
13.4.1 Stop and wait protocols
• Simple approach
– Sender sends a packet and waits for a positive
acknowledgement, commonly referred to as an ACK.
– As soon as packet is received, recipient generates and
sends an ACK for that packet. ACK should contain
information for sender to discern unambiguously packet
being acknowledged. Sequence number is unique
signature of each packet. Thus, all that needs to be in ACK
packet is sequence number of received packet.
– Sender waits for a period of time called timeout. If within
this period, it does not hear an ACK, it re-transmits the
packet. Similarly, the destination may re-transmit the ACK,
if it receives the same packet again (an indication to the
receiver that his ACK was lost en route)
13.4.1 Stop and wait protocols
13.4.1 Stop and wait protocols
13.4.1 Stop and wait protocols
(a)
(b)
13.4.3 Reliable Pipelined Protocol
13.4.3 Reliable Pipelined Protocol
Increasing sequence numbers
Active window of
sequence numbers
Packets sent and acknowledged Packets sent but not yet acknowledged
Packets that are in the active window that can Packets that cannot yet be sent since they
be sent without waiting for any further ACKs are outside the active window
13.4.4 Dealing with transmission
errors
• Methods are needing to determine if packets
are being received correctly
• Examples
– Checksums
– Error Correcting Codes (ECC)
13.4.5 Transport protocols on the
Internet
Transport Features Pros Cons
protocol
TCP Connection- Reliable; messages Complexity in connection
oriented; self- arrive in order; well- setup and tear-down; at a
regulating; data behaved due to self- disadvantage when mixed
flow as stream; policing with unregulated flows; no
supports guarantees on delay or
windowing and transmission rate
ACKs
Telephone Number
24 bits 8 bits
IP Network Device
13.5.2 Internet Addressing
• Consider this 32 bit IP Address
– (10000000 00111101 00010111 11011000)2
• Convert each 8-bit octet into a decimal
number and separate each with a decimal
– 128.61.23.216
• In this address the first 24 bits are network
while the last 8 are the device
– 128.61.23.216/24
13.5.2 Internet Addressing
How many IP networks?
13.5.2 Internet Addressing
How many IP networks?
13.5.2 Internet Addressing
8 bits 24 bits
Device Device
16 bits 16 bits
IP Network Device
24 bits 8 bits
IP Network Device
13.5.3 Network Service Model
Circuit Switching
13.5.3 Network Service Model
MessageSwitching
13.5.3 Network Service Model
Packet Switching
13.5.4 Network Layer Summary
Network Definition/Use
Terminology
Circuit switching A network layer technology used in telephony. Reserves the network
resources (link bandwidth in all the links from source to destination) for the
duration of the call; no queuing or store-and-forward delays
TDM Time division multiplexing, a technique for supporting multiple channels on a
physical link used in telephony
FDM Frequency division multiplexing, also a technique for supporting multiple
channels on a physical link used in telephony
Packet switching A network layer technology used in wide area Internet. It supports best effort
delivery of packets from source to destination without reserving any network
resources en route.
Message switching Similar to packet switching but at the granularity of the whole message (at the
transport level) instead of packets.
Switch/Router A device that supports the network layer functionality. It may simply be a
computer with a number of network interfaces and adequate memory to serve
as input and output buffers.
Input buffers These are buffers associated with each input link to a switch for assembling
incoming packets.
Output buffers These are buffers associated with each outgoing link from a switch if in case
the link is busy.
Routing table This is table that gives the next hop to be used by this switch for an incoming
packet based on the destination address. The initial contents of the table as
well as periodic updates are a result of routing algorithms in use by the
network layer.
13.5.4 Network Layer Summary
Network Definition/Use
Terminology
Delays The delays experienced by packets in a packet-switched network
Store and This delay is due to the waiting time for the packet to be fully formed in the
forward input buffer before the switch can act on it.
Queuing This delay accounts for the waiting time experienced by a packet on either the
input or the output buffer before it is finally sent out on an outgoing link.
Packet loss This is due to the switch having to drop a packet due to either the input or the
output buffer being full and is indicative of traffic congestion on specific
routes of the network.
Service Model This is the contract between the network layer and the upper layers of the
protocol stack. Both the datagram and virtual circuit models used in packet-
switched networks provide best effort delivery of packets.
Virtual Circuit This model sets up a virtual circuit between the source and destination so that
(VC) individual packets may simply use this number instead of the destination
address. This also helps to simplify the routing decision a switch has to make
on an incoming packet.
Datagram This model does not need any call setup or tear down. Each packet is
independent of the others and the switch provides a best effort service model
to deliver it to the ultimate destination using information in its routing table.
13.6 Link Layer and Local Area
Networks
• Innovations in the link layer in the 70's led to
making the internet a household term
• Link layer is responsible for acquiring physical
medium for transmission, and sending packet
over the physical medium to destination host.
• Broad Classification
– Random Access: Example-Ethernet
– Taking Turns: Example-Token Ring
• Portion of protocol that deals with gaining access
to physical medium is called the Media Access
and Control (MAC) layer
13.6.1 Ethernet
No collision
Collision
Medium Detected
Idle
Listen for Transmit Abort
Need to Carrier Message Transmission
Transmit
Medium Transmission
Not Idle Complete
Terminologies
• Base band signaling
• Manchester encoding
• CSMA/CD
• CSMA/CA Joe Cindy Bala
– Hidden terminal problem
– RTS/CTS
• xBASEy
• Watch
– Triumph of the Nerds (PBS show)
13.6.1 Manchester Encoding
0 1 1 0 0 1 0 1 1
13.6.1 Ethernet
Protocol Protocol
S R
stack stack
msg
Tw Tf
13.9 Message transmission time
Sender Time on
Overhead the wire
Time of Receiver
Flight Overhead
13.10 Protocol Layering
• Layering is a structuring tool for combating complexity
of protocol stack
• Allows partitioning total responsibility for message
transmission and reception among various layers.
• Modularity allows integration of a new module at a
particular layer with minimal changes to the other
layers.
• It might appear that a potential downside to layering
might be a performance penalty, as the message has to
traverse several layers.
• Judicious definition of interfaces between layers avoids
such inefficiencies.
13.10.1 OSI Model
7 Application
• Presentation layer subsumes
user directed input/output
6 Presentation functionalities that are
common across different
5
Session applications.
Transport • Session layer maintains
4 process-to-process
Network communication details and
3
provides a higher-level
Data Link
abstraction between an
2 application and the
transport layer (e.g. Unix
Physical
socket).
1
13.10.2 Practical issues with layering
7 Application
6 Presentation
Telnet, FTP, etc. 5
Session
5
TCP 4
Transport
4
Network
IP 3
3
Data Link
Ethernet Card 2
2
Physical 1
Physical
1
13.11 Networking Hardware
• Hub/Repeater
Hub
13.11 Networking Hardware
• More Hubs
Hub Hub
Hub
Hub Hub
13.11 Networking Hardware
• Bridge
1 3
2 4
1 5
Switch Switch
2 6
4 8
3 7
13.11 Networking Hardware
• NIC
Header Payload
13.11 Networking Hardware
• Router
MAC address of router IP address of the destination Message
P1 P2
Socket
13.12.1 Unix Sockets
• Socket: create an endpoint of communication
• Bind: bind a socket to a name or an address
• Listen: listen for incoming connections on the socket
• Accept: accept an incoming connection request on a
socket
• Connect: send a connection request to a name (or
address) associated with a remote socket
• Recv: receive incoming data on a socket from a remote
peer
• Send: send data to a remote peer via a socket
13.13 Network Services and Higher
Level Protocols
P1
foo (args) P2
foo (args)
RPC
return
Host 1 Host 2
13.13 Network Services and Higher
Level Protocols
User
fopen
Network
13.15 Historical Perspective
• From Telephony to Computer Networking
• Evolution of the Internet
• PC and the arrival of LAN
• Evolution of LAN
13.15.1 From Telephony to Computer
Networking
• 1875 Telephone invented…analog system
• 1960 Telephone infrastructure goes digital
13.15.1 From Telephony to Computer
Networking
• 1940's Mainframe computers developed
• 1960's Transition
– Batch-oriented card-input/output
– CRT I/O and timesharing
13.15.1 From Telephony to Computer
Networking
Digital Data ?Missing Link?
Telephone
Telephone
Analog Data Analog Data
Infrastructure
Infrastructure
Telephone
Telephone
Analog Data Analog Data
Infrastructure
Infrastructure
MAU AMP
Thick
15 pin AUI Connector
Coaxial
(Vampire)
AUI Cable Tap
(50 meter max)
Ethernet
Interface
Computer
Terminator Terminator
BNC "T"
Connector
13.15.4 Evolution of LAN
• Fast Ethernet
– Move "ethernet" into the box
– 100baseT (T for twisted pair)
– RJ45 Connectors