Practical-1: Aim: Write A C Program To Implement CRC Algorithm
Practical-1: Aim: Write A C Program To Implement CRC Algorithm
Practical-1: Aim: Write A C Program To Implement CRC Algorithm
#include<stdio.h>
#include<conio.h>
#include<string.h>
#define MAX 10
void main()
{
char gen[MAX],temp[MAX],data[MAX];
char trans[2*MAX],recvd[2*MAX],checksum[2*MAX];
int r,m,i;
clrscr();
printf("Enter the generator Bits ");
scanf("%s",gen);
printf("\nEnter the Data Bits to be transmitted ");
scanf("%s",data);
// strcpy(gen,"10101");
// strcpy(data,"01101101");
printf("\nGenerator : %s",gen);
printf("\nData : %s",data);
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
r=strlen(gen);
m=strlen(data);
strcpy(checksum,data);
strcpy(trans,data);
for(i=m;i<m+r-1;i++)
checksum[i]='0';
checksum[i]='\0';
mod2div(checksum,gen);
printf("\nCheckSum : %s",checksum);
strcat(trans,checksum);
printf("\nTransmmited bits : %s",trans);
printf("\nEnter the Recieved Bits ");
scanf("%s",recvd);
// strcpy(recvd,"110011001100");
strcpy(checksum,recvd);
printf("\n\nReceived bits : %s",recvd);
mod2div(checksum,gen);
printf("\nRemainder : %s",checksum);
printf("\nHence %s is ",recvd);
if(!strcmp(checksum,"0000"))
{
printf("Accpetable");
recvd[strlen(recvd)-4]='\0';
printf("\nAnd Data Bits : %s",recvd);
}
else
printf("Not Accpetable");
getch();
}
Output
Enter the generator Bits 1110
Enter the Data Bits to be transmitted 0101
Generator : 1110
Data : 0101
CheckSum : 010
Transmmited bits : 0101010
Enter the Recieved Bits 0011
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Practical-2
#include<stdio.h>
#include<conio.h>
void main()
{
unsigned char LRC = 0x00;
unsigned char CMNDarray[]= {0x01,0x01,0x00,0x07,0xC0};
int index, count; count = 5; clrscr();
for (index = 0; index<count; index++)
{
LRC = CMNDarray[index]+LRC;
// printf(" LRC temp is %X ",LRC);
// printf(" index is %d ",index);
// printf(" count is %d ",count); }
LRC = 0xFF-LRC; // 1's complement
LRC = LRC+1;// 2's complements
printf("\nLRC Calculated is %X ",LRC);
}
getch();
}
OUTPUT
LRC Calculated is FF
LRC Calculated is 0
LRC Calculated is 0
LRC Calculated is F9
LRC Calculated is 47
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Practical-3
Bus Topology
Bus networks (not to be confused with the system bus of a computer) use a common
backbone to connect all devices. A single cable, the backbone functions as a shared
communication medium that devices attach or tap into with an interface connector. A
device wanting to communicate with another device on the network sends a broadcast
message onto the wire that all other devices see, but only the intended recipient actually
accepts and processes the message.
Ring Topology
In a ring network, every device has exactly two neighbors for communication purposes.
All messages travel through a ring in the same direction (either "clockwise" or
"counterclockwise"). A failure in any cable or device breaks the loop and can take down
the entire network.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Star Topology
Many home networks use the star topology. A star network features a central connection
point called a "hub" that may be a hub, switch or router. Devices typically connect to the
hub with Unshielded Twisted Pair (UTP) Ethernet.
Compared to the bus topology, a star network generally requires more cable, but a failure
in any star network cable will only take down one computer's network access and not the
entire LAN. (If the hub fails, however, the entire network also fails.)
Tree Topology
Tree topologies integrate multiple star topologies together onto a bus. In its simplest
form, only hub devices connect directly to the tree bus, and each hub functions as the
"root" of a tree of devices. This bus/star hybrid approach supports future expandability of
the network much better than a bus (limited in the number of devices due to the broadcast
traffic it generates) or a star (limited by the number of hub connection points) alone.
Mesh Topology
A mesh network in which every device connects to every other is called a full mesh. As
shown in the illustration below, partial mesh networks also exist in which some devices
connect only indirectly to others.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Practical No: - 4
ICMP stands for Internet Control Message Protocol. This particular protocol is very
important among all the network layer protocols. This is used by the operating systems of
network computers to send error messages indicating that a particular service was not
available or the connection to a router failed, etc.
It is an integral part of the IP multicast specification, operating above the network layer,
though it does not actually act as a transport protocol.[1] It is analogous to ICMP for
unicast connections. IGMP can be used for online streaming video and gaming, and
allows more efficient use of resources when supporting these types of applications. IGMP
is vulnerable to some attacks[2][3][4][5], and firewalls commonly allow the user to disable it
if not needed.
IGMP is only needed for IPv4 networks, as multicast is handled differently in IPv6
networks.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
addresses when the next-hop router must be determined. ARP was defined by RFC 826 in
1982.[1] It is Internet Standard STD 37.
ARP has been implemented in many types of networks, such as Internet Protocol (IP)
network, CHAOS, DECNET, Xerox PARC Universal Packet, Token Ring, FDDI, IEEE
802.11 and other LAN technologies, as well as the modern high capacity networks, such
as Asynchronous Transfer Mode (ATM). Due to the overwhelming prevalence of IPv4
and Ethernet in general networking, ARP is most frequently used to translate IP addresses
to Ethernet MAC addresses.
RARP is described in Internet Engineering Task Force (IETF) publication RFC 903.[1] It
has been rendered obsolete by the Bootstrap Protocol (BOOTP) and the modern Dynamic
Host Configuration Protocol (DHCP), which both support a much greater feature set than
RARP.
RARP requires one or more server hosts to maintain a database of mappings of Link
Layer addresses to their respective protocol addresses. Media Access Control (MAC)
addresses needed to be individually configured on the servers by an administrator. RARP
was limited to serving only IP addresses.
Reverse ARP differs from the Inverse Address Resolution Protocol (InARP) described in
RFC 2390, which is designed to obtain the IP address associated with another host's
MAC address. InARP is the complement of the Address Resolution Protocol used for the
reverse lookup.
Internet Protocol
The Internet Protocol (IP) is a protocol used for communicating data across a packet-
switched internetwork using the Internet Protocol Suite, also referred to as TCP/IP.
IP is the primary protocol in the Internet Layer of the Internet Protocol Suite and has the
task of delivering distinguished protocol datagrams (packets) from the source host to the
destination host solely based on their addresses. For this purpose the Internet Protocol
defines addressing methods and structures for datagram encapsulation. The first major
version of addressing structure, now referred to as Internet Protocol Version 4 (IPv4) is
still the dominant protocol of the Internet, although the successor, Internet Protocol
Version 6 (IPv6) is being deployed actively worldwide.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
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
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
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.
RTP is usually used in conjunction with the RTP Control Protocol (RTCP). While RTP
carries the media streams (e.g., audio and video) or out-of-band events signaling (DTMF
in separate payload type), RTCP is used to monitor transmission statistics and quality of
service (QoS) information. When both protocols are used in conjunction, RTP is usually
originated and received on even port numbers, whereas RTCP uses the next higher odd
port number.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
computer hostnames into IP addresses. For example, www.example.com translates to
192.0.32.10.
The Domain Name System makes it possible to assign domain names to groups of
Internet users in a meaningful way, independent of each user's physical location. Because
of this, World Wide Web (WWW) hyperlinks and Internet contact information can
remain consistent and constant even if the current Internet routing arrangements change
or the participant uses a mobile device. Internet domain names are easier to remember
than IP addresses such as 208.77.188.166 (IPv4) or 2001:db8:1f70::999:de8:7648:6e8 (IPv6).
People take advantage of this when they recite meaningful URLs and e-mail addresses
without having to know how the machine will actually locate them.
The Domain Name System distributes the responsibility of assigning domain names and
mapping those names to IP addresses by designating authoritative name servers for each
domain. Authoritative name servers are assigned to be responsible for their particular
domains, and in turn can assign other authoritative name servers for their sub-domains.
This mechanism has made the DNS distributed, fault tolerant, and helped avoid the need
for a single central register to be continually consulted and updated.
In general, the Domain Name System also stores other types of information, such as the
list of mail servers that accept email for a given Internet domain. By providing
worldwide, distributed keyword-based redirection service, the Domain Name System is
an essential component of the functionality of the Internet.
Other identifiers such as RFID tags, UPC codes, International characters in email
addresses and host names, and a variety of other identifiers could all potentially utilize
DNS.
The Domain Name System also defines the technical underpinnings of the functionality
of this database service. For this purpose it defines the DNS protocol, a detailed
specification of the data structures and communication exchanges used in DNS, as part of
the Internet Protocol Suite (TCP/IP).
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Simple Mail Transfer Protocol
Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail (e-
mail) transmission across Internet Protocol (IP) networks. SMTP was first defined in
RFC 821 (STD 15) (1982), and last updated by RFC 5321 (2008) which includes the
extended SMTP (ESMTP) additions, and is the protocol in widespread use today. SMTP
is specified for outgoing mail transport and uses TCP port 25.
While electronic mail servers and other mail transfer agents use SMTP to send and
receive mail messages, user-level client mail applications typically only use SMTP for
sending messages to a mail server for relaying. For receiving messages, client
applications usually use either the Post Office Protocol (POP) or the Internet Message
Access Protocol (IMAP) to access their mail box accounts on a mail server.
SNMP exposes management data in the form of variables on the managed systems, which
describe the system configuration. These variables can then be queried (and sometimes
set) by managing applications.
Telnet
Telnet (teletype network) is a network protocol used on the Internet or local area
networks to provide a bidirectional interactive communications facility. Typically, telnet
provides access to a command-line interface on a remote host via a virtual terminal
connection which consists of an 8-bit byte oriented data connection over the
Transmission Control Protocol (TCP). User data is interspersed in-band with TELNET
control information.
Telnet was developed in 1969 beginning with RFC 15, extended in RFC 854, and
standardized as Internet Engineering Task Force (IETF) Internet Standard STD 8, one of
the first Internet standards.
The term telnet may also refer to the software that implements the client part of the
protocol. Telnet client applications are available for virtually all computer platforms.
Most network equipment and operating systems with a TCP/IP stack support a Telnet
service for remote configuration (including systems based on Windows NT). Because of
security issues with Telnet, its use has waned in favor of SSH for remote access.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
Telnet is also used as a verb. To telnet means to establish a connection with the Telnet
protocol, either with command line client or with a programmatic interface. For example,
a common directive might be: "To change your password, telnet to the server, login and
run the passwd command." Most often, a user will be telnetting to a Unix-like server
system or a network device such as a router and obtain a login prompt to a command line
text interface or a character-based full-screen manager.
On many systems, a Telnet client application may also be used to establish interactive
raw-TCP sessions. It is commonly believed that a Telnet session which does not use the
IAC (character 255) is functionally identical.[citation needed] This is not the case, however,
because there are other network virtual terminal (NVT) rules, such as the requirement for
a bare carriage return character (CR, ASCII 13) to be followed by a NULL (ASCII 0)
character, that distinguish the telnet protocol from raw-TCP sessions.
Due to its simple design, TFTP could be implemented using a very small amount of
memory — an important consideration at that time. It was therefore useful for booting
computers such as routers which did not have any data storage devices. It is still used to
transfer small amounts of data between hosts on a network, such as IP phone firmware or
operating system images when a remote X Window System terminal or any other thin
client boots from a network host or server. The initial stages of some network based
installation systems (such as Solaris Jumpstart, Red Hat Kickstart, Symantec Ghost and
Windows NT's Remote Installation Services) use TFTP to load a basic kernel that
performs the actual installation.
Trivial File Transfer Protocol (TFTP) is a simple protocol to transfer files. It has been
implemented on top of the User Datagram Protocol (UDP) using port number 69. TFTP
is designed to be small and easy to implement, therefore, lacks most of the features of a
regular FTP. TFTP only reads and writes files (or mail) from/to a remote server. It cannot
list directories, and currently has no provisions for user authentication.
In TFTP, any transfer begins with a request to read or write a file, which also serves to
request a connection. If the server grants the request, the connection is opened and the
file is sent in fixed length blocks of 512 bytes. Each data packet contains one block of
data, and must be acknowledged by an acknowledgment packet before the next packet
can be sent. A data packet of less than 512 bytes signals termination of a transfer. If a
packet gets lost in the network, the intended recipient will timeout and may retransmit his
last packet (which may be data or an acknowledgment), thus causing the sender of the
lost packet to retransmit that lost packet. The sender has to keep just one packet on hand
for retransmission, since the lock step acknowledgment guarantees that all older packets
have been received. Notice that both machines involved in a transfer are considered
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
senders and receivers. One sends data and receives acknowledgments, the other sends
acknowledgments and receives data.
Three modes of transfer are currently supported by TFTP: netascii, that it is 8 bit ascii;
octet (This replaces the "binary" mode of previous versions of this document.) raw 8 bit
bytes; mail, netascii characters sent to a user rather than a file. Additional modes can be
defined by pairs of cooperating hosts.
Practical-5
Repeaters
A repeater is an electronic device that receives a signal, cleans it from the unnecessary
noise, regenerates it and retransmits it at a higher power level, or to the other side of an
obstruction, so that the signal can cover longer distances.
Hubs
A network hub contains multiple ports. When a packet arrives at one port, it is copied
unmodified to all ports of the hub for transmission. The destination address in the frame
is not changed to a broadcast address.
Bridges
A network bridge connects multiple network segments at the data link layer (layer 2) of
the OSI model. Bridges do send broadcasts to all ports except the one on which the
broadcast was received. However, bridges do not promiscuously copy traffic to all ports,
as hubs do, but learn which addresses are reachable through specific ports. Once the
bridge associates a port and an address, it will send traffic for that address to that port
only.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
Remote bridges: Can be used to create a wide area network (WAN) link between
LANs. Remote bridges, where the connecting link is slower than the end
networks, largely have been replaced with routers.
Wireless bridges: Can be used to join LANs or connect remote stations to LANs
Switches
A network switch is a device that forwards and filters OSI layer 2 datagrams (chunk of
data communication) between ports (connected cables) based on the MAC addresses in
the packets. A switch normally has numerous ports, facilitating a star topology for
devices, and cascading additional switches. Some switches are capable of routing based
on Layer 3 addressing or additional logical levels; these are called multi-layer switches.
The term switch is used loosely in marketing to encompass devices including routers and
bridges, as well as devices that may distribute traffic on load or by application content
(e.g., a Web URL identifier).
Routers
A router is a networking device that forwards packets between networks using
information in protocol headers and forwarding tables to determine the best next router
for each packet.
Control plane, in which the router learns the outgoing interface that is most
appropriate for forwarding specific packets to specific destinations,
Forwarding plane, which is responsible for the actual process of sending a packet
received on a logical interface to an outbound logical interface.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Practical:-6
COAXIAL CABLE
Advantages
sufficient frequency range to support multiple channel, which allows for much
greater throughput.
lower error rates. because the inner conductor is in a Faraday shield, noise
immunity is improved, and coax has a lower error rates and therefore slightly
better performance than twisted pair.
greater spacing between amplifiers coax's cable shielding reduces noise and
crosstalk, which means amplifiers can be spaced farther apart than with twisted
pair.
Coaxial cable
Disadvantages
more expensive to install compare to twisted pair cable.
the thicker the cable, the more difficult to work with.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
FIBER OPTIC CABLE
Advantages
system performance
greatly increased bandwidth and capacity
lower signal attenuation (loss)
immunity to electrical noise
immune to noise (electromagnetic interference and radio frequency interference)
less restrictive in harsh environments
overall system economy
Disadvantages
fiber optic component are expensive
fiber optic transmitters and receivers are still relatively expensive compared to
electrical interfaces
the lack of standardization in the industry has also limited the acceptance of fiber
optics.
Disadvantages
Short distance due to attenuation
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Disadvantages
More expensive than UTP and coaxial
More difficult installation.
Disadvantages
More expensive than UTP and coaxial
More difficult installation.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Practical : - 7
An ad-hoc network is a network where stations communicate only peer to peer (P2P).
There is no base and no one gives permission to talk. This is accomplished using the
Independent Basic Service Set (IBSS).
If a signal strength meter is used in this situation, it may not read the strength accurately
and can be misleading, because it registers the strength of the strongest signal, which may
be the closest computer.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Hidden node problem: Devices A and C are both communicating with B, but are unaware
of each other
IEEE 802.11 define the physical layer (PHY) and MAC (Media Access Control) layers
based on CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance). The
802.11 specification includes provisions designed to minimize collisions, because two
mobile units may both be in range of a common access point, but out of range of each
other.
The 802.11 has two basic modes of operation: Ad hoc mode enables peer-to-peer
transmission between mobile units. Infrastructure mode in which mobile units
communicate through an access point that serves as a bridge to a wired network
infrastructure is the more common wireless LAN application the one being covered.
Since wireless communication uses a more open medium for communication in
comparison to wired LANs, the 802.11 designers also included shared-key encryption
mechanisms: Wired Equivalent Privacy (WEP) and Wi-Fi Protected Access (WPA,
WPA2) to secure wireless computer networks.
The decentralized nature of wireless ad hoc networks makes them suitable for a variety of
applications where central nodes can't be relied on, and may improve the scalability of
wireless ad hoc networks compared to wireless managed networks, though theoretical
and practical. limits to the overall capacity of such networks have been identified.
Minimal configuration and quick deployment make ad hoc networks suitable for
emergency situations like natural disasters or military conflicts. The presence of a
dynamic and adaptive routing protocol will enable ad hoc networks to be formed quickly.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Wireless ad hoc networks can be further classified by their application:
Practical : - 8
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Figure 1
A complete explanation of Windows 2000 architecture is beyond the scope of this article;
in fact, entire books on this subject have already been written. (If you require an in-depth
explanation, see "Related Publications" at the end of this article for a suggested reading
list.) This article attempts to explain Windows 2000 architecture from a high-level block
diagram approach and will try to give an overview of Windows 2000 architecture
without over-simplifying it.
The operating system is built upon a layered approach, similar to the UNIX operating
system. One advantage of the layered operating structure is that each layer of code is
given access only to the layer below it (interfaces and data structures). This structure also
allows the operating system to be debugged, starting at the lowest layer and adding one
layer at a time until the whole system works correctly. Layering also makes it easier to
enhance the operating system; one entire layer can be replaced without affecting other
parts of the operating system.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
Windows 2000 is a portable operating system because of two design decisions. First, the
operating system was written in ANSI C, a language that enables programs to be ported
easily to other hardware architectures. Second, all parts of Windows 2000 that must be
written for a specific hardware are isolated in an area called the Hardware Abstraction
Layer (HAL). To move Windows 2000 to a new hardware platform, developers need to
do little more than recompile the C code for the new hardware and create a new HAL.
Designing an OS around a HAL means that a large portion of the code is exactly the
same between hardware platforms. This also means that only the small slice of code that
interfaces with the computer's hardware needs to be rewritten as Windows 2000 is ported
between different processor architectures. Thus, it provides a high level of portability.
The two modes that Windows 2000 operates in—kernel mode and user mode—are
discussed in the following sections.
Kernel Mode
In this mode, the software is able to access the hardware and system data, as well as
access all other system resources. The kernel mode has the following components:
Hardware Abstraction Layer (HAL). The HAL is the code associated with
Windows 2000 that changes with the hardware the operating system is being run
on. Thus, it becomes compatible with multiple processor platforms. The HAL
manipulates the hardware directly.
Device drivers. Device drivers send and receive load parameters and
configuration data from the Registry.
Windowing and graphics system. This system implements the graphical user
interface (GUI).
User Mode
Software in the user mode cannot access hardware directly. The user mode-protected
subsystem has four primary responsibilities:
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
Special system support processes, such as the logon process and the session
manager.
Windows 2000 services that are server processes, such as the Event Log and
Schedule services.
The NDIS is a Logical Link Control (LLC) that forms the upper sublayer of the OSI data
link layer (layer 2 of 7) and acts as an interface between layer 2 and 3 (the Network
Layer). The lower sublayer is the Media Access Control (MAC) device driver.
Inter-process communication
In computing, Inter-process communication (IPC) is a set of techniques for the
exchange of data among multiple threads in one or more processes. Processes may be
running on one or more computers connected by a network. IPC techniques are divided
into methods for message passing, synchronization, shared memory, and remote
procedure calls (RPC). The method of IPC used may vary based on the bandwidth and
latency of communication between the threads, and the type of data being communicated.
There are several reasons for providing an environment that allows process cooperation:
Information sharing
Computation speedup
Modularity
Convenience
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Transport Driver Interface
The Transport Driver Interface or TDI is the protocol understood by the upper edge of
the Transport layer of the Microsoft Windows kernel network stack.
When user-mode binaries are created by compiling and linking, an entity called a TDI
client is linked into the binary. TDI clients are provided with the compiler. The user-
mode binary uses the user-mode API of whatever network protocol is being used, which
in turn causes the TDI client to emit TDI commands into the Transport Provider.
FAT32
In order to overcome size limit of FAT16, while at the same time allowing DOS real
mode code to handle the format, and without reducing available conventional memory
unnecessarily, Microsoft implemented a next generation, known as FAT32. Cluster
values are represented by 32-bit numbers, of which 28 bits are used to hold the cluster
number, for a maximum of approximately 268 million (228) clusters. This allows for drive
sizes of up to 8 terabytes with 32KB clusters, but the boot sector uses a 32-bit field for
the sector count, limiting volume size to 2 TB on a hard disk with 512 byte sectors.
On Windows 95/98, due to the version of Microsoft's SCANDISK utility included with
these operating systems being a 16-bit application, the FAT structure is not allowed to
grow beyond around 4.2 million (< 222) clusters, placing the volume limit at 127.53 GiB.
[14]
A limitation in original versions of Windows 98/98SE's Fdisk utility causes it to
incorrectly report disk sizes over 64 GB.[15] A corrected version is available from
Microsoft, but it cannot partition drives larger than 512GB [16]. The Windows 2000/XP
installation program and filesystem creation tool imposes a limitation of 32 GB [17].
However, both systems can read and write to FAT32 file systems of any size. This
limitation is by design and according to Microsoft was imposed because many tasks on a
very large FAT32 file system become slow and inefficient.[14][18] This limitation can be
bypassed by using third-party formatting utilities.[19] Windows Me supports the FAT32
file system without any limits.[20] However, similarly to Windows 95/98/98SE there is no
native support for 48-bit LBA in Windows ME, meaning that the maximum disk size for
ATA disks is 127.6 GiB, the maximum size of an ATA disk using the previous long-
standard 28-bit LBA.
FAT32 was introduced with Windows 95 OSR2, although reformatting was needed to
use it, and DriveSpace 3 (the version that came with Windows 95 OSR2 and Windows
98) never supported it. Windows 98 introduced a utility to convert existing hard disks
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
from FAT16 to FAT32 without loss of data. In the NT line, native support for FAT32
arrived in Windows 2000. A free FAT32 driver for Windows NT 4.0 was available from
Winternals, a company later acquired by Microsoft. Since the acquisition the driver is no
longer officially available.
NTFS
NTFS (New Technology File System)[1] is the standard file system of Windows NT,
including its later versions Windows 2000, Windows XP, Windows Server 2003,
Windows Server 2008, Windows Vista, and Windows 7.[5]
NTFS supersedes the FAT file system as the preferred file system for Microsoft’s
Windows operating systems. NTFS has several improvements over FAT and HPFS (High
Performance File System) such as improved support for metadata and the use of
advanced data structures to improve performance, reliability, and disk space utilization,
plus additional extensions such as security access control lists (ACL) and file system
journaling
Practical : - 9
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
One of the most fundamental concepts of implementing TCP/IP is that of IP
addressing.
IP addresses uniquely identify each machine on a network, and the network itself.
In comparison, think of your mailing address. The zip code identifies which postal
station mail destined for you should be delivered to. The street address tells the
Mail Carrier which street your mailbox is on, and the final piece of information
tells the Carrier which box to place your mail in. This is referred to as
a hierarchical addressing scheme, as opposed to a "flat" addressing scheme (such
as Social Security numbering). Each piece of information in the address narrows
the scope more until the final destination is reached. IP addressing is based on the
same hierarchical approach and, as with Postal addressing, each computer (or
intelligent device) on a TCP/IP network must have a unique address.
On the average LAN, this is not nearly as great a problem as it is on the Internet,
where there are literally millions of users connected at any one time.
Someone must be responsible for insuring that no two computers are assigned the
same IP address. That "someone" is The Network Information Center (InterNIC).
InterNIC is the body through which Internet IP addresses are assigned.
When a user wants to obtain an Internet address (for hosting a website, or general
Internet connectivity), they much purchase a domain (an IP address) from
InterNIC (more commonly today, this task is handled indirectly through an ISP).
Since each machine connected to the Internet requires a unique IP address, and
the length of current IP addresses is fixed at 32 bits, there is a finite number of IP
addresses available.
As TCP/IP was evolving, perhaps the developers and contributors did not foresee
a future in which nearly every household in the world would have an Internet
connection (that day will come). Perhaps to them, the 32-bit scheme seemed to
offer more than enough unique addresses.
Subnet Masking
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
An IP address has two components, the network address and the host address.
Subnetting enables the network administrator to further divide the host part of the
address into two or more subnets. In this case, a part of the host address is
reserved to identify the particular subnet.
This is easier to see if we show the IP address in binary format. The full address
is:
10010110.11010111.00010001.00001001
The network part is:
10010110.11010111
and the host address is
00010001.00001001
If this network is divided into 14 subnets, however, then the first 4 bits of the host
address (0001) are reserved for identifying the subnet.
The subnet mask is the network address plus the bits reserved for identifying the
sub-network. (By convention, the bits for the network address are all set to 1,
though it would also work if the bits were set exactly as in the network address.)
In this case, therefore, the subnet mask would be
11111111.11111111.11110000.00000000.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
The default subnet mask hides (masks) the network portion of the address and
identifies what bits may be used to assign addresses to hosts.
By applying the mask to the IP address, we can filter out the bits that are available
for host assignment from the bits designating the network.
By applying the subnet mask to the IP address, we can determine what portion of
the address designates the network, and what portion is available for assigning
host addresses. 0's "mask" the bit position and 1's allow the bits to "show
through." What "shows through" is the NETWORK portion of the address. For
example, we'll apply the default subnet mask for our 12.2.0.253 address (Class A)
as so:
00001100.00000010.00000000.11111101 Address
11111111.00000000.00000000.00000000 +Subnet Mask
00001100. Network Address "Shows Through"
From this we can deduce that the network portion of this address is 12 (all the bits
that were not masked) and the host address is 2.0.253. Therefore, the address of
this machine is 2.0.253 on the 12 network.
Now ask yourself this, "what if I need to connect more than one network to the
Internet?" "How can I do that with a single IP Address?" The answer lies in the art
of custom subnet masking. Subnet masking is the manipulation of the default
subnet mask to provide for additional network segments (subnets) or nodes
(hosts). In effect, we "borrow" bits from the host portion(s) of the address to use
in assigning network addresses.
Practical : - 10
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Dynamic Host Configuration Protocol
The Dynamic Host Configuration Protocol (DHCP) is a computer networking protocol
used by hosts (DHCP clients) to retrieve IP address assignments and other configuration
information.
DHCP uses a client-server architecture. The client sends a broadcast request for
configuration information. The DHCP server receives the request and responds with
configuration information from its configuration database.
Depending on implementation, the DHCP server may have three methods of allocating
IP-addresses:
Technical details
DHCP uses the same two ports assigned by IANA for BOOTP: 67/udp for sending data
to the server, and 68/udp for data to the client.
DHCP operations fall into four basic phases: IP discovery, IP lease offer, IP request, and
IP lease acknowledgement.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
Where a DHCP client and server are on the same subnet, they will communicate via UDP
broadcasts. When the client and server are on different subnets, IP discovery and IP
request messages are sent via UDP broadcasts, but IP lease offer and IP lease
acknowledgement messages are sent via unicast.
DHCP discovery
The client broadcasts messages on the physical subnet to discover available DHCP
servers. Network administrators can configure a local router to forward DHCP packets to
a DHCP server from a different subnet. This client-implementation creates a User
Datagram Protocol (UDP) packet with the broadcast destination of 255.255.255.255 or
the specific subnet broadcast address.
A DHCP client can also request its last-known IP address (in the example below,
192.168.1.100). If the client remains connected to a network for which this IP is valid, the
server might grant the request. Otherwise, it depends whether the server is set up as
authoritative or not. An authoritative server will deny the request, making the client ask
for a new IP immediately. A non-authoritative server simply ignores the request, leading
to an implementation-dependent timeout for the client to give up on the request and ask
for a new IP address.
DHCP offer
When a DHCP server receives an IP lease request from a client, it reserves an IP address
for the client and extends an IP lease offer by sending a DHCPOFFER message to the
client. This message contains the client's MAC address, the IP address that the server is
offering, the subnet mask, the lease duration, and the IP address of the DHCP server
making the offer.
The server determines the configuration based on the client's hardware address as
specified in the CHADDR (Client Hardware Address) field. Here the server, 192.168.1.1,
specifies the IP address in the YIADDR (Your IP Address) field.
DHCP request
A client can receive DHCP offers from multiple servers, but it will accept only one
DHCP offer and broadcast a DHCP request message. Based on the Transaction ID field
in the request, servers are informed whose offer the client has accepted. When other
DHCP servers receive this message, they withdraw any offers that they might have made
to the client and return the offered address to the pool of available addresses.
DHCP acknowledgement
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
When the DHCP server receives the DHCPREQUEST message from the client, the
configuration processes enters its final phase. The acknowledgement phase involves
sending a DHCPACK packet to the client. This packet includes the lease duration and
any other configuration information that the client might have requested. At this point,
the IP configuration process is completed.
The protocol expects the DHCP client to configure its network interface with the
negotiated parameters.
DHCP information
A DHCP client may request more information than the server sent with the original
DHCPOFFER. The client may also request repeat data for a particular application. For
example, browsers use DHCP Inform to obtain web proxy settings via WPAD. Such
queries do not cause the DHCP server to refresh the IP expiry time in its database.
Practical : - 11
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
various information with domain names assigned to each of the participants. Most
importantly, it translates domain names meaningful to humans into the numerical (binary)
identifiers associated with networking equipment for the purpose of locating and
addressing these devices worldwide. An often used analogy to explain the Domain Name
System is that it serves as the "phone book" for the Internet by translating human-friendly
computer hostnames into IP addresses. For example, www.example.com translates to
192.0.32.10.
The Domain Name System makes it possible to assign domain names to groups of
Internet users in a meaningful way, independent of each user's physical location. Because
of this, World Wide Web (WWW) hyperlinks and Internet contact information can
remain consistent and constant even if the current Internet routing arrangements change
or the participant uses a mobile device. Internet domain names are easier to remember
than IP addresses such as 208.77.188.166 (IPv4) or 2001:db8:1f70::999:de8:7648:6e8 (IPv6).
People take advantage of this when they recite meaningful URLs and e-mail addresses
without having to know how the machine will actually locate them.
The Domain Name System distributes the responsibility of assigning domain names and
mapping those names to IP addresses by designating authoritative name servers for each
domain. Authoritative name servers are assigned to be responsible for their particular
domains, and in turn can assign other authoritative name servers for their sub-domains.
This mechanism has made the DNS distributed, fault tolerant, and helped avoid the need
for a single central register to be continually consulted and updated.
In general, the Domain Name System also stores other types of information, such as the
list of mail servers that accept email for a given Internet domain. By providing a
worldwide, distributed keyword-based redirection service, the Domain Name System is
an essential component of the functionality of the Internet.
Other identifiers such as RFID tags, UPC codes, International characters in email
addresses and host names, and a variety of other identifiers could all potentially utilize
DNS.[1]
The Domain Name System also defines the technical underpinnings of the functionality
of this database service. For this purpose it defines the DNS protocol, a detailed
specification of the data structures and communication exchanges used in DNS, as part of
the Internet Protocol Suite (TCP/IP).
Structure
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
The hierarchical domain name system, organized into zones, each served by a name
server.
The domain name space consists of a tree of domain names. Each node or leaf in the tree
has zero or more resource records, which hold information associated with the domain
name. The tree sub-divides into zones beginning at the root zone. A DNS zone consists of
a collection of connected nodes authoritatively served by an authoritative name server.
(Note that a single name server can host several zones.)
Administrative responsibility over any zone may be divided, thereby creating additional
zones. Authority is said to be delegated for a portion of the old space, usually in form of
sub-domains, to another nameserver and administrative entity. The old zone ceases to be
authoritative for the new zone.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
TH
6 SEM. C.E.
The right-most label conveys the top-level domain; for example, the domain name
www.example.com belongs to the top-level domain com.
The hierarchy of domains descends from right to left; each label to the left
specifies a subdivision, or subdomain of the domain to the right. For example: the
label example specifies a subdomain of the com domain, and www is a subdomain of
example.com. This tree of subdivisions may consist of 127 levels.
Each label may contain up to 63 characters. The full domain name may not
exceed a total length of 253 characters.[9] In practice, some domain registries may
have shorter limits.
DNS names may technically consist of any character representable in an octet
(RFC 3696). However, the allowed formulation of domain names in the DNS root
zone, and most other subdomains, uses a preferred format and character set. The
characters allowed in a label are a subset of the ASCII character set, and includes
the characters a through z, A through Z, digits 0 through 9, and the hyphen. This
rule is known as the LDH rule (letters, digits, hyphen). Domain names are
interpreted in case-independent manner. Labels may not start or end with a
hyphen, nor may two hyphens occur in sequence.
A hostname is a domain name that has at least one IP addresses associated. For
example, the domain names www.example.com and example.com are also hostnames,
whereas the com domain is not.
When sent over an IP network, all records use the common format specified in RFC 1035
and shown below.
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Length
Field Description
(octets)
Practical : - 12
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Aim: - Write a program to implement bit-stuffing method.
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0,n,m[100],count=0,k;
clrscr();
printf(“enter limit of msg”);
scanf(“%d”,&n);
for(i=0;i<n;i++)
{ scanf(“%d”,&m[i]); }
for(i=0;i<n;i++)
{
if(m[i]==1)
count++;
else
count=0;
if(count==5)
{ for(k=n;k>=i;k--)
{
m[k]=m[k-i]; }
m[i+1]=0;
n++; } }
printf(“%d”,n):
printf(“after stuffing msg is::”);
for(i=0;i<n;i++)
{ printf(“%d”,m[i]); }
getch();
}
OUTPUT::
Practical : - 13
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
void main()
{
int i=0,n,m[100],count=0,k;
clrscr();
printf("Enter limit of message:");
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&m[i]);
}
for(i=0;i<n;i++)
{
if(m[i]==1)
{
count++;
}
else
{
count=0;
}
if(count==5)
{
for(k=i+1;k<n;k++)
{
m[k]=m[k+1];
}
n--;
}
}
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
for(i=0;i<n;i++)
{
printf("%d",m[i]);
}
getch();
}
OUTPUT::
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
Practical : - 14
if(a[3]==1)
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
{
count1++;
}
if(a[5]==1)
{
count1++;
}
if(a[7]==1)
{
count1++;
}
if(a[9]==1)
{
count1++;
}
if(a[11]==1)
{
count1++;
}
if(count1%2==0)
{
a[1]=0;
}
else
{
a[1]=1;
}
if(a[3]==1)
{
count2++;
}
if(a[6]==1)
{
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
count2++;
}
if(a[7]==1)
{
count2++;
}
if(a[10]==1)
{
count2++;
}
if(a[11]==1)
{
count2++;
}
if(count2%2==0)
{
a[2]=0;
}
else
{
a[2]=1;
}
if(r>2)
{
if(a[5]==1)
{
count4++;
if(a[6]==1)
{
count4++;
if(a[7]==1)
{
count4++;
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
if(count4%2==0)
{
a[4]=0;
}
else
{
a[4]=1;
}
printf(“\n value of r4 %d”,a[4]);
if(r>3)
{
if(a[9]==1)
{
count8++;
}
if(a[10]==1)
{
count8++;
}
if(a[11]==1)
{
count8++;
}
if(count8%2==0)
{
a[8]=0;
}
else
{
a[8]=1;
}
C.N.
PARUL INSTITUTE OF ENGG. & TECH.
PATEL PRANAV A. D-08CE67
6TH SEM. C.E.
for(i=n;i>=1;i--)
{
printf(“%d”,a[i]);
}
getch();
}
OUTPUT::
C.N.