0% found this document useful (0 votes)
28 views46 pages

EE250Unit2_NetworkBasics

Uploaded by

花海
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views46 pages

EE250Unit2_NetworkBasics

Uploaded by

花海
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

EE250 | Networking Basics | Unit 2 | 1

EE 250 Unit 2

Networks Overview and Layered Approach


Bhaskar Krishnamachari
Mark Redekopp
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 2

Introduction

• At the heart of IoT is networks


– To understand and frame our discussions we must have some basic
network understanding

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 |

NETWORKING OVERVIEW

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 4

Definitions
• What is a computer network?
– A set of devices (nodes) that can communicate with each
other over some form of communications channel
• Helpful definitions
– Medium: the material used to carry the signals or means of
transmission (wire, fiber, air)
– Channel: Link between devices (sometimes interchangeable
with medium)
– A node: A device able to receive and send data
– Half-duplex: Can only send or receive but not both at the
same time
– Full-duplex: Can send and receive at the same time

This Photo by Unknown Author is licensed under CC BY-SA


© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 5

Network Goals and Issues

• Goal of a network
– Efficiently communicate data from one device to
another
• Network metrics
– Throughput (Bandwidth): total bits per second that
can be transferred
– Latency: time it takes to deliver a message
– Reliability
– Energy-efficiency
– Others
• Jitter (variability of inter-arrival times), cost, distance,
availability, etc. This Photo by Unknown Author is licensed under CC BY-SA

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 |

6
https://www.visualcapitalist.com/paper-map-early-internet/

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 |

https://en.wikipedia.org/wiki/ARPANET
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 8

Thought Experiment
• Suppose we lived decades ago when networks were non-existent until we effectively
thought of them and wanted to create a web browser running on one machine and
communicate with a webserver on another via some common wired access point
• We hired some other USC engineers to develop the ENTIRE network solution from
software down to hardware as a single, monolithic solution to enable me to send
web requests and responses back and forth between the two machines over the
wired connections
• What might change that would make this monolithic solution a bad choice?
@app.route('/')
def index():
return render_template('index.html')

Access Point (AP) /


This Photo by Unknown Author is licensed under CC BY-SA
Switch This Photo by Unknown Author is licensed under CC BY-SA
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed. This Photo by Unknown Author is licensed under CC BY-SA
EE250 | Networking Basics | Unit 2 | 9

Network Challenges
• Q: To meet our goal (communicating information) and
Router
achieve specific metrics, what challenges and problems Network A
Hub
do we need to solve?
• Potential answers:
– Signaling: How should data be represented electronically (i.e. signaling)
when communicated over the medium? Internet
– Synchronization: How does the receiver know when I'm sending?
– Medium access: How do I share the medium with other devices?
Router
– Routing: How do I route data across multiple hops or entire networks?
– Security/Integrity: How do I ensure the integrity of the data I send?
– Interoperability: How do I interconnect different kinds of networks?
– Multiplexing: How do I share a single network connection on a system Network B
with multiple apps?

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 10

Network Layering
• To solve these issues in a modular way,
networks often follow a layered approach
– Each layer has well-defined responsibilities
and is intended to solve certain issues
(separation of concerns)
– Alternate implementations of a layer can be
swapped with minimal effect on neighboring
layers (TCP vs. UDP, 802.11x vs. wired
Ethernet)
• OSI model: 7 layer general template for
networks
– Not all layers must be implemented
• Internet model: 5 layer model
– Combines top 3 layers into "Application Layer" https://www.lifewire.com/layers-of-the-osi-model-illustrated-818017
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed. https://commons.wikimedia.org/wiki/File:Osi-model-7-layers.png
EE250 | Networking Basics | Unit 2 | 11

Internet Model
• Application
– Software application that uses the network capabilities
– Example: Browser (http), ssh, E-mail (smtp)
• Transport Messages Layer 5:
– Provides reliability (error-detection) and coordinates multiple applications Application
sharing access to the network through the use of "ports"
Logical Sharing / Layer 4:
– Example: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol)
Host-to-host Transport
• Network
– Provides network-to-network routing capabilities using logical address Layer 3:
End-to-end
– Example: IPv4 and IPv6 (Internet Protocol) Routing Network
• Data Link (Medium Access Layer) Single-hop Layer 2:
– HW/SW for transmitting a message one hop (just to the next node on the overall Delivery Data Link
route) using physical addresses Signaling of bits Layer 1:
– Example: Wired Ethernet 802.3, Wireless Ethernet 802.11, 802.15.x Zigbee, Physical
Bluetooth
• Physical
– Actual wire or wireless link/carrier
– Example: CAT 5 Wire, Radio-Frequency Wireless transmission
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 12

WHY IS THE INTERNET STILL AROUND?

Internet Applications
Application Layer Protocols
Hourglass
Architecture with a Transport Layer Protocols
Narrow Waist:
“Everything runs over Network Layer Protocols
IP and IP runs over
everything”

Link Layer Protocols

Physical Layer Protocols

https://www.linkedin.com/pulse/iot-connected-world-key-architectural-design-david-kuriakose-pmp
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 13

Internet Protocols: A Brief History

• 1969 - ARPANet - The 1822 protocol (implemented the physical, link, and network
layers)
• 1970 - ARPANet - NCP - Network control protocol
• 1970’s-1980’s: Telnet, FTP, SMTP, DNS
• 1970’s-1980’s - TCP and IP - Invented by Robert Kahn and Vint Cerf; Developed 1974-
1978, production version in 1983
• Late 1980’s - Full deployment of the TCP/IP Suite of Protocols, alternatives to
ARPANet created, such as NSFNet and commercial networks
• 1989 - Invention of the World Wide Web by Tim Berners-Lee
• 1990 ARPANet officially decommissioned

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 14

USC’s Networking History

• USC/USC-ISI either collaborated or was the source of the following


networking products and protocols
– TCP/IP
– SMTP
– DNS
– Kerberos
– PIM
– IPv6
– RSVP

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 15

USC Contributions to the Internet

• Jon Postel - joined USC’s Information Sciences Institute


in 1977:
• Editor of RFC’s: 1969-1998 ; Creator and administrator
of IANA
• Proposed and defined standards for Telnet (remote
login); MTP, then SMTP (E-mail); FTP (File-transfer)

• Paul Mockapetris - joined USC-ISI in 1978:


• Developed first SMTP Email Server
• Invented DNS
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 16

Other Internet Pioneers

Dr. Elizabeth Feinler operated the Network Information Center


and the host name registry for ARPANet at SRI (1972-1989)

Elise Gerich was involved in the


deployment of NSFNet which became
the model for commercial Internet; and its
migration to a high-speed T3 backbone;
co-founder of NANOG - the first network
operator’s group; 2010-2016 head of IANA

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 |

Let's build up reasoning for why we need each layer…

WHAT AND WHY OF THE LAYERS

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 18

PHY Layer

CC BY-NC-ND
CC BY-SA

CC BY-SA
CC BY-SA
CC BY
Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
• Two devices can directly communicate with each other via physical signaling (e.g.
RS-232 serial from EE 109)
• May use various physical mediums (wireless, fiber, etc.) and signaling techniques

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
• But what if we want to add more devices to the respective networks?
– How would devices know who information is intended for?

Client Client Server


Client

PHY PHY PHY PHY


802.11 Wireless Ethernet
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 19

MAC Layer & Physical Addressing

CC BY-NC-ND
CC BY-SA

CC BY-SA
CC BY-SA
CC BY
Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
• The MAC layer adds ability for multiple devices to share a common
communications medium/channel
• It also adds physical addressing (specific to the hardware device) to identify each

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
network interface
Access Point (AP) /
Switch

Switch
A Client B C Client Router Client Server

K Client Client

Phys. Addr MAC A MAC B MAC C MAC D MAC MAC F

PHY PHY PHY PHY PHY PHY


802.11 Wireless Ethernet
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 20

Network Layer & Logical Addressing

• The network layer allows for inter-network communication


– Because networks may use different MAC/PHY layers, the network layer specifies logical
addressed (e.g. IP addresses)
• It also adds routing capabilities to direct packets to their destination using
devices known as routers
Access Point (AP) /

CC BY-NC-ND
Switch

CC BY-SA

CC BY-SA
CC BY-SA
CC BY
Switch
Client Client

Author is licensed under


Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
Router Client Server

NET NET NET NET NET NET NET

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
Logical Addr 1 2 3 7 8 4 6

Phys. Addr MAC A MAC B MAC C G MAC MAC H MAC D MAC MAC F

PHY PHY PHY PHY PHY PHY PHY PHY


© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
802.11 Wireless Ethernet
EE250 | Networking Basics | Unit 2 | 21

Logical vs. Physical Addressing

• We can replace a device on the network


• It would have a different hardware / physical address
• But it can retain the same logical address
• Example: Buying a new phone (you can keep your phone number which is a logical address)
NET 3
Access Point (AP) /
Switch MAC J

CC BY-NC-ND
PHY Switch

CC BY-SA

CC BY-SA
CC BY-SA
CC BY
Client Client Router Client Server

Author is licensed under


Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
Logical Addr NET 1 NET 2 NET 3 7 NET NET 8 NET 4 NET 6

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
Phys. Addr MAC A MAC B MAC C G MAC MAC H MAC D MAC MAC F

PHY PHY PHY PHY PHY PHY PHY PHY


802.11 Wireless Ethernet
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 22

Transport and Application Layer


• The transport layer allows multiple applications on the same machine to access the
network and separates their data (via ports)
• The application layer is the end-application that communicates data (web browser,
email client, etc.)
Access Point (AP) /
Switch

Author is licensed under CC BY-NC-ND


Author is licensed under CC BY-SA

Author is licensed under CC BY-SA


Author is licensed under CC BY-SA
Switch

Author is licensed under CC BY


Client Client Router Client Server
APP APP

TRPT TRPT

Logical Addr NET 1 NET 2 NET 3 7 NET NET 8 NET 4 NET 6

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
Phys. Addr MAC A MAC B MAC C G MAC MAC H MAC D MAC MAC F

PHY PHY PHY PHY PHY PHY PHY PHY


802.11 Wireless Ethernet
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 23

Abstraction & Encapsulation


• Each layer is abstracted from neighboring layers
– Treats the data from the previous layer as opaque (need not know its content nor its organization…just a
sequence of bytes)
– On transmission, each layer takes data from the previous layer and adds its own control information (i.e. a
header or footer)
– On receipt, each layer removes its header/footer info

Message Application Message

TCP TCP
Header
App. Data Transport Header
App. Data

IP IP
Header
Transport Data Network Header
Transport Data

Ethernet Ethernet
Header
Network Data Data Link Header
Network Data

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed. Physical Link
EE250 | Networking Basics | Unit 2 | 24

Layers and Routing


• Application and transport layers generally only run on endpoints / nodes
• Network (IP) layer may inspect packets for dest. address to determine
routing
• Data link layer strips incoming header and replaces it with outgoing header

CC BY-NC-ND
CC BY-SA

CC BY-SA
CC BY-SA
CC BY
Client Server

Author is licensed under


Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
Access
Application Switch Application
Point (AP)
Transport / Switch Router Router Transport
Network Network Network Network

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
Data Link DL DL DL DL DL DL DL Data Link
Physical PHY PHY PHY PHY PHY PHY PHY Physical
Wireless Ethernet Fiber Ethernet Ethernet
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 25

Fragmentation
• As an idea that captures the benefit and working of encapsulation, any layer can
FRAGMENT the message it receives from an upper layer and send each fragment as
an INDEPENDENT message and possibly take different routes through the network
• Each layer below the fragmenting layer sees INDEPENDENT messages
• Upon receipt of the independent messages, the fragmenting layer on the receiver
can REASSEMBLE them into a single message and pass it up to the higher layer as if
nothing happened.

CC BY-NC-ND
CC BY-SA

CC BY-SA
CC BY-SA
CC BY
Client Server

Author is licensed under


Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
Access
Application Switch Application
Point (AP)
Transport / Switch Router Transport

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
Network Network Network
Data Link DL DL DL DL DL Data Link
Physical PHY PHY PHY PHY PHY Physical
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
Wireless Ethernet Ethernet Ethernet
EE250 | Networking Basics | Unit 2 |

A BRIEF TOUR THROUGH THE LAYERS

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 27

Protocols

• (Def.) Rules by which two or more systems interact


• Protocols may specify…
– Rules to access a shared communication link

– Define legal states and modes

– Rules for the format of data so that receivers know how to interpret
what they receive
• Networks are full of protocols so get ready!

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 28

Layer 1 & 2 Example: Ethernet


Messages Layer 5:
• Wired communication on a LAN (Local Area Network) Application
• Ethernet (aka IEEE 802.3x) specifies both Layer 1 (PHY) and Layer 2 Logical Layer 4:
(Data Link) for speeds of 10Mbps, 100Mbps, 1Gbps, 10Gbps, … Sharing / Transport
• Layer 1 (PHY) layer specifies signaling: Host-to-host
End-to-end Layer 3:
– Ex. 1000-BaseT some form of Pulse Amplitude Modulation (PAM) Network
where multi-bit symbols are sent as various voltages over a wire Routing
Single-hop Layer 2:
– Example: Physical interface can send -2V, -1V, 0V, +1V, +2V
Delivery Data Link
onto which we map 2-bit values: 00, 01, 10, 11, unused (can
be for reliability or other purposes) Signaling of Layer 1:
bits Physical
• Layer 2 (Data-Link Layer)
– Handles medium access (shared access to the wire) via medium
access protocols
– Transfers "frames" of data

+2
+1
+1

0
– Specifies physical addresses to indicate source and destination

-1
-2
computers
11 00 01 11 - 10

time
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 29

Historical Ethernet Physical Topologies


• Legacy (early and now outdated) Ethernet networks used shared mediums
• 802.2 Coax Cable
– Truly shared medium
– All computers connected to same wire
– Half Duplex Transmission – can only send one direction at a time (otherwise, collision)
• 802.3i Twisted Pair
– Capable of full duplex transmission (Separate Receive (Rx) and Transmit (Tx) wire pairs)
– Cables connect to hub that broadcasts transmissions on any port to all others
– Effect: Independent wires function as a single, shared medium = Half-Duplex!

Hub

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
This Photo by Unknown Author is licensed under CC BY-SA
EE250 | Networking Basics | Unit 2 |

Legacy Ethernet: CSMA/CD


• On a half-duplex link, collisions can occur and thus a protocol is
needed to share the channel
• Carrier-Sense, Multiple Access / Collision Detection
– On a shared link, only one computer can transmit at once (think
multiple people speaking on the phone at the same time)
– Collisions occur if two transmissions occur at the same time

Algorithm
1. Wait for data to transmit
2. if (someone is already transmitting)
Wait until transmission is complete
3. Begin your transmission and while
transmitting, listen for collision
4. if (collision)
wait for a random "backoff" time and start
again (go back to step 2)
5. Done
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 31

Ethernet Frame Structure


• Ethernet (Physical or MAC) Address
– 48-bit Physical Source and Destination Address
– Example: 00:0A:9D:4E:1B:37
• Ethertype
– ID’s which network layer protocol is being used (IP, ICMP, etc.)
• Data payload
– Min. 46 bytes (octets) / Max. 1500 bytes
– Can you think of why there is a:
• Minimum size: Send long enough to ensure any collision will be heard by all
• Maximum size: Ensure no monopolization, reduce probability of transmission error, etc.
• FCS (Frame Check Sequence)
– Basic Error Detection
6 Bytes 6 Bytes 2 Bytes 46-1500 Octets 4 Bytes
Dst. Src.
Addr. Addr.
Ethertype Payload FCS

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 32

Switched Ethernet
• Switches replaced hubs
– Provides full-duplex connections
• Switch learns what address is attached to each port.
Can you guess how?
– By looking at the source address of incoming frames on that
port
• Incoming traffic is forwarded only to the appropriate
output port
Switch
• Allows multiple, simultaneous connections
• Allows full duplex transmission - two way
communication (send and receive at the same time)
• Only broadcasts if address not known
• Removes need for CSMA/CD but requires flow control
(i.e. method for receiver to tell transmitter to slow
down/stop)

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 33

IP (Internet Protocol)
• Layer 3 (Network layer) implementation
• Focused on logical organization of networks
– Deals with issues of connecting different, separately owned networks
• Assigns logical addresses not tied to specific hardware
– Different than physical address
– Your phone number is not tied to 1 phone but can be transferred to a new
hardware device, so logical addresses are not fixed to a device
– Range of contiguous addresses assigned to logical group of computers (a
department of a business, all of USC computers, etc.)
• Deals with routing messages
– Finding an (efficient) path from the source to the destination (potentially across
the globe)
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 34

Internet Diagram
128.125.32.74
• IP is required since different networks
may use different data-link layers 128.125.225.254
Router
• IP addresses are broken into Network A
Switch
network/host sections
– Example: 128.125 identifies USC's network,
while the last two numbers identify a 128.125.100.58
particular host/node
Internet
• Routers are devices used to route
messages from one network to the Router
other
• Intelligent routing can be performed on
messages by looking at the network
portion of the address AP Network B

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
164.16.82.133
EE250 | Networking Basics | Unit 2 | 35

IPv4 vs. IPv6 Addresses


• IPv4 = 32-bit addresses
– Each byte converted to decimal equivalent
• Humans use dotted decimal notation (e.g. 192.168.0.1)
– How many IP addresses are available? 232 (4 billion)
– IP Addresses can be statically assigned (IP address is "semi-permanently" assigned) or
dynamically assigned when a system comes online (DHCP)
– One IP address can be shared by many computers using NAT (Network Address Translation)
• Similar to your wireless router
• IPv6 = 128-bit addresses
– Written as eight (8) 16-bit hex values fe80:0:0:0:3d2a:2fb2:bdd6:d92a

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 36

IPv4 Packet
• Data from upper layers is encapsulated
into a "packet" then an IP header is Byte0 Byte1 Byte2 Byte3

appended Version+ IHL Type of Service Total Length

• Total Length Field Identification

Time to Live Protocol


Flags and Fragment Offset

Header Checksum

– Indicates length of packet Source IP Address

• Time to Live (TTL) Destination IP Address

Options Padding

– Indicates how many hops (router to


router) are allowed before packet is Message Data

dropped
• Source and Dest. IP Address IP Packet Format
– Identify original sender and final
destination

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 37

IP Routing
• Only involves the network layer down
• Destination IP address is examined by routers to find the next hop that
will hopefully get the message closer to the destination
• Data-link (physical) address is changed to the next hop of the route
• Demo: tracert (trace route)

IP: 164.16.82.133
MAC: E

Author is licensed under CC BY-NC-ND


IP: ... IP: 128.125.100.58

Author is licensed under CC BY-SA

Author is licensed under CC BY-SA


Author is licensed under CC BY-SA
MAC: B IP: ... IP: ... MAC: E

Author is licensed under CC BY


Client MAC: C MAC: D
Server
Access
Application Switch Application
Point (AP)
Transport / Switch Router Router Transport
128.125.100.58 128.125.100.58 128.125.100.58
Network NET Network Network Network

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
Data Link DL DL DL DL Data Link DL Data Link
MAC: B MAC: C MAC: D MAC: E MAC: E
Physical PHY PHY PHY PHY Physical PHY Physical
Wireless Ethernet Fiber Ethernet
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 38

Transport Layers

• Layer 4 Implementations
• Handle end-to-end communication issues
– Multiplexing multiple applications over single network interface (via "ports")
– Reliability
– Reordering
– Flow Control, Congestion Control
• Examples:
– TCP (Transmission Control Protocol)
– UDP (User Datagram Protocol)

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 39

Ports
• Ports allow us to share/multiplex a single network connection
between several applications
• Analogy:
– IP address = Building address (Same for all apartments)
– Port = Separate mailbox for each apartment This Photo by Unknown Author is licensed under CC BY-NC-ND

Web Browser ssh E-mail Layer 5:


Messages
Application
Logical Sharing / Layer 4:
Port 80 Port 22 Port 25 Host-to-host Transport
Layer 3:
End-to-end
Interface

Host Machine
Network

Routing Network
Single-hop Layer 2:
Delivery Data Link
Signaling of bits Layer 1:
Physical
Communications
Links
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed. Internet Model
EE250 | Networking Basics | Unit 2 |

Ports
Application Port
• Act as endpoints for messages at a destination HTTP 80
– A Web server will "listen" on port 80 HTTPS 443
– A Web browser will create its own port and send a IMAP 143
message to the server at port 80 requesting a page
SSH/SFTP 22
– The listening web server gets the request, processes it,
and returns the page to the source port specified in the Port
Description
message Range
– The web browser will get the page and display it Well-known ports for
common protocols;
• For common protocols (TCP/UDP) port numbers Requires superuser
0-1023
are 16-bits (0 – 65535) privilege to bind to these
ports; Don't use these
– Ports are broken into ranges where some numbers are for your own apps.
dedicated (i.e. http = 80)
New protocols can
– Others are for temporary use 1024-
apply for a port in this
– Windows: netstat -a -b (Run as admin) 49151
range.
49152- Dynamic/Ephemeral
See: https://en.wikipedia.org/wiki/Registered_port
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
65535 ports
EE250 | Networking Basics | Unit 2 | 41

Wireshark Demo

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 42

Learning More

• We will learn more about some of these layers as we progress through


the course
• If you are interested in learning more about these concepts, EE 450 (or
CSCI 353) will delve into many of the details of layer 2 through 5

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 |

BACKUP ILLUSTRATIONS

© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
EE250 | Networking Basics | Unit 2 | 44

Layers and Routing

CC BY-NC-ND
CC BY-SA

CC BY-SA
CC BY-SA
CC BY
Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
• Application and transport layers
generally only run on endpoints / nodes
• Network (IP) layer may inspect packets

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
for dest. address to determine routing
• Data link layer strips incoming header
and replaces it with outgoing header

Client Server
Access
Application Switch Application
Point (AP)
Transport / Switch Router Router Transport
Network Network Network Network
Data Link DL DL DL DL DL DL DL Data Link
Physical PHY PHY PHY PHY PHY PHY PHY Physical
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
Wireless Ethernet Fiber Ethernet Ethernet
EE250 | Networking Basics | Unit 2 | 45

Another View of Routing

CC BY-NC-ND
CC BY-SA

CC BY-SA
CC BY-SA
CC BY
Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
Author is licensed under
• The original data from the application and transport layer is not
modified during transmission
• The network layer's logical address (final destination) is inspected

This Photo by Unknown


This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
This Photo by Unknown
and used by routers to determine the next physical hop (physical
address)
• The MAC layer (physical address) is replaced based on the next hop
Access Point (AP) /
Switch

Switch
Client Client Router Client Server
APP APP

TRPT TRPT
6 6
NET 1 NET 3 7 NET NET 8 NET 4 NET 6

B,G MAC MAC MAC MAC MAC MAC


A B,G
B C G MAC MAC H D F

6
PHY PHY PHY PHY PHY PHY PHY
F PHY
B,G 6
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. This content is protected and may not be shared, uploaded, or distributed.
802.11 Wireless 6 Ethernet
EE250 | Networking Basics | Unit 2 | 46

Internet Layered Approach


• Internet model – 5 layer model
Router 1,2
Network A
3 Switch 4
Messages Layer 5:
1,2
Application 5
Software
3
Logical Sharing / Layer 4: (TCP/IP Stack 1,2
Host-to-host Transport part of OS)
3 Internet
Layer 3:
End-to-end Hardware
Routing Network
(Ethernet) Router
Single-hop Layer 2:
Delivery Data Link
Layer 1:
1,2
Signaling of bits
Physical
Network B
Internet Model 3 4
1,2
This Photo by Unknown Author is licensed under CC BY-SA
ThisThis
© 2024 by Mark Redekopp and Bhaskar Krishnamachari. Photo byis Unknown
content Author
protected and may not be is licensed
shared, under
uploaded, CC BY-SA
or distributed.
5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy