Design of A Wired Network Using Different Topologies
Design of A Wired Network Using Different Topologies
Design of A Wired Network Using Different Topologies
1.3 Theory:
A network setup where each of the computers and network devices are connected to a single cable or
backbone. Below is a visual example of a simple computer setup on a network using the bus topology.
A network setup where each of the computers and network devices are interconnected with one another,
allowing for most transmissions to be distributed, even if one of the connections go down. This type of
topology is not commonly used for most computer networks as it is difficult and expensive to have
redundant connection to every computer. However, this type of topology is commonly used for wireless
networks. Below is a visual example of a simple computer setup on a network using a mesh topology.
A star topology is one of the most common network setups where each of the devices and computers on a
network connect to a central hub. A major disadvantage of this type of network topology is that if the
central hub fails, all computers connected to that hub would be disconnected. Below is a visual example of
a simple computer setup on a network using the star topology .
Also known as a ring network, the ring topology is a computer network configuration where each network
computer and device are connected to each other forming a large circle (or similar shape). Each packet is
sent around the ring until it reaches its final destination. Today, the ring topology is seldom used. Below is a
visual example of a simple computer setup on a network using a ring topology.
Also known as a star bus topology, tree topology is one of the most common types of network setups that is
similar to a bus topology and a star topology. A tree topology connects multiple star networks to other star
networks. Below is a visual example of a simple computer setup on a network using the star topology.
In the above picture if the main cable or trunk between each of the two star topology networks failed, those
networks would be unable to communicate with each other. However, computers on the same star topology
would still be able to communicate with each other.
1.4 Algorithm
1.6 Result
Thus networks of different topology were created using the network simulator software NS2.
2. File Transfer(FTP) over Transmission Control Protocol(TCP)
connection
2.1 Aim: To establish connections among nodes in a network and to transfer file over TCP Connection
2.3 Theory:
The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP
is one of the two original components of the suite (the other being Internet Protocol, or IP), so the entire
suite is commonly referred to as TCP/IP. Whereas IP handles lower-level transmissions from computer to
computer as a message makes its way across the Internet, TCP operates at a higher level, concerned only
with the two end systems, for example a Web browser and a Web server. In particular, TCP provides
reliable, ordered delivery of a stream of bytes from a program on one computer to another program on
another computer. Besides the Web, other common applications of TCP include e-mail and file transfer.
Among its other management tasks, TCP controls segment size, flow control, the rate at which data is
exchanged, and network traffic congestion.
2.3.1 Network Function
TCP provides a communication service at an intermediate level between an application program and the
Internet Protocol (IP). That is, when an application program desires to send a large chunk of data across the
Internet using IP, instead of breaking the data into IP-sized pieces and issuing a series of IP requests, the
software can issue a single request to TCP and let TCP handle the IP details.
IP works by exchanging pieces of information called packets. A packet is a sequence of bytes and consists
of a header followed by a body. The header describes the packet's destination and, optionally, the routers to
use for forwarding until it arrives at its final destination. The body contains the data which IP is
transmitting.
Due to network congestion, traffic load balancing, or other unpredictable network behavior, IP packets can
be lost or delivered out of order. TCP detects these problems, requests retransmission of lost packets,
rearranges out-of-order packets, and even helps minimize network congestion to reduce the occurrence of
the other problems. Once the TCP receiver has finally reassembled a perfect copy of the data originally
transmitted, it passes that datagram to the application program. Thus, TCP abstracts the application's
communication from the underlying networking details.
TCP is used extensively by many of the Internet's most popular applications, including the World Wide
Web, E-mail, File Transfer Protocol, Secure Shell, and some streaming media applications.
TCP is optimized for accurate delivery rather than timely delivery, and therefore, TCP sometimes incurs
relatively long delays (in the order of seconds) while waiting for out-of-order messages or retransmissions
of lost messages. It is not particularly suitable for real-time applications such as Voice over IP. For such
applications, protocols like the Real-time Transport Protocol (RTP) running over the User Datagram
Protocol (UDP) are usually recommended instead.[2]
TCP is a reliable stream delivery service that guarantees delivery of a data stream sent from one host to
another without duplication or losing data. Since packet transfer is not reliable, a technique known as
positive acknowledgment with retransmission is used to guarantee reliability of packet transfers. This
fundamental technique requires the receiver to respond with an acknowledgment message as it receives the
data. The sender keeps a record of each packet it sends, and waits for acknowledgment before sending the
next packet. The sender also keeps a timer from when the packet was sent, and retransmits a packet if the
timer expires. The timer is needed in case a packet gets lost or corrupted.[2]
TCP consists of a set of rules: for the protocol, that are used with the Internet Protocol, and for the IP, to
send data "in a form of message units" between computers over the Internet. At the same time that IP takes
care of handling the actual delivery of the data, TCP takes care of keeping track of the individual units of
data transmission, called segments, that a message is divided into for efficient routing through the network.
For example, when an HTML file is sent from a Web server, the TCP software layer of that server divides
the sequence of bytes of the file into segments and forwards them individually to the IP software layer
(Internet Layer). The Internet Layer encapsulates each TCP segment into an IP packet by adding a header
which includes (among other data) the destination IP address. Even though every packet has the same
destination address, they can be routed on different paths through the network. When the client program on
the destination computer receives them, the TCP layer (Transport Layer) reassembles the individual
segments and ensures they are correctly ordered and error free as it streams them to an application
2.3.2 Connection establishment
To establish a connection, TCP uses a three-way handshake. Before a client attempts to connect with a
server, the server must first bind to a port to open it up for connections: this is called a passive open. Once
the passive open is established, a client may initiate an active open. To establish a connection, the three-way
(or 3-step) handshake occurs:
1. The active open is performed by the client sending a SYN to the server. It sets the segment's
sequence number to a random value A.
2. In response, the server replies with a SYN-ACK. The acknowledgment number is set to one more
than the received sequence number (A + 1), and the sequence number that the server chooses for
the packet is another random number, B.
3. Finally, the client sends an ACK back to the server. The sequence number is set to the received
acknowledgement value, and the acknowledgement number is set to one more than the received
sequence number i.e. B + 1.
At this point, both the client and server have received an acknowledgment of the connection.
2.3.3 Data transfer
There are a few key features that set TCP apart from User Datagram Protocol:
• Ordered data transfer - the destination host rearranges according to sequence number[2]
• Retransmission of lost packets - any cumulative stream not acknowledged will be retransmitted[2]
• Discarding duplicate packets
• Error-free data transfer
• Flow control - limits the rate a sender transfers data to guarantee reliable delivery. When the
receiving host's buffer fills, the next acknowledgement contains a 0 in the window size, to stop
transfer and allow the data in the buffer to be processed.
• Congestion control - sliding window
2.3.4 Reliable transmission
TCP uses a sequence number to identify each byte of data. The sequence number identifies the order of the
bytes sent from each computer so that the data can be reconstructed in order, regardless of any
fragmentation, disordering, or packet loss that may occur during transmission. For every payload byte
transmitted the sequence number must be incremented. In the first two steps of the 3-way handshake, both
computers exchange an initial sequence number (ISN). This number can be arbitrary, and should in fact be
unpredictable, in order to avoid a TCP Sequence Prediction Attack.
TCP primarily uses a cumulative acknowledgment scheme, where the receiver sends an acknowledgment
signifying that the receiver has received all data preceding the acknowledged sequence number. Essentially,
the first byte in a segment's data field is assigned a sequence number, which is inserted in the sequence
number field, and the receiver sends an acknowledgment specifying the sequence number of the next byte
they expect to receive. For example, if computer A sends 4 bytes with a sequence number of 100
(conceptually, the four bytes would have a sequence number of 100, 101, 102, & 103 assigned) then the
receiver would send back an acknowledgment of 104 since that is the next byte it expects to receive in the
next packet.
In addition to cumulative acknowledgments, TCP receivers can also send selective acknowledgments to
provide further information (see selective acknowledgments).
If the sender infers that data has been lost in the network, it retransmits the data.
2.4 Algorithm
1. Create the nodes and assign their positions.
2. Establish duplex links between the nodes according to the topology.
3. Set up FTP over TCP connection
4. Display the network and show the data transmission in Network Animated (NAM) file
5. Plot the graph Bitrate Vs Time
3.1 Aim: To generate Constant Bit Rate (CBR) traffic and transfer it over UDP connection
3.3 Theory:
Constant Bit Rate is an encoding method that keeps the bit rate the same as opposed to VBR
which varies the bit rate. CBR processes audio faster than VBR due to its fixed bit rate value. The downside
to a fixed bit rate is that the files that are produced are not as optimized for quality vs. storage as VBR. For
example, if there is a quiet section in a music track that doesn’t require the full bit rate to produce good
quality sound then CBR will still use the same value - thus wasting storage space. The same is true for a
complex sounds; if the bit rate is too low then quality will suffer.
3.3.2 User Datagram Protocol
UDP is one of the core members of the Internet Protocol Suite, the set of network protocols used
for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams,
to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special
transmission channels or data paths. UDP is sometimes called the Universal Datagram Protocol. The
protocol was designed by David P. Reed in 1980 and formally defined in RFC 768
UDP uses a simple transmission model without implicit hand-shaking dialogues for guaranteeing reliability,
ordering, or data integrity. Thus, UDP provides an unreliable service and datagrams may arrive out of
order, appear duplicated, or go missing without notice. UDP assumes that error checking and correction is
either not necessary or performed in the application, avoiding the overhead of such processing at the
network interface level. Time-sensitive applications often use UDP because dropping packets is preferable
to waiting for delayed packets, which may not be an option in a real-time system. If error correction
facilities are needed at the network interface level, an application may use the Transmission Control
Protocol (TCP) or Stream Control Transmission Protocol (SCTP) which are designed for this purpose.
UDP's stateless nature is also useful for servers that answer small queries from huge numbers of clients.
Unlike TCP, UDP is compatible with packet broadcast (sending to all on local network) and multicasting
(send to all subscribers).
Common network applications that use UDP include: the Domain Name System (DNS), streaming media
applications such as IPTV, Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP) and many online
games.
UDP is a simpler message-based connectionless protocol. Connectionless protocols do not set up a
dedicated end-to-end connection. Communication is achieved by transmitting information in one direction
from source to destination without verifying the readiness or state of the receiver.
• Unreliable – When a message is sent, it cannot be known if it will reach its destination; it could get
lost along the way. There is no concept of acknowledgment, retransmission and timeout.
• Not ordered – If two messages are sent to the same recipient, the order in which they arrive cannot
be predicted.
• Lightweight – There is no ordering of messages, no tracking connections, etc. It is a small
transport layer designed on top of IP.
• Datagrams – Packets are sent individually and are checked for integrity only if they arrive. Packets
have definite boundaries which are honored upon receipt, meaning a read operation at the receiver
socket will yield an entire message as it was originally sent.
3.4 Algorithm:
3.6 Result:
Thus Constant Bit rate traffic is generated and is transferred over UDP connection
4. Ethernet LAN
4.1 Aim: To write a simulation program using NS2 for Ethernet LAN protocol and execute the same
4.3 Theory:
Ethernet is the most common LAN (Local Area Network) technology in use today. Ethernet was
developed by Xerox in the 1970s, and became popular after Digital Equipment Corporation and Intel joined
Xerox in developing the Ethernet standard in 1980.Ethernet was officially accepted as IEEE standard 802.3
in 1985.The original Xerox Ethernet operated at 3Mbps. Ethernet networks up to 10Gbps now exist.
4.3.1 Ethernet Cabling
The first Ethernet standard, 10Base-5, ran over thick coaxial cable. A later standard, Ethernet 10Base-2, ran
over a much thinner coaxial cable. These two versions of Ethernet were colloquially known as thicknet and
thinnet.
Modern Ethernet standards run on UTP (Unshielded Twisted Pair) or fiber-optic cabling.
Ethernet
Cable Specification
Standard
10Base-T Category 3 UTP
100Base-TX Category 5 UTP
1000Base-T Cat 5e UTP
1000Base-SX Optical Fiber
4.3.2 Ethernet Topologies
Ethernet 10Base-5 and 10Base-2 used a bus topology. Bus topologies were difficult to maintain and
troubleshoot. Modern Ethernet networks use a star topology with an Ethernet hub, switch, or router at the
center of the star. It is still possible to create a two-node Ethernet network in a bus topology using a null-
Ethernet cable between the two devices.
4.3.3 Ethernet DTE and DCE
All nodes on an Ethernet network are either DTE (Data Terminal Equipment) or DCE (Data
Communications Equipment).Ethernet DTE are devices such as computers and printers which are trying to
communicate on the Ethernet network. Ethernet DCE are devices such as switches and routers which are
trying to help other devices communicate on the Ethernet network.
4.3.4 Ethernet CSMA/CD
Like any network, Ethernet must have an algorithm for determining when each network node is allowed to
communicate. In Ethernet, this algorithm is known as CSMA/CD (Carrier Sense Multiple Access /
Collision Detection).CSMA/CD has proven to be a very capable, if highly anarchistic, algorithm.
4.4 Algorithm:
4.6 Result:
Thus a simulation program using NS2 for Ethernet LAN protocol was written and executed.
5. Wireless Network
5.1 Aim: To create a wireless network
5.3 Theory :
It is a network set up by using radio signal frequency to communicate among computers and other network
devices. Sometimes it’s also referred to as WiFi network or WLAN. This network is getting popular
nowadays due to easy to setup feature and no cabling involved. You can connect computers anywhere in
your home without the need for wires.
Here is simple explanation of how it works, let say you have 2 computers each equipped with wireless
adapter and you have set up wireless router. When the computer sends out the data, the binary data will be
encoded to radio frequency and transmitted via wireless router. The receiving computer will then decode
the signal back to binary data.
It doesn’t matter you are using broadband cable/DSL modem to access internet, both ways will work with
wireless network. If you heard about wireless hotspot, that means that location is equipped with wireless
devices for you and others to join the network. You can check out the nearest hotspots from your home
here.
The two main components are wireless router or access point and wireless clients.
If you have not set up any wired network, then just get a wireless router and attach it to cable/DSL modem.
You then set up wireless client by adding wireless card to each computer and form a simple wireless
network. You can also cable connect computer directly to router if there are switch ports available.
If you already have wired Ethernet network at home, you can attach a wireless access point to existing
network router and have wireless access at home.
Wireless router or access points should be installed in a way that maximizes coverage as well as throughput.
The coverage provided is generally referred to as the coverage cell. Large areas usually require more than
one access point in order to have adequate coverage. You can also add access point to your existing
wireless router to improve coverage.
5.3.2 Wireless Operating Mode
The IEEE 802.11 standards specify two operating modes: infrastructure mode and ad hoc mode.
Infrastructure mode is used to connect computers with wireless network adapters, also known as wireless
clients, to an existing wired network with the help from wireless router or access point. The 2 examples
which I specified above operate in this mode.
Ad hoc mode is used to connect wireless clients directly together, without the need for a wireless router or
access point. An ad hoc network consists of up to 9 wireless clients, which send their data directly to each
other.
5.4 Algorithm
5.6 Result
Thus the wireless network was created and data was transmitted over it.