Distributed
Information
Systems
LECTURE 9 – NETWORKING BASICS: OSI MODEL
B A S E D O N AG RAWA L A N D S H A R M A , P R O S P E C T P R E S S
Agenda
1. Networking overview
2. Physical layer
3. Data link layer
4. Network layer
5. Transport layer
6. Application layer
7. Wide area networks
2
1. Networking overview
• Definition
• Utility of computer networking
• Technology milestones
• Packetization
• Layering
• TCP/ IP model
• OSI model
• Principles of Internet protocols
3
Typical data network
Unique features of
computer networks
• Common set of technologies support all networked computer
applications
◦ Email, IM, browsing, client-server etc
◦ Therefore, any laptop can perform all these functions
6
Packetization overview
• Packetization is
◦ breaking down user data into small segments
◦ packaging these segments appropriately so that they can be delivered and
reassembled across the network
7
Packets analogy
Packetization in retail
Traffic aggregation
Advantages of
packetization
• Communication link costs are now very high relative to switching costs
◦ Efficient utilization of communication links is more important than
conserving computation effort
◦ Dedicated computers can be used as routers
• Ease of transport
11
Layering
• Arranging functionality in a hierarchical manner, such that
◦ lower layers provide functions and services that support the functions and
services of higher layers
12
Layering examples
• Example (software)
◦ Similarly, computer applications
delegate many tasks to operating
systems, which further delegate
tasks to drivers for execution
13
Advantages of layering
• Specializes technology development
• Separation of functionality
◦ Simplification in upgrades
◦ Change from IPv4 to IPv6 does not require change in email clients or
browsers
14
Layering in data
communication
Typical packet structure
• Five important datacomm tasks
◦ User needs (e.g. get web page, web page body)
◦ Segmentation and reassembly
◦ Identifying and locating destination
◦ Error control
◦ Signaling - Converting data into a form suitable for transmission over wires
16
Typical packet structure
• These and other related datacomm tasks are accomplished by adding
additional required information to information packets
◦ Packet header
◦ Organized in a layered structure
◦ Routers and end stations use this header information to handle packets
appropriately
17
Important header
information
Networking task Header information
Signaling None
Typical packet structure
• A typical packet contains
◦ Information sent from the layers above
◦ and
◦ Additional information (called headers) specific to the functions of each layer
◦ At a high level, looks like this:
19
5-layered TCP/ IP stack
• Modern computer networks implement layering in 5 layers
• Called the TCP/ IP stack
◦ After the core set of technologies
◦ TCP
◦ IP
20
Layer names and tasks
Layer Layer name Networking task Header information
number
5 Application Specify user needs User commands
• Multiple applications could use the Internet, including those not yet
conceived
– This translates to multiple applications using the same TCP/ IP services for
connectivity
22
Principles of Internet
protocols
• Standardized message block to serve any application
-- Baran 1964
◦ Simplifies design of network equipment
◦ All network traffic can be processed in a cookie-cutter manner by routers,
irrespective of application
23
TCP/ IP technologies by
layer
24
A typical computer network
25
Standards reference
• Internet technology standards are publicly available as
Requests For Comment (RFCs)
◦ http://www.ietf.org/rfc.html
26
2. Physical layer
• Functions of the Physical Layer
• Physical media and their properties
• Signals and their properties
• Importance of binary signals
• Signal representation of data
• Multiplexing
27
Physical layer service
definition
• Provide transparent transmission of a bit stream over a circuit built
from some physical communications medium
• ATIS Telecom glossary
◦ http://www.atis.org/glossary/default.aspx
◦ Earlier versions
◦ Federal Standard 1037C
◦ http://www.its.bldrdoc.gov/fs-1037
◦ ANS T1.523-2001, Telecom Glossary 2000
◦ http://www.atis.org/tg2k/
28
The need for signals
• Data cannot be transmitted
◦ E.g. How will you send a word document over a long distance?
30
Special feature of the
Physical Layer
• Physical layer interacts with nature
– Layer where we are at the mercy of nature
– Depend upon wires, optical fibers or air to transmit signals
• Signal transmitting properties of chosen media are important
• Signals generated by physical layer comply with properties of the medium
• E.g. voltages with copper, light with fiber
31
Physical media and
their properties
• The physical medium is the transmission path along which a signal
propagates
– e.g.: a wire pair, coaxial cable, optical fiber, radio path
• Media are chosen for their special properties that enable efficient
transmission (movement) of signals
– e.g.: most plastics cannot be used as physical media because they do not
efficiently conduct electricity, light, heat or other forms of energy
– Common media are copper wire and optical fiber
32
Copper wire as physical
medium
• Copper is a very good conductor of electricity and is relatively
abundantly available
33
Categories of UTP
cables
Cat 3 cable
Cat 5 cable
34
Cable connectors
• Cat5e cables end in RJ 45 connectors
Conductor identification Color code Use
Pair 1 White-Blue/ Blue -
Pair 2 White-Orange/ Orange Transmit data
Pair 3 White-Green/ Green Receive data
Pair 4 White-Brown/ Brown -
35
Optical fiber as physical
medium
• Optical fiber is a thin strand of glass that guides light along its length
◦ Can carry large volumes of data over long distances
◦ Weighs much less than copper
◦ Hence dominant in long distance communications
38
Data vs. Signals
• Data:
◦ Representation of facts in a formalized manner suitable for
communication, interpretation, or processing by humans or by
automatic means
◦ e.g.: thoughts in humans or numbers in computer spreadsheets
• Signal:
◦ Detectable transmitted energy that can be used to carry information or
◦ A time-dependent variation of a characteristic of a physical
phenomenon, used to convey information
◦ e.g.: voice in humans or wire voltage in computer networks
39
Impact of noise on
signals
Transmitted signal Received signal
Signal value
Signal value
24 24
• The received signal can get seriously affected by noise. The receiver has to be
able to interpret the result correctly for reliable data transmission
40
Need for binary signals
• Computer systems use binary 2-level signal transmitted
representation for all data
◦ Helps reliable reception in the
Signal value
presence of noise 24
Data = 0
3-levelData
signal
=1
transmitted
Data = 2 Data = 0
Signal value
24
Bit period
41
Binary signals 2-level signal + noise
• Detection rule for 2 level signal
(binary)
◦ If amplitude < first gridline,
Signal value
data = 0 24
else data = 1
• Detection rule for 3 level signal
(ternary) Bit period
◦ If amplitude < first gridline,
3-level signal + noise
data = 0
else if amplitude between 2 gridlines
data = 1
Signal value
else data = 2
24
• Clearly ternary systems are
more prone to errors
Bit period
42
Shannon’s theorem (not
for tests)
• How much data can you send over a medium?
◦ Defined by the Shannon-Hartley theorem
• Phone line
◦ Sends signals in frequency range 0Hz – 3,400 Hz
◦ Bandwidth = 3,400 – 0 = 3,400 Hz
Signaling
• Sending data as signals
• Consider sending the word “Hello”
• How to send letters h, e, l, l, o on the wire
◦ Sender side
◦ Step 1: Encode letters as binary numbers
◦ Step 2: Modulate carrier signal with binary numbers
◦ Receiver side
◦ Step 3: Demodulate signal into binary numbers
◦ Step 4: Decode binary numbers as letters
45
ASCII code for binary
representation of data
• Standard method to convert characters to binary is ASCII code
◦ Numbers 0-127 represent common characters
◦ http://www.asciitable.com
◦ Decimal to binary conversion shown later (with IP addresses), just accept for
now
46
Unicode
• Used to represent characters in almost all languages
◦ Including over 75,000 Chinese characters
0 0 0 1 h e l l o
48
Receiver operation
• The receiver keeps track of bit periods
◦ If a wave is received during the bit period, it is interpreted as 1, otherwise 0
51
Functions of the Data-
Link layer
• ATIS Telecom glossary 2007
◦ Transfer data between devices on the same network
◦ Detect and possibly correct errors that may occur in the Physical Layer
52
Ethernet
• Most common data link layer technology for end users
• Patented in 1977
◦ But, basis of current end user networks
◦ Easily understood
54
Ethernet operation
• A typical end-user network looks like this:
55
Packet in the medium
56
Ethernet data transmission
• When PC A wants to send data to PC B, it first adds B’s address before
the data
◦ Like putting a letter in an envelope and putting a To: address on top
◦ This is our first example of packetizing
57
Broadcast in Ethernet
• Signal is transmitted to all stations connected to the wire
– Ethernet operation is based on broadcast
– Signal is transmitted to all stations connected to the wire
– All computers on the network get the packet
– But only B opens it
• Note that the receipt process is different from the mail system
– Ethernet packets go to every computer on the network
– But mail only goes to the intended receiver
58
Packet receipt in Ethernet
59
Ethernet data reception
• In broadcast, the network does not direct the packet to its correct
destination
– Instead, the packet is simply sent to every computer on the network
• Packet is sure to reach its destination
• Greatly simplifies the technology
• But increases the processing load on each computer on the network
– So, Ethernet cannot be indefinitely large
60
CSMA/ CD - collision
• What if multiple senders want to send data at the same time?
• The outcome is called a collision
• The solution to this problem is called
Carrier Sense Multiple Access with Collision Detection (CSMA/ CD)
61
CSMA/ CD - collision
62
CSMA/ CD esentials
• Senders send only when they sense that the medium is silent
◦ All clear; no other computing is sending data
63
Error detection
• As the packet moves from source to destination, it can get errors
◦ Just as cars can get flat tires from driving
64
Error correction in human
communication
• Some human error-correction techniques
◦ Receiver reads back on telephone
◦ credit card number, phone number etc.
◦ Not reliable in computer networks because of possible error-cancellation
◦ Redundant data
◦ Don’t just say tomorrow
◦ Say tomorrow, Thursday, Nov. 16, 2000
◦ Sender contact information
◦ For clarification if necessary
65
Error correction in computer
communication
• The general approach to error detection in data communications is to
add some meta-data to the original data
◦ The meta-data is generated from the data itself
◦ The receiver can re-compute the meta-data and compare the result with the
meta-data sent by the sender
66
Ethernet frames with
CRC
67
Ethernet frame
structure
• Previous sections show destination address and CRC fields in Ethernet
• Other information also necessary
– E.g.
• source address – destination for replies
• start of frame – alert receiver about packet arrival
• frame length – inform receiver about packet end
68
Ethernet frame structure
69
Ethernet fields
• Preamble: Allows receiver to synchronize with sender
◦ 10101010 10101010 10101010 10101010 10101010 10101010 10101010
◦ Bit pattern produces a periodic waveform in the medium when encoded by
the physical layer using Manchester encoding
70
Ethernet fields
• Address
◦ 48 bits in length
◦ All 1’s in the destination address is pre-defined to be the broadcast address
on the LAN
◦ Addresses may be universally administered
◦ Assigned by manufacturer
◦ http://standards.ieee.org/faqs/OUI.html
◦ Or locally administered
◦ Assigned by network administrator
71
Ethernet address
representation
72
Ethernet address
• Address
73
Ethernet address
representation
• Hexadecimal notation
◦ Address broken up into 12 4-bit blocks
◦ Each 4-bit block is represented as a hexadecimal digit 0-f
74
Ethernet address
representation
• Example Note: Globally unique
0000 0000 0001 0101 1100 0101 0101 0111 0001 1101 0001 1010
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
0 0 1 5 c 5 5 7 1 d 1 a
75
Switched Ethernet -
state of the market
• Hubs vs. switches
• Hubs send data out to all computers
– Old technology, but useful for network diagnostics
• Switches only send the data to the intended destination
– This speeds up the network, at extremely low cost
– The map of computers connected to each port is called the forwarding table
– forwarding table of the switch is initially empty
– By reading the source addresses of incoming frames, switches learn the addresses of the
computers connected to each port
76
From Ethernet to the outside
world
77
Next chapter
• Ethernet can reliably send data between computers on one network
• To get bigger networks, we connect networks together
• The network layer figures out how to find the correct path from source
to destination through these networks
◦ Without broadcasting
◦ Called point-to-point
Summary
• Why broadcast?
• Why CSMA/ CD?
• Why CRC?
• Why Switches over hubs?
79
4. Network layer
• Functions of network layer
• Internet protocol (IP)
• IP Header
• IP Addresses
• CIDR notation
• Obtaining IP addresses
• IP version 6
80
Functions of the
Network layer
• Transfer variable length data packets from a source network to a
destination network via one or more networks
◦ Can optionally maintain different qualities of service
81
Functions of the
Network layer
82
Routing and road trips
• Consider a long distance road trip
• The source and final destination are like network layer addresses
84
IP packet within data
link frame
IP Header
86
IP Addresses
• An address is a unique label that helps locate an entity on a network
• 32-bit values in source and destination address fields
• Every communication interface on every computer on the Internet has
an IP address
• Unlike MAC (Ethernet) addresses, IP addresses are assigned by
network administrators
◦ Provides flexibility in addressing
87
Binary numbers
overview
• Binary numbers are extremely important in data communications
◦ IP addresses use binary numbers
88
Using binary numbers
• The most important use of binary numbers in this class is to assign
computer addresses
◦ In this chapter, we focus on assigning computers with a unique label
◦ Using the label to locate the device is covered in the chapters on subnetting and routing
◦ You should be able to determine the maximum number of addresses
possible given the number of binary digits (bits) available for labeling/
addressing
89
Binary numbers as
labels
Bits Labels Number of Formula for
labels label count
1 0, 1 ID: 0 ID: 1
2 21
90
Converting from decimal to
binary
•Used to compute subnet sizes, broadcast addresses etc.
– You should be comfortable with binary numbers with up to 8 digits
•One technique is to fill-in-the-blanks
– Start with template below
– Place 1 in the leftmost-possible position
– Subtract place-value and repeat until subtraction yields 0
128 64 32 16 8 4 2 1
91
Place values
3 5 8 Digit
100 10 1 Decimal (Base 10)
Place value
(102) (101) (100)
1 0 1 Digit
4 2 1 Binary (Base 2)
Place value
(22) (21) (20)
Converting from decimal to
binary
e.g.: 13310
◦ 128 is less than 133
◦ Hence place 1 over 128, remainder is 133 – 128 = 5
1
128 64 32 16 8 4 2 1
94
Converting from binary to
decimal
• Use the same template as before
• Add the place values corresponding to the
locations that have 1 in the number
• E.g.: 111000112
1 1 1 0 0 0 1 1
128 64 32 16 8 4 2 1
1 0 0 1 1 0 1 1
128 64 32 16 8 4 2 1
97
Dotted decimal notation
• IP addresses are written in dotted decimal notation
◦ 32 bit addresses broken into 4 blocks of 8 bits each
◦ Each block converted to decimal representation
◦ Decimals are separated by dots
◦ E.g.. 192.168.1.5
98
IP Addresses (dotted decimal
notation)
• Examples
99
IP addresses – structure
• IP addresses are not assigned at random like MAC addresses
– Or even on first-come-first-serve basis
• IP addresses have a structure
– Split into network part and host part
• The first few address bits define the organization to which the address
belongs
– Remaining bits are unique to the computer (host) within the organization
100
IP Addresses - structure
• Network part identifies the network (autonomous
system) to which the address belongs
◦ Most commonly associated with telecom carriers
◦ Also, with large organizations such as state universities
• Host part identifies the host within the network
• Host part is generally broken further into subnets
◦ Subnet ID
◦ Host ID
◦ Covered in subnetting chapter
101
IP addresses - structure
• Quite analogous to street
addresses
◦ Home address identifies network as
well as host
◦ Street name analogous to network
part of IP address
◦ Home number analogous to host
part of IP address
IP addresses – structure
• This is similar to phone numbers
– 1 (813) 974 - 6716
– NA Tampa USF Office
103
IP addresses – structure
• Or zip codes
◦ 3 36 47
◦ State group Region Delivery address (PO)
• Visualization at http://benfry.com/zipdecode
104
Special IP Addresses
• 255.255.255.255
◦ Broadcast on local network to which the host is connected
• 0.0.0.0
◦ Default route
• 127.0.0.1
◦ This computer, or localhost
• Reusable addresses
◦ Discussed in support services chapter
105
Obtaining IP addresses
• Regional registries
– IP addresses distributed around the globe
• American Registry for Internet Numbers
– North America and parts of the Caribbean
• RIPE Network Coordination Centre (RIPE NCC)
– Europe, the Middle East and Central Asia
• Asia-Pacific Network Information Centre (APNIC)
– Asia and the Pacific region
• Latin American and Caribbean Internet Address Registry (LACNIC)
– Latin America and parts of the Caribbean region
• African Network Information Centre (AfriNIC)
– Africa
106
Obtaining IP addresses
• Registries prefer allocating large address pools to large carriers
– Simplifies routing
• RFC 2050
– Sec 2.1: ISPs who exchange routing information with other ISPs at multiple
locations and operate without default routing may request space directly
from the regional registry in its geographical area
• Most organizations will obtain IP addresses from these carriers (ISPs)
107
Obtaining IP addresses
• Requesting initial allocation from ARIN
– http://www.arin.net/registration/guidelines/ipv4_initial_alloc.html
• ARIN allocation pre-requisites
– http://www.arin.net/policy/nrpm.html#four
• Assigned network addresses
– RFC 790 (1981)
– http://www.iana.org/assignments/ipv4-address-space (current)
108
IP version 6
• Current version of IP is 4
◦ IPv4 has one major limitation
◦ Running out of IP addresses
◦ Problem particularly acute outside U.S.
◦ Total IPv4 address pool
◦ 232 = 4,294,967,296 (about 4 billion)
◦ Approx 1 IP address per person
◦ But allocation is not very efficient
◦ Could run out of addresses at about 15% utilization
109
IP version 6 overview
• IPv6 defined in RFC 2460
• Primarily expands source and destination address fields
• Also simplifies packet processing at routers
◦ Eliminates header checksum
◦ Modern networks assumed to be fairly robust
110
IP version 6 address
pool
• IP version 6 is mainly intended to eliminate shortage of IP addresses
◦ Total address pool = 2128 addresses =
◦ 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses (340 * 10 36)
111
IP version 6 header
112
IP version 6 header
fields
• Version
◦ 6
• Traffic class
◦ Similar to IPv4 TOS field
◦ Allows sender to specify service priority for data
• Flow label
◦ Allows sender to label a few packets for special handling
113
IP version 6 header
fields
• Payload length
◦ Length of data in packet
◦ Similar to total length field in IPv4
• Next header
◦ Transport layer user of IP
◦ Same as protocol field in IPv4
◦ Specified in RFC 1700
• Hop limit
◦ Same as TTL field of IPv4
114
IPv6 addressing
example - USF
115
IPv6 addressing
example - USF
• Arrived after numerous iterations
◦ First 8 bits in host part are currently reserved
◦ i.e. unused
◦ future-proofing
◦ Remaining bits
◦ First distributed among branch campuses
◦ Each institution partitions available bits according to its needs
116
IPv6 address notation -
hex
• 128 bits written as 8 blocks of 4 hex characters each
◦ Each hex character represents 4 bits
◦ Ref: Ethernet chapter
◦ 8*4*4 = 128
◦ E.g. 2001:abcd:2346:1234:a1b5:fedc:0011:35ac
117
IPv6 address
compaction rules
• Leading zeros in an individual 16-bit field must be omitted, e.g.
◦ 2001:0db8:aaaa:0000:0000:0000:eeee:0001
◦ Must be written as
◦ 2001:db8:aaaa:0000:0000:0000:eeee:1
118
IPv6 address
compaction rules
• :: indicates successive blocks of 0 fields
◦ Can only appear once in an address
◦ Must be used to its maximum capability
119
IPv6 address
compaction rules
• When there is a tie for possible uses of ::
◦ First possible occurrence of :: must be used
120
Summary
• Functions of IP
• Why different parts of IP addresses
• Why CIDR
• Obtaining IP addresses
• IP version 6
5. Transport layer
• Need for TCP
• TCP functions
– Segmentation
– Reliability
– Flow-control
– Multiplexing
– Connection establishment
• TCP Header
• UDP
122
The need for a Transport
layer
• The network layer (IP) sends packets of data to their correct
destinations with best effort
– Packets may get lost in transit
• Therefore, network layer is not adequate for most applications to
work correctly
• The maximum packet size in IP is 65,536 bytes
– What happens if the application wants to send a file of size 5,000,000 bytes?
– Need to break files into smaller blocks at the sender end and re-assemble these blocks into the
file at the receiving end
• Port addressing
◦ Distinguish between applications on computers
123
The Transport layer in
the stack
Transport Control
Protocol (TCP)
• These (and other related jobs) are performed by the Transport layer
– TCP (Transmission Control Protocol) is the most popular protocol at the
transport layer
– For simpler tasks, another protocol – UDP is also defined
• TCP is a highly reliable host-to-host transport layer protocol over
packet switched networks
– Defined in RFC 793 (Sep 1981)
125
Transport layer -
reference
• TCP
◦ RFC 793 (Sep 1981)
• UDP
◦ RFC 768 (Aug 1980)
126
TCP – Overview of
operation
• At the sending end, the application creates the data to be sent and
passes it to its TCP module for transmission
◦ TCP fragments the data, adds sequence numbers to the fragments and
hands them off to IP
• At the receiving end, TCP collects all fragments from IP, reassembles
them into the original data and passes it to the receiving application
127
TCP functions
• TCP provides a reliable application-to-application communication
service over a network of arbitrary complexity and unreliability
◦ Applications (such as browsers and email) simply pass the data to be
transferred to TCP and leave all communication complexities to TCP
128
TCP functions
• TCP corrects for all possible imperfections of IP
• Therefore TCP has to perform many tasks
– Segmentation
– Reliability
– Multiplexing
– Flow-control
– Connection establishment
129
TCP functions -
segmentation
• TCP allows IP to transfer arbitrarily large data blocks
◦ Accomplished by breaking data into segments
◦ A sequence number is assigned to each datagram
◦ Sequence numbers help receiver order datagrams even when received out
of order
130
Sequence numbers
132
Sequence numbers and
reliability
133
TCP functions -
reliability
• Datagrams may get seriously damaged during transmission
◦ If datagrams are further fragmented by IP, some IP fragments may get lost
during transmission
◦ These errors cannot be detected by Ethernet
◦ Such damage is corrected by adding a checksum to each datagram and
comparing it at the receiver
◦ Damaged datagrams are discarded and retransmitted by sender since no ACK is received
134
TCP functions -
multiplexing
• Modern computers are capable of multi-tasking
◦ Including simultaneous communication tasks
135
Port addresses and
multiplexing
136
TCP ports and airport
gates
137
TCP port assignment
• On the sender side, the operating system assigns one of the free ports
to an application that requires network connectivity
138
Standard ports
• Standard ports
– Assigned by IANA: Internet Assigned Numbers Authority
• To see list
– In Windows:
• C:/Windows/System32/drivers/etc/services
– In UNIX/ Linux
• /etc/services
139
Standard ports
• Typically ports 1 – 1023 are reserved for defined services
– Applications may use the remaining port numbers 1024 – 65535
• Common ports
– 80 : web (http)
– 25 : email (smtp)
– 443: SSL (https)
– 445: microsoft-ds (smb)
140
etc\services file
141
Viewing ports usage
with netstat
144
V. simple flow control
mechanism
145
TCP functions – flow
control
• Flow control mechanism shown earlier is called stop-and-wait
– Sender waits for ACK before sending next datagram
• Very slow
146
TCP flow control with
window size
147
Sliding window
• Flow control is the regulation by the receiver of the amount of data
the sender may send
• Creates a “sliding window” at the sender
• Packets that have received permission for transmission are within the
window
• Window slides as receiver acknowledges packets or modifies window
size
148
Sliding window
149
TCP Header
150
TCP header fields
• Port addresses have 16 bits
◦ 216 possible ports
151
User Datagram Protocol
(UDP)
• Defined in RFC 768 (1980)
• Many applications do not need TCP, e.g..
152
UDP Header
153
Summary
• Why segmentation
• Why sequence numbers
• Why sliding window
• Why port numbers
• Why three-way handshake
• Why UDP
6. Application layer
• Overview of the application layer
• Overview of the Web
155
Application layer
overview
• The application layer specifies
◦ End-user activity supported by the protocol
◦ Commands to accomplish protocol functions
156
Application layer in TCP/
IP stack
157
Application vs. lower
layers
• Unlike lower layers, each supported end-user task has a different
application layer protocol associated with it
◦ SMTP for email, HTTP for web
◦ All use TCP or UDP for data transfer
158
Application protocols
evolution
• These days, HTTP is more popular than these protocols
• New applications are emerging or have become popular
◦ Voice over IP
◦ Instant messaging
◦ Bit-torrent
159
HTTP
• The web is the lay person’s interpretation of the Internet
– Most common service to retrieve information from the Internet
– Uses HTTP
• Any user can access a huge amount of interesting and/ or useful
information across the world using the web
– Coupons/ Comparison shopping
– Facebook/ MySpace
– Assignments
160
Web structure
• The web consists of pages linked to each other through hyperlinks
• Pages are linked to each other through hyperlinks form a web of pages
◦ Linked pages can be anywhere in the world
◦ Hence the name: world wide web
161
Web structure
162
Web pages
• Web pages are written in hypertext markup language (HTML)
163
Web page example
<html>
<head>
<title>HTML 101</title>
</head>
<body>
<h1>Welcome to html page at
<a href = “www.usf.edu”>USF</a> </h1>
<p>Please check back later</p>
</body>
</html>
164
The HTTP protocol
• Defined in RFC 2616 (1999)
• General purpose protocol for data transfer
• Based on request/ response
• Client sends request to server
• Server responds with status code, meta-information and data
• HTTP transaction for web page example is shown
165
HTTP example
166
HTTP features
• Web transfers contain meta information about the data being
transferred
◦ Client knows the data type of the data being transferred – txt/pdf/ jpg etc
167
Content-encoding for
compression
168
URLs
• Web pages are accessed by URLs
◦ Uniform Resource Locator
◦ RFC 1738, 1994
• Syntax
◦ protocol://host [:port ]/[abs_path[?query]]
• Examples
◦ http://www.usf.edu:8080/acad_calendar.html
◦ http://www.usf.edu:8080/grades?fName=joe
◦ http://www.google.com/search?q=usf
169
URL defaults
• To simplify access to web pages, web servers recognize defaults
– http://www.usf.edu is the same as http://www.usf.edu:80/index.asp
• Other default files include index.html, index.php
170
Summary
1. Networking overview
2. Physical layer
3. Data link layer
4. Network layer
5. Transport layer
6. Application layer
7. Wide area networks
172