Upload
ganeshn1412
View
216
Download
0
Embed Size (px)
Citation preview
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 1/23
This Lecture – Internet Basics
Basic terms we need to understand.
The OSI/ISO (Open SystemsInternconnection/International Standards Office)“layers model” of computer networks.
The standard model to describe how computernetworks should work.
The TCP/IP (Transmission ControlProtocol/Internet Protocol) Protocol Stack
The standard model which is how computer networksactually work.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 2/23
Where to go for more information on
this lecture’s subjects RFCs: (Requests for Comments): The protocols which
define the internet: http://www.rfc-editor.org/
RFCs define how things work (but some are spurious, some areout of date and some are just jokes).
IETF: (Internet Engineering Task Force)
http://www.ietf.org/
Related texts:
Bertsekas/Gallager: Layers Model: Section 1.3 IP: Section2.8+ 2.9
Tanenbaum: Layers Model: Section 1.4 IP: Section 5.5
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 3/23
Basic Definitions: Protocol
Protocol: A formal specification of how things should
communicate. In networking a protocol defines an interfaceusually (though not necessarily) between one computer andanother.
A simple example of a protocol “Knock and Enter”:
1. Knock on the door.2. Wait for someone to say “Come in.”
3. If someone says “Come in.” then open the door and enter.
4. If you wait for five minutes then give up. We might want to combine this with a protocol for saying
“Come in” when you hear a knock.
Two computers need to use the same protocol to talk to one
another. The definition of protocols is critical to networking.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 4/23
Basic Definitions: Bit, Byte, Octet,
Packet, Header, Bandwidth Bit: A 0 or a 1 – the basic unit of digital data.
Byte: A short collection of bits (usually assumed to be 8bits – but may, rarely, be 7, 16 or 32).
Octet: A collection of 8 bits.
Packet: A collection of bits in order assembled fortransmission.
Header: Part of packet with info about contents.
Bandwidth: The amount of data which can be sent on achannel. Usually bits per second – sometimes in bytes(octets) per second. (Yes this is confusing.)
KB = kilobytes. Kb = kilobits.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 5/23
Basic Definitions: Host, Router,
Switch, Source, Destination
Host: A machine which is a point on a network
which packets travel through – a node in a graph.
Router: A host which finds a route for packets to
travel down – an intermediate point in a journey. Switch: Often used interchangeably with router
but implies that the routes are “fixed”.
Source: Where data is coming from.
Destination: (or sink) Where data is going to.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 6/23
A Simple Model of Reliable Internet
Communications.
To send data to another computer:
Find the address of the computer you are sending to.
Break the data into manageable chunks (packets).
Put the address on each packet (packet heard) and also
your own address.
Send each packet in return to the receiving computer.
Get a receipt for each packet which has been sent.
Resend packets for which we do not have a receipt.
The receiver then reassembles the packets to retrievethe data sent.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 7/23
Models of the Internet
OSI/ISO Reference Model TCP/IP Reference Model
Open Systems Interconnection
(International Standards Office)
ApplicationPresentation
SessionTransportNetwork Data Link
Physical
Model Layers
Application
TransportInternetHost-to-network
Transmission Control
Protocol/
Internet Protocol
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 8/23
1) Physical layer
Purpose: Necessary infrastructure.
Think "wires in the ground and switchesconnecting them".
This is the physical hardware of the internet. Wires/optical cables/wireless links and other
technologies provide a way for transmission of
raw bits (0s and 1s). Routers and switches connect these cables and
direct the traffic.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 9/23
2) Data link layer
Purpose: Provides basic connection between two
logically connected machines.
Think: “I stuff packets down a wire to myneighbour”
Send raw packets between hosts.
Basic error checking for lost data.
In TCP/IP the "Physical layer" and the "DataLink" layer are grouped together and called thehost-to-network layer.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 10/23
3) Network Layer/Internet Layer
Purpose: Provide end-to-end communication
between any two machines.
Think: “I try to get a packet to its destination”
Tells data which link to travel down. Addresses the problem known as routing.
Deals with the question "where do I go next to
get to my destination?" Ensures packets get from source A to destination
B.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 11/23
4) Transport Layer
Purpose: Ensure that data gets between A and B.
Think: “From the source and destination, I makesure that the data gets there”.
Ensures a data gets between source anddestination.
If necessary ensure that connection is lossless
(resend missing data). Provides flow control if necessary (send data
faster or slower depending on the network
conditions).
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 12/23
5) Session Layer (not TCP/IP)
Purpose: Provides a single connection for one
application.
Think: “I am in charge of the entire message.”
This connection may be two way or may besynchronised.
Not discussed much as it is never implemented.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 13/23
6) Presentation Layer (Not TCP/IP)
Purpose: Provides commonly used functions for
applications. Think: “I meet internationalisation standards”.
The main job of the presentation layer is toensure that character sets match – e.g. thatChinese characters are correctly received by thesends.
Again not discussed much as it is neverimplemented.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 14/23
7) Application layer
Purpose: The computer programs which actually dothings with the network.
Think: “I deliver the mail, browse the web etc.”
For example, your email client program which will talk to the email server at the other end.
At this layer, we have many protocols (http, snmp,
smtp, ftp, telnet) which different bits of software use. We often talk in terms of client and server architecture
for the software.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 15/23
TCP/IP model in summary
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 16/23
Internet (IP) addresses
xxx.lcsee.wvu.edu (email, or similar)
http://www.apoptygma.eu.org (www)
ftp://ftp.uk.debian.org (file transfer)
telnet://towel.blinkenlights.nl (telnet)
157.182.194.89
148.122.211.110195.224.53.39
62.250.7.101
These are the “real” IP addresses
of the above sites. IP addressesare 32 bits grouped into 4 octets.
(Octet = 8 bits – a number from
0-255)
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 17/23
IP Networks(1)
IP addresses use less significant bits first to
indicate sub-networks. IP address: 123.45.67.89
Netmask :255.255.255.0 (no holes allowed)
If two IP addresses are the same when bitwiseAND’d against the netmask then they are on the
same subnet. 123.45.67.?? is always on the same subnet in the
above example.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 18/23
IP Networks(2)
IP networks were originally subdivided into class
A, B, C, D and E networks.
Start End Networks Hosts/network
A 1.0.0.0 127.255.255.255 126 16 million
B 128.0.0.0 191.255.255.255 16,382 64K
C 192.0.0.0 223.255.255.255 2 million 254
D 224.0.0.0 239.255.255.255 Multicast
E 240.0.0.0 247.255.255.255 Reserved
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 19/23
Subnet examples
IP Addresses: A= 132.128.208.32
10000100.10000000.11010000.00100000
B= 132.128.217.63
10000100.10000000.11011001.00111111
Subnet mask 1: 255.255.255.0 =
11111111.11111111.11111111.00000000
Subnet mask 2: 255.255.240.0 =
11111111.11111111.11110000.00000000
A and B would be on the same subnet if the subnetmask was 1 but different subnets if the mask was 2.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 20/23
The IP header
IP packets all have a header as shown
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 21/23
About the IP header
Type of Service: (Best efforts, immediate
delivery etc) Total length (of whole packet)
Identification (number of packet for laterreassembly)
Fragment offset – sometimes the network splits a
packet into fragments. Flags (information about fragments). DF= Dont
Fragment MF= More Fragments to come
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 22/23
About the IP header (2)
Time To Live (TTL) – reduced by one every hop.
When it reaches zero packet is killed. (This is to
ensure that the network doesn’t fill up with lost
packets).
Protocol – identified by a number (usually TCP
or UDP).
Checksum – to ensure that the packet is notcorrupted.
7/27/2019 Comp_Network_Intro [Compatibility Mode].pdf
http://slidepdf.com/reader/full/compnetworkintro-compatibility-modepdf 23/23
IPv6
IPv4 allows over 4 billion computers (but not really) –
inefficient subnetting is using these up. IPv6 allows 16 octet addresses (4 octets in IPv4).
3x1038 addresses (> Avogadro’s number). 7x1023 IP
addresses per square meter of the earth’
s surface. Why so many? Electrical devices may want IP addresses
– your house could be its own subnetwork. Why NOT?
Better security than current IP(v4). Allow “roaming hosts”.
Pay more attention to type of service (for real time data).