You are on page 1of 30

Basics of Networking & Designs of Simple Networks

The term network can refer to any interconnected group or system. More specifically,a network is any method of sharing information between two systems (human, electrical or mechanical). A network lets you effortlessly transfer files, pictures, music and information . It also enables everyone in your home or office to share one broadband Internet connection, one printer, one scanner.

A Simple Network Example

Classification of Network
According to the Size of the Network
LAN (Local Area Network) : A Local Area Network is a group of computers and network communication devices within a limited geographic area, such as an office building. Current LANs are most likely to be based on Ethernet technology. For example, a library will have a wired or wireless LAN for users to interconnect local devices (e.g., printers and servers). Local area networking uses switches, bridges and/or repeaters, and hubs to interconnect LANs and increase overall size. Routers are used to connect a LAN to a WAN or MAN. Both of these scenarios form an internetwork. The upside is that there speed is very high and the downside is that data can travel only a small length.

Figure : A Simple LAN Illustration

They are characterized by the following: High data transfer speeds Generally less expensive technologies Limited geographic area Security Scalability Resilience

Reliability MAN (Metropolitan Area Network) : A Metropolitan Area Network is a network that connects two or more Local Area Networks or Campus Area Networks together but does not extend beyond the boundaries of the immediate town, city, or metropolitan area. Multiple routers, switches & hubs are connected to create a MAN. A MAN can range any where from 5 to 50km in diameter. WAN (Wide Area Network) : A WAN is a data communications network that covers a relatively broad geographic area (i.e. one city to another and one country to another country) and that often uses transmission facilities provided by common carriers, such as telephone companies. They are generally connected with each other using routers.

Figure : An Example of WAN

They are characterized by the following: Multiple interconnected LANs Generally more expensive technology More sophisticated to implement than LANs Exist in an unlimited geographic area Less error resistance due to transmission travel distances Personal Area Network (PAN) : A personal area network (PAN) is a computer network used for communication among computer devices close to one person. Some examples of devices that may be used in a PAN are printers, fax machines, telephones, PDAs or scanners. The reach of a PAN is typically within about 20-30 feet (approximately 6-9 Meters). PANs can be used for communication among the individual devices (intrapersonal communication), or for connecting to a higher level network and the Internet. Storage Area Network (SAN) : We heavily rely on data in modern time. We have a lot of data in the form of audio and video. We need to store data for quick access and transfer on special storage devices. SAN may be referred to as a sub network or special purpose network. Its special purpose is to allow users on a larger network to connect various data storage devices with clusters of data servers. Virtual Private Network (VPN) : VPN is a private network that lets you access public networks remotely. VPN uses encryption and security protocols to retain privacy while it accesses outside resources by creating a virtual network for you which acts as if you are having a private line for the given period of time. When employed on a network, VPN enables an end user to create a virtual tunnel to a remote location. Typically, telecommuters use VPN to log in to their company networks from home.

According To the Type of Connection Used


Wired Network: A network that connects devices using cables (wires) like Coaxial Cable, Twisted pair Cable, Optical Fiber Cable etc. Wireless Network: A network that connects devices using wireless technologies like Bluetooth, infrared, radio frequency etc.

According To the Functional Relationship (Network Architecture)


Peer to peer network (Workgroup) : A workgroup is a collection of computers on a local area network (LAN) that share common resources and responsibilities. Workgroups provide easy sharing of files, printers and other network resources. Being a peer-to-peer (P2P) network design, each workgroup computer may both share and access resources if configured to do so. Workgroups are designed for s mall LANs in homes, schools, and small businesses. A Windows Workgroup, for example, functions best with 15 or fewer computers. As the number of computers in a workgroup grows, workgroup LANs eventually become too difficult to administer and should be replaced with alternative solutions like domains or other client/server approaches. Client-Server Network (Domain) : A Domain is a Network Architecture in which each computer or process on the network is either a client or a server. Servers are powerful computers or processes dedicated to managing disk drives ( file servers), printers (print servers), or network traffic ( network servers ). Clients are PCs or workstations on which users run applications. Clients rely on servers for resources, such as files, devices, and even processing power.

Network Topologies
Topology refers to the way in which the network of computers is connected. Each topology is suited to specific tasks and has its own advantages and disadvantages. The choice of topology is dependent upon--Type and number of equipment being used Planned applications and rate of data transfers Required response times Cost

Types of Network Topologies


Physical Topology: Physical topology defines how devices are connected to the network through the actual cables that transmit data ( physical structure of the network) Logical Topology: Logical Topology (also referred to as Signal Topology) is a Network computing term used to describe the arrangement of devices on a network and how they communicate with one another.

Common LAN Topologies (Physical)

1. BUS In a bus topology: A single cable connects each workstation in a linear, daisy-chained fashion . Signals are broadcasted to all stations, but stations only act on the frames addressed to them.

Figure : Bus Topology Representation

2. RING In a ring topology: Unidirectional links connect the transmit side of one device to the receive side of another device. Devices transmit frames to the next device (down stream member) in the ring.

Figure : Ring Topology Representation

3. STAR In a star topology: Each station is connected to a central Hub or S witch (concentrator) that functions as a multi-port repeater. The HUB broadcasts data all of the devices connected to it. The Switch transmits the data to the dedicated device for which the data is meant for.

Figure : Star Topology Representation

LAN Transmission Methods

Unicast Transmission : In unicast transmissions, a single data packet is sent

from a source to a single destination on the network. In Unicast Method: o The source addresses the packet with the destination address. o The packet is sent into the network. o The network delivers the packet to the destination. Multicast Transmission: In multicast transmissions, a single data packet is copied andsent to specific destinations on the. In network Multicast Process: o The source addresses the packet using a multicast address. o The packet is sent into the network. o The network copies the packet. o A copy is delivered to each destination that is included in the multicast address. Broadcast Transmission: In Broadcast transmissions, a single data packet is copied and sent to all the destinations on the network. In Broadcast Process: o The source addresses the packet with the broadcast address. o The packet is sent into the network. o The network copies the packet. o The packet copies are delivered to all destinations on the network.

Basic Hardware Components


LAN Infrastructure Devices
All networks are made up of basic hard ware building blocks to interconnect network nodes, such as Network Interface Cards (NICs), Bridges, Hubs, Switches, and Routers. In addition, some method of connecting these building blocks is required, usually in the form of galvanic cable ( most commonly Category 5 cable). Less common are microwave links (as in IEEE 802.11) or optical cable ("optical fiber"). Network Interface Cards : A network card, network adapter or NIC (network interface card) is a piece of computer hardware designed to allow computers to communicate over a computer network. It provides physical access to a networking medium and often provides a low-level addressing system through the use of MAC addresses. It allows users to connect to each other either by using cables or wirelessly. Repeaters : A repeater is an electronic device that receives a signal and retransmits it at a higher level or higher power, or onto the other side of an obstruction, so that the signal can cover longer distances without degradation. Because repeaters work with the actual physical signal, and do not attempt to interpret the data being transmitted, they operate on the Physical layer, the first layer of the OSI model. Hubs : A hub (concentrator) contains multiple ports, which is used to connect devices in a star topology. When a packet arrives at one port, it is copied to all the ports of the hub. But when the packets are copied, the destination address in the frame does not change to a broadcast address. It does this in a rudimentary way; it simply copies the data to all of the Nodes connected to the hub (broadcast). Bridges : A network bridge connects multiple network segments at the data link layer (layer 2) of the OSI model. Bridges do not promiscuously copy traffic to all

ports, as hubs do, but learn which physical addresses are reachable through specific ports. Once the bridge associates a port and an address, it will send traffic for that address only to that port. Bridges do send broadcasts to all ports except the one on which the broadcast was received. Bridges learn the association of ports and addresses by examining the source address of frames that it sees on various ports. Once a frame arrives through a port, its source address is stored and the bridge assumes that MAC address is associated with that port. The first time that a previously unknown destination address is seen, the bridge will forward the frame to all ports other than the one on which the frame arrived. Bridges come in three basic types: Local bridges : Directly connect local area networks (LANs) Remote bridges : Can be used to create a wide area network ( WAN) link between LANs. Remote bridges, where the connecting link is slower than the end networks, largely have been replaced by routers . Wireless bridges: Can be used to join LANs or connect remote stations to LANs. Switches : A switch is a device that performs switching. Specifically, it forwards and filters OSI layer 2 datagram (chunk of data communication) between ports (connected cables) based on the Physical- Addresses in the packets. This is distinct from a hub in that it only forwards the datagram to the ports involved in the communications rather than all ports connected. A switch normally has numerous ports with the intention that most or all of the networks be connected directly to a switch, or another switch that is in turn connected to a switch. Switches may operate at one or more OSI layers, including physical, data link, network, or transport (i.e., end-to-end). A device that operates simultaneously at more than one of these layers is called a Multilayer switch. Routers : Routers are networking devices that forward data packets along networks by using headers and forwarding/routing tables to determine the best path to forward the packets. Routers work at the Internet layer of the TCP/IP model or layer 3 of the OSI model. Routers also provide interconnectivity between like and unlike media. A router is connected to at least two networks, commonly two LANs or WANs or a LAN and its ISP's network. Some DSL and cable modems, for home use, have been integrated with routers to allow multiple home computers to access the Internet.

WAN Infrastructure Devices


As with LAN, there are numerous devices associated with data transmission across a WAN. Together these devices create the infrastructure of a functional WAN. These devices include: Router ATM Switch Modem and CSU/DSU Communication Server Multiplexer X.25/Frame Relay Switches ATM Switch: ATM Switches provide high-speed transfer between both LANs and WANs.

Modem (modulator / demodulator) : Modems convert digital and analog signals. At the source, modems convert digital signals to a form suitable for transmission over analog communication facilities (public telephone lines). At the destination, modems convert the signal back to a digital format. Multiplexer : A Multiplexer combines multiple signals for transmission over a single circuit. This allows for the transfer of various data simultaneously, such as video, sound, text, etc. Communication Servers : Communication Servers are typically dial-in/out servers that allow users to dial in from remote locations and attach to the LAN. X.25 / Frame Relay Switches : X.25 and Frame Relay Switches connect private data over public data circuits using digital signal. These units are very similar to ATM switches, but the transfer rate of data is not comparable.

Network Cabling
Cable is the medium through which information usually moves from one network device to another. There are several types of cable which are commonly used with LANs. In some cases, a network will utilize only one type of cable, other networks will use a variety of cable types. The type of cable chosen for a network is related to the network's topology, protocol, and size. Coaxial Cable : Coaxial cabling has a single copper conductor at its center. A plastic layer provides insulation between the center conductor and a braided metal shield. The metal shield helps to block any outside interference from fluorescent lights, motors, and other computers.

Figure : Coaxial Cable

Coaxial cabling is difficult to install, it is highly resistant to signal interference. In addition, it can support greater cable lengths between network devices than twisted pair cable. The two types of coaxial cabling are: Thick coaxial: Thick coaxial cable is also referred to as thicknet. 10Base5 refers to The specifications for thick coaxial cable carrying Ethernet signals. The 5 refers to The maximum segment length being 500 meters. Thick coaxial cable has an extra Protective plastic cover that helps keep moisture a way from the center conductor. This makes thick coaxial a great choice when running longer lengths in a linear bus network. One disadvantage of thick coaxial is that it does not bend easily and is difficult to install. Thin coaxial: Thin coaxial cable is also referred to as thinnet. 10Base2 refers to the specifications for thin coaxial cable carrying Ethernet signals. The 2 refers to the approximate maximum segment length being 200 meters. In actual fact the maximum segment length is 185 meters. Thin coaxial cable is popular in school networks, especially linear bus networks.

Coaxial Cable Connectors : The most common type of connector used with coaxial cables is the Bayonette Neil-Concel man (BNC) connector. Different types of adapters are available for BNC connectors, including a T connector, barrel connector, and terminator. Connectors on the cable are the weakest points in any network. To avoid problems with your network, always use the BNC connectors that crimp, rather than screw, onto the cable.

Figure : BNC Connector

Twisted Pair Cable : Twisted pair cable comes in two varieties: unshielded twisted pair and shielded twisted pair. Unshielded Twisted Pair Cable : Unshielded twisted pair (UTP) is the most popular and is generally the best option for school networks UTP cables contain four twistedpairs (Orange, green, Blue & Brown), enclosed in a common sheath. 10Base-T, 100Base-TX and 100Base-T2 only use two of the four pairs, while 100Base-T4 and 1000Base-T require all four pairs. For networking applications, UTP cabling normally refers to 100 ohm Category 3, 4 and 5 specifications. Category 5e, 6 and 7 have also been proposed to support higher data rates, such as the STP 300 M Hz standards. The terms "cat5" and "cat5e" refer to their Category specification equivalents.

Figure : Unshielded Twisted Pair Cable

The following table lists all the types of UTP cabling systems Cat1& Not suitable for Ethernet data network use Cat2 Unshielded twisted pair, supporting trans mission up to 16 MHz. Cat3 Suitable for 10Base-T, 100Base-T4 and 100Base-T2. Unshielded twisted pair, supporting transmission up to 20 MHz. Cat4 Provides more reliable data transport over Cat3 but is used only in token ring. Suitable for 10Base-T, 100Base-T4 and 100Base-T2. Unshielded twisted pair, supporting trans mission up to 100 MHz Cat5 this is the most common form of UTP cabling, but should be tested for 100Base-T performance. Suitable for 10Base-T, 100Base-T4, 100Base-T2 and 100Base-TX. "Enhanced Cat5" or Cat5e - unshielded twisted pair supporting transmission up to 200MHz. Has improved attenuation while sharing Cat5e similar electrical characteristics to Cat5.Supports 1000Base-T, 10BaseT, 100Base-T4, 100Base-T2, 100Base-TX, Near End Cross Talk (NEXT) and Power Sum Equal Level Far End Cross Talk (PSELFEXT).

Cat6 Cat7

Proposed standard for unshielded twisted pair, supporting transmission up to 400 MH z. Proposed standard for unshielded twisted pair, supporting transmission up to 600-700 MHz.

Unshielded Twisted Pair Connector

Figure : UTP Cable Connector RJ45

The standard connector for unshielded twisted pair cabling is an RJ-45 connector. This is a plastic connector that looks like a large telephone-style connector. Slot allows the RJ-45 to be inserted only one way. RJ stands for Registered Jack, implying that the connector follows a standard borrowed from the telephone industry. Shielded Twisted Pair (STP) Cable : A disadvantage of UTP is that it may be susceptible to radio and electrical frequency interference. Shielded twisted pair (STP) is suitable for environments with electrical interference; however, the extra shielding can make the cables quite bulky. Shielded twisted pair is often used on networks using Token Ring topology. Fiber Optic Cable : Fiber optic cabling consists of a center glass core surrounded by several layers of protective materials. It transmits light rather than electronic signals eliminating the problem of electrical interference. This makes it ideal for certain environments that contain a large amount of electrical interference. It has also made it the standard for connecting networks between buildings, due to its immunity to the effects of moisture and lighting.

Figure : Fiber Optic Cable

Fiber optic cable has the ability to transmit signals over much longer distances than coaxial and twisted pair. It also has the capability to carry information at vastly greater speeds. This capacity broadens communication possibilities to include services such as video conferencing and interactive services. The cost of fiber optic cabling is comparable to copper cabling; however, it is more difficult to install and modify. 10BaseF refers to the specifications for fiber optic cable carrying Ethernet signals.

Fiber Optic Connector : There are many types of connectors used with fiber optic cables. Each connector has its own strong points. The most common connector used with fiber optic cable is an ST connector. It is barrel shaped, similar to a BNC connector. A newer S C connector is becoming more popular. It has a squared face and is easier to connect in a confined space. SC styles: Originally developed by NTT, the SC connector has a push/pull snap fit. The duplex SC connector uses the same mating profile as the simplex design. A number of SC suppliers actually clip simplex SC connectors together to form the duplex version.

Figure : SC Simplex Type

SC Duplex Type

There are many types of connectors used with fiber optic cables. Each connector has its own strong points. The most common connector used with fiber optic cable is an ST connector. It is barrel shaped, similar to a BNC connector. A newer S C connector is becoming more popular. It has a squared face and is easier to connect in a confined space.

Types of Fiber Optic Cable


Single Mode cable: It is a single stand ( most applications use 2 fibers) of glass fiber with a diameter of 8.3 to 10 microns that has one mode of transmission. Single Mode cable carries higher band width than multimode fiber, but requires a light source with a narrow spectral width. Single- mode fiber also gives a higher transmission rate and up to 50 times more distance than multimode, but it also costs more. Single- mode fiber has a much smaller core than multimode.

Figure : Single Mode Transmission

Multi-Mode cable: It has a little bit bigger diameter, with a common diameters in the 50-to-100 micron range for the light carrying component. Multimode fiber gives high band width at high speeds (10 to 100 Mbps - Gigabit to 275 m to 2km ) over medium distances. Light waves are dispersed into numerous paths, or modes, as they travel through the cable's core. Typical multimode fiber core diameters are 50, 62.5, and 100 micro meters. However, in long cable runs, multiple paths of light can cause signal distortion at the receiving end, resulting in an unclear and incomplete data transmission.

Figure : Multimode Transmission

Facts about fiber optic cables: Outer insulating jacket is made of Teflon or PVC. Kevlar fiber helps to strengthen the cable and prevent breakage. A plastic coating is used to cushion the fiber center.

Network Communications
Network Models & Protocols
Network models define a set of network layers and how they interact. There are several different network models depending on what organization or company started them. The most important two are: OSI Network Model (Reference Model) The TCP/IP Model (D O D Model) Advantages of Layering : The layered concept of networking has the following advantages: Reduces Complexity: By dividing the processes into groups, or layers, implementation of network architecture becomes less complex Provides Compatibility: Standardized interfaces allow for "plug-and-play" compatibility and multi-vendor integration Facilitates modularization: Developers "swap" out new technologies at each layer keeping the integrity of the network architecture Accelerates evolution of technology: Since developers can focus on technology at one layer while preventing the changes from affecting another layer, this accelerates the evolution process Simplifies learning: Processes broken up into groups divides the complexities into smaller, manageable chunks. Introduction to Protocols In computing, a protocol is a convention or standard that controls or enables the connection, communication, and data transfer between two computing endpoints. In its simplest form, a protocol can be defined as the rules governing the syntax, semantics, and synchronization of communication. The general functions (Properties) of protocols are: Detection of the underlying physical connection (wired or wireless), or the Existence of the other endpoint or node Handshaking Negotiation of various connection characteristics How to start and end a message How to format a message What to do with corrupted or improperly formatted messages (error correction) How to detect unexpected loss of the connection, and what to do next Termination of the Chapter or connection of the underlying.

Need for Multiple Protocols : Complex data communications systems do not


use a single protocol to handle the entire transmission task. Instead they require a set of cooperative protocols called a Protocol Family or Protocol Suite. To understand the need of Protocol Suite, think of the problems that arise when machines communicate over the data network: Hardware Failure: A host or router may fail either because the hardware fails or because the operating system crashes. A network transmission link may fail or accidentally be disconnected. The protocol software needs to detect such failures and recover from them if possible. Network Congestion: Even when all hardware and software operates correctly, networks have finite capacity that can be exceeded. The protocol software needs to arrange ways that a congested machine can suppress further traffic. Packet Delay or Loss: Sometimes, packet experiences extremely long delays or are lost. The protocol software needs to learn about failures or adapt to long delays. Data Duplication or Inverted Arrivals: Networks that offers multiple routes may deliver data out of sequence or may deliver duplicates of packets. The protocol software needs to reorder packets and remove any duplicates. Taken together, the problem seem overwhelming, it is difficult to understand how to write a single protocol that can handle all of them. Therefore a group of protocols are used to solve all the above mentioned problems. Each protocol in a protocol suite has its own function and based on its function it is placed on a different layer in a Network Model.

The Open System Interconnection (OSI) Reference Model

Figure : The OSI Model

In 1983, the International Standards Organization (ISO) developed a model called Open Systems Interconnection (OSI) which is a standard reference model for communication between two end users in a network. The model is used in developing products and understanding networks. Layers in the OSI Model : OSI divides Telecommunications into Seven Layers. Each layer is responsible for a particular aspect of data communication. For example, one layer may be responsible for establishing connections between devices, while another layer may be responsible for error checking during transfer.

The layers of the OSI model are divided into two groups: the upper layer and lower layer. The upper layers (Host layers) focus on user applications and how files are represented on the computers prior to transport. The lower layers (Media Layers) concentrate on how the communication across a network actually occurs. Layer 7: The Application Layer : The Application Layer is the highest layer in the protocol stack and the layer responsible for introducing data into the OSI stack. Here reside the protocols for user applications that incorporate the components of network applications. The applications can be classified as: Computer applications Network applications Internetwork applications Computer Applications : Presentation ,Graphics , Database ,Word Processing, Spreadsheet Design/Manufacturing, Others Network Applications : Network Management Information, Location, Remote Location, Electronic Mail, File Transfer, Client/Server Process Internetwork Applications : World Wide Web, Conferencing (Video, Voice, Data) , Electronic Date Exchange, Internet Navigation Utilities, E-Mail Gateways, SpecialInterest Bulletin Boards, Financial Transaction Services. The functions of Application Layer are: Resource sharing and device redirection Remote file access Remote printer access Network management Directory services Electronic messaging (such as mail) etc Layer 6: The Presentation Layer : This is a layer, usually part of an operating system, that converts incoming and outgoing data from one presentation format to another (for example, from a text stream into a popup window with the newly arrived text). This layer is sometimes called the syntax layer. The Presentation Layer is responsible for the following services: Data representation: The presentation layer of the OSI model at the receiving computer is also responsible for the conversion of the external format with which data is received from the sending computer to one accepted by the other layers in the host computer. Data formats include postscript, ASCII, or BINARY such as EBCDIC (fully Extended Binary Coded Decimal Interchange Code). Data security: Some types of encryption (and decryption) are performed at the presentation layer. This ensures the security of the data as it travels down the protocol stack. For example, one of the most popular encryption schemes that is usually associated with the presentation layer is the Secure Sockets Layer (SSL) protocol. Data compression: Compression (and decompression) may be done at the presentation layer to improve the throughput of data. Layer 5: The Session (Chapter) Layer : The Chapter Layer establishes, manages, and terminates Chapters (different from connections) between applications as they interact on different hosts on a network. Its main job is to coordinate the service requests and responses between different hosts for applications. The Chapters established between hosts can be:

Simplex: Simplex trans mission is like a one-way street where traffic moves in only one direction. Simplex mode is a one-way-only transmission, which means that data can flow only in one direction from the sending device to the receiving device. Half Duplex: Half Duplex is like the center lane on some three-lane roads. It is a single lane in which traffic can move in one direction or the other, but not in both directions at the same time. Half-duplex mode limits data transmission because each device must take turns using the line. Therefore, data can flow from A to B and from B to A, but not at the same time. Full Duplex: is like a major high way with two lanes of traffic, each lane accommodating traffic going in opposite directions. Full-duplex mode accommodates two-way simultaneous transmission, which means that both sides can send and receive at the same time. In full-duplex mode, data can flow from A to B and B to A at the same time. Note: Full-duplex transmission is, in fact, two simplex connections: One connection has traffic flowing in only one direction; the other connection has traffic flowing in the opposite direction of the first connection. Layer 4: The Transport Layer : This layer manages the end-to-end control (for example, determining whether all packets have arrived) and error-checking. It ensures complete data transfer. The Basic Transport Layer Services are: Resource Utilization (multiplexing) : Multiple applications run on the same machine but use different ports. Connection Management (establishing & terminating) : The second major task of Transport Layer is establishing connection between sender & the receiver before data transmission starts & terminating the connection once the data transmission is finished. Flow Control (Buffering / Windowing) : Once the connection has occurred and transfer is in progress, congestion of the data flow can occur at a destination for a variety of reasons. Possible options include: The destination can become overwhelmed if multiple devices are trying to send it data at the same time. The destination can become overwhelmed if the source is sending faster than it can physically receive. Congestion Prevention : The Transport Layer is responsible for providing flow control to alleviate the issue of congestion in the data transfer. Two main methods for flow control include: Buffering: Buffering is a form of data flow control regulated by the Transport Layer. It is responsible for ensuring that sufficient buffers (Temporary Memory) are available at the destination for the processing of data and that the data is transmitted at a rate that does not exceed what the buffer can handle. Windowing: Windowing is a flow control scheme in which the source computer will monitor and make adjustments to the amount of information sent based on successful, reliable receipt of data segments by the destination computer. The size of the data transmission, called the "window size", is negotiated at the time of connection establishment, which is determined by the amount of memory or buffer that is available.

Reliable Transport (positive acknowledgment): Transport layer provides reliable transport of data by sending positive acknowledgements back to the sender once the data has reached the receiving side, if the data is lost or is corrupted, a negative acknowledgement is sent. Layer 3: The Network Layer : The Network Layer is responsible for identifying computers on a network. This layer is concerned with 2 functions: Routing: It is the process of selecting the best paths in a network along which to send data on physical traffic. Fragmentation / Reassembly: if the network layer determines that a next router's maximum trans mission unit (MTU) size is less than the current frame size, a router can fragment a frame for transmission and re-assembly at the destination station. Two types of packets are used at the Network layer: Data packets: Used to transport user data through the internetwork. Protocols used to support data traffic are called routed protocols. Route update packets: Used to update neighboring routers about the network connected to all routers within the internetwork. Protocols that send route updates are called routing protocols. Layer 2: The data-link layer : The data link layer provides error-free transfer of data frames from one node to another over the physical layer, allowing layers above it to assume virtually error-free transmission over the link. To do this, the data link layer provides: Frame Traffic Control: tells the transmitting node to "stop when no frame buffers are available. Frame Sequencing: transmits/receives frames sequentially. Frame Acknowledgment: provides/expects frame acknowledgments. Detects and recovers from errors that occur in the physical layer by retransmitting non-acknowledged frames and handling duplicate frame receipt. Frame Delimiting: creates and recognizes frame boundaries. Link Establishment and Termination: establishes and terminates the logical link between two nodes. Frame Error Checking: checks received frames for integrity. Media access management: determines when the node "has the right" to use the physical medium. Data Link Sub layers Logical Link Control (LLC): The LLC is concerned with managing traffic (flow and error control) over the physical medium and may also assign sequence numbers to frames and track acknowledgements. LLC is defined in the IEEE 802.2 specification and supports both connectionless and connection-oriented services used by higher-layer protocols. Media Access Control (MAC): The MAC sub layer controls how a computer on the network gains access to the data and permission to transmit it. Layer 1: The Physical Layer : The physical layer, the lowest layer of the OSI model, is concerned with the transmission and reception of the unstructured raw bit stream over a physical medium.

It describes the electrical/optical, mechanical, and functional interfaces to the physical medium, and carries the signals for all of the higher layers. It provides: Data encoding: modifies the simple digital signal pattern (1s and 0s) used by the PC to better accommodate the characteristics of the physical medium, and to aid in bit and frame synchronization. It determines: o What signal state represents a binary 1 o How the receiving station knows when a "bit-time" starts o How the receiving station delimits a frame Physical medium attachment, accommodating various possibilities in the medium: o Will an external transceiver (MAU) be used to connect to the medium? o How many pins do the connectors have and what is each pin used for? Transmission technique: determines whether the encoded bits will be transmitted by baseband (digital) or broadband (analog) signaling. Physical medium transmission: transmits bits as electrical or optical signals appropriate for the physical medium, and deter mines: o What physical medium options can be used o How many volts/db should be used to represent a given signal state, using a given physical medium. Devices Used At Each Layer of OSI Model OSI Layers Application Layer Presentation Layer Chapter Layer Transport Layer Network Layer Data link Layer Physical Layer Devices Used Gate ways --------------------Gate ways Router, Layer 3 switches NIC, Switch, Bridge Hubs, Repeaters, Network cables & connectors

Transmission Control Protocol/Internet Protocol (TCP/IP) Model Or DOD Model


The TCP/IP Model is a specification for computer network protocols created in the 1970s by DARPA, an agency of the United States Department of Defense. It laid the foundation for ARPANET, which was the world's first wide area network and a predecessor of the Internet.

Figure : Mapping of TCP/IP Suite to OSI

Layers in the TCP/IP Model : TCP/IP is generally described as having four 'layers or five if we include the bottom physical layer. The layers near the top are logically closer to the user application, while those near the bottom are logically closer to the physical transmission of the data. The TCP/IP Application Layer : TCP/IP application layer protocols provide services to the application software running on a computer. The application Layer identifies the application running on the computer through Port Numbers. The various protocols that are used at the Application Layer are: Telnet: Terminal Emulation, Telnet is a program that runs on your computer and Connects your PC to a server on the network. You can then enter commands through the Telnet program and they will be executed as if you were entering them directly on the server console. Port Number :23. FTP: File Transfer Protocol, the protocol used for exchanging files over the Internet. FTP is most commonly used to download a file from a server using the Internet or to upload a file to a server. Port Number : 20(data port) ,21(control port) HTTP: Hyper Text Transfer Protocol is the underlying protocol used by the World Wide Web. HTTP defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. For example, when we enter a URL in the browser, this actually sends an HTTP command to the Web server directing it to fetch and transmit the requested Web page. Port Number :80. NFS: Network File System, a client/server application that allows all network users to access shared files stored on computers of different types. Users can manipulate shared files as if they were stored locally on the user's own hard disk. Port Number :2049 SMTP: Simple Mail Transfer Protocol, a protocol for sending e- mail messages between servers. In addition, SMTP is generally used to send messages from a mail client to a mail server. Port Number :25 POP3: Post Office Protocol, a protocol used to retrieve e- mail from a mail server. Most email applications (sometimes called an e-mail client) use the

POP, although some can use the newer IMAP (Internet Message Access Protocol)as a replacement for POP3. Port Number :110 TFTP: Trivial File Transfer Protocol, a simple form of the File Transfer Protocol (FTP). TFTP provides no security features. It is often used by servers to boot diskless workstations, X terminals, and routers. Port Number :69 DNS: Domain Name System (or Service or Server), an Internet service that translates domain names into IP addresses. Because domain names are alphabetic, they're easier to remember. The Internet however, is really based on IP addresses. Every time you use a domain name, a DNS service must translate the name into the corresponding IP address. For example, the domain name www.example.com might translate to 198.105.232.4. Port Number :53 DHCP: Dynamic Host Configuration Protocol, a protocol for assigning dynamic IP addresses to devices on a network. With dynamic addressing, a device can have a different IP address every time it connects to the network. Dynamic addressing simplifies network administration because the software keeps track of IP addresses rather than requiring an administrator to manage the task. Port Number : 67(Server),68(Client) BOOTP: Bootstrap Protocol (BOOTP) is utilized by diskless workstations to gather configuration information from a network server. This enables the workstation to boot without requiring a hard or floppy disk drive. Port Number : 67(Server),68(Client) SNMP: Simple Network Management Protocol, a set of protocols for managing complex networks. SNMP works by sending messages, called protocol data units (PDUs), to different parts of a network. Port Number :161 The TCP/IP Transport Layer : The protocol layer just below the Application layer is the host-to-host layer (Transport layer). It is responsible for end-to-end data integrity. Transport Layer identifies the segments through Socket address (Combination of Port Number & I.P. address). The two most important protocols employed at this layer are the Transmission Control Protocol (TCP): TCP provides reliable, full-duplex connections and reliable service by ensuring that data is retransmitted when transmission results in an error (end-to-end error detection and correction). Also, TCP enables hosts to maintain multiple, simultaneous connections. User Datagram Protocol (UDP): When error correction is not required, UDP provides unreliable datagram service (connectionless) that enhances network throughput at the host-to-host transport layer. It's used primarily for broadcasting messages over a network. The TCP/IP Internet Layer : The best known TCP/IP protocol at the internetwork layer is the Internet Protocol (IP), which provides the basic packet delivery service for all TCP/IP networks node addresses, the IP implements a system of logical host addresses called IP addresses.The IP addresses are used by the internetwork and higher layers to identify devices and to perform internetwork routing. IP is used by all protocols in the layers above and below it to deliver data, which means all TCP/IP data flows through IP when it is sent and received, regardless of its final destination.The basic protocols used at the Internet Layer are: I.P. (Internet Protocol): It is a protocol used at the internet layer of TCP/IP model by which data is encapsulated and is sent from one computer to another on the Internet. ARP (Address Resolution Protocol): It is used to map the known I.P. addresses into Physical address.

RARP(Reverse Address Resolution Protocol): It is used to map Physical address into I.P. address I.C.M.P.( Internet Control Message Protocol): It is used to send error & control Messages in the network I.G.M.P. (Internet Group Management Protocol): It is a protocol which is used to form multicast groups in a network to receive multicast messages. The TCP/IP Network Access Layer The network access layer is the lowest layer in the TCP/IP model. This layer contains the protocols that the computer uses to deliver data to the other computers and devices that are attached to the network. The protocols at this layer perform three distinct functions: They define how to use the network to transmit a frame, which is the data unit passed across the physical connection. They exchange data between the computer and the physical network. They deliver data between two devices on the same network using the physical address. The network access layer includes a large number of protocols. For instance, the network access layer includes all the variations of Ethernet protocols and other LAN standards. This layer also includes the popular WAN standards, such as the Point-toPoint Protocol (PPP) and Frame Relay.

Types of Addresses Used During Data Communication


TCP/IP Layers Application Layer Transport Layer Network Layer Network Access Layer Addresses Used Port Numbers Socket Address I.P. Address Physical Address

Port Numbers : A port number is a way to identify a specific process to which an Internet or other network message is to be forwarded when it arrives at a server. The port numbers are divided into three ranges: The Well Known Ports: Range from 0 through 1023. The Well Known port numbers are registered by the IANA and are already assigned to the Well Known protocols. Well Known port numbers can only be used by system (or root) processes or by programs executed by privileged users. The Registered Ports: Range from 1024 through 49151. The registered port numbers are also registered by the IANA. The Registered Ports are listed by the IANA and on most systems can be used by ordinary user processes or programs executed by ordinary users. The Dynamic and/or Private Ports: Range from 49152 through 65535. The Dynamic port numbers are available for use by any application used for communicating with any other application, using the Internet's Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). Socket Address : Socket address is a combination of Port Number for a particular process & the I.P. address of the host. I.P. Address (Logical Address) : There are two versions of I.P. address: IPv4 & IPv6. IPv4 : IPv4 is a 32 bit numeric address used for data communication at the internet layer. This has been in use for more than 20 years and served well but growing number of devices in networks has forced us to go for a new addressing scheme and here comes IPv6.

IPv6 : IP Version 6 (IPv6) is the newest version of IP, sometimes called IPng for IP, Next Generation. IPv6 is fairly well defined but is not yet widely deployed. The main differences between IPv6 and the current widely-deployed version of IP (which is IPv4) are: IPv6 uses larger addresses (128 bits instead of 32 bits in IPv4) and so can support many more devices on the network. IPv6 includes features like authentication and multicasting that had been bolted on to IPv4 in a piece meal fashion over the years. Physical Address (Hardware Address/MAC Address) : The MAC ( Media Access control) address is a unique value associated with a network adapter. They uniquely identify an adapter on a LAN. MAC addresses are 12-digit hexadecimal numbers (48 bits in length). By convention, MAC addresses are usually written in one of the following two formats: MM:MM:MM:SS:SS:SS MM-MM-MM-SS The first half (24 bits) of a MAC address contains the ID number of the adapter manufacturer(Vendor ID). The second half(24 bits) of a MAC address represents the serial number assigned to the adapter by the manufacturer. In the example, 00:A0:C9:14:C8:29 The prefix 00A0C9 indicates the manufacturer is Intel Corporation.

Three Layer Model of Cisco


Cisco Hierarchical Model Large networks can be extremely complicated, with multiple protocols, detailed configurations, and diverse technologies. Hierarchy helps us summarize a complex collection of details into an understandable model. Then, as specific configurations are needed, the model dictates the appropriate manner to apply them. The Cisco hierarchical model can help us design, implement, and maintain a scalable, reliable, cost-effective hierarchical internetwork. There are three layers to the Cisco hierarchical model The core (backbone) layer provides optimal transport between sites. The distribution layer provides policy-based connectivity. The local-access layer provides workgroup/user access to the network

Figure : Layers of Cisco Hierarchical model

The Core Layer : The core layer is literally the internet backbone. At the top of the hierarchy, the core layer is responsible for transporting large amounts of traffic both

reliably and quickly. The only purpose of the network's core layer is to switch traffic as fast as possible. The traffic transported across the core is common to a majority of users. However, remember that user data is processed at the distribution layer, which forwards the requests to the core if needed. If there is a failure in the core, every user can be affected. Therefore, fault tolerance at this layer is an issue. The core is likely to see large volumes of traffic, so speed and latency are driving concerns here. Given the function of the core, we can now consider some design specifics. Let's start with something w e don't want to do. Don't do anything to slow down traffic. This includes using access lists, routing between virtual local area networks, and packet filtering. Don't support workgroup access here. Avoid expanding the core when the internetwork grows. If performance becomes an issue in the core, give preference to upgrades over expansion. Now, there are a few things that we want to do as we design the core. They include the following: Design the core for high reliability. Consider data-link technologies that facilitate both speed and redundancy, such as FDDI, Fast Ethernet, or even ATM. Design with speed in mind. The core should have very little latency. Select routing protocols with lower convergence times. The Distribution Layer : The distribution layer is sometimes referred to as the workgroup layer and is the major communication point between the access layer and the core. The primary function of the distribution layer is to provide routing, filtering, and WAN access and to determine how packets can access the core, if needed. The distribution layer must determine the fastest way that network service requests are handled; for example, how a file request is forwarded to a server. After the distribution layer determines the best path, it forwards the request to the core layer. The core layer then quickly transports the request to the correct service. The distribution layer is the place to implement policies for the network. Here you can exercise considerable flexibility in defining network operation. There are several items that generally should be done at the distribution layer such as: Implementation of tools such as access lists, of packet filtering, and of queuing Implementation of security and network policies including firewalls Redistribution between routing protocols, including static routing Routing between VLANs and other workgroup support functions Definitions of broadcast and multicast do mains Things to avoid at this layer are limited to those functions that exclusively belong to one of the other layers. The Access Layer : The access layer controls user and workgroup access to internetwork resources. The access layer is sometimes referred to as the desktop layer. The network resources most users need will be available locally. The distribution layer handles any traffic for remote services. The following are some of the functions to be included at the access layer: Continued access control and policies Creation of separate collision domains Workgroup connectivity into the distribution layer through layer 2 switching Technologies such as DDR and Ethernet switching are frequently seen in the access layer. Static routing is seen here as well. As already noted, three separate levels does not imply three separate routers. It could be fewer, or it could be more.

Protocols

Figure: OSI Vs TCP/IP

Transport Layer Protocols (TCP & UDP) :


Transmission Control Protocol : TCP is a Reliable (guarantees that the data sent across the connection will be delivered exactly as sent, without missing or duplicate data), Connection oriented (An application requests a connection, and then uses it for data transfer) protocol on the transport layer which provides inorder delivery of data and also use buffering and windowing to implement flow control. User Datagram Protocol The UDP is an unreliable connectionless protocol of the transport layer. UDP is unreliable, means that UDP does not provide mechanisms for error detection and error correction between the source and the destination. Because of this, UDP utilized band width more efficiently than TCP. Connectionless, means that a network node can communicate with another network node using UDP without first negotiating any kind of handshaking or creating a connection. Because of this, UDP is very efficient for protocols that send very small amounts of data at irregular intervals. TCP is a connection-oriented, reliable protocol of Transport layer that provides inorder delivery of Data with Flow control. UDP is connectionless, unreliable protocol of Transport layer but is still used because: UDP utilizes band width m ore efficiently than TCP as it does not take the overhead of establishing connection before transmitting the data.

UDP is very efficient for protocols that send very small amounts of data at irregular intervals. UDP is very efficient when the data is to be broadcasted in the whole network .

Internet Layer Protocols (IP, ICMP, ARP, RARP) :


Internet Protocol : The Internet Protocol is the building block of the Internet. IP is a connectionless protocol, means it does not exchange control information (handshake) to provide end-to-end control of communications flow. It relies on other layers to provide this function if it is required. IP also relies on other layers to provide error detection and correction. Because of this IP is sometimes referred to as an unreliable protocol because it contains no error detection and recovery code. IP can be relied upon to accurately deliver your data to the connected network, but it doesn't check whether that data was correctly received. Its functions include: Defining the datagram, which is the basic unit of transmission in the Internet Defining the Internet addressing scheme Moving data between the Network Access Layer and the Host-to-Host Transport Layer Routing datagrams to remote hosts Performing fragmentation and re-assembly of datagrams. Address Resolution Protocol (ARP) : The address resolution protocol is a protocol used by the Internet Protocol (IP), specifically IPv4, to map IP network addresses to the hardware addresses used by a data link protocol. It is used when IPv4 is used over Ethernet. Reverse Address Resolution Protocol (RARP) : R everse Address Resolution Protocol, a TCP/IP protocol that permits a physical address, such as an Ethernet address, to be translated into an IP address. Hosts such as diskless workstations often only know their hard ware interface addresses, or MAC address, when booted but not their IP addresses. They must discover their IP addresses from an external source, usually a RARP server. To obtain the I.P. address, diskless workstations broadcast their MAC address in the whole network, when the RARP server receives the request it responds the workstation with a unique I.P. address. Internet Control Message Protocol (ICMP) : Internet Control Message Protocol (ICMP) is a protocol tightly integrated with IP. ICMP messages, delivered in IP packets, are used for sending error & control messages i.e. information about the status of the network itself. Since ICMP uses IP, ICM P packet delivery is unreliable, so hosts can't count on receiving ICMP packets for any network problem. Some of ICMP's functions are to: Announce network errors, such as a host or entire portion of the network being unreachable, due to some type of failure. A TCP or UDP packet directed at a port number with no receiver attached is also reported via ICMP . Announce network congestion. When a router begins buffering too many packets, due to an inability to transmit them as fast as they are being received, it will generate ICMP Source Quench messages. Directed at the sender, these messages should cause the rate of packet transmission to be slowed. Of course, generating too many Source Quench messages would cause even more network congestion, so they are used sparingly.

Assist Troubleshooting. ICMP supports an Echo function, which just sends a packet on a round--trip between two hosts. Ping, a common network management tool, is based on this feature. Ping will transmit a series of packets, measuring average round--trip times and computing loss percentages . Announce Timeouts. If an IP packet's TTL field drops to zero, the router discarding the packet will often generate an ICMP packet announcing this fact. TraceRoute is a tool which maps network routes by sending packets with small TTL values and watching the ICMP timeout announcements. Voice over Internet Protocol (VoIP) : Voice over Internet Protocol (VoIP) is a technology that allows us to make voice calls using a broadband Internet connection instead of a regular (or analog) phone line. Some VoIP services may only allow us to call other people using the same service, but others may allow us to call anyone who has a telephone number - including local, long distance, mobile, and international numbers. Also, while some VoIP services only work over the computer or a special VoIP phone, other services allow us to use a traditional phone connected to a VoIP adapter.

Application Layer Protocols (FTP, Telnet, SMTP, & others) :


Telnet (Network Terminal Protocol) : The purpose of the Telnet protocol is to provide a fairly general, bi-directional, eight-bit byte oriented communications facility. Its primary goal is to allow a standard method of interfacing terminal devices and terminal-oriented processes to each other. Telnet not only allows the user to log in to a remote host, it allows that user to execute commands on that host. Thus, an individual in Los Angeles can Telnet to a machine in New York and begin running programs on the New York machine just as though the user were actually in New York. File Transfer Protocol : FTP (File Transfer Protocol) is the simplest and most secure way to exchange files over the Internet. Whether you know it or not, you most likely use FTP all the time. The most common use for FTP is to download files from the Internet. When downloading a file from the Internet you're actually transferring the file to your computer from another computer over the Internet. This is why the \T (transfer) is in FTP. You may not know where the computer is that the file is coming from but you most likely know it's URL or Internet address. An FTP address looks a lot like an HTTP, or Website, address except it uses the prefix ftp:// instead of http://. Example Website address: http://www.hcl.com Example FTP site address: ftp://www.hcl.com Simple Mail Transfer Protocol : SMTP is a relatively simple, text-based protocol, in which one or more recipients of a message are specified (and in most cases verified to exist) along with the message text and possibly other encoded objects. The message is then transferred to a remote server using a procedure of queries and responses between the client and server. Either an end-user's e mail client, a.k.a. MUA (Mail User Agent), or a relaying server's MTA (Mail Transport Agents) can act as an SMTP client. An email client knows the outgoing mail SMTP server from its configuration. A relaying server typically determines which SMTP server to connect to by looking up the MX (Mail eXchange) DNS record for each recipient's domain name (the part of the email address to the right of the at ( @) sign). Conformant MTAs (not all) fall back to a simple A record in the case of no MX. (Relaying servers can also be configured to use a smart host.) The SMTP client initiates a TCP connection to server's port 25 (unless overridden by configuration).It is quite easy to test an SMTP server using the telnet program.

SMTP is a "push" protocol that does not allow one to "pull" messages from a remote server on demand. To do this a mail client must use POP3 or IMAP. Another SMTP server can trigger a delivery in SMTP using ETRN. Hyper Text Transfer Protocol : Hypertext Transfer Protocol (HTTP) is a communications protocol for the transfer of information on the intranet and the World Wide Web. Its original purpose was to provide a way to publish and retrieve hypertext pages over the Internet. HTTP is a request/response standard between a client and a server. A client is the end-user, the server is the web site. The client making an HTTP request - using a web browser, spider, or other end-user tool - is referred to as the user agent. The responding server - which stores or creates resources such as HTML files and images - is called the origin server. In between the user agent and origin server may be several intermediaries, such as proxies, gateways, and tunnels. HTTP is not constrained to using TCP/IP and its supporting layers, although this is its most popular application on the Internet. Indeed HTTP can be "implemented on top of any other protocol on the Internet, or on other networks. HTTP only presumes a reliable transport; any protocol that provides such guarantees can be used." Typically, an HTTP client initiates a request. It establishes a Transmission Control Protocol (TCP) connection to a particular port on a host (port 80 by default). An HTTP server listening on that port waits for the client to send a request message. Upon receiving the request, the server sends back a status line, such as "HTTP/1.1 200 OK", and a message of its own, the body of which is perhaps the requested file, an error message, or some other information. The reason that HTTP uses TCP and not UDP is because much data must be sent for a webpage, and TCP provides transmission control, presents the data in order, and provides error correction. Domain Name Server : The most basic task of DNS is to translate hostnames to IP addresses. DNS also has other important uses. Above all, DNS makes it possible to assign Internet names to organizations (or concerns they represent) independent of the physical routing hierarchy represented by the numerical IP address. Because of this, hyperlinks and Internet contact information can remain the same, whatever the current IP routing arrangements may be, and can take a human-readable form (such as "example.com"), which is easier to remember than the IP address 208.77.188.166. People take advantage of this when they recite meaningful URLs and e- mail addresses without caring how the machine will actually locate them. The Domain Name System distributes the responsibility for assigning domain names and mapping them to IP networks by allowing an authoritative name server for each domain to keep track of its own changes, avoiding the need for a central register to be continually consulted and updated. Routing Information Protocol : The Routing Information Protocol (RIP) is a distance-vector protocol that uses hop count as its metric. RIP is widely used for routing traffic in the global Internet and is an interior gateway protocol (IGP), which means that it performs routing within a single autonomous system. Exterior gateway protocols, such as the Border Gateway Protocol (BGP), perform routing between different autonomous systems. Simple Network Management : Simple Network Management Protocol (SNMP) is a popular protocol for network management. It is used for collecting information from, and configuring, network devices, such as servers, printers, hubs, switches, and routers on an Internet Protocol (IP) network. Using SNM P, you can monitor network performance, audit network usage, detect network faults or inappropriate access, and in some cases configure remote devices. SNMP is designed to be deployed on

the largest possible number of network devices, to have minimal impact on the managed nodes, to have mini mal transport requirements, and to continue working when most other network applications fail. Network File System : NFS stands for Network File System, a file system developed by Sun Microsystems, Inc. It is a client/server system that allows users to access files across a network and treats them as if they resided in a local file directory. For example, if you were using a computer linked to a second computer via NFS, you could access files on the second computer as if they resided in a directory on the first computer. This is accomplished through the processes of exporting (the process by which an NFS server provides remote clients with access to its files) and mounting (the process by which file systems are made available to the operating system and the user). The NFS protocol is designed to be independent of the computer, operating system, network architecture, and transport protocol. This means that systems using the NFS service may be manufactured by different vendors, use different operating systems, and be connected to networks with different architectures. These differences are transparent to the NFS application, and thus, the user.

IP Addressing
If a device wants to communicate using TCP/IP, it needs an IP address. I.P. addressing was designed to allow hosts on one network to communicate with a host on a different network regardless of the type of LANs the hosts are participating in. When the device has an IP address and the appropriate software and hard ware, it can send and receive IP packets. Any device that can send and receive IP packets is called an IP host. The important terms vital to the understanding of the Internet Protocol are: Bit: A bit is one digit, either a 1 or a 0. Byte: A byte is 8 bits. Octet: An octet, made up of 8 bits, is just an ordinary 8-bit binary number. In this Chapter, the terms byte and octet are completely interchangeable. Network address: This is the designation used in routing to send packets to a remote network for example, 10.0.0.0, 172.16.0.0, and 192.168.10.0. Broadcast address: The address used by applications and hosts to send information to all nodes on a network is called the broadcast address. Examples include 255.255.255.255, which is all networks, all nodes; 172.16.255.255, which is all subnets and hosts on network 172.16.0.0; and 10.255.255.255, which broadcasts to all subnets and hosts on network 10.0.0.0. The Hierarchical IP Addressing Scheme An IP v4 address consists of 32 bits of information. These bits are divided into four sections, referred to as octets or bytes, each containing 1 byte (8 bits). You can depict an IP address using one of three methods: Dotted-decimal, as in 172.16.30.56 Binary, as in 10101100.00010000.00011110.00111000 Hexadecimal, as in AC.10.1E.38 All these examples truly represent the same IP address. Hexadecimal isnt used as often as dotteddecimal or binary when IP addressing is discussed, but you still might find an IP address stored in hexadecimal in some programs. The Windows Registry is a good example of a program that stores a machines IP address in hex.

The 32-bit IP address is a structured or hierarchical address, as opposed to a flat or nonhierarchical address. Although either type of addressing scheme could have been used, hierarchical addressing was chosen for a good reason. The advantage of this scheme is that it can handle a large number of addresses, namely 4.3 billion (a 32-bit address space with two possible values for each position either 0 or 1 gives you 232, or 4,294,967,296). The disadvantage of the flat addressing scheme, and the reason its not used for IP addressing, relates to routing. If every address were unique, all routers on the Internet would need to store the address of each and every machine on the Internet. This would make efficient routing impossible, even if only a fraction of the possible addresses were used. The solution to this problem is to use a two- or three-level hierarchical addressing scheme that is structured by network and host or by network, subnet, and host. This two- or three-level scheme is comparable to a telephone number. The first section, the area code, designates a very large area. The second section, the prefix, narrows the scope to a local calling area. The final segment, the customer number, zoom s in on the specific connection. IP addresses use the same type of layered structure. Rather than all 32 bits being treated as a unique identifier, as in flat addressing, a part of the address is designated as the network address and the other part is designated as either the subnet and host or just the node address. Network Addressing : The network address (which can also be called the network number) uniquely identifies each network. Every machine on the same network shares that network address as part of its IP address. In the IP address 172.16.30.56, for example, 172.16 is the network address. The node address is assigned to, and uniquely identifies, each machine on a network. This part of the address must be unique because it identifies a particular machine an individual as opposed to a network, which is a group. This number can also be referred to as a host address. In the sample IP address 172.16.30.56, the 30.56 is the node address. The designers of the Internet decided to create classes of networks based on network size. For the small number of networks possessing a very large number of nodes, they created the rank, Class A network. At the other extreme is the Class C network, which is reserved for the numerous networks with a small number of nodes. The class distinction for networks between very large and very small is predictably called the Class B network. Subdividing an IP address into a network and node address is deter mined by the class designation of ones network. Classes Class A: Class B: Class C: Class D: Class E: Class Class A: Class B: Class C: Class D: 8 bits Network Network Network Multicast Research Left most bits 0xxx 10xx 110x 1110 8 bits Host Network Network 8 bits Host Host Network 8 bits Host Host Host

Table : Classes of I.P. Address

Start Address 0.0.0.0 128.0.0.0 192.0.0.0 224.0.0.0

Finish Address 127.255.255.255 191.255.255.255 223.255.255.255 239.255.255.255

Class E:
Total # Of Bits For N/W ID /Host ID 8 / 24 16 / 16 24 / 8

1111
First Octet of IP Address # Of N/W ID Bits Used To Identify Class 1

240.0.0.0
Table : Possible IP Addresses Usable # Of Network ID Bits 8-1 = 7 Number of Possible Network IDs

255.255.255.255

Class

# Of Host IDs Per Network ID

Class A Class B Class C

0xxx xxxx

2^7-2 = 126

10xx 2 16-2 = 2^14 = 16,384 xxxx 14 110x 3 24-3 = 2^21 = 2^8-2 = 254 xxxx 21 2,097,152 Table : IP Address Class Network and Host Capacities

2^24-2 = 16,277,214 2^16-2 = 65,534

Class A Network: binary address start with 0, therefore the decimal number can

be any where from 1 to 126. The first 8 bits (the first octet) identify the network and the remaining 24 bits indicate the host within the network. An example of a Class A IP address is 102.168.212.226, where "102" identifies the network and "168.212.226" identifies the host on that network. Each Class A address has 3 bytes (24-bit positions) for the node address of a machine. This means there are 2^24 or 16,777,216 unique combinations and, therefore, precisely that many possible unique node addresses for each Class A network. Because node addresses with the two patterns of all 0s and all 1s are reserved, the actual maximum usable number of nodes for a Class A network is 2^24 minus 2, which equals 16,777,214. Class B Network: binary addresses start with 10, therefore the decimal number can be any where from 128 to 191. The first 16 bits (the first two octets) identify the network and the remaining 16 bits indicate the host within the network. An example of a Class B IP address is 168.212.226.204 where "168.212" identifies the network and "226.204" identifies the host on that network. With a network address being 2 bytes (8 bits each), there would be 216 unique combinations. But the Internet designers decided that all Class B network addresses should start with the binary digit 1, then 0. This leaves 14 bit positions to manipulate, therefore 16,384 unique Class B network addresses. A Class B address uses 2 bytes for node addresses. This is 216 minus the two reserved patterns (all 0s and all 1s), for a total of 65,534 possible node addresses for each Class B network. Class C Network: Binary addresses start with 110, therefore the decimal number can be any where from 192 to 223. The first 24 bits (the first three octets) identify the network and the remaining 8 bits indicate the host within the network. An example of a Class C IP address is 200.168.212.226 where "200.168.212" identifies the network and "226" identifies the host on that network. In a Class C network address, the first three bit positions are always the binary 110. The calculation is as follows: 3 bytes, or 24 bits, minus 3 reserved positions leaves 21 positions. Hence, there are 221, or 2,097,152, possible Class C networks. Each unique Class C network has 1 byte to use for node addresses. This leads to 28 or 256, minus the two reserved patterns of all 0s and all 1s, for a total of 254 node addresses for each Class C network. Class D Network: Binary addresses start with 1110, therefore the decimal number can be any where from 224 to 239. Class D networks are used to support multicasting. Class E Network: Binary addresses start with 1111, therefore the decimal number can be any where from 240 to 255. Class E networks are used for

experimentation. They have never been documented or utilized in a standard way. Special Network ID and Host ID Address Patterns : Special IP addresses are constructed by replacing the normal network ID or host ID (or both) in an IP address with one of two special patterns. The two patterns are: All Zeroes: When the network ID or host ID bits are replaced by a set of all zeroes, the special meaning is the equivalent of the pronoun this, referring to whatever was replaced. It can also be interpreted as the default or the current. So for example, if we replace the network ID with all zeroes but leave the host ID alone, the resulting address means the device with the host ID given, on this network. Or alternatively, the device with the host ID specified, on the default network or the current network. All Ones: W hen the network ID or host ID bits are replaced by a set of all ones, this has the special meaning of all. So replacing the host ID with all ones means the IP address refers to all hosts on the network. This is generally used as a broadcast address for sending a message to everyone. Loopback Addresses : Normally, when a TCP/IP application wants to send information, that information travels down the protocol layers to IP where it is encapsulated in an IP datagram. That datagram then passes down to the data link layer of the device's physical network for transmission to the next hop, on the way to the IP destination. However, one special range of addresses is set aside for loopback functionality. This is the range 127.0.0.0 to 127.255.255.255. IP datagrams sent by a host to a 127.x.x.x loopback address are not passed down to the data link layer for trans mission. Instead, they loop back to the source device at the IP level. In essence, this represents a short-circuiting of the normal protocol stack; data is sent by a device's layer three IP implementation and then immediately received by it. The purpose of the loopback range is testing of the TCP/IP protocol implementation on a host. Since the lower layers are short-circuited, sending to a loopback address allows the higher layers (IP and above) to be effectively tested without the chance of problems at the lower layers manifesting themselves. 127.0.0.1 is the address most commonly used for testing purposes. Private IP Addresses : These addresses can be used on a private network, but theyre not routable through the Internet. This is designed for the purpose of creating a measure of well-needed security, but it also conveniently saves valuable IP address space. If every host on every network had to have real routable IP addresses, we would have run out of IP addresses to hand out years ago. But by using private IP addresses, ISPs, corporations, and home users only need a relatively tiny group of bonafide IP addresses to connect their networks to the Internet. This is economical because they can use private IP addresses on their inside networks and get along just fine. To accomplish this task, the ISP and the corporation the end user, need to use something called Network Address Translation (NAT), which basically takes a private IP address and converts it for use on the Internet. The reserved private addresses are listed in the Table: Address Class Reserved Address Space Class A 10.0.0.0 through 10.255.255.255 Class B 172.16.0.0 through 172.31.255.255 Class C 192.168.0.0 through 192.168.255.255

Subnet Masks : A subnet mask is a 32-bit value that allows the recipient of IP
packets to distinguish the network ID portion of the IP address from the host ID portion of the IP address. The network administrator creates a 32-bit subnet mask composed of 1s and 0s. The 1s in the subnet mask represent the positions that refer to the network or subnet addresses. Not all networks need subnets, meaning they use the default subnet mask. This is basically the same as saying that a network doesnt have a subnet address. Table shows the default subnet masks for Classes A, B, and C. These default masks cannot change. In other words, you cant make a Class B default subnet mask read 255.0.0.0. If you try, the host will read that address as invalid and usually wont even let you type it in. For a Class A network, you cant change the first byte in a subnet mask; it must read 255.0.0.0 at a minimum. Similarly, you cannot assign 255.255.255.255, as this is all 1s a broadcast address. A Class B address must start with255.255.0.0, and a Class C has to start with 255.255.255.0. Address Class Format Default Subnet Mask Class A Network.node.node.node 255.0.0.0 Class B Network.Network.node.node 255.255.0.0 Class C Network.Network. Network.node 255.255.255.0

Subnetting :
Subnetting is basically just a way of splitting a TCP/IP network into smaller, more manageable pieces. The basic idea is that if you have an excessive amount of traffic flowing across your network, then that traffic can cause your network to run slowly. When you subnet your network, you are splitting the network into a separate, but interconnected network. That way, most of the network traffic will be isolated to the subnet in which it originated. Of course you can still communicate across a subnet, but the only time that traffic will cross subnet boundaries is when it is specifically destined for a host residing in an alternate subnet. The various advantages of subnetting are: Reduced network traffic Optimized network performance Simplified management Facilitated spanning of large geographical distances

Subnetting a Class C Address :


How many subnets? 2^x = number of subnets. x is the number of masked bits, or the 1s. How many hosts per subnet? 2^y 2 = number of hosts per subnet. y is the number of unmasked bits, or the 0s. What are the valid subnets? 256 subnet mask = block size, or increment number. Whats the broadcast address for each subnet? The broadcast address is always the number right before the next subnet. What are the valid hosts? Valid hosts are the numbers between the subnets, omitting the all 0s and all 1s.

You might also like