Networking Theory (Part 1)
Networking Theory (Part 1)
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.
Wires
and cables - use electricity for transmitting data Wireless - use infrared / radio Fiber-optic cables - use light
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.
Sending individual bits of data from node to node is not very cost effective.
Overhead
information (e.g sender & recipient) Checksums to ensure packet has not been corrupted Other info needed for transmission across network
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
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.
Internet Architecture
The Internet is a worldwide collection of smaller networks that share a common suite of communication protocols (TCP/IP). It is an open system, built on common network, transport and application layer protocols, while granting the flexibility to connect a variety of computers, devices and operating systems to it.
sharing between networks Hardware and software independence Reliability and robustness
Fault tolerant protocols - data could be rerouted depending on the state of the network
"Good"
Major protocols:
Internet
Protocol (IP) Internet Control Message Protocol (ICMP) Transmission Control Protocol (TCP) User Datagram Protocol (UDP)
Although each machine has its own physical address, each host machine under the Internet Protocol must be assigned a unique IP address. The IP address is a four-byte (32-bit) address. Example: 192.168.1.5 The IP address is not bound to a particular physical machine. Network programming in Java does not require the use of the physical address; only the IP address is used.
IP uses ICMP if it needs to notify another host of an error. ICMP requires IP to send the error message.
Note that a host cannot rely solely on ICMP to guarantee delivery as there is no guarantee that ICMP messages will be sent or that they will reach their intended destination.
Unreachable
If a gateway is unable to pass a datagram on to its destination, this message is sent back to the original host.
Parameter
Problem
This message is sent to the sending host if a gateway is unable to process the header parameters of an IP datagram.
If a shorter path, or alternate route, is available, a gateway may send this message to the router that passed on a datagram
Source
Quench
This message may be sent in an attempt to reduce the number of incoming datagrams when a router, gateway or host becomes overloaded.
Time
Exceeded
Whenever the TTL value of a datagram reaches zero is discarded. This message may be sent if this event occurs.
Request/Echo Reply
Address
Provides the functionality to determine the address mask which controls which bits of an IP address correspond to a host, and which bits determine the network/subnet portion.
Protocols
for accessing and sending email Protocols for transferring files Protocols for reading Web pages
Telnet
A
service that allows users to open a remoteterminal session to a specific machine. Uses TCP port 23.
file transfers Uses TCP port 21 (to control sessions) and TCP port 20 (for the actual transfer).
to access e-mail Allows users to read mail offline. Uses TCP port 110.
popular than POP3 as it requires continual connection to the mail server. Message are stored on a server and not on the user's system. Uses port 143.
of the most popular protocols in use on the Internet; it made the World Wide Web possible. Java provides good HTTP support. Uses TCP port 80.
UDP
Internet Protocol
ICMP
TCP/IP Stack
TCP header
RETR1
Transport layer
Firewall: while being an excellent tool for n/w admin often is a developers worst enemy It blocks direct UDP and TCP access, making application that uses these protocols practically unusable Need to adapt software to proxy requests using protocol such as HTTP Direct UDP/TCP communication is simpler and offers better performance Using proxy server and HTTP can add delays
Proxy Server
It is a machine that acts as a proxy for application protocols The server accepts incoming connections from machines within a local n/w and makes requests on their behalf to machines connected to the Internet Advantages:
Direct
Proxy Server
Only popular protocols such as HTTP is permitted access while newer application such as games or RealAudio is not permitted Most proxy servers also log networking events to allow n/w admin to track unusual communications and their origin