Thursday, July 19, 2007

Routing

Routing is the process of selecting best paths in a network for moving a packet of data from source to destination. Routing is usually performed by a dedicated device called a router.

Routers don’t really care about hosts, they only care about networks and the best path to each network. The logical network address or IP address of the destination host is used to route packets to a network through a routed network, then the hardware address or MAC address of the host is used to deliver the packet from a router to the correct destination host.

Routing involves two basic activities: determining optimal routing paths and transporting packets through an internetwork. Part of this process involves analyzing a routing table to determine the best path.

Routing protocols use metrics to evaluate what path will be the best for a packet to travel. A metric is a standard of measurement, such as path bandwidth, that is used by routing algorithms to determine the optimal path to a destination. To aid the process of path determination, routing algorithms initialize and maintain routing tables, which contain route information. Route information varies depending on the routing algorithm used.

Routing algorithms fill routing tables with a variety of information. Destination/next hop associations tell a router that a particular destination can be reached optimally by sending the packet to a particular router representing the "next hop" on the way to the final destination. When a router receives an incoming packet, it checks the destination address and attempts to associate this address with a next hop.

Routing algorithms have used many different metrics to determine the best route. The following metrics can be used to determine best path

• Path length - Path length is the sum of the costs associated with each link traversed. Other routing protocols define hop count, a metric that specifies the number of passes through internetworking products, such as routers, that a packet must take en route from a source to a destination.

• Reliability - refers to the dependability (usually described in terms of the bit-error rate) of each network link.

• Delay - refers to the length of time required to move a packet from source to destination through the internetwork.

• Bandwidth - refers to the available traffic capacity of a link.

• Load - refers to the degree to which a network resource, such as a router, is busy. Load can be calculated in a variety of ways, including CPU utilization and packets processed per second.

• Communication cost

Routing tables also can contain other information, such as data about the desirability of a path. Routers compare metrics to determine optimal routes, and these metrics differ depending on the design of the routing algorithm used.

Routers communicate with one another and maintain their routing tables through the transmission of a variety of messages. The routing update message is one such message that generally consists of all or a portion of a routing table. By analyzing routing updates from all other routers, a router can build a detailed picture of network topology.

Classes of routing protocols:

Distance Vector:
Distance Vector protocol is a simple routing protocol that uses distance or hop count as its primary metric for determining the best forwarding path. The distance-vector protocols find the best path to a remote network by judging distance. Distance vector algorithms, also known as Bellman-Ford algorithms send the entire routing table to directly connected neighbors. Distance vector algorithms know only about their neighbors. RIP and IGRP are the examples for distance vector protocols.

Link State:
Link state protocols send updates containing the state of their own links to all other routers on the network. Link-state algorithms also known as shortest path first algorithms flood routing information to all nodes in the internetwork. Each router, however, sends only the portion of the routing table that describes the state of its own links. In link-state algorithms, each router builds a picture of the entire network in its routing tables & determines the shortest path to a destination. OSPF is an example for link state protocol.

Friday, June 1, 2007

MAC Address

MAC Address, short for Media Access Control Address is an identity code burnt in to a device, such as a network card (Ethernet card), when it is manufactured. A MAC address is a 48-bit defined number which uniquely identifies that card from all others in the world. This unique hardware address is represented by six octets, separated by colons, such as CO:3C:4E:00:10:8F. Layer 2 of the OSI reference model uses the MAC address to deliver the frames to the destination host.

A MAC address Addresses can either be "universally administered addresses" or "locally administered addresses."

A universally administered address is uniquely assigned to a device by its manufacturer. These are sometimes called "burned-in addresses." The first three octets (in transmission order) identify the organization that issued the identifier and are known as the Organizationally Unique Identifier (OUI). The following three octets are assigned by that organization in nearly any manner, subject to the constraint of uniqueness.

A locally administered address is assigned to a device by a network administrator, overriding the burned-in address.

IP Addressing

IP address is short for Internet Protocol address. An IP address is a unique address used to identify a device on an IP network. An IP address consists of 32 bits of information & these bits are divided into four octets or bytes. Each octet is separated by a period (dot). An IP address can be expressed using one of following methods

i. Dotted decimal format (for example, 192.168.1.1)
ii. Binary (for example, 11000000.10101000.00000001.00000001)

The value in each octet ranges from 0 to 255 in decimal, or 00000000 - 11111111 in binary.

The following example shows how to convert binary octets to decimal. The right most bit, or least significant bit, of an octet will hold a value of 20. The bit just to the left of that will hold a value of 21. This continues until the left-most bit, or most significant bit, which will hold a value of 27. So if all binary bits are a one, the decimal equivalent would be 255 as shown

  1  1  1  1 1 1 1 1 
128 64 32 16 8 4 2 1
(128+64+32+16+8+4+2+1=255)
An IP address can be divided into a network portion and host portion. The network address uniquely identifies each network & the node address or host address uniquely identifies each machine on a network.

There are five different classes of networks, A, B, C, D and E. Given an IP address, its class can be determined from the three high-order bits. The terms Class A, B etc are rarely used in the industry since the introduction of Classless Inter Domain Rouing(CIDR).

Class A:
The first bit of the first octet in a Class A network address must always be 0. This means a Class A address must be between 0 and 127.

Consider the following network address:

0xxxxxxx
If we turn the other 7 bits all off and then turn them all on, we’ll find the Class A range of network addresses:

00000000 = 0
01111111 = 127

So, Class A range of addresses falls between 1.0.0.0 and 127.255.255.255 (0 is not a valid class A network). In a Class A network address, the first byte is used to identify the network address and the remaining three bytes are used for the node addresses.

The Class A format is: network.host.host.host

For example in the IP address 10.12.22.30, 10 is the network address & 12.22.30 is the host address.

Class B:
The first bit of the first byte, in a Class B network must always be 1, but the second bit must always be 0. If you turn the other 6 bits all off and then all on, you will find the range for a Class B network:

10000000 = 128
10111111 = 191

So, Class B range of addresses falls between 128.0.0.0 and 191.255.255.255
In a Class B network address, the first two bytes are used to identify the network address and the remaining two bytes are used for the node addresses.

The Class B format is: network.network.host.host

For example in the IP address 172.16.22.56, 172.16 is the network address & 22.56 is the host address.

Class C:
The first 2 bits of the first octet in a Class C network must always be 1, but the third bit must always be 0. If you turn the other 5 bits all off and then all on, you will find the range for a Class B network:

11000000 = 192
11011111 = 223

So, Class C range of addresses falls between 192.0.0.0 and 223.255.255.255
In a Class B network address, the first two bytes are used identify the network address and the remaining two bytes are used for the node addresses.

The Class B format is: network.network.host.host

For example in the IP address 192.168.1.2, 192.168.1 is the network address & 2 is the host address.

Class D and E:
The addresses between 224 and 255 are reserved for Class D and E networks.
Class D addresses ranges from 224.0.0.0 to 239.255.255.255 which are used for multicast.
Class E addresses ranges from 240.255.255.255 to 254.255.255.255 which are used for scientific purposes.

How to connect two computers?

Following steps tells you how to network or connect two computers.

- 1st, install the network cards (LAN cards) on each computer.

- 2nd thing is identify the Operating Sytem that you are running on each computer & install the drivers for the network cards in that OS.

- 3rd, decide on whether to use a direct cable between the two computers or to use a hub or switch. If the two computers are to be connected directly, a crossover cable must be used. When connecting them through a hub or switch, a straight through cable must be used.

Ethernet Cabling

Several types of cabling are used for Ethernet & few of them are discussed below.

10Base2 or Thinnet supports 10Mbps (transmitting Ethernet packets at a rate of a 10Mb per second), baseband technology & can span up to 200 meters in length. The 10 means 10Mbps, Base means baseband technology, and the 2 means 200 meters. This uses a string of RJ-58 coaxial cables in a bus topology, with BNC-T connectors attached to each device.

10Base5 or Thicknet supports 10Mbps, baseband technology, up to 500 meters in length. This uses a single 75-ohm coaxial cable in a bus topology, connecting each device with a "vampire tap" clamped over a hole drilled in the cable. Segments may be up to 500 meters in length.

10BaseT supports 10Mbps using category 3 UTP wiring. Unlike the 10Base2 and 10Base5 networks, each device must connect into a hub or switch, and you can only have one host per segment or wire. This uses a RJ-45 connector (8-pin modular connector) with a physical star topology and a logical bus.

100BaseTX (IEEE 802.3u) uses category 5, 6, or 7 UTP two-pair wiring. There can be only one user per segment. Supports up to 100 meters in lenght. It uses a RJ-45 connector with a physical star topology and a logical bus.

1000BaseT (IEEE 802.3ab) supports 1000 Mbps. This uses category 5, four-pair UTP wiring & can go up to 100 meters long.

1000BASE-X is used in industry to refer to gigabit Ethernet transmission over fiber, where options include 1000BASE-SX, -LX, or -LH/-ZX implementations.

1000BaseSX (IEEE 802.3z) uses Multi-Mode Fiber that uses a 62.5- and 50-micron core and 850 nanometer laser and can go up to 220 meters with 62.5-micron, 550 meters with 50-micron.

1000BaseLX (IEE 802.3z) uses Single-mode fiber that uses a 9-micron core and 1300 nanometer laser, and can go from 3 kilometers up to 10 kilometers.

1000BASE-ZX and 1000BASE-LH refers to gigabit Ethernet transmission using 1550 nm wavelength to achieve distances of at least 70 km over single-mode fiber.

Thursday, May 31, 2007

Networking Devices

This section will provide you with the details of few of the networking devices that are widely used in the IT industry to form networks.

NETWORK SEGMENT :
A network segment can be defined as a network link connecting two interfaces or a physical connectivity between the network interfaces of two computer devices. The physical layer connectivity could be a piece of copper or fiber-optic cable, an infrared or wireless. A network is built by connecting together multiple network segments using a hub, bridge, switch or a router.

HUB :
A hub is a network device that is used for connecting computers on a Local Area Network (LAN). It forwards all the packets it receives to all of its ports. Hubs work at the physical layer of the OSI model. There are two main types of hubs, passive and active. A passive hub simply splits the signal and forwards it. An active hub takes the incoming frames, amplifies the signal, and forwards it.

BRIDGE :
A network bridge connects multiple network segments at the data link layer (layer 2) of the OSI model. Bridges are similar to repeaters or network hubs; however bridges are more intelligent than hubs. A bridge maintains a table with MAC addresses (Media Access Control address also called Ethernet Address is a unique hardware address that each network device has burned into it.) of all attached nodes, and on which segment they are located. It takes an incoming frame, reads the destination MAC address and consults the table to decide what should be done with the frame. If the location of the destination MAC address is listed in the table, the frame is forwarded to the corresponding port. The frame will be discarded if the destination port is the same as the port from which the frame arrived. If the location is not known yet, the frame will be flooded through all outgoing ports.

SWITCH :
A network switch is a networking device that performs transparent bridging which connects multiple network segments with forwarding based on MAC addresses. The switch connects devices together to form the LAN. Switches can connect at 10,100, or 1000 megabits per second, at half or full duplex. Half duplex means that the device can only send or receive at any given time, whereas full duplex can send and receive, at the same time.Switches were developed to improve network performance even more. Switches are very similar to bridges as they also maintain a table with MAC addresses per port to make forwarding decisions, operate at the Data Link layer (layer 2) of the OSI model. Some of the main differences between switches and bridges are:- Switches have more ports than bridges. Switches are meant to replace hubs and improve network performance by creating a separate collision domain per port.- Bridges switch in software whereas switches switch in hardware (integrated circuits).- Switches offer more variance in speed; an individual port can be assigned 10 Mb/s, 100 Mb/s, 1 Gb/s or even more.

SWITCH Vs HUB
A hub is a fairly unsophisticated broadcast device. Hubs do not manage any of the traffic that comes through them, and any packet entering any port is broadcast out on every other port (every port other than the port of entry). Since every packet is being sent out through every other port, packet collisions result--which greatly hinder the smooth flow of traffic.A switch isolates ports, meaning that every received packet is sent out only to the port on which the target may be found. If it is not, then the switch will broadcast the packet to all ports except the port from which the request originated. Since the switch intelligently sends packets where they need to go the performance of the network can be greatly increased.

ROUTER :
Routers are used to interconnect multiple networks and route information between these networks by choosing an optimal path to the destination. A router forwards data packets across a network towards their destinations, through a process known as routing. Routing occurs at Layer 3 of the OSI model.A router acts as a junction between two or more networks to transfer data packets among them. A router is different from a switch. A switch connects devices to form a local area network (LAN). In order to route packets, a router communicates with other routers using routing protocols and using this information creates and maintains a routing table. The routing table stores the best routes to certain network destinations, the "routing metrics" associated with those routes, and the path to the next hop router.A router that connects clients to the Internet is called an edge router. A router that serves solely to transmit data between other routers, e.g. inside the network of an ISP, is called a core router. Depending on their function, these routers will support any number of routing protocols including IS-IS OSPF IGRP EIGRP RIP BGP and EGP.

FIREWALL :
A firewall is a security device which provides a solution to enforce security policies. Firewalls can either be hardware or software based.A firewall's basic task is to control traffic between computer networks with different zones of trust. Normally, a Firewall is deployed between a trusted, protected private network and an untrusted public network. Typical example where the Firewalls are usually placed is between the users of a LAN and the Internet. A firewall has built-in filters that can disallow unauthorized or potentially dangerous sources from entering the network. Firewalls are frequently used to prevent unauthorized Internet users from accessing private networks connected to the Internet, especially intranets. All messages entering or leaving the intranet pass through the firewall, which examines each message and blocks those that do not meet the specified security criteria. It also logs attempted intrusions.

MODEM :
Modem is short for modulator/demodulator. It is a device that connects your computer to a phone line in order to communicate with other computers. Modem converts the digital signal from a computer to an analogue signal that can be transmitted along an ordinary phone line. The signal is then converted back to digital form by the modem at the receiving side so that it can be processed by a receiving computer. This allows computers to connect to the Internet through a telephone line. Basically, modems do for computers what a telephone does for humans.

Ethernet Networking

Ethernet is the most widely used network standard that allows all hosts on a network to share the same bandwidth of a link. Ethernet has been standardized as IEEE 802.3.

Ethernet networking uses Carrier Sense Multiple Access with Collision Detection (CSMA/CD), a protocol that helps devices share the bandwidth evenly without having two devices transmit at the same time on the shared network medium. CSMA/CD overcomes the problem of collisions that occur when different nodes transmit packets simultaneously.

When a host wants to transmit over the network, it first checks for the presence of a digital signal on the wire. If everything is clear i.e., if no other host is transmitting, the host will then proceed with its transmission. But it doesn’t stop there. The transmitting host constantly monitors the wire to make sure no other hosts begin transmitting. If the host detects another signal on the wire, it sends out a jam signal that causes all nodes on the segment to stop sending data. The nodes stop transmitting for a short time until the timers expire & then attempts to transmit again. Backoff algorithm determines when the colliding stations can retransmit. If collisions keep occurring after 15 tries, the nodes attempting to transmit will then abort transmission.

LAN / WAN Topologies

Network topology is the configuration of connections between nodes or workstations. A network topology is the method in which nodes or devices of a network are connected by links. A node can have one or more links to others. Following are the types of topologies.

BUS Topology:

A bus topology is a network architecture in which the nodes are connected via ashared communications line, called a bus. Bus topology is the cheapest topology to implement A cable break in this type can disable the entire network. Performance degrades as additional computers are added or on heavy traffic.


RING Topology:

A ring topology is a topology of computer networks where each node is connected to two other nodes,so as to create a ring. If one of the nodes in the ring topology breaks down then the entire network will break down with it as itrequires a full circle in order to function.



STAR Topology:

Star topology is one of the most common computer network topologies. A star network consists of one central switch or hub to transmit messages. There are no problems with collisions of Data since each station has its own cable to the switch or hub. The centre of a star, i.e. the hub or switch, is the best place to find network faults. It is easy to add and remove new nodes to a star topology without disturbing the rest ofthe network. Failure of the central node can disable the entire network.


MESH Topology:

A mesh topology is a network that employs one of two connection arrangements, fullmesh topology or partial mesh topology. In the full mesh topology, each node is connected directly to each of the others. In the partial mesh topology, some nodes are connected to all the others, but some of the nodes are connected only tothose other nodes with which they exchange the most data.


TREE Topology:

A tree topology is a combination of two or more star networksconnected together. The central switch or hub of the star networks are connected to a main cable called the bus. Thus, atree network is a bus network of star networks.

Friday, May 11, 2007

OSI Reference Model

Open Systems Interconnection (OSI) reference model was created by the International Organization for Standardization (ISO) to overcome the problem in older days where computers could typically communicate only with computers from the same manufacturer.

A reference model defines how communications should take place. It defines all the processes required for effective communication and divides these processes into logical groupings called layers. When a communication system is designed in such a way, it is known as layered architecture.

The OSI model was created to allow interoperability across various platforms offered by vendors. The OSI reference model is a hierarchical structure of seven layers that describes how information from an application in one computer moves through a network medium to an application in another computer.

Open System Interconnection (OSI) reference model consists of the following seven layers.

Layer 7 - Application
Layer 6 - Presentation
Layer 5 - Session
Layer 4 - Transport
Layer 3 - Network
Layer 2 - Data link
Layer 1 - Physical

Application Layer:

The application layer is the seventh level of the seven-layer OSI model. The application layer is where users actually communicate to the computer. The Application layer acts as an interface between the users & the actual application program to interact with the application. Telnet, File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP) and Hypertext Transfer Protocol (HTTP) are some of the application layer protocols.

Presentation Layer:

The presentation layer is responsible for data translation and code formatting. The Presentation layer transforms the data to provide a standard interface for the Application layer. This is usually part of an operating system, that converts incoming and outgoing data from one presentation format to another eg. EBCDIC to ASCII conversion.

Session Layer:

The Session layer controls the dialogues (sessions) between computers. The Session layer is responsible for setting up, managing, and then tearing down connections between the local and remote application. It provides for either full duplex or half-duplex operation. Session layer basically keeps different applications data separate from other applications data.

Transport Layer:

The Transport layer is responsible for the transfer of data between end users. This layer provides transparent transfer of data between end users, providing reliable data transfer while relieving the upper layers of it. The transport layer provides flow control, error detection & correction. Flow control manages data transmission between devices so that the transmitting device does not send more data than the receiving device can process. Error detection involves detecting transmission errors & error correction involves retransmitting data in case of transmission failures.

Network Layer:

The Network layer prerforms routing functions necessary to transfer data from an originating system to the destination system. The network layer uses the network address for the route selection to transmit the data. The Network layer formats the message into packets and adds a customized header containing the destination and source IP address or network address.

Data Link Layer:

The Data Link layer provides the physical transmission of the data. This layer handles physical addressing, error notification, network topology, and flow control. The Data Link layer formats the message into frame, and adds a customized header containing the destination and source MAC address or hardware address.

Physical Layer:

The Physical layer defines all electrical and physical specifications for devices. This includes the physical connectors, voltages levels, maximum transmission distances and cable specifications. It sends and receives streams of binary digits across a physical medium such as cable, optical fibre or a radio link.

Computer Network - LAN, WAN & MAN

A network consists of a group of computers and devices connected together to communicate with each other for the purpose of sharing information & resources.

Connections can be permanent using cable, or temporary through telephone or other communications links. The hardware used to transmit data across the network is called the media. The transmission medium can be physical using UTP copper cable, fiber optic cable or wireless.

Common types of networks can be classified as Local Area Networks (LAN), Wide Area Networks (WAN), Metropotilan Area Networks (MAN).

LAN (Local Area Network):
LAN is a Communications network covering a small geographically area, like a home, office or small group of buildings connecting PCs, workstations and servers together to allow users to share resources.

WAN (Wide Area Network):
A wide area network or WAN is a computer network covering a wide geographical area. Typically, a WAN consists of two or more local-area networks (LANs). WANs are used to connect local area networks (LANs) together, so that users and computers in one location can communicate with users and computers in other locations. A well known example of a WAN is the Internet.

MAN (Metropotilan Area Networks):
Metropolitan area networks, are large computer networks usually spanning a city that covers larger area than a LAN but smaller than WAN. They typically use wireless infrastructure or optical fiber connections to link their sites.