Computer communications
Download
Report
Transcript Computer communications
Computer Communications
Dr. Jim Martin
[email protected]
Copyright 2006 Jim Martin
1
Web browsers and servers
Internet Explorer,
FireFox
BellSouth
Internet
www.usatoday.com
HTTP GET COMMAND: "GET /~jmarty/index.html HTTP/1.0"
Returns the web object. File size ranges
From 20 bytes to gigabytes
Copyright 2006 Jim Martin
2
Web browsers and servers
Internet Explorer,
FireFox
BellSouth
Internet
www.usatoday.com
Data sent between computers is packaged in packets.
TCP/IP refers to the set of protocols that defines the rules for
sending and receiving packets
Copyright 2006 Jim Martin
3
Data Communications
Modem
routers
Internet Explorer,
FireFox
www.usatoday.com
Access Link:
Dialup, DSL,
Cable
Links
Copyright 2006 Jim Martin
4
Data Communications
1.
2.
3.
4.
How does a computer send data to
another computer?
They need a physical connection (called a link).
Data is encoded and transmitted as energy.
Energy is decoded at the destination back into data.
Each form of energy has different properties which explains why some
connections are high speed and other connections are slow
Copyright 2006 Jim Martin
5
Data Communications
Simplest approach - use varying voltages to
represent 1s and 0s
One common encoding use negative voltage for 1
and positive voltage for 0
In following figure, transmitter puts positive voltage
on line for 0 and negative voltage on line for 1
Copyright 2006 Jim Martin
6
Back to the binary number
system
Let’s say one computer transmits the
message ‘hello’ to another computer.
Each letter is mapped to a unique number in
the range of 0 to 255. The mapping is called
the ascii character set:
Decimal Character
Decimal Character
Decimal Character
48
49
50
65
66
A
B
97
98
Z
122
57
….
0
1
2
9
90
….
Copyright 2006 Jim Martin
….
a
b
z
7
Back to binary
When ‘hello’ gets sent, the following decimal
numbers are sent: 104 101 108 108 109
We have now seen the message ‘hello’ in two
formats: ascii and decimal
Remember what decimal format means:
A decimal number is a number (e.g., 104) that has a number
of digits with the value of each digit ranging from 0 to 9.
Each digit represents some number of 1’s, 10’s, 100’s , …
Example: 104 in decimal:
(1 * 100) + (0 * 10) + (4 * 1) = 104
Copyright 2006 Jim Martin
8
Back to the binary number
system
Binary numbers are a number system made up of 0's and 1's.
In base-10, the weight of each digit is based on 10EXP#digit
Digit#
The magnitude of the first 8 places in binary notation are given by 2EXPdigit#
(i.e., a base-2 number system and the digits are referred to as bits):
Bit#
Example:
7 6 5 4 3 2 1 0
128 64 32 16 8 4 2 1
The number 10 interpreted in decimal is (1 * 10) + (0 * 1) = 10 (in decimal)
The number 10 interpreted in binary is (1 * 2) + (0 * 1) = 2 (in decimal)
Example
3 2 1 0
1000 100 10 1
The number 13 in decimal is (1 * 10) + (3 * 1) = 13 (in decimal)
The number 13 in binary does not exist. Digits must by 1’s and 0’s
To convert the decimal number 13 to binary: (1 * 8) + (1 * 4) + (1 * 2) + (1 * 1) =
13
More examples of converting between binary and decimal systems:
0x00000010 = 2 in decimal
0x00000100 = 8 in decimal
0x10000010 = 130 in decimal
Copyright 2006 Jim Martin
0x11111111 = 255 in decimal
9
Back to the binary number
system
The ascii message : hello
In ascii format: hello
In decimal format : 104
In binary format: 1101000
101
1100101
108
108
109
1101100 1101100 1101101
Each character requires 8 bits
hello
hello
1101101 1101100 1101100 1100101 1101000
The most significant bit of the last
character (the ‘o’) is the last bit that is
sent and the last bit that is received
The least significant bit of the first
character of the message is the first bit
that is sent and the first bit that is
received
Copyright 2006 Jim Martin
10
Web browsers and servers
Internet Explorer,
FireFox
BellSouth
Internet
www.usatoday.com
The time from when
the browser
Sends the message
until when all
The data is received is
the
response time.
HTTP GET COMMAND: "GET /~jmarty/index.html HTTP/1.0"
Returns the web object. File size ranges
From 20 bytes to gigabytes
Copyright 2006 Jim Martin
11
Where do the delays come
from?
Transmission time: time to transmit the
message over a link.
T-t : message size in bits / link speed
(bits)
bits per second
Propagation delay : Time for the bit to
propagate over the physical medium.
Electro-Magnetic energy travels at the speed of
light.
E.g., propagation delay from NY to LA is about .003
seconds.
Copyright 2006 Jim Martin
12
Ping program
Ping is an Internet program that tests if a machine is
alive.
Also let’s us test the RTT and the loss rate between two
machines.
All computers have the ping program. However not
all computers will reply.
Ping request msg
Ping reply msg
Copyright 2006 Jim Martin
13
Ping: RTT calculation
Two computers connected by a 64000 bps link.
The one – way propagation delay over the link is
.003 seconds.
What RTT would you expect if a 64 byte message is
sent and echoed back?
RTT= 2 * transmission delay + 2 * propagation delay
= 2 * ( (64 * 8) / 64000) + 2 * (.003)
= 2 * (.008) + 2 * (.003) = .022 seconds
Copyright 2006 Jim Martin
14
Assessing application
performance
When downloading a file the
throughput is used to assess
performance:
Throughput: how much data is sent in a
given time.
Download a 10,000 byte file in .060 seconds
Throughput = 10,000 * 8 / .060 = 1.33
megabits per second (1.33 Mbps)
Copyright 2006 Jim Martin
15
History of the Internet
ARPANET
Goal:
To allow scientists
at different
locations to share
information
Networking project by
Pentagon’s Advanced
Research Projects
Agency (ARPA)
Goal:
To function if
part of network
were disabled
Became
functional
September 1969
Copyright 2006 Jim Martin
16
History of the Internet
Today
More than 400 million host nodes
1984
More than 1,000 host nodes
1969
Four host nodes
Copyright 2006 Jim Martin
17
Who controls the Internet?
No one — it is a public, cooperative, and
independent network
Several organizations set standards
c
c
World Wide Web
Consortium (W3C)
Oversees research, sets
standards and guidelines
Tim Berners-Lee, director
Internet2 (I2)
Internet-related research and
development project
Develops and tests advanced
Internet technologies
Copyright 2006 Jim Martin
18
Internet names and addresses
The Internet Protocol (IP) defines many of the rules that make the
Internet work.
IP requires all computers on the Internet have an IP address.
A 32 bit (4 bytes) quantity
Every computer must have a different IP address.
You might here about an IP address shortage…
There are only 4,294,967,296 unique IP addresses (according to
http://www.ibiblio.org/lunarbin/worldpop there are just over 6.6 billion
people- so everyone can not have their own IP address)
To find the IP address of a Windows machine,
Go to start, control panel, network and Internet
connections, network connections and click the right
Button on the Local Area network connection and
Select status. You will see this panel of information.
The default gateway is the IP address of a machine
Nearby that helps your machine connect to the
Internet.
Copyright 2006 Jim Martin
19
Internet names and addresses
The Internet Protocol (IP) defines many of the rules that make the
Internet work.
All computers on the Internet have an IP address
What is a domain name?
Number that uniquely identifies
each computer or device
connected to Internet
Some computers have a domain name that is mapped to the
computers IP address
Domain Name: www.google.com
Address in dotted decimal format: 216.239.39.99
Address in binary:
11011000 11101111 00101001 01100011
Copyright 2006 Jim Martin
20
How to connect …
Slow-speed
technology
Dial-up access
modem in your
computer uses a
standard telephone line
to connect to the Internet
Connection must be established
each time you log on.
Slow but inexpensive
High-speed
connection
Digital subscriber line (DSL),
cable telephone Internet
services (CATV), cable modem,
fixed wireless, and satellite modems
Connection is always on—
whenever the computer
is running
Copyright 2006 Jim Martin
21
Broadband Access:DSL
DSL is a very high-speed connection that uses the same wires
as a regular telephone line.
Provided by an Internet Service Provider (ISP)
Here are some advantages of DSL:
•You can leave your Internet connection always on
and still use the phone line for voice calls.
•Doesn't require new wiring.
•Provides asymmetric high speeds: up to 6Mbps
downstream and 768,000 upstream.
But there are disadvantages:
•A DSL connection works better when you are
closer to the provider's central office.
•The connection is faster for receiving data than it
is for sending data over the Internet.
•The service is not available everywhere.
Copyright 2006 Jim Martin
22
Broadband Access: WiMAX
WiMAX is short for Worldwide
Interoperability for Microwave
Access, and it also goes by the
IEEE name 802.16.
No wires needed between a house
and the ISP.
House can be 10 miles from the
tower.
Provides access speeds from 1 Mbps
to 70 Mbps depending on range and
terrain.
Copyright 2006 Jim Martin
23
Broadband Access + Home
Networks: SECURITY Issues
Security issues
Hacking : someone from the outside can hack into your systems
preventing your network from working
Attacks on machines connected to your home network
Viruses that can delete your files
Spyware that your files to the outside world
Programs that can force your computer to attack other computers
Your computer or home network must have these three security
components:
Anit-spyware software: Spy bot, ad aware or Microsoft’s SpyWare
Defender
Anti-virus software : Norton’s Antivirus, McAfee VirusScan
Firewall : Norton’s Internet Security, zone labs, or purchase a
broadband router ($30 Linksys boxes come with a firewall).
Copyright 2006 Jim Martin
24