Images

TCP/IP - PART I


TCP/IP
TCP/IP is a communications protocol used to transfer digital data around the internet.
TCP and IP were developed by a Department of Defense (DOD) research project to connect different networks designed by different vendors into a network of networks (the "Internet").TCP/IP is often referred to as the 'internet protocol'.
TCP/IP stands for Transmission Control Protocol/Internet Protocol. If this leads you to think that it is not just one protocol, you’re right. In fact, it is not just two protocols, either. TCP/IP is a suite of protocols.
IP is the bedrock protocol of TCP/ IP. Every message and every piece of data sent over any TCP/ IP network is sent as an IP packet.
IP’s job is to enable data to be transmitted across and between networks. Hence the name: inter- net protocol.

Introduction to Networks
Introduction to Networks
computer network is composed of multiple computers connected together using a telecommunication system for the purpose of sharing data, resources and communication.
For instance, a home computer network may consist of two or more computers that share files and a printer using the network.
The size and scalability of any computer network are determined by the hardware used as well as which protocols are being implemented.
Definition of Network
In Computer Science Network or Computer Network, is a system of computers interconnected by telephone wires or other means in order to share information. Also callednet.
Network, in computing, two or more computers connected for the purpose of routing, managing, and storing rapidly changing data.
local area network (LAN), which is restricted by distances of up to one mile, and ametropolitan area network (MAN), which is restricted to distances of up to 60 miles, connect personal computers and workstations (each called a node) over dedicated, private communications links.
wide area network (WAN) connects large numbers of nodes over long-distance communications links, such as common carrier telephone lines, over distances ranging from that between major metropolitan centers to that between continents.
An internet is a connection between networks. The Internet is a WAN that connects thousands of disparate networks in the U.S., Canada, Europe, Asia, and elsewhere, providing global communication between nodes on government, educational, and industrial networks.
Networks allow for resource sharing (e.g., multiple computers sharing one printer), data sharing, and communication or data exchange (e.g., electronic mail).

Introduction to Networks
Data Communication
Telematics
Telematics is the combination of informatics and telecommunication. It includes a total of services connected with the usage of informatics. They are accessible for the transmission of data by middle from networks.
Data-communication:
Data-communication is the combination of data-processing and telecommunication.
It includes the processing of data of program's running on computer-systems, and the communication over great distance where the information is transported by using ofelectrical-conductivity, radio-ways, light-signals, etc..
With data-communication is it possible to communicate over great distances from terminals connected on the communication network.
ip01
Figure shows different possibilities for communication of great distance.
Data-transmission:
Character-sets (ASCII & EBCDIC), parallel/serial, method's of transmission (Asynchronically: all characters are directly and independently from eachother transmitted.
It begins with a start-, and ends with a stop-bit. & Synchronically: The information-packet is transmitted in block.), simplex/half-duplex/full-duplex, and the speed from the data-transmission.
Accident-proof network:
Is designed so that the actions of one user do not affect the network access of another user. No network is really accident-proof.
Therefore, we must reduce the impact of a user's mistake on the other users, while knowing well that some accidents cannot be planned for. Design a network that a user cannot bring down by merely disconnecting his PC, or even by accidentally cutting a wire in his office.

Introduction to Networks
Types of Networks
Computer networks may be classified according to the scale or extent of reach of the network, for example as a Personal area network (PAN), Local area network (LAN), Campus area network (CAN), Metropolitan area network (MAN), or Wide area network(WAN).
Personal area network
personal area network (PAN) is a computer network used for communication among computer devices (including telephones and personal digital assistants) close to one person.
The devices may or may not belong to the person in question.
The reach of a PAN is typically a few meters.
PANs can be used for communication among the personal devices themselves(intrapersonal communication), or for connecting to a higher level network and the Internet(an uplink).
Local area network
A local area network (LAN) is a computer network covering a small geographic area, like a home, office, or group of buildings.
Current LANs are most likely to be based on switched IEEE 802.3 Ethernet technology, running at 10, 100 or 1,000 Mbit/s, or on IEEE 802.11 Wi-Fi technology.
Each node or computer in the LAN has its own computing power but it can also access other devices on the LAN subject to the permissions it has been allowed.
These could include data, processing power, and the ability to communicate or chat with other users in the network.
Campus area network
A campus area network (CAN) is a computer network made up of an interconnection of local area networks (LANs) within a limited geographical area.
It can be considered one form of a metropolitan area network, specific to an academic setting.
Metropolitan area network
Metropolitan Area Networks, or MANs, are large computer networks usually spanning a city.
They typically use wireless infrastructure or optical fiber connections to link their sites.
MAN is optimized for a larger geographical area than is a LAN, ranging from several blocks of buildings to entire cities.
As with local networks, MANs can also depend on communications channels of moderate-to-high data rates.
MAN might be owned and operated by a single organization, but it usually will be used by many individuals and organizations.
MANs might also be owned and operated as public utilities. They will often provide means for internetworking of local networks.
Wide area network
Wide Area Network (WAN) is a computer network that covers a broad area (i.e., any network whose communications links cross metropolitan, regional, or national boundaries).
). Or, less formally, a network that uses routers and public communications links.
Contrast with personal area networks (PANs), local area networks (LANs), campus area networks (CANs), or metropolitan area networks (MANs) which are usually limited to a room, building, campus or specific metropolitan area (e.g., a city) respectively.
The largest and most well-known example of a WAN is the Internet.

Introduction to Networks
Network Components
Network Operating System (NOS) controls the interaction between all the machines on the network.
The network operating system is responsible for controlling the way information is sent over the network medium and handles the way data from one machine is packaged and send to another. The NOS also has to handle what happens when two or more machines try to send at the same time.
• Local area networks that have a single server with many clients connected to it who put the NOS on the server. The main part of the NOS sits on the server, while the smaller client software packages are loaded onto each client.
• With larger networks that don't use a single server, such as a network running TCP/IP, the NOS may be part of each machine's software.
Network Interface Card (NIC) is an adapter that usually sits in a slot inside the PC. Some NIC’s can plug into parallel or SCSI ports.
The network interface card handles the connection to the network itself through one or more connectors on the backplane of the card. You must make sure that the network interface card you are using in your machine works with the network operating system.
ip02
Figure 1 shows the symbol used for a Network Interface Card.
Client is any machine that requests something from a server. The server supplies files and sometimes processing power to the smaller machines connected to it. Each machine is a client in this type of network.
ip03
Figure 2 shows the symbol used for a Client.
Server is any machine that can provide files, resources, or services to another machine. Any machine that you request a file from is a server. This is the essence of client-server networks: One machine, the client, request something from another machine, the server.
A single machine may be both client and server. The more commonly used definition for a server is related to local area networks, where the server is a powerful machine that holds main files and large applications.
Other machines on the network connect to the server to access those files and applications. In this type of network, a single machine usually acts as the server and all the other machines are clients. Simply put, the server is any machine on the network that your machine request something from.
ip04
Figure 3 shows the symbol used for a Server.
In the Client-Server model, a client is the machine that initiates a request to a server. This type of terminology is common with TCP/IP networks, where no single machine is a central repository.
05
Figure 4 shows a Client-Server model.
Local Resource is any peripheral (optical drive, printer, scanner, modem, and so on) that is attached to your machine. Since the machine doesn't have to go on the network to get to the device, it is called a local device or a local resource.
06
Figure 5 shows Local Resources.
Remote Resource is any device that must be reached through the network. Any devices attached to a server, are remote resources.
07
Figure 6 shows Remote Resources.
Node is any device on a network (server, workstation, printer, scanner, or any other kind of peripheral) that is accessed directly by the network. A node has a unique name or IP address so the rest of the network can identify it.

Introduction to Networks
Network Media
Network Medium is the type of cabling used in a network. There are many types of cables used in networks today, although only a few are commonly used. The type of cabling can have an influence on the speed of the network.
Twisted-pair cable has a pair of wires twisted around eachother to reduce the interference. There can be two, four, or even more sets of twisted pairs in a network cable.
Twisted-pair cables are usually attached to the network devices with a jack that looks like a telephone modular jack, but a little wider, supporting up to eight wires.
The most commonly used jacks are called RJ-11 (6 wires) and RJ-45 (8 wires), depending on the size of the connector and the number of wires inside.
001
Figure 1 shows the symbol used for a Twisted-Pair line tag.
There are two types of Twisted-Pair cable in use:
• A Unshielded Twisted-Pair (UTP) cable is one of the most commonly used network media because it is cheap and easy to work with.
• A Shielded Twisted-Pair (STP) cable has the same basic construction as its unshielded cousin, but the entire cable is wrapped in a layer of insulation for protection from interference.
The same type of connectors are used with both forms of twisted-pair cables.
Coaxial cable is designed with two conductors, one in the centre surrounded by a layer of insulation, and the second a mesh or foil conductor surrounded the insulation.
Outside the mesh is a layer of outer insulation. Because of its reduced electrical impedance, coaxial is capable of faster transmission than twisted-pair cable. Coax is also broadband, supporting several network channels on the same cable.
002
Figure 2 shows the symbol used for a Coaxial line tag.
There are two types of coaxial cable in use:
• Thick coax is a heavy cable that is used as a network backbone for the bus network. This cable is formally known as Ethernet PVC coax, but is usually called 10BASE5. Because thickcoax is so heavy and stiff, it is difficult to work with and is quit expensive.
Thin coax is the most common type used in Ethernet networks. It goes by several names, including Thin Ethernet, 10BASE2, and cheapernet. Formally, thin coax is called RG-58. Thin coax is the same as your television cable.
The inner connector can be made of a single solid copper wire or fashioned out of thin strands of wire braided together. Thin coax is quite flexible and has a low impedance, so it is capable of fast throughput rates.
It is not difficult to lay out, as it is quite flexible, and it is easy to construct cables with the proper connectors, usually BNC connectors, at each end. Thin coax is broadband, although most local area networks use only a single channel of the cable.
A Fibre-optic cable is becoming popular for very high-speed networks (500 Mbits). It is very expensive but capable of supporting many channels at tremendous speed.
Fibre-optic cable is almost never used in local area networks, although some large corporations do use it to connect many LAN’s together into a wide area network. The supporting hardware to handle fibre-optic backbones is quite expensive and specialised.
003
Figure 3 shows the symbol used for a Fibre-optic line tag.

Introduction to Networks
Network Topology
Network Topology describes the way network cabling is laid out. This doesn't mean the physical layout (how it loops through walls and floors), but how the logical layout looks when viewed in a simplified diagram.
Bus Networks is one of the most widely used network topologies. A bus network uses acable to which all the network devices are attached, either directly or through a junction box.
The method of attachment depends on the type of bus network, the network protocol, and the speed of the network. The main cable that is used to connect all the devices is called the backbone.
0001
Figure 1 shows a schematic of a bus network.
In figure 1, the backbone has a number of junction boxes (transceivers) attached. This allows for a high-speed backbone that is usually also immune to problems with any network card within a device.
The junction box allows traffic through the backbone whether or not a device is attached to the junction box. Each end of the backbone, called the bus, is terminated with a block of resistors or a similar electrical device.
A popular variation of the bus network topology is found in many small LAN’s. This consists of a length of cable that snakes from machine to machine. There are no transceivers along the network.
Instead, each device is connected into the bus directly using a T-shaped connector (Bus Network Connector) on the network interface card.
The connector connects the machine to the two neighbours through two cables, one to each neighbour. At the ends of the network, a simple resistor is added to one side of the T-connector to terminate the network electrically.
0002
Figure 2 shows a schematic of a machine-to-machine bus network.
In figure 2, each network device has a T-connector attached to the network interface card,leading to the two neighbours.
The two ends of the bus are terminated with resistors. Some devices on this type of network use a telephone jack connector, called RJ-45, instead of a T-connector and BNC jacks.
In this case, a special adapter must be coupled into the network backbone to accept the telephone jacks. This connector acts much like a transceiver in the true bus network.
This machine-to-machine network, also called a peer-to-peer network, is not capable of sustaining the high speeds possible with a backbone-based bus network.
A machine-to-machine network is usually built using coaxial cable. Until recently, these networks were limited to a throughput of about 10 Mbps.
Recent improvements allow 100 Mbps on this type of network.
The problem with this type of machine-to-machine network is that if one machine is taken off the network cable or the network interface card malfunctions, the backbone is broken and must be tied together again with a jumper of some sort.
Ring Network is a closed network structure in the form of a circle, to which all nodes are connected. Despite misconceptions, there is no physical loop made of the network cable, at least not in the case of the most common form of ring network called Token Ring.
The ring name comes from the design of the central network device, which has a loop inside it to which are attached cables for all the devices on the network.
With a Token Ring network, a central control unit called a Media Access Unit (MAU) has a cable ring inside it to which all devices are attached.
0004
Figure 3 shows a schematic of a Token Ring network.
In figure 3, with the MAU at the centre of the network containing the bus ring. Attached to the ring through junction boxes are all the network devices.
There are some true ring networks that have a physically closed loop of the network cable. The ring network has some advantages from a design point of view in that network problems with traffic collisions are handled more easily than on a bus network.
A problem is that as with the bus-based machine-to-machine network, any problem with one machine's connection to the network cable can crash the entire network.
005
Figure 4 shows the token access method in a Token Ring network.
In figure 4, a Token Frame is transported in only one direction, until it reaches it’s destination. Thereafter it’s back transported by the Token Ring network until the sending node recognise it and remove it from the ring.
A Star Network is arranged in a central structure with branches radiating from it. The central point of the star-structure is called a concentrator, into which plug all the cables from individuals machines.
On machine on the network usually acts as the central controller or network server. A star network has one major advantage over the machine-to-machine bus and ring networks: When a machine is disconnected from the concentrator, the rest of the network continues functioning unaffected.
006
Figure 5 shows a schematic of a star network.
In figure 5, each cable from the concentrator to the device comes out of one of a row of slots or connectors, each identified by a number.
Network traffic on a star network proceeds from your machine to the concentrator, then out to the target machine. A star network needs a lot of cable because each machine has to have a cable straight to the concentrator.
A Hub Network is similar to the bus network in that it uses a backbone cable that has a set of connectors on it. The cable is called a backplane in a hub network. Each connector leads to the hub device, which leads off to network devices.
This allows a very high-speed backplane to be used, which can be as long and complex as needed. Hub networks are commonly found in large organisations that must support many network devices and need high speed.
The hubs that lead off the backplane can support many devices, depending on the type of connector. They can support hundreds of PC each, so a hub network can be used for very large networks. The cost of a hub network is usually very high because of the high-speed backbone and the fast hub devices.
005
Figure 6 shows a schematic of a hub network.
A Local Area Networks (LAN) is a number of devices (computers, printers, and other special peripherals) that are connected to eachother by some form of wiring, all of which are treated as a single entity for TCP/IP configuration.
This usually means they share a subnet IP address in common. A LAN enables independent devices to communicate directly with each other through peer-to-peer communications.
A LAN does not exceed a span of about 10 kilometre’s and is usually limited to a single building or group of close buildings. LAN’s use a moderate data rate, which means they are slower than mainframe-to-mainframe links.
A LAN is a physical and logical accumulation of machines, called nodes, and cables or other communications method's between the machines, called links. Usually the links are simple coaxial or twisted-pair cables.
In larger LAN’s, there may have to be amplifiers or repeaters positioned along the cables to ensure the signal is not lost due to lack of strength.
There are three characteristics of LAN’s that must always be considered:
• The transmission medium (the type of cabling used as the link).
The transmission technique (the technique used to handle transmission on the medium).
The access control method (which decides how a machine accesses the medium).
The medium is straightforward:
• It's a choice between one type of cable or another, dependent primarily on the speed of the network and the adapter cards, as well as the type of network topology.
The transmission technique is usually one of two:
• Circuit-Switched networks, this networks uses dedicated connections between any two machines (or more properly, between any two nodes). As long as the circuit exists, the sending machine can always talk directly to the destination machine.
The connection between the two machines is left in place until no longer needed. This doesn't mean that a cable has to be strung between the two devices, the connection may be made inside a switching box of some sort, which can connect and disconnect between any two machines running into it quickly and flexibly.
The connection between two machines is exclusively used by those two machines only, and no other transmission is allowed on the connection.
0005
Figure 7 shows fragmentation and reassemble of a message on a circuit switching network.
Packet-Switched networks, this networks divides all messages on the local area network into small chunks called packets and attaches information to the front of the packet that identifies the recipient.
The packets from all the machines on the local area network are placed on a high-bandwidth cable running through all the machines on the network.
As a packet moves around the network, each machine analyses the header to see if the packet is for it. If not, it is sent further on.
005
Figure 8 shows fragmentation and reassemble of a message on a packet switching network.
While packet switching is a more flexible approach than circuit switching, it does have a few problems. The primary problem is network traffic.
As the number of nodes on the network increases, the network traffic increases too, sometimes reaching the network limit's.
Another problem with packet switching is that there is no guarantee of packets getting from source to destination, which is one of the strong points of circuit switching.
Some examples of common used networks:
A Backbone Network:
0006
Figure 9 shows a schematic of a Backbone Network.
A Thinnet Network:
007
Figure 10 shows a schematic of a Thinnet Network.
• A 10BASET Network:
0007
Figure 11 shows a schematic of a 10BASET Network.
Wide Area Networks (WAN) is a number of local area networks that are connected to form a large, logical entity. The LAN’s are connected through a gateway or bridge, cabled to each other with a high-speed network cable.
WAN’s can be close together physically or separated by a large distance. For example, the design of the WAN is such that machines-to-machines connections are simpler than going out over the internet, and usually much faster.
WAN’s can share a subnet IP address, or they can have different subnets. The design of the WAN is more a choice of logical configuration and can be tailored to meet traffic, security, and speed considerations. WAN’s are used by most corporations that maintain multiple offices.

Network Protocols & ISO model
ISO OSI model
The standard model for networking protocols and distributed applications is theInternational Standard Organization's / Open System Interconnect (ISO/OSI) model. It defines seven network layers.
layers
Layer 1 - Physical
Physical layer defines the cable or physical medium itself, e.g., thinnetthicknet,unshielded twisted pairs (UTP). All media are functionally equivalent. The main difference is in convenience and cost of installation and maintenance. Converters from one media to another operate at this level.
Layer 2 - Data Link
Data Link layer defines the format of data on the network. A network data frame, aka packet, includes checksumsource and destination address, and data. The largest packet that can be sent through a data link layer defines the Maximum Transmission Unit (MTU).
The data link layer handles the physical and logical connections to the packet's destination, using a network interface. A host connected to an Ethernet would have anEthernet interface to handle connections to the outside world, and a loopback interface to send packets to itself.
Ethernet addresses a host using a unique, 48-bit address called its Ethernet address orMedia Access Control (MAC) address. MAC addresses are usually represented as six colon-separated pairs of hex digits, e.g., 8:0:20:11:ac:85.
This number is unique and is associated with a particular Ethernet device. Hosts with multiple network interfaces should use the same MAC address on each.
The data link layer's protocol-specific header specifies the MAC address of the packet's source and destination. When a packet is sent to all hosts (broadcast), a special MACaddress (ff:ff:ff:ff:ff:ff) is used.
Layer 3 - Network
NFS uses Internetwork Protocol (IP) as its network layer interface. IP is responsible for routing, directing datagrams from one network to another. The network layer may have to break large datagrams, larger than MTU, into smaller packets and host receiving the packet will have to reassemble the fragmented datagram.
The Internetwork Protocol identifies each host with a 32-bit IP address. IP addresses are written as four dot-separated decimal numbers between 0 and 255, e.g., 129.79.16.40. The leading 1-3 bytes of the IP identify the network and the remaining bytes identifies the host on that network.
The network portion of the IP is assigned by InterNIC Registration Services, under the contract to the National Science Foundation, and the host portion of the IP is assigned by the local network administrators, locally by noc@indiana.edu.
For large sites, usually subnetted like ours, the first two bytes represents the network portion of the IP, and the third and fourth bytes identify the subnet and host respectively.
Even though IP packets are addressed using IP addresses, hardware addresses must be used to actually transport data from one host to another. The Address Resolution Protocol(ARP) is used to map the IP address to it hardware address.
Layer 4 - Transport
Transport layer subdivides user-buffer into network-buffer sized datagrams and enforces desired transmission control. Two transport protocols, Transmission Control Protocol (TCP)and User Datagram Protocol (UDP), sits at the transport layer.
Reliability and speed are the primary difference between these two protocols. TCPestablishes connections between two hosts on the network through 'sockets' which are determined by the IP address and port number.
TCP keeps track of the packet delivery order and the packets that must be resent. Maintaining this information for each connection makes TCP a stateful protocol.
UDP on the other hand provides a low overhead transmission service, but with less error checking. NFS is built on top of UDP because of its speed and statelessness. Statelessness simplifies the crash recovery.
Layer 5 - Session
The session protocol defines the format of the data sent over the connections. The NFSuses the Remote Procedure Call (RPC) for its session protocol. RPC may be built on eitherTCP or UDP. Login sessions uses TCP whereas NFS and broadcast use UDP.
Layer 6 - Presentation
External Data Representation (XDR) sits at the presentation level. It converts local representation of data to its canonical form and vice versa. The canonical uses a standard byte ordering and structure packing convention, independent of the host.
Layer 7 - Application
Provides network services to the end-users. Mail, ftp, telnet, DNS, NIS, NFS are examples of network applications.

Network Protocols & ISO model
Network protocol
TCP/IP is a large collection of different communication protocols.
A Family of Protocols
TCP/IP is a large collection of different communication protocols based upon the two original protocols TCP and IP.
TCP - Transmission Control Protocol
TCP is used for transmission of data from an application to the network.
TCP is responsible for breaking data down into IP packets before they are sent, and for assembling the packets when they arrive.
IP - Internet Protocol
IP takes care of the communication with other computers.
IP is responsible for the sending and receiving data packets over the Internet.
HTTP - Hyper Text Transfer Protocol
HTTP takes care of the communication between a web server and a web browser.
HTTP is used for sending requests from a web client (a browser) to a web server, returning web content (web pages) from the server back to the client.
HTTPS - Secure HTTP
HTTPS takes care of secure communication between a web server and a web browser. HTTPS typically handles credit card transactions and other sensitive data.
SSL - Secure Sockets Layer
The SSL protocol is used for encryption of data for secure data transmission.
SMTP - Simple Mail Transfer Protocol
SMTP is used for transmission of e-mails.
MIME - Multi-purpose Internet Mail Extensions
The MIME protocol lets SMTP transmit multimedia files including voice, audio, and binary data across TCP/IP networks.
IMAP - Internet Message Access Protocol
IMAP is used for storing and retrieving e-mails.
POP - Post Office Protocol
POP is used for downloading e-mails from an e-mail server to a personal computer.
FTP - File Transfer Protocol
FTP takes care of transmission of files between computers
NTP - Network Time Protocol
NTP is used to synchronize the time (the clock) between computers.
DHCP - Dynamic Host Configuration Protocol
DHCP is used for allocation of dynamic IP addresses to computers in a network.
SNMP - Simple Network Management Protocol
SNMP is used for administration of computer networks.
LDAP - Lightweight Directory Access Protocol
LDAP is used for collecting information about users and e-mail addresses from the internet.
ICMP - Internet Control Message Protocol
ICMP takes care of error handling in the network.
ARP - Address Resolution Protocol
ARP is used by IP to find the hardware address of a computer network card based on the IP address.
RARP - Reverse Address Resolution Protocol
RARP is used by IP to find the IP address based on the hardware address of a computer network card.
BOOTP - Boot Protocol
BOOTP is used for booting (starting) computers from the network.
PPTP - Point to Point Tunneling Protocol
PPTP is used for setting up a connection (tunnel) between private networks.

0 comments: