Transcript Document
NETWORKING THEORY
(PART 1)
Introduction
Overview of the basic concepts of networking
Also discusses essential topics of networking theory
What is a Network?
A network is a collection of devices that share a
common communication protocol and a common
communication medium.
Devices - computers, printers, telephones, televisions,
coke machines, etc.
What is a Network?
Computing-centric model - services and devices
bound to individual machines
Network-centric model - services and devices are
distributed across a network
Network and software standards (e.g. Jini) exist to
allow devices and hardware talk to each other over
networks and to allow instant plug-and-play
functionality
What is a Network?
Besides devices providing services, there are also
devices that keep the network going, for example,
Network
cards - to allow a computer to talk to a
network. E.g. ethernet card.
Routers - machines that direct data to the next "hop" in
the network
Hubs - allow multiple computers to access a network
Gateways - connect one network to another. E.g. a LAN
to the Internet.
How do Networks Communicate?
Networks consist of connections between computers
and devices.
Connections:
Wires
and cables - use electricity for transmitting data
Wireless - use infrared / radio
Fiber-optic cables - use light
How do Networks Communicate?
Connections carry data (bits - 0's and 1's) between
one point (node) in the network and another.
For data to be successfully delivered to individual
nodes, these nodes must be clearly identifiable.
Addressing
Each node in a network is typically represented by
an address.
The manufacturer of the network interface card
(NIC) is responsible for ensuring that no two card
addresses are alike, and chooses a suitable
addressing scheme.
Each card will have this address stored permanently,
so that it remains fixed.
Addressing
There are many addressing schemes available. E.g.
Ethernet network cards are assigned a unique 48-bit
number.
This physical address is referred to by many names,
such as:
Hardware
address
Ethernet address
Media Access Control (MAC) address
NIC address
Addressing
Often, machines are known by more than one type
of address. E.g. a network server may have a
physical Ethernet address as well as an Internet
Protocol (IP) address, or it may have more than one
network card.
For inter-network communications, the IP address is
used.
Data Transmission Using Packets
Sending individual bits of data from node to node
is not very cost effective.
Overhead
involved - e.g address of destination node.
Most networks group data into packets.
Data Transmission Using Packets
A packet consists of a header and data segment.
Header fields
Data
1101000111010100001
The header contains:
Addressing information (e.g sender & recipient)
Checksums to ensure packet has not been corrupted
Other info needed for transmission across network
Data Transmission Using Packets
To transmit data, a direct connection is usually not
available.
So packets are sent to their destination nodes via
intermediary nodes in the network.
Due to network conditions (such as congestion or
network failures), packets may take arbitrary routes,
and sometimes may be lost or arrive out of
sequence.
Data Transmission Using Packets
Packet transmission and transmission of raw bits are
low-level processes.
Most network programming deals with high-level
transmission of data.
Communication Across Layers
The concept of layers was introduced to
acknowledge and address the complexity of
networking theory.
The most popular approach to network layering is
the Open Systems Interconnection (OSI) model
created by the International Standards
Organization (ISO)
Communication Across Layers
The OSI model groups network operations into seven
layers.
Communication Across Layers
Each layer is responsible for some form of
communication task, but each task is narrowly
defined and usually relies on the services of one or
more layers beneath it.
Generally, programmers work with one layer at a
time; details of the layers below are hidden from
view.
Layer 1 - Physical Layer
This layer is network communication at its most basic
level.
At this level, networking hardware transmit sequence
of bits between two nodes.
Java programmers do not work at this layer - it is
the domain of hardware driver developers and
electrical engineers.
No real attempt is made to ensure error-free data
transmission
Layer 2 - Data Link Layer
This layer is responsible for providing a more
reliable transfer of data, and for grouping data
together into frames.
Frames are similar to data packets but are blocks of
data specific to a single type of hardware
architecture.
Frames have checksums to detect errors in
transmission.
Corrupted frames are discarded so that they will not
be passed to higher layers.
Layer 3 - Network Layer
The network layer deals with data packets which
are sent across the network.
Communication at this level is still very low-level;
network programmers are rarely required to write
software services for this layer.
Layer 4 - Transport Layer
This layer is concerned with controlling how data is
transmitted.
It deals with issues such as automatic error detection
and correction, and flow control (limiting the amount
of data sent to prevent overload).
Layer 5 - Session Layer
The purpose of this layer is to facilitate applicationto-application data exchange, and the establishment
and termination of communication sessions.
Connection-oriented communication can increase
network delays and bandwidth consumption. Some
applications choose to use a connectionless form of
communication.
Layer 6 - Presentation Layer
This layer deals with data representation and data
conversion.
Different
machines use different types of data
representation (e.g. 8-bit integers on one system and
16-bit integers on another).
Data compression
Data encryption
Layer 7 - Application Layer
This layer is where the vast majority of
programmers write code.
Protocols for this layer dictate the semantics of how
requests for services are made (e.g requesting a
file).
In Java, almost all network software written will be
for this layer.
Advantages of Layering
Helps simplify networking protocols.
Protocols can be designed for interoperability
Software
that uses Layer n can talk to software running
on another machine that supports Layer n, regardless
details of the lower layers.
Example: a network layer protocol can work with an Ethernet network and a
token ring network.