Cit854 Summary Note - Complete
Cit854 Summary Note - Complete
2. Metropolitan Area Networks (MANs): They are often used to connect LANs together to form a greatly extended LAN
environment. An interconnectivity of several LANs that spans a given geographical area. The coverage is usually
within 10-kilometre range. Examples are campus-wide network or a network for a large industrial complex.
Advantages
• The ability to carry information in forms that require many more bits than conventional text or simple graphics
• High-speed net- works, approaching gigabits per second.
• Delivers timely access to resources
Disadvantages
• Difficult to manage
• Difficult to secure from hackers
• High cost of installation and maintenance
3. Wide Area Networks (WANs): It connects different smaller networks, including local area networks (LANs) and
metro area networks (MANs). Message units, called packets, are passed from one inter- mediate mode to another
until they arrive at the destination. Typical transmission speeds range from 56kbps to 1.54Mbps. Example is a
network that links all the branches of a bank within the country
Advantages
• Explicit communication (electronic mail and file transfer)
• Access to remote computers that offers particular services
• It links several cities within a particular country
Disadvantages
• Significant propagation delay in message transmission
• High incidence of lost or damaged transmissions
• Routing decisions need to be made
• Transmission formats due to the differences among the types of local area networks
Q. What is the most powerful influence yet on our handling of information?
The combination of computing power with high-speed data communication
NODES
A node is any device that is connected to the computer network. It is a general-purpose computer or workstation. It is
also an intermediate network device such as a router or a printer.
How is a node connected to the network?
It needs some kind of hardware interface device called a network adaptor. Beside the network adaptor, a node must be
installed with a network operating system (NOS) (e.g. Novell Network, Windows NT, Unix) in order for the applications
running on it to communicate with the network.
LINKS
Links are physical media that connect the nodes. To transmit data through links, data is encoded into electromagnetic
signals, which can be transmitted from one node to another.
• Digital Links: Discrete signals like electromagnetic pulse. Capable of transmitting digital signals.
• Analog Links: Carry continuous electromagnetic signals. Capable of transmitting analog signals.
• Digital Data: Composed of discrete values, like computer data which is composed of Os and Is
• Analog Data: Composed of continuous waves, like voice and video
• Digital Signals: A sequence of discrete pulses (e.g voltage pulses in copper media)
• Analog Signals: A continuously varying electromagnetic wave
COMMONLY USED MEDIA FOR DIGITAL LINKS
• Unshielded Twisted Pairs (UTPs)
• Coaxial cables
• Optical fibers
Q. Some author's believe that optical fiber is not able to transmit digital signals. True of False? Explain.
This is not quite true. Indeed, light, instead of electricity, is transmitted in optical fiber. Digital signaling in optical fiber
is not done by voltage pulses, but by two different power levels of light. So optical fiber can also transmit digital signals.
MODEM
A device for converting digital signals to analogue signals, and vice versa, in order to transmit bits over analogue links.
The term 'modem' comes from the words 'modulator' and 'demodulator.' Modulation and demodulation are the
processes for converting digital signals to analogue signals and analogue to digital respectively
MODES OF DATA TRANSMISSION
Simplex: Any link that only allows data flow in one direction. Radio set and T.V set are examples.
Half-Duplex: Any link that allows data to be transmitted in both directions, but only in one way at one time.
Full-Duplex: Any link that allows two streams of data to be transmitted in opposite directions at the same time.
TOPOLOGY
The term 'network topology' refers to the way nodes are arranged and connected with links. It is also the shape of the
network and the layout of cabling
1. Bus Topology: One of the oldest and simplest to implement. Each node in the network is connected in sequence along
a single network cable. It uses a Media Access Control (MAC) protocol known as Carrier Sense Multiple Access with
Collision Detection (CSMA/CD) to ensure steady flow of data along the network.
Advantages
• Long distances possible especially with 10BASE 5.
• Noise immunity because of the STP.
• The architecture is conceptually simple.
• It is relatively inexpensive
Disadvantages
• It is inflexible once installed especially IOBASE 5.
• It is fault intolerant since a break down in the bus causes the entire network to go down.
• It is very difficult to troubleshoot.
• It is susceptible to ground loops due to potential difference.
• It uses specialized cable, e.g. 10BASE 2. If the network is changed, the cable has to be changed too.
• Bottlenecks often occur
CSMA/CD: A method in which multiple workstations share access to a common network (multiple-access), but only one
node can broadcast data at a time.
2. Star Topology: Emerging as the most common network in use today. Each workstation is connected point-to-point
to a single central location that is commonly referred to as a wiring closet (a central switching station known as the
hub)
Advantages
• It is fault tolerant due to partitioning. If a node is faulty, it does not affect the rest of the network.
• It allows for easy troubleshooting due to its architecture.
• It allows for ease of re-configuration.
• It is flexible as many buildings already have UTP cables.
Disadvantages
• Limited coverage area of 100meters
• It is sensitive to noise especially the UTP
HUB: A hub is used to concentrate all the links into a single point in the network and it usually has multiple ports for
multiple links to plug into. All messages must pass through the hub that contros the flow of data
3. Ring Topology: A simple design consisting of a single cable that forms the main data path in the shape of a ring.
Advantages
• Very high speed
• Minimized packet collision
• Robust
• Easy to troubleshoot and maintain
• Cost effective
Disadvantages
• Cannot cope with a single point failure
• Failure of a node also hangs up the whole network
• Difficult to add and remove nodes
Repeater: Responsible for receiving data from one link and immediately transmitting it bit by bit to the other link
Token Ring: The MAC protocol that the ring topology uses in order to ensure that all nodes have equal access to the
network.
4. Tree Topology: A hybrid of the bus and the star layouts. The basic topology is similar to that of a bus, with nodes
connected in sequence to a linear cable. But tree networks may have branches that contain multiple workstations
that are connected point-point in a star-like pattern. The tree topology is used when you are to network a multi-
floor building.
Advantages
• Highly scalable
• Easy maintenance and fault detection
• Supported by several hardware and software vendors
• Point-to-pint wiring for individual segments
• Other nodes in the network are not affected if one node goes down
Disadvantages
• Very difficult to configure
• Once the hub fails, the entire network fails
• Scalability depends on the type of cable used
• It becomes more difficult to maintain as more nodes are added
Structures
• Two or more hubs can be uplinked in a bus structure and nodes attached to them.
• Linear backbone (or bus) with hubs directly attached to the bus
• A switch that joins several hubs together
Q. A client has just approached you on the proposed networking project of her newly completed 5-
storey Head Office Complex. You are to give your advice on the best type of topology to adopt and why.
The Tree topology will be adopted. This is because using multiple switches that connect to several hubs can segregate
the network. In other words, it has the capability of dividing the whole network into parts that are more easily
manageable.
ADAPTORS
Network adaptors for the computers are often called Network Interface Card (NIC). They are responsible for converting
the computer data to a form that can be transmitted over the links, and also converting the incoming data from the link
back to a form that can be understood by the computer.
Interfacing Components
Bus Interface: The component of the NIC that communicates with the computer to which it is attached. It transmits data
through the bus. Commonly used bus interface cards (ISA, EISA, MCA)
Link Interface: The component communicating with the link to the network.
Serial Links - transmit or receive data one bit at a time (comms more than a few feet apart)
Parallel Links - transmits or receives multiple bits in parallel through multiple transceivers (for short comms)
Transceiver - translate the bits to electronic signals
CABLING
Cabling includes the installation of cable and outlets in the area covering the network.
Considerations in planning a cabling system
• Transmission characteristics, which includes bandwidth, error performance, distance covered and attenuation.
• Propagation delay and response time.
• How safe is the medium in terms of security against espionage activities.
• Its mechanical strength.
• Cost implication i.e. what the budget is for cabling.
• How large an area the network covers.
• How many users the network is going to support.
• How heavy the network traffic will be.
• Physical dimension are sometimes considered.
• Selection of cable type (MOST IMPORTANT as it affects the cost, installation method, flexibility of relocation and
the reliability and speed with which data is transmitted)
Types of Cabling
• Coaxial Cable: It consists of a central core copper wire surrounded by a hollow outer cylindrical conductor, with
dielectric materials filled in between them, and an outer plastic cover to protect the cable from physical damage.
It is widely used, partly due to the popularity of Ethernet, because Ethernet adopts a bus topology that can be
easily implemented through coaxial cable
Thinnet coaxial cable - has a shorter diameter, about 0.25 inches. Each cables segment can be joined to
another by a Bayonet Navy Conductor (BNC) connector
Thicknet coaxial cable - has a wider diameter, about 0.5 inches and is more expensive than thin coaxial
cable
• Twisted Pair Cable: It consists of two copper wires twisted around each other, one for transmitting data and the
other for receiving data. The twisting is important as it cancels out the electrical interference from adjacent
wires and the surroundings.
Shielded Twisted Pair (STP): has a protective cover around each pair of wires
Advantages:
Strong resistance to interference; Long distance data transmission
Unshielded Twisted Pair (UTP): does not have a protective cover around each pair of wires. The
Electronic Industries Association and Telecommunication Industries Association's Commercial Building
Wiring Standard 568 (EIA/TIA-568 standard) defines UTP as a standard in building and wiring
situations. Five categories of UTP have been specified in the EIA/TIA-568:
Advantages:
Extremely low cost; Easy installation; pre-installed with telephone cables; Uses star topology
• Fiber Optic Cable: It is an extremely thin glass strand. The fiber cable consists of an optical fiber, called the core,
surrounded by a concentric layer of glass, called the cladding, which is in turn covered by an outer plastic jacket
for protection from physical damage
Multi Mode Fiber Optic: a light pulse propagates in a number of modes in the fiber
Single Mode Fiber Optic: a light pulse is able to propagate in only one mode in the fiber. Has a smaller
core
Mode is used to describe a light path through a fiber optic cable.
SUMMARY OF CABLE TYPES
FEATURES COAXIAL CABLE TWISTED PAIR OPTIC FIBER
Thinnet Thicknet Unshielded Shielded
Cost (expensiveness) 4th 3rd Least 2nd Most
Any machine on the network that wants to access the server's services should be installed with the client-side
programme. The client-side programme is actually a software 'shell' for the local operating sys- tem of the
machine.
The shell is a programme for accepting user commands. It distinguishes between commands for the network
and commands for the local OS. If the command is for the local OS, the shell passes the command back to the
local OS for the execution. If the command is for the network, it is executed by the shell.
• Windows NT: NT stands for New Technology. It was developed by Microsoft in the 1990's.
Advantages Over Netware:
• It has simple to start-up built in services for implementing highly required Internet services such as
Domain Name Services (DNS) and electronic mail.
• Compared to the text-mode interface in NetWare, Windows NT is more user-friendly
• It supports multiple communication protocols including:
TCP/IP for networks in a Wide Area Network (WAN)
IPX/SPX for communication with the NetWare network
NetBIOS Ex- tended user Interface (NETBEUI) usually used in LANs with no access outside
networks like the Internet
• It is most often used in implementing enterprise network with multiple NOSs
• Uses NT File System (NTFS) to provide software fault tolerant services such as disk mirroring
• It provides many network management tools like network traffic monitoring and protocol analysis.
• Unix: Unix is not a NOS, but an operating system with built-in networking features.
Supported Protocol & Services: TCP/IP and Electronic Mail
Advanced Features: administration, diagnostics, system utilities and other networking services.
Advantages:
• It is rich in resources for system and network management
• High portability of applications
• A very good network server for running applications serving the other machines on the network
NETWORK TECHNOLOGIES TO MEDIATE ACCESS BY MULTIPLE NODES TO A COMMON LINK (LAN)
1. Ethernet (CSMA/CD): Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is a technology used to
share a common link among multiple nodes. In Ethernet networks the network adaptor of each node always
monitors the link to see if there is another node transmitting data on it. This actually is the meaning of Carrier Sense
(CS) in CSMA/CD.
Carrier Sense (CS) means the nodes attached to the link know about the state of the link; that is, whether it is idle
or being used by someone. A node transmits data to the link immediately when it finds the link free.
Multiple Access (MA) means that it is a technology used in multiple access network.
Collision occurs when there may be more than one node which wants to transmits data finding the link idle and
submit their data into the link at the same time.
Collision Detection (CD) means that nodes are able to detect collisions during data transmission. If a collision is
detected, the node transmits a jamming signal and immediately stops transmitting. This ensures all the nodes on
the link know there has been a collision. Each sending node then waits for a random unit of time before
retransmitting so as to reduce the probability of collision again. If there is a further collision or retransmission, the
sender doubles the waiting time for retransmission until reaching a limit.
Ethernet Address: This address is burned into the Read Only Memory (ROM) of the network adaptor so if the
network adaptor of a node is replaced, its Ethernet address is also changed. The form of an Ethernet address is 8
bytes long, composed of a sequence of six hexadecimal numbers separated by colons; a4:23:2b:e4:b1:d2 is an
example. To make sure that each Ethernet address is unique in the world, each Ethernet device manufacturer is
allocated a different prefix of Ethernet address
Unicast: Each adapter on the Ethernet will suck each frame up from the network and compare the destination
address on the frame with its own Ethernet address to see whether the frame is destined to itself.
Broadcast: The broadcast address, which is an Ethernet address of all, is used.
Multicast: More than one destination address is included in the frame. A special field in the frame will be set to
indicate the frame including multicast information.
Ethernet Implementation: Ethernet is usually implemented with coaxial cable and adapts a bus topology. It uses
the Manchester encoding scheme to encode the bits into electronic signals
On coaxial cable, a T-connector is used to branch out to a node.
Each node should be at least 2.5 metres apart, otherwise signal reflection may give a false collision indication.
Each cable segment should not exceed 185 metres
If you want to build a network in an area exceeding this limit, you may use a repeater to extend the network
A repeater will receive signals from one cable segment, amplify and transmit it to another
However, you may not use more than four repeaters between any two nodes in the network
2. Token Ring: Token Ring is implemented on a ring topology. For a ring topology, nodes are connected with several
point-to-point links and frames flow in one direction - a node receives frame from its upstream neighbour and
passes them to its downstream neighbour, and copies the frame to its internal memory if it finds the frame
designated to itself.
Fiber Distributed Data Interface (FDDI): Fiber optic cable is used for the implementation. FDDI uses a dual ring
configuration; that is, each node is connected to two independent rings and data is transmitted in opposite
directions in these two rings. The second ring is used to loop back the frames in case of a single node failure or a
single break in the link. The transmission rate can be up to 100Mbps. The maximum number of nodes is about 500
and there should not be a distance longer than 2 kilometres between any two nodes. FDDI uses the 4B15B-encoding
scheme
Critical Problems with FDDI
• How long is a node allowed to hold the token for transmission?
The time a mode is allowed to hold the token as the Token Holding Time (THT).
If THT is set to infinity, the node may hold the token for a very long time and this would keep
other nodes waiting for a very long time
If the THT is too short, the node has a small piece of data to send and may still need to wait for the
token several times. The worst-case scenario for short THT is that there is only one node that has
data to send.
Ring Latency (RL) is the time needed for the token to circulate around the ring once when there is
no node, which wants to send data.
• What should be done if the token is missing?
This may happen if the node holding it fails or there is a bit error in the token. n these cases, the
token should be regenerated.
Q. What algorithm is adopted by Token Ring in controlling which node sends data first?
It uses a token.
A token is actually a special sequence of bits circulating around the ring as ordinary frames. Any node, which wants to
send data out, must hold the token. In other words, nodes on a Token Ring network transmit data in turn. When a node
has data to send and the token arrives at it, it takes off the token (that is, does not pass it to its downstream neighbour)
and sends the data out. The data is then passed to the nodes on the network until reaching the destination node which
copies the frame of data into its internal memory. The frame continues to travel after reaching the destination node
until it comes back to the sender node, which absorbs the frame and releases the token back to the network.
Q. For a link of speed 10Mbps and propagation delay of 51.2 x 10-as; find what the minimum frame
size will be?
S >=2aC, Where:
S = minimum frame size = ?
a = end-to-end propagation delay = 51.2microsec
C = speed of the link in bits per second = 10Mbps
Therefore, S = 2*(51.2*10) = 1024MB / 1,024,000 bytes
Q. A company, OPQ solutions, provides Pentium PC for all her staff, with a total of 10 different
applications to share. There may also be heavy sharing of data among the users. What would you
recommend for the company: Ethernet or Token Ring? Why.
Ethernet will be recommended because it uses the Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
technology to share a common link amongst multiple nodes, as well as detect collisions during data transmission.
SHANNON'S LAW / THEOREM
Simply stated, Shannon's theorem gives an upper bound to the capacity of a link, in terms of bits per second (bps) as a
function of the signal-to-noise ratio of the link, measured in decibels. C = Blog, (1 + S/N)
ENCODING SCHEMES
1. Non-Return-to-Zero (NRZ): In this scheme, the obvious thing to do is to map the data value 1 onto the high signal
and data value 0 onto the low signal. This is exactly the mapping used by this scheme called cryptically enough, non-
return-to-zero (NRZ). The problem with NRZ is that a sequence of several consecutive Is means that the signal stays
high on the link for an extended period of five, and similarly, several consecutive Os means that the signal stays low
for a long time
2. Non- Return- to- Zero- Inverted (NRZI): Addresses this problem of infrequent transition, called the non-return-to-
zero-invented (NRZ1), has the sender make a transition from the current signal to encode a I and stay at the current
signal to encode a O. This solves the problem of consecutive Is but obviously does nothing for consecutive 0s.
3. Manchester: does a more explicit job of merging the clock with the signal by transmitting the exclusive — OR of the
NRZ — encoding data and the clock. The problem with the Manchester encoding scheme is that, it doubles the rate
at which signals transitions are made on the link, which means that the receiver has half the time to detect each
pulse of signal. The rate at which the signal changes is called the link's band rate.
4. 4B/5B: It attempts to address the inefficiency of the Manchester encoding without suffering from the problem of
having extended durations of high or low signals. The idea of 4B/5B is to insert extra bits into the bit stream so as to
break up long sequences of Os and Is
ERROR DETECTION
There must be errors on transmitting the data across the links. Bit errors are sometimes introduced into frames. This
happens, for example, because of electrical interference or thermal noise. Although errors are rare, especially on optical
links, some mechanism is needed to detect these errors so that corrective actions can be taken
1. Cycle Redundancy Check (CRC): Blocks of data entering these systems get a short check value attached, based on
the remainder of a polynomial division of their contents. On retrieval, the calculation is repeated and, in the event
the check values do not match, corrective action can be taken against data corruption.
2. Two-Dimensional Parity: Catches all 1-,2-, and 3- bit errors, and most 4-bit errors. the information bits are
organized in a matrix consisting of rows and columns. For each row and each column, one parity-check bit is
calculated. As a result, the last column consists of check bits for all rows and the bottom row consists of check bits
for all columns.
3. Internet Checksum Algorithm: The idea behind the Internet Checksum is very simple. You add up all the words that
are transmitted and that transmit the result of that sum. The result is called the Checksum. The reason for using an
algorithm like this despite its weaker protection against errors than a CRC is simple: this algorithm is much easier to
implement
LAYERING AND PROTOCOLS
An orderly exchange of data requires that each node conform to some pre-established agreement or rules. These rules
specify the formats and relative timing of messages to be exchanged among the workstations. A network protocol
establishes these rules, standards, or connections. The advantage of the layering concepts is to simplify the complexity
of the network design with a structured model. The set of layers and protocols is called the network architecture.
OSI REFERENCE MODEL
The goal of the model is to set a standard for the communication product vendors. Each layer performs specific
functions, which allow application software on different system architecture to communicate with each other as if they
were operating on the same system. In the layered approach, it is possible to use different network application
programs. Two hosts using the OSI model and connected by network devices.
Physical Layer:
This layer defines electrical signaling on the transmission channel; how bits are converted into electrical current, light
pulses or any other physical form; and the ability to detect signaling errors in the network media. A network device
functioning at this layer only is called a repeater. The function of a repeater is used to extend the physical distance of
internetworking hosts.
Data Link Layer:
This layer defines how the network layer packets are transmitted as bits. It accomplishes this task by having the sender
break the input data up into a data frame, (a few hundred bytes), transmits the frames sequentially and process the
acknowledgement frame sent back by the receiver
Network Layer:
The layer defines how information from the transport layer is sent over networks and how different hosts are
addressed. Each host in the network must have at least one unique address. Routers/Gateways are used to provide this
function.
Session Layer:
This layer is responsible for establishing and terminating network connections as well as arranging sessions into logical
parts. A session allows ordinary data transport, as does the transport layer, ordinary data transport, as does the
transport layer, but it also provides same enhanced services which are useful in some applications. This layer is also
responsible for range-to-station address translation.
Presentation Layer:
This layer is responsible for data translation (formatting the data) and data encryption and decryption processes. A
typical example of a presentation service is encoding data in a standard, agreed way.
Application Layer:
This is the interface between the application and the user. It is used for those applications that are specifically written
to run over the network. The application layer specifies the protocols to be used between the application programs. The
application interface defines interns such as screen layouts, escape sequences for inserting and deleting text, moving
the cursors, and so on.
The Production Data Unit: To synchronize the communication between host, specific headers for each layer are
designed to indicate the start or the end of the communication.
OSI TERMS AND CONCEPTS
Addressing: Each host in the internetwork needs at least one unique address for identification.
• Link Layer Address: (also called physical or hardwired addresses) are unique for each network interface.
• Network layer addresses: (also called vertical or logical addresses): This type of address can be modified
according to the setting of the application. Unlike link layer addresses, which usually exist within a flat address
space.
Frames: The term 'frame' represents an information unit whose source and destination is a link layer entity.
Packets: The term 'packet' denotes an information unit whose source and destination is a network layer entity
Messages: The term 'message' denotes an information unit whose source and destination entity exists above the
network layer. The term message is also used to refer to particular lower layer information units with a specific, well -
defined purpose.
THE INTERNET STRUCTURE
The Internet architecture is also known as the Transmission Control Protocol over Internet Protocol (TCP/IP)
architecture. The TCP/IP was developed by ARPANET (Advanced Research Project Agency Network) of the US
Department of Defense, and totally funded by them.
Network Access Layer: To set up a TCP/IP network, one of the first things that you have to do is to choose the kind of
network access protocols you will use
Internet Layer: This consists of a single protocol - the Internet Protocol (IP). This is the Protocol that supports the
interconnection of multiple networking technologies into a logical internetwork.
Transport Layer: contains two main protocols.
Transmission Control Protocol (TCP)
User Datagram protocol (UDP)
Application Process Layer:
Application Protocols such as File Transfer Protocol (FTP), Telnet, simple Mail Transfer Protocol (SMTP, or electronic
Mail) are run in this layer.
Features
• The number of layers in the Internet architecture is reduced to four instead of the seven used in the OSI model.
• The Internet Protocol (IP) working at the Internet layer is the most critical factor for the development of the
Internet architecture. It defines a common method for exchanging packets among a wide collection of networks.
FUNCTIONALITY OF THE INTERNET ARCHITECTURE
1. Network Access Layer: This layer provides the ability to transmit the data blocks received from the
Internet layer. This is the layer that is responsible for translating a logical address to a physical
address of the destination.
2. Internet Layer: This Layer defines the size and the format of the data to be transmitted. The Internet layer
consists of two protocols, the Internet Protocol (IP) which performs, the address function and the Internet
Control Message Protocol (ICMP) which is usually used for diagnostics of the network connectivity.
3. Transport Layer: This layer has two major protocols, namely: Transmission Control Protocol (TCP) which is
a connection-oriented approach and is reliable, but with relatively large overheads on the connection setup
and the User Datagram Protocol (UDP) which is a connectionless approach that provide a faster connection
rate for communication and is generally used when the amount of data being transmitted is small.
4. Application Layer: Applications for use over the Internet. Application layer protocols include FTP, Telnet,
Routing Information Protocols (RIP), Network File System (NFS), Hypertext Transfer Protocol (HTTP),
SMTP, and many others. These protocols are used to provide application level services.
Q. What are the advantages of using the layering models?
The advantage of the layering concepts is to simplify the complexity of the network design with a structured model.
TYPES OF NETWORK DEVICES
1. Hubs: A hub is the most primitive network device. The hub works as a center of distribution in matters of signals
from and to the different parts of the network. The hub allocates a port to each host and the hosts are
interconnected through the hub.
2. Repeaters: A repeater, as the name implies, copies or repeats signals that it receives. It, however, also amplifies all
received signals before retransmission (without changing the frequency). The advantage of using a repeater is to
extend the geographical distance of the network coverage.
3. Bridges: A bridge is a device which allows two networks that used the same technology to be connected together. It
operates at the data link layer which controls data flow, handles transmission errors, provides physical (as opposed
to logical) addressing and manages access to the physical medium.
Advantages:
• Since only a certain percentage of traffic is forwarded, the bridge diminishes the traffic experienced by
devices on all connected segments.
• It acts as a firewall for some potentially damaging network errors.
• Bridges allow for communication between a larger number of devices than would be supported on any
single LAN connected to the bridge.
• It extend the effective length of LAN, permitting the attachment of distant stations that were not
previously connected.
Transparent Bridging:
Transparent bridges are so named because their presence and operation are transparent to the network
hosts. They are able to learn the network's topology by storing the source address of incoming frames from
all attached networks
A transparent bridging table
4. Switches: The purpose of switching is to be able to reduce the traffic congestion in different network topologies.
Since the operating speed of switches is much faster than that of bridges, the performance of switching technology
is better able to support high volume traffic on networks.
Switching in the Ethernet Environment: An Ethernet LAN switch improves bandwidth by separating collision
domains and selectively forwarding traffic to the appropriate segments.
5. Routers: The router is sometimes called a gateway. It is a device, which routes data between network of different
technologies such as Ethernet, Novell or IBM Token Ring.
Features:
• It provides support for multi-protocols.
• It provides multi-interfaces for different networks.
• It operates at the Internet Protocol layer.
Bridges versus routers
The major differences between bridges and routers are:
1. Bridging occurs at the data link layer of the router OSI Reference Model, while routing occurs
2. at the network layer.
3. All interfaces in routers have corresponding addresses. It is possible to connect to routers through their interface
addresses. Bridges does not have such facility.
4. A bridge has to examine all data in order to determine its destination. If a source and destina- tion are in the same
network segment, but on different interfaces of a bridge, data from the source has to pass through the bridge in
order to reach the destination.
Routing components / operations
1. The determination of optional routing paths.
2. The transport of information groups (typically called packets) through an internetwork.
Routing algorithm
Routers need to determine the path for each outgoing pocket. In order to choose the optimum, routers compute the
path length that is used by routing algorithms to determine the optional path to a destination. Path determination can
be obtained according to the routing algorithm operating in the routers.
Routing Attributes
1. Optimality: Refers to the ability of the routing algorithm to select the 'best' route.
2. Simplicity: Routing algorithm is designed to be as simple as possible.
3. Rapid Convergence: The process of agreement, by all routers, on optimal routes. Routers distribute routing update
messages.
4. Flexibility: Routing algorithms should quickly and accurately adopt to a variety of network circumstances.
Q. What happens if the convergence of routers is not fast enough?
Slow convergence of the routing tables brings the problem of loops
Q. Compare a Router with a gateway
A router is a device that is capable of sending and receiving data packets between computer networks, also creating an
overlay network. A Gateway, on the other hand, joins dissimilar systems. Gateway it is defined as a network entity that
allows a network to interface with another network with different protocols.
RARPD = Reverse Address Resolution Protocol Daemon
NFS = Network File System
NIC = Network Interface Card
SNMP = Simple Network Management Protocol
TFTP = Trivial File Transfer Protocol
TCP: The Transmission Control protocol over Internet Protocol (TCP/IP) is a set of protocols developed to allow
computers to communicate across a network. It was developed by a community of researchers centered around the
ARPANET. TCP/IP is used to refer to the whole Internet protocol family.
IP: It is the Internet layer protocol that controls the routes of data across an internetwork. Besides the internetworking
routing function, IP provides fragmentation and reassembly of datagrams, and error reporting. s
COMPARISON BETWEEN TCP/IP AND UDP
Both TCP and UDP are responsible for breaking up the message into packets or datagrams, and reassembling them at
the other end. However, TCP is a more intelligent protocol. It is able to resend any data that gets lost and puts packets
back in the right order.
THE FORMAT OF AN IP PACKET
The fields of the IP packet and their functions are as follows:
• Version: Indicates the version of IP currently used. The current version 4 or IPv4 in short form.
• IP Header Length (HL): Indicates the datagram header length in 32-bit words. If there are options set, the
header length is 20 octets (bytes)
• Type of Service (TOS): Specifies how a particular upper layer protocol would like the current datagram to be
handled. The priority of the datagrams can be defined by a 3-bit precedence field.
• Total Length: Length of the entire IP packet measured in octets, including data and header. The maximum
packet length is 64 octets.
• Fragmentation Field: Identification, flags and fragment offset indicate the packets' sequence in fragmentation.
Receiving hosts reassemble the fragmented packets to the sending sequence according to the information in this
field.
• Time to Live (TTL): Indicates the maximum number of seconds/hops that a datagram will be allowed to remain
in the network. The TTL is a counter that gradually decreases down to zero, at which point the datagram is
discarded. This keeps packets from looping endlessly.
• Protocol: Identifies which upper layer protocol receives incoming packets after IP processing is completed.
• Header checksum: It’s a 16- bit field that helps ensure IP header integrity.
• Source IP address: Specifies the sending IP address.
• Destination IP address: Specifies the receiving IF' address.
• Options: Provides additional information on features of the IP header. Options such as dedicated rating, security
or time stamp operation can be available.
• Data: contains upper layer information, including TCP or UDP data
THE DEVELOPMENT OF TCP/IP
The TCP/IP protocols were initially developed as part of the research network developed by the United States Defense
Advanced Research Projects Agency (DARPA or ARPA). However, they all had flaws or limitations when used on the
ARPAnet. The developers of the new network recognized that trying to use these existing protocols might eventually
lead to problems as the ARPAnet scaled to a larger size and was adapted for newer uses and applications.
In 1973, development of a full-fledged system of internetworking protocols for the ARPAnet began. In early versions of
this technology, there was only one core protocol: TCP (Transmission Control Program). The first version of this
predecessor of modern TCP was written in 1973, then revised and formally documented in RFC 675, Specification of
Internet Transmission Control Program, December 1974.
NAMING
The naming scheme in the Internet is based on the concept of domains. Host names within a domain are delegated by
the domain administrator.
The domain is structured in a hierarchical model:
• .com: commercial organization
• .edu: educational institution
• .gov: government
• .mil: Military organization
• .net: systems performing network services org — non-profit organization
ADDRESSES
The IP address is a 32-bit binary value. Each host in the internet has a unique IP address to -locate its position.
CLASSES OF IP
• Class A networks: Allocates 7 bits for the network address field and start with a number between 0 and 127. The
host address field has 24 bits. They are mainly for use with a few very large networks since they can support
very large number of host addresses.
• Class B networks: Allocate 14 bits for the network address field and start with a number between 128 and 191.
The host address field has 16 bits. It provides a good balance between network address and host address space.
• Class C networks: Allocates 21 for the network address field and start with a number between 192 and 223. The
host address field has 8 bits. Eight bits implies a maximum number of 254 hosts in a class C network. This class
of network is the most popular and it is suitable for small-scale network.
• Class D networks: Starts with a number between 223 and 239. The class is reserved for multicast applications..
• Class E networks — are reserved for experiemental use. Class E addresses start with a number between 240 and
255.
NETWORK ADDRESSING GUIDELINES
• The IP address of each host must be unique. Duplicated IP addresses on different host will cause the
corresponding hosts to be unable to communicate and even to halt.
• The network address cannot begin with the number 127. The number 127 in class A is reserved for internal
loop back functions. The loopback address of a host is used to cheek the correctness of the network
configuration for the host.
• The first octet in a network address cannot be 255. The octet 255 is used for broadcast mode of the network.
• The first octet in a network address cannot be 0. Zero is used to indicate that the address is the local network.
• Host address cannot be 255. This means that all the bits will be set to Ps and the address is regarded as if it in
broadcast mode.
• Host address cannot all be O's
SUBNETS
Subnet mask make use of the format and representation of IP addresses. Subnet masks have IS in all bits except those
bits that specify the host field. Besides the performance issue, the utilization of the IP address is another concern for
class A and class B. Hence, it is reasonable to divide class A, B or even C network addresses into multiple subnet
network addresses.
Benefits
• Reducing network congestion by redirecting traffic and reducing broadcasting it; can significantly improve the
performance of Ethernet network.
• Better utilization of the IP address
• It's easier to control the network segment by dividing hosts into different sub networks.
PHYSICAL NETWORK ADDRESS RESOLUTION
In some media (e.g., IEEE802 Local Area Networks), physical addresses and IP addresses are found dynamically
through the use of the Address Resolution Protocol (ARP) and the Reverse Address Resolution Protocol (RARP). ARP
uses broadcast messages to determine the physical address of a particular IP address. The system on the local network
applies ARP to an automatically look up the physical addresses.
NETWORK ADMINISTRATION
A major limitation of RARP is that RARP request cannot be forwarded by routers. Hence, network administrators are
not able to design RARP clients in different network segments with a single RARP server.
The Bootstrap protocol: The Bootstrap protocol works as a client-server model. The client- server model mean that a
host will offer services to the other hosts. The service provider is called the server and the other are the client.
Dynamic Host Configuration Protocol: DHCP also works as a client-server architecture. The designated server assigns
network addresses and lease configuration parameters to dynamically configured clients. DHCP clients can obtain the
initialization parameters from DHCP servers. DHCP provides:
• Automatic IP Addressing that assigns a permanent IP address to a client.
• Dynamic IP addressing that assigns an IP address to a client for a limited period of time.
• Manual IP Addressing thatassigns on IF address to the client through the Network Administrator.
Domain Name Server (DNS): It is is a global network of servers that translate host names into IP addresses.
Authoritative Name Servers: Stores information for the host names of subdomains. Each Authoritative Name Server
hold in its database the name-to-address mappings for the group of host if administers.
Basically, each domain should have its own Authoritative Name Server.
ROUTING TABLE MAINTENANCE
Each machine in the IP network simply forwards the IP packets to the next hop without computing the entire path to
the destination, all of the machines, and especially all of the routers, must have a consistent
view of how to get to each destination. In other words, it is essential that their routing table be synchronised with each
other.
IP ROUTING
IP routing specifies that IP datagrams travel through internetworks one hop at a time. As the next hop may or may not
be the final destination, each intermediate device needs to match the destination address of the datagram with an entry
in the current node's routing table. Each node involved in the routing process tries its best to forward packets based on
internal information, regardless of whether the packets get to their final destination.
Static Routing (or Non-adaptive Routing): The simplest routing technique to understand and implement is the static
routing. In static routing each router is manually configured with the list of destinations, and the next hop to reach
those destinations, by a configuration file stored on a stable storage (or cache).
Advantages:
• It is predictable and this is because the network administrator computes the routing table in advance. The path
a packet takes between two destinations is always known precisely, and can be controlled exactly.
• It does not impose any overhead on the router or the network. This is because no periodic broadcast of RIP
information every 30 seconds is required.
• It is easy to configure on a small network. The network administrator simply tells each router how to reach
every network segment to which it is not directly attached.
Disadvantages:
• The price of its simplicity is a lack of scalability. For a large network with several routers, computing an
appropriate route from every router to every destination is difficult.
• When a network segment moves, or is added one would have to update the configuration of every router on the
network. If one misses any, in the best case, segment attached to that router will be unable to reach the moved
or added segment.
• Finally, because static routing is, by definition static, it cannot use redundant network links to adopt to a failure
in the network.
Dynamic (or Adaptive) Routing: This routing technique is a more flexible solution that allows the routers to compute
their routing tables dynamically, bases on information provided by the other routers in the network. In general, the
rooters speak a protocol that communicates information about the current functional topology of the network. From
this information, the router computes one or more next hop rooters for each destination, trying to produce a path to the
destination that is as close to optimal as possible.
Advantages:
• The issue of scalability and adaptability is one of the major advantages of this scheme.
• With a dynamic routing protocol, routers learn about the topology of the network by communicating with other
routers.
• The ability to learn about changes to the network's configuration means that the network redundant paths, then
a partial network failure appears to the routers as if some segments got moved and they can be reached via
alternate paths.
Disadvantages:
• The complexity of this technique is one of its major disadvantages.
• In order to communicate information about the topology of the network, routers must periodically send
messages to each other using a dynamic rooting protocol.
• Increase in bandwidth overhead and the network latency.
• Finally, some or all of the machines in a network may be unable to speak any dynamic routine protocol, or they
may not speak a common protocol. If that is the case, static routing may be the only option.
Hybrid Routing: It is a reasonable middle ground that limits the complexity of dynamic routing. In a hybrid routing
scheme, some parts of the network use static routing, and some parts use dynamic routing.
THE ROUTING INFORMATION PROTOCOL
Routing Information Protocol (RIP) is a dynamic routing protocol which uses hop count as a routing metric to find the
best path between the source and the destination network.
OPEN SHORTEST PATH FIRST (OSPF)
Open Shortest Path First (OSPF) is a newer technology than RIP as an interior gateway protocol. It overcomes the major
problem of the RIP, which is slow convergence.
THE INTERNET CONTROL MESSAGE PROTOCOL (ICMP)
The Internet Control Message Protocol (ICMP) can be regarded as a network helper. It perfomes a number of tasks
within an IP environment. ICMP is able to report routing failures back to the source.
ICMP provides helpful message such as the following:
• To test node reachability across an Internetwork with echo and reply message
• To stimulate more efficient routing with redirect message
• Time exceeded message to inform sources that a datagram has exceeded its allocated time to exist within the
Internetwork.
• Rooter advertisement and rooter solicitation messages to determine the addresses of rooters on directly
attached sub networks.
THE INTERNET TRANSPORT LAYER
The Internet transport layer is implemented by the Transmission Control Protocol (TCP) and User Datagram Protocol
(UDP)
IMPORTANCE OF TCP
1. TCP provides correction- oriented data transport, while UDP is correction less.
2. The correction- oriented data transport of the TCP correction is a reliable application-to-application
transmission
3. TCP is able to provide reliable services
4. When data is lost or duplicated during the transmission, TCP will automatically discard the duplicated data and
handle the retransmission of the missing data.
5. TCP will automatically discard the duplicated data and handle the retransmission of the missing data.
6. TCP provides full-duplex, acknowledged and slow-controlled services to upper layer protocols.
7. Guaranteed delivery of data to the destination
8. TCP is able to provide a flow control feature
PORTS AND SOCKETS ADDRESSES
Ports:
To address a connection for each application, the IP address of the corresponding host is not sufficient to fulfill the
requirement of multiple connections. It is required to provide its TCP port number, accompanied with the host address,
to specify a particular connection. The range of port number is from 0 to 216-1 for TCP or UDP. Ports in the range 0 to
1023 are well-known services ports.
Sockets:
The combination of the IP address and the port used for communication. The socket address is unique for a session of
communication between hosts.
CONNECTIONS
Before starting a TCP communication, it is necessary to establish a connection between the hosts. The scenario of the
connection procedure involves three steps.
• A server host opens a TCP port for services e.g, for a Web Server. The server listens to the port and accepts
connection if there is any request from clients.
• A client initiates a request to start a connection to the server at the given port and IP address.
• The client sends a synchronization segment with an initial sequence number- lets say 100
FLOW CONTROL IN TCP
Flow Control is all about making sure we don’t send more packets when the receive buffer is already full, as the receiver
wouldn’t be able to handle them and would need to drop these packets. To control the amount of data that TCP can
send, the receiver will advertise its Receive Window, that is, the spare room in the receive buffer.
Every time TCP receives a packet, it needs to send an ACK message to the sender, acknowledging it received that packet
correctly, and with this ACK message it sends the value of the current receive window, so the sender knows if it can
keep sending data.
After the completion of the Data transfer, it is necessary to close the connection session with the following steps:
1. The close procedure involves the following request reply process:
2. An application has finished its work and it tells TCP to close the connection.
3. The host sends a close segment to inform its partner that it will send no more data.
4. The partner replies the close request segment and stops its application.
5. The partner will also send a close segment to the host to confirm the end of communication.
6. After receiving the close segment for the partner, the host replies with the acknowledgement segment and stops
its application.
Retransmission Timeout:
If time outs are too long, it will prevent prompt recovery when a segment really has been destroyed, and will decrease
the network response time. In order to design a suitable timeout parameter for TCP communication, an algorithm with
adaptive feature is developed according to the network status.
Karn and Jacobson's Algorithm: New SRTT= (1- * (previous SRTT) + A * (latest RTT) where 0 1 1
A round trip time (RTT) is defined as the time taken between the transmissions of data and the arrival of
matching acknowledgements.
UDP
The UDP is a simple transport-layer protocol. It provides a connectionless service as there need not be any long-term
relationship between a UDP client and server.
The UDP datagram provides:
• a source port – a 16-bit port number
• a destination port – a-16 bit port number
• the length (of UDP header + data) – a-16 bit count of octets in the UDP datagram
• a UDP checksum – a 16-bit field
Features of UDP
1. No connection establishment: TCP uses a three-way handshake before it starts to transfer data, UDP just blasts
away without any final preliminaries
2. No connection state: TCP maintains connection state in the end systems. does not track any of these parameters.
3. Small segment header overhead: The TCP segment has 20 bytes of header overhead in every segment, whereas
UDP only has 8 bytes of overhead.
4. Unregulated Send rate: the speed at which UDP send data is only constrained by the rate at which the
application generates data, the capabilities of the sources (CPU, chock rate, etc.) and the access bandwidth to the
Internet, whereas TCP has a congestion control mechanism that throttles the sender when one or more links
between sender and receiver becomes excessively congested.
UDP CHECKSUM
The UDP checksum provides for error detection. UDP at the sender side performs the one's complement of the sum of
all the 16-bit words in the segment. This result is put in the checksum field of the UDP segment.
THE DESIGNER’S ROLE
The technical details of design can be extra-ordinarily complex. Before they reach a decision, companies frequently seek
outside expert opinion, spend substantial time meeting with key vendors, and carry out de- tailed technical and
economic analyses. The designer is often the coordinator of these activities and may not have the in-depth technical
knowledge of other experts.
Key network design valuables:
1. The capability of the network: What business functions does it deliver?
2. Its flexibility: How easy will it be to add and extend business functions?
3. The quantity of service: How reliable is it?
4. Cost: What's the price tag, and is it worth it?
DESIGN GOALS
1. Flexibility: The ease and speed with which changes can be made to any part of the platform
2. Scalability and Adaptability: The network's ability to cope with the growth of the organization,
3. Manageability: Ensuring the ongoing stability of operations and availability of resources of the network.
4. Cost Effectiveness: Weighing the costs required and the benefits provided by the network
TRAFFIC ANALYSIS
It is important to analysis the traffic patterns, between attached clients and servers before swapping out hubs and
installing switches.
To minimize the interswitch traffic, which represents a potential bottleneck, the following suggestions will suffice:
1. It is important to have those workstations and servers that communicate most often with each other on the
same switch, since switches differ in capability and speed of inter switch communications connections.
2. Another benefit of analyzing traffic patterns before installing the switch is the ability to identify those users and
workstations that need a dedicated switch port and those that can reside on a shared LAN segment attached to a
switched ports.
General guidelines for switch port allocation:
1. Servers and UNIX working stations should ideally have their own switch ports.
2. Distributed computing power users with frequent queries to servers should be able to connect to switch ports
via shared LAN segments of up to eight users.
3. Casual or light traffic users accessing only e-mail and terminal, character-based programs can be
4. Connected to switch ports via shared LAN segments of 50 or more users.
BRIDGING
Bridges provide certain features that routers cannot achieve. Under certain circumstances, we may choose bridges to
implement the internetworking
Advantages
1. The Installation of bridges is very simple. You can simply take the bridge out of the box, power it up, and attach
it to a network.
2. Pricing for bridges is usually more attractive than for routers
3. Bridges are network layer-protocol-independent. Nonetheless, bridges can handle multiple protocol with
almost no configuration
4. Some protocols are not routable: you cannot implement routers to connect these networks.
However bridge are able to forward non-routable protocols.
SWITCHING
The primary purpose of a switch is to increase available bandwidth within a shared-media LAN by implementting micro
segmentation on the local LAN. Switching, otherwise known as LAN switching, is very similar in function to bridging.
The key difference is that switching is done in hardware, or Application Specific Integrated Circuit (ASIC) chips and is
extremely fast compared to bridging
ROUTING
Unlike the bridge, which merely allows access to the internetwork (forwad-if-not-local logic), the router specifically
address the data packet to a distant router. Only when the destination address and the quality of the intended path,
does it release the carefully packed data packet. This meticulous processing activity is known as forward-if-proven-
remote logic.
VIRTUAL LOCAL AREA NETWORKS (VLANS)
VLANs are software definable through configuration software contained within the LAN switch. The use of vitual LANs
allows workgroup members to be assigned to more than one workgroup quickly and easily if necessary. A key
limitation to virtual LANs is that when members of the same virtual LAN are physically connected to separate LAN
switches, the virtual LAN configuration information must be shared among multiple LAN switches.
BACKBONE STRATEGY
The word 'backbone' is very often used to descibe the part of the network that interconnects the other parts of the
network.
Types
FDDI Backbone; Distributed Backbones (the connections of the LANs are distributed throughout the backbone);
Collapsed Backbones
ROUTING OPTIONS
1. Multiprotocol backbone: The network layer for both protocols are different. e.g. the combination of IPX networks
and TCP/IP networks. The IP packets and the TCP/ IP packets can be routed throughout a common backbone
without encapsulation. A drawback of this is the creation of confusing situation particular), for integrated routing.
2. Single protocol backbone: The design can be significantly simplified. All routers are assumed to support a single
routing protocol for a single network protocol.
NETWORK IMPLEMENTATION
Account Types:
1. Built in Accounts: There are two built-in accounts: Guest and Administrator
2. Domain User Accounts: They are created through the utility programs, user Manager for Domains.
3. Local User Accounts: They are created on an NT Member server or an NT workstation through their own utility
program, user Manager.
AUDIT TRAIL
The auditing of all the activities that goes on in a network
These activities are monitored under the following points:
• A description of the action performed.
• The user who performed the action.
• The date and time of the action.
MONITORING
To monitor system resources like the procesor, memory and storage, you may use the parfomance Monitor.
Event Viewer:
The Event Viewer shows your records of event generated by one of the following sources: NT system, the NT services,
applications running on an NT server and audited user accounts. You may use the Event Viewer to isolate problems.
Using Last Known Good Configuration
When you log on to an NT server successfully, it will store the current configuration as the Last Known Good
Configuration. The Last Known Good Configuration is used for incorrect configurations. It cannot solve problems arising
from hardware damage or corrupted drivers or files.
System Recovery
You may configure the recovery options on a server error, called a STOP error to suit your particular needs.
EMERGENCY REPAIR PROCESS
The NT server provides the Emergency Repair Process for system recovery. However, you must have the following
before you can use it:
• The original installation disks and CD-ROM, in case files are detected as missing or corrupted.
• The Emergency Repair disk, which is computer - specific. An Emergency Repair disk created for computer will
not work on the other ones
NETWORK MANAGEMENT
Network management refers to how computer networks monitor and manage active function
Functional Areas
1. Fault management detects, displays, and maintains records of alarm conditions.
2. Configuration management handles additions, deletions, and changes to the network.
3. Accounting management tracks the measurable use and cost of network resources.
4. Performance management is designed to optimise the speed of the network and to ensure effective utilisation of the
network resources.
5. Security management deals with such issues as logging on and protection of the network from external attack from
intruters or unauthorised users (Lockers) and crackers.
Network Management System (NMS)
Huge workstations for running Network Management Tools Software that require hundreds of MB (or even GB) of RAM.
E.g. HP Openview
Key Elements of NMS
1. Agent: A software that performs function, on behalf of its principal. It can be a stationary or mobile agent, but most
of the time, they are mobile.
2. Management Station/Manager: These are the nodes and devices (or stand alone devices) that are attached to the
network and they are to be managed.
3. Management Information Base: As we said in the last section, the Management Information Base (NIB) serves as the
database or repository for information and data collected along the network.
4. Network Management Protocol: The management station and agents are linked by a network management protocol
e.g. Simple Network Management Protocol(SNMP), Common Management Information Protocol (CMIP) etc.
Network Management Tools
There are several network management tools available that provide a range of services. For example, they can monitor
nodes such as repeaters, routers bridges, hubs, workstaitons, servers, and hosts. If a router is down the software
graphically displays this condition —id may sound an alarm to the network management station. Some managemet
packages are designed to be modular, so specific functions can be added as your network grows. Modules, can be added
that manage domain name services, user accounts, e-mail services need backup and restore services, file server
configuration printer sevices and telecommunication services.
Peripheral Management
OpenView an example of network management package, has modules that enable you to manage key peripherals such
as disk services and print services. Software like OMNISTORAGE can provide disk capacity management, by
automatically storing data where it can be kept most economcally. Data are migrated from expensive magnetic media to
less- expensive tapes or CD-ROMs. In the process, critical hard drive space is freed for immediate production use.
STEPS TO INVESTUGATE NETWORK PROBLEMS
TROUBLESHOOTING EQUIPMENT
1. Time - Domain Reflectometers (TDRs) and Optical Time - Domain Reflectometer (OTDRs)
A TDR can quickly locate open and short circuits, sharp bends and imperfections in twisted pair and coaxial
cables. It sends a signal along the cable. The defects on the cable reflect the signal to the TDR, at different
amplitudes depending on the problem.
2. Cable Testers (Scanners)
If you suspect the cables cause the network problem, you may check them with a cable tester. Besides the
physical connectivity, a cable tester can test and report on cable conditions like near-end crosstalk (NEXT),
attention and noise.
3. Network Monitor
Network monitors track packets crossing a network. They gather information about packet sizes and types,
error packets, and overall utilisation and other information.
4. Protocol Analysers
A protocol analyzer helps you in network traffic analysis by capturing and decoding the data frames. It
presents the protocol layers information recorded in a frame in a readable format.
5. Tranceiver Monitor
Tranceiver have low visibility on a network, but they play a critical role. These small devices are part of the
attachment unit interface (AU!) for linking backbone cabling into network and computer equipment such as
bridges, routers, hubs, andmonitor can detect transceiver problems workstations.
6. MAU Analyser
A MAU analyzer is used on token ring networks and provides information similar to a cable scanner. It
generates a singal for the purpose of locating opens, shorts, and faulty cable conditions. Also, it can deter-
mine if the MAU is functioning properly.
NETWORK PROBLEMS
Network cabling is the most common source of problems on a network.
There are several things to check related to cabling problems, including the following:
• Cable length
• Cable Type
• Terminators
• Grounding
• Cable impedance
• An open or short
• RFI and EMI
• Connectors
• Distance between connections
PROBLEMS OF NETWORK DEVICES
1. NIC Problems: A NIC may have problems because it is set up to use the wrong frame type or the wrong cable type. A
protocol analyser will help you trace the problem to the offending NIC. With the protocol analyser, you can obtain
the address of the NIC and trace its location. The easiest solution to try with a malfunctioning NIC is to reseat
(remove and reinstall) the board in the device having problems.
2. Print Servers: Print server problems are usually very apparent, because nothing appears at the printer after a print
request is made. When printing problems occur, you will need to check the printer's print server and the print
server software on the file server or host.
3. File servers: A bottleneck or slow response will occur if the buffer are too small or if there are too few buffers to
match the demand on the server. It may be necessary to rellocate or expand server memory to meet the need.
4. Gateway: A malfunctioning gateway can have several symptoms. The most apparent symptom is that a node is
missing. A protocol analyser or RMON probe can be used to trace the problem to the gateway.
5. Repeaters: Excessive collisions, network slowdown, or a network bottleneck can be caused by an overload repeater.
In this situation, you may need to make some design changes such as installing one or more bridges to segment
sections of the network and prevent overloading.
6. Bridge: A defective bridge can generate bad packets, excessive network traffic and network slowdowns. Check the
bridge configuration and power supply. Try resetting the bridge to see this cures the problem. If none of these
things work, you may need to replace the bridge.
7. Router Problems: When a router malfunctions, check the routing table and related areas. Check the following
potential trouble spots:
• Is the routing software up-to-date?
• Is the power supply working properly?
• Is the router memory working?
• For PC-based routers, is the hard drive full or fragmented?
• For PC-based routers, are the hard drive and controller working?
Another solution may be to replace the router with an intelligent hub.
TROUBLESHOOTING FIBER OPTIC CABLES
Troubleshooting fiber optic cable presents some special problems, because the signal source is light and the medium
is glass or plastic (usually glass). Fiber cable is especially susceptible to damage and should be examined for breaks or
opens when problems occur. An Optical Time-Domain Reflectometer (OTDR) is used to locate opens or measure
power loss on a cable run.
Improperly connected or terminated cable will cause problems. Dirty connectors also cause problems on fiber optic
cable runs. Examine connections and terminations for dirt or for poor installation when you have problems on a fiber
optic cable.
Another problems area is the angle of the bend around corners. This si called the angular circumference. The
maximum angular circumference depends on the cable characteristics and the number of stands. Light will not
transmit when the angular circumference is too great.
ISOLATING NETWORK PROBLEMS
The amount of difficulty you may experience in isolating a network problem is related to the size of your network, its
complexity, and the type of network.
Small token ring network are relatively easy to troubleshoot because of their star configuration. Management
software, TDR, or a protocol analyzer can be used to locate the node and isolate it for repair. The network continues
running after the node is removed.
Problems are more difficult to isolate on an Ethernet network, particularly if they are intermittent. A defective
NIC, repeater, bridge, router or other piece of equipment can result in similar network symptoms, such as network
slowdowns. Network troubleshooting equipment such as a protocol analyzer, is very effective for resolving problems.
SNMP - compliant equipment also helps, especially on complex networks, so you can use network management
software to isolate problems.
PROGRAMME TO DISPLAY TODAY’S DATE AND CURRENT TIME
--------------------------------------intro/daytimetcpcli.c
1. # include "unp.h"
2. int
3. main (int argc, char **argv)?
4. {
5. int sockftd, n;
6. char recvline (MAXLINE + 1);
7. struct sockaddr_in servaddr;
8. if (argc ! = 2)
9. err_qu it ("usage: a .out <I Paddress>");
10. if ( (sockfd = socket (AF-INET, SOCK_STREAM, 0) ) < 0)
11. err_sys ("socket error");
12. bzero (& servaddr, size of (servaddr);
14. servaddr. sin_family = AF_INET;
15. if (inet_pton (AF-INET, argv[1], & servaddr.sin_addr)< = 0)1
16. err_quit ("inet_pton error for %s", argv [1] );
17. if (connect (sockfd, (SA *) &servaddr, sizeof (servaddr) ) < 0)
18. err_sys ("connect error");
19. while ( (n = read (sockfd, recvline, MAXLINE)) > 0) {
20. recvline [ n ] = 0 ; /* null terminate * /
21. if (fputs(recvline, stdout) == EOF)
22. err_sys ("fputs error");
23. if(n<0)
25. err_sys ("read error");
26. exit (0);
-----------------------------------------intro/daytimecpcli.c
If we complile the program into the defaul a.out file and execute it, we have the following output
solaris % a.out 206.62.226.35 our input
Mon Oct 28 11:30:2019
ERROR HANDLING – WRAPPER FUNCTIONS
we check for errors from socket, inet_pton, connect, read, and fputs, and when one occurs, we call our own functions,
err_quit and err_sys, to print an error message and terminate the program. Since terminating on an error is the common
case, we can shorten our programs by defining a wrapper function that performs the actual function call, tests the
return value, and terminates on an error. The convention we use is to capitalize the name of the function, as in
sockfd = Socket(AF_INET, SOCK_STREAM, 0);
Below is the wrapper function:
____________________ lib/wrapsock.c
172 int
173 174 { 175 176 177 178 179}
Socket (int family, int type, int protocol )
int n;
if( (n = socket (fa mi ly, type, protocol) ) <0)
err_sys (socket error"); return (n) ;
____________________ lib/ wrapsock.c
PROTOCOL INDEPENDENCE
sockaddr_in, AF_INET, sin_family etc. all refer to IPv4. To make an IPv4 dependent program work under IPv6, we can
change them to sockaddr_in6, AF_INET6, sin6_family etc. Now the program will be protocol-dependent on IPv6. To
make the program totally protocol-independent, we use a function - getaddrinfo() which is called by tcpconnect.
HOW TO CREATE A TCP SOCKET
1. Bind server's well-known port to socket: By filling in an Internet socket address structure and calling bind
2. Convert socket to listening socket: By calling listen the socket is converted into a listening socket
3. Accept client connection, send reply: By using TCP’s three-way handshake to establish a connection and when this
handshake completes, accept returns
OSI MODEL
SOCKET FUNCTIONS (Sequence of System Calls for Connection Oriented communication)
1. Socket Function: To perform network I/O, the first thing a process must do is call the socket function, specifying the
type of communication protocol desired.
2. Bind Function: assigns a local protocol address to a socket. The bind system call requires the address family, the
port number and the IP address. The address family is known to be AF_INET, the IP address of the client is already
known to the operating system, binding can be done on a random port. This way whenever the program tries to
connect to a remote machine through this socket, the operating system binds this socket to a random local port.
3. Listen Function: The listen function is called only by a TCP server and it performs two actions. (Converts an
unconnected socket into a passive socket AND specifies the maximum number of connections that the kernel should
queue for this socket.)
4. Connect Function: The connect function is used by a TCP client to establish a connection with a TCP server.
Q. HOW WOULD YOU PERFORM 1/0 OPERATION IN THE NETWORK USING SOCKET FUNCTION?
To perform network I/O, the first thing a process must do is call the socket function, specifying the type of
communication protocol desired
# include <sys/socket h>
int socket(i ntfamily, int int protocol);
Returns:nonnegative descriptor if OK,-1 on
On success the socket function returns a small nonnegative integer value, similar to a file descriptor.
POSIX
Posix is an acronym for "Portable Operating System Interface." Posix is not a single standard, but a family of standards
being developed by the Institute for Electrical and Electronics Engineers, Inc., normally called the MIFF. It provides the
definition for the application programming interfaces, the associated utility interfaces and command line shells for
compatibility of different applications and software with different operating systems and variants of UNIX
OPEN GROUP
The Open Group is the certifying body for the UNIX trademark, and publishes the Single UNIX Specification technical
standard, which extends the POSIX standards. It is an industry consortium that seeks to "enable the achievement of
business objectives" by developing "open, vendor-neutral technology standards and certifications".
ROLES OF IETF
The Internet Engineering Task Force develops and promotes voluntary Internet standards, in particular the standards
that comprise the Internet protocol suite (TCP/IP). It is a large open international community of network designers,
operators, vendors, and researchers concerned with the evolution of the Internet architecture and the smooth
operation of the Internet.
64BIT ARCHITECTURES
During the mid to late 1990s the trend was towards 64-bit architectures and 64-bit software. One reason is for larger
addressing within a process (i.e., 64-pointers) that can address large amounts of memory (more than 232 bytes). The
model that is becoming most prevalent for 64-bit Unix systems is called LP64 model, meaning only long integers (L) and
pointers (P) require 64 bits
1. X64
It is the most used and is an extension of the x86 instruction set designed by AMD and licensed to Intel. It is the
most common as most new CPUs in the home and business use this architecture.
2. IA64 (Intel Itanium)
It was developed by Intel and HP for use in enterprise servers and high-performance systems.
SOCKET ADDRESS STRUCTURE
Most of the socket functions require a pointer to a socket address structure as an argument. Each supported protocol
suite defines its own socket address structure. The names of these structure begins with sockad d r_ with a unique suffix
for each protocol suite.
1. Ipv4 socket address structure: An IPv4 socket address structure, commonly called an "Internet socket address
structure," is named sockadd r_i n and defined by including the <net i net/ in. h> header.
2. Generic Socket Address Structure: Socket address structures are always passed by reference when passed as a
argument to any of the socket functions. But the socket functions that take one of these pointers as an argument
must deal with socket address structures from any of the supported protocol families.
3. IPv6 Socket Address Structure: The 1Pv6 socket address is defined by including the <netinet/in.h> header
BYTE ORDERING FUNCTION
Consider a 16-bit integer that is made up of 2 bytes. There are two ways to store the 2 bytes in memory: with the low-
order byte at the starting address, known as little-endian byte order, or with the high-order byte at the starting address,
known as big-endian byte order.
TCP ECHO SERVER: main FUNCTION
It follows the following flow:
1. Create socket, bind server's well-known port: A TCP socket is created. An Internet socket address structure is filled
in with the wildcard address (I NADDR_ANY) and the server's well-known port (SERV_PORT)
2. Wait for client connection to complete: The server blocks in the call to accept, waiting for a client connection to
complete.
3. Concurrent server: For each client, fork spawns a child, and the child handles the new client.
TCP ECHO SERVER: str_echo FUNCTION
It performs the server processing for each client: reading the lines from the client and echoing them back to the client.
1. Read a line and echo the line
readline reads the next line from the socket and the line is echoed back to the client by writen. If the client
closes the connection (the normal scenario), the receipt of the client's FIN causes the child's read I ine to return ).
This causes the str_echo, function to return
TCP ECHO CLIENT: main FUNCTION
A TCP socket is created and an Internet socket address structure is filled in with the server's IP address and port
number. The server's IP address is taken from the command-line argument and the server's well-known port (
SERV_PORT ) is from the unp.h header.
TCP ECHO CLIENT: str_cli FUNCTION
It handles the client processing loop: read a line of text from standard input, write it to the sever, read back the server's
echo of the line, and output the echoed line to standard output.
1. Read a line, write to server
fgets reads a line of text wri ten sends the line to the server.
2. Read echoed line from server, write to standard output
readline reads the line echoed back from the server and fputs writes it to the standard output.
3. Return to main
The loop terminates when fgets returns a null pointer, which occurs when it encounters either an end-of-file or an
error. Our Fget s wrapper function checks for an error and aborts if one occurs, so Fgets returns a null pointer only
when an end-of-file is encountered.
NORMAL STARTUP
We first start the server in the background on the host linux.
When the server starts, it calls socket, bind, listen, and accept, blocking in the call to accept. (We have not started the
client yet.) Before starting the client, we run the netstat program to verify the state of the server's listening socket.
We then start the client on the same host, specifying the server's IP address of 127.0.0.1 (the loopback address). We
could have also specified the server's normal (nonloopback) IP address.
The client calls socket and connect, the latter causing TCP's three-way handshake to take place. When the three-way
handshake completes, connect returns in the client and accept returns in the server. The connection is established.
NORMAL TERMINATION
At this point the connection is established and whatever we type to the client is echoed back.
We type in two lines, each one is echoed, and then we type our terminal EOF character (Control-D) which terminates
the client.
POST SIGNAL HANDLING
A signal is not notification to a process that an event has occured. Signals are somethings called software interrupts.
Signals usually occur asynchronously. By this we mean that the process doesn't know ahead of time exactly when a
signal will occur. Signals can be sent by one process to another process (or to it self), AND by the kernel to a process.
DIFFERENCES BETWEEN wait AND waitpid
1. The wait function can block the caller until a child process terminates, whereas waitpid has an option that prevents
it from blocking.
2. The wait() system call suspends execution of the current process until one of its children terminates, whereas
waitpid() waits only for terminated children, but this behaviour is modifiable via the options argument
3. If more than one child is running then wait() returns the first time one of the parent's offspring exits; whereas the
waitpid() is more flexible:
SIGPIPE SIGNAL
If a client needs to perform two writes to the server before reading anything back, with the first write eliciting the RST.
The rule that applies is: when a process writes to a socket that has received an RST, the SIGPIPE signal is sent to the
process. The default action of this signal is to terminate the process so the process must catch the signal to avoid being
involuntarily terminated.
If the process either catches the signal and returns from the signal handler, or ignores the signal, the write operations
return EPIPE.
PROTOCOLS FOR CONNECTION Abort
The RST is processed, causing tcp_close to be called. This function calls in_pcbdetach, which in turn calls sofree.
sofree finds that the socket being aborted is still on the listening socket’s completed connection queue and removes the
socket from the queue and frees the socket. When the server gets around to calling accept, it will never know that a
connection that was completed has since been removed from the queue.
SHUTDOWN OF SERVER HOST
When a UNIX system is shut down, the i nit process normally sends the SI GTERM signal to all processes (we can catch
this signal), waits some fixed amount of time (often between 5 and 20 seconds), and then sends the SIGKILL signal
(which we cannot catch) to any processes still running. This gives all running process a short amount of time to clean up
and terminate.
CRASHING AND REBOOT OF SERVER HOST
If the client is not actively sending data to the server when the server host crashes, the client is not aware that the
server host has crashed. (This assumes we are not using the SO_KEEPALIVE socket option). The following steps take
place:
1. We start the server and then the client. We type a line to verify that the connection is established.
2. The server host carahes and reboots.
3. We type a line of input to the client, which is sent as a TCP data segment to the server host.
4. When the server host reboots after crashing, its TCP loses all information about connections that existed before
the crash. Therefore the server TCP responds to the reveived data segment from the client with an RST.
5. Our client is blocked in the call to readline when the RST is reveived, causing readline to return the error
ECONNRESET.
I/O MODELS
An I/O model is the method you use to control the program flow of the code that deals with the network input and
output.
1. Blocking I/O Model: The most prevalent model. By default, all sockets are blocking. All socket functions operate
synchronously, ie. They will not return before the operation is finished. This kind of behavior is often undesirable in
the Windows environment, because often user input and output should still be processed even while network
operations might occur. To solve this problem, non-blocking sockets were introduced.
2. Non-Blocking I/O Model: When we set a socket non-blocking, we are telling the kernel "when an I/0 operation that I
request cannot be completed without putting the process to sleep, do not put the process to sleep but return an
error instead." The first three times that we call recvfrom, there is no data to return, so the kernel immediately
returns an error of EWOULD B LOCK instead. The fourth time we call recvfrom a datagiam is ready, it is copied into
our application buffer, and recvfrom returns OK. We then process the data. A socket can be set into non-blocking
mode using ioctlsocket.
3. I/O Multiplexing (select and poll): With I/O multiplexing, we call select or poll and block in one of these two system
calls, instead of blocking in the actual I/O system call.
4. Signal-Driven I/O Model: We can also use signals, telling the kernel to notify us with the SIGIO signal when the
descriptor is ready. We call this signal-driven I/O
5. Asynchronous I/O Model: Asynchronous I/O is defined by the POSIX specification, and various differences in the
real-time functions that appeared in the various standards which came together to form the current POSIX
specification have been reconciled. In general, these functions work by telling the kernel to start the operation and
to notify us when the entire operation (including the copy of the data from the kernel to our buffer) is complete. The
main difference between this model and the signal-driven I/O model in the previous section is that with signal-
driven I/O, the kernel tells us when an I/O operation can be initiated, but with asynchronous I/O, the kernel tells us
when an I/O operation is complete.
Synchronous I/O versus Asynchronous I/O
POSIX defines these two terms as follows:
A synchronous I/O operation causes the requesting process to be blocked until that I/O operation completes.
An asynchronous I/O operation does not cause the requesting process to be blocked.
Using these definitions, the first four I/O models—blocking, nonblocking, I/O multiplexing, and signal-driven I/O—
are all synchronous because the actual I/O operation (recvfrom) blocks the process. Only the asynchronous I/O
model matches the asynchronous I/O definition.
HOW THE str_cli FUNCTION WORKS
The str_cli function handles the client processing loop: It reads a line of text from standard input, writes it to the
server, reads back the server's echo of the line, and outputs the echoed line to standard output.
BATCH INPUT
It operates in a stop-and-wait mode, which is fine for interactive use. it sends a line to the server and then waits for the
reply. This amount of time is one RTT (round-trip time) plus the server's processing time (which is close to 0 for a
simple echo server). We can therefore estimate how long it will take for a given number of lines to be echoed, if we
know the RTT between the client and server.
GENERIC SOCKET OPTION
1. SO_BROADCAST Socket Option:
This option enables or disables the ability of the process to Send broadcast messages. Broadcast is supported for
only datagram sockets and only on networks that support the concept of a broadcast message (e.g. Ethernet, token
ring, etc.). You cannot broadcast on a point-to-point link.
2. SO_DEBUG Socket Option: This option is supported only by TCP. When enabled for a TCP socket, the kernel keeps
track of detailed information about all the packets sent or received by TCP for the socket. These are kept in a
circular buffer within the kernel that can be examined with the trpt programme.
3. SO_DONTROUTE Socket Option:
This option specifies that outgoing packets are to bypass the normal routing mechanisms of the underlying protocol.
For example, with IPv4, the packet is directed to the appropriate local interface, as specified by the network and
subnet portions of the destination address. If the local interface cannot be determined from the destination address
(e.g, the destination is not on the other end of a point-to-point link, or not on a shared network), ENETUNREACH is
returned.
4. SO_ERROR Socket Option:
When an error occurs on a socket, the protocol module in a Berkeley-derived kernel sets a variable named so_error
for that socket to one of the standard Unix Exxx values. This is called the pending error for the socket. The process
can be immediately notified of the error in one of two ways.
• If the process is blocked in a call to select on the socket, for either readability or writability, select return
with either or both conditions set.
• If the process is using signal-driven I/O, the SIGIO signal is generated for either the process or the process
group.
5. SO_KEEPALIVE Socket Option
When the keepalive option is set for a TCP socket and no data has been exchanged across the socket in either
direction for 2 hours, TCP automatically sends a keepalive probe to the peer. This probe is a TCP segment to which
the peer must respond. One of three scenarios results:
• The peer responds with the expected ACK. The application is not notified (since everything if OK). rcp will
send another probe following another 2 hours of inactivity.
• The peer responds with an RST, which tells the local TCP that the peer host has crashed and rebooted. The
socket's pending error is set to EC ON NRESET and the socket is closed.
• There is no response from the peer to the keepalive probe. Berkeley-derived TCPs sends eight additional
probes, 75 seconds apart, trying to elicit a response. TCP will give up if there is no response within 11
minute and 15 seconds after sending the first probe. If there is no response to one the socket is closed. But if
the socket's pending error is set to ETIMEDOUT and the socket is closed. But if the socket receives an ICMP
error in response to one of the keepaliv proebs, the corresponding error is returned instead (and the socket
is still closed). A common ICMP error in this scenario is "host unreachable", indicating that the peer host not
crashed but is just unrechable, in which case the pending error is set to EHOSTUNREACH .
6. SOLINGER Socket Option
This option specifies how the close function operates for a connection-oriented protocol (e.g., for TCP but not for
UDP). By default, close returns immediately, but if there is any data still remaining in the socket send buffer, the
system will try to deliver the data to the peer.
setsockopt AND getsockopt FUNCTIONS
The getsockopt() and setsockopt() system calls manipulate the options associated with a socket. Options may exist at
multiple protocol levels; they are always present at the uppermost "socket" level.
The optval and optlen arguments are used to access option values for setsockopt(). For getsockopt() they identify a
buffer in which the value for the requested option(s) are to be returned. For getsockopt(), optlen is a value-result
argument, initially containing the size of the buffer pointed to by optval, and modified on return to indicate the actual
size of the value returned. If no option value is to be supplied or returned, optval may be NULL.
SOCKET STATES
For some socket options there are timing considerations about when to set or fetch the options versus the state of the
socket. The following socket options are inherited by a connected TCP socket from the listening socket SO_DEBUG, SO
DONTROUTE, SO_KEEPALIVE, SOW NGER, SO 00BINLI NE, SO_RCVBUF, and SO_SNDBUF.
This is important with TCP because the connected socket is not returned to a server by accept until the three-way
handshake is completed by the TCP layer. If we want to ensure that one of these socket options is set for the connected
socket when the three-way handshake completes, we must set that option for the listening socket.
DOMAIN NAME SYSTEM
The Domain Name System, or DNS, is used primarily to map between hostnames and IP address. A hostname can be
either a simple name, such as soIaris or a fully qualified domain name (FQDN) such as solaris.kohala.com.
RESOURCE RECORDS
Entries in the DNS are known as resource records (RRs). We have the following types:
A
An A record maps a hostname into a 32-bit IPv4 address
AAAA
A AAAA record, called a "quad A" recod, maps a hostname into a 128-bit IPv6 address. The term "quad A" was chosen
because a 128-bit address is four times largfer than a 32- bit address.
PTR
PTR records (called "pointer records") map IP address into hostnames.
MX
An MX record specifies a host to act as a "mail exchange" for the specified host.
CNAME
CNAME stands for "canonical name" A common use is to assign CNAME record for common service, such as ftp and
www. If people use this service name, instead of the actual hostname, it is transparent if the service is moved to another
host.
RESOLVERS AND NAME SERVERS
Organizations run one or more name servers, often the programme known as BIND (Berkeley Internet Name Domain).
Application such as the client and server that we are writing in this text contact a DNS server by calling functions in a
library known as the resolver. The common resolver functions are gethostbr a me and gethostbyaddr, both of which are
described in this reverse mapping.
DNS ALTERNATIVES
It is possible to obtain the name and address information without using the DNS and common alternatives are static
host files or NIS (Network Information System).
gethostbyname FUNCTION
Given the name of a host, gethostbyname returns a pointer to the hostent structure containing the host's IP address
and other information. It is the most basic function that looks up a hostname. In terms of the DNS, gethostbyname
performs a query for an A record for a AAAA record. This function can return either Wv4 addresses or II'v6 addresses
#include <netdb.h>
struct hostent *gethostbyname (const char shasiname):
Returns: nonnull pointer if OK, NULL on error with h_err no set
Uname FUNCTION
The uname function returns the name of the current host. This function is not part of the resolver library, but it is often
used along with gethostbyname to determine the local host's IP addresses.