+ All Categories
Home > Documents > CN Lab Manual 2008 Course E TC

CN Lab Manual 2008 Course E TC

Date post: 14-Apr-2018
Category:
Upload: adib-shaikh
View: 234 times
Download: 1 times
Share this document with a friend

of 52

Transcript
  • 7/30/2019 CN Lab Manual 2008 Course E TC

    1/52

    Table of contents:

    Sr.

    No.Contents

    1Study of Computer Network, Categories of Network, Network Topology and

    Basic Hardware Components

    2Study of Operating System and Implementation of LAN

    3 Study of IP Address Classes and DHCP

    4 Study of IP Address Subnetting and CIDR

    5 Installation and Configuration of Web Server and FTP

    6 Study of DNS, SMTP and POP3

    7 Configuration of Router and study of Routing between the LANs

    8 Write a program for Encryption and Decryption

    9 Write a program for Implementation of Shortest Path Algorithm

    10 Study of Wireless LAN

    11 Lab Practice on RouterSim Network Visualizer

    H.O.D E&TC

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    2/52

    EXPERIMENT NO: 01

    TITLE OF EXPERIMENT : Study of Computer Network, Categories ofNetwork, Network Topology and Basic

    Hardware Components

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    3/52

    Computer Network

    1.1 Aim: Study of Computer Network, Categories of Network, Network Topology and

    Basic Hardware Components.

    1.2 Theory:

    Computer Network:A computer network, often simply referred to as a network, is a collection of

    computers and devices interconnected by communications channels that facilitate

    communications and allows sharing of resources and information among interconnected

    devices. Put more simply, a computer network is a collection of two or more computers

    linked together for the purposes of sharing information, resources, among other things.

    Computer networking or Data Communications is the engineering discipline concerned

    with computer networks. Computer networking is sometimes considered a sub-discipline

    of electrical engineering, telecommunications, computer science, information technology

    and/or computer engineering since it relies heavily upon the theoretical and practical

    application of these scientific and engineering disciplines.

    Networks may be classified according to a wide variety of characteristics such asmedium used to transport the data, communications protocol used, scale, topology,

    organizational scope, etc.

    A communications protocol defines the formats and rules for exchanging

    information via a network. Well-known communications protocols are Ethernet, which is

    a family of protocols used in LANs, the Internet Protocol Suite, which is used not only in

    the eponymous Internet, but today nearly ubiquitously in any computer network.

    1.2.1 Communication media

    Computer networks can be classified according to the hardware and associated

    software technology that is used to interconnect the individual devices in the network,

    such as electrical cable, optical fiber, and radio waves (wireless LAN). In the OSI model,

    these are located at levels 1 and 2.

    A well-knownfamily of communication media is collectively known as Ethernet.

    It is defined by IEEE 802 and utilizes various standards and media that enable

    communication between devices. Wireless LAN technology is designed to connect

    devices without wiring. These devices use radio waves or infrared signals as a

    transmission medium.

    1.2.1.1 Wired technologies

    Twisted pair wire is the most widely used medium for telecommunication.

    Twisted-pair cabling consist of copper wires that are twisted into pairs. Ordinarytelephone wires consist of two insulated copper wires twisted into pairs. Computer

    networking cabling (wired Ethernet as defined by IEEE 802.3) consists of 4 pairs of

    copper cabling that can be utilized for both voice and data transmission. The use of two

    wires twisted together helps to reduce crosstalk and electromagnetic induction. The

    transmission speed ranges from 2 million bits per second to 10 billion bits per second.

    Twisted pair cabling comes in two forms which are Unshielded Twisted Pair (UTP) and

    Shielded twisted-pair (STP) which are rated in categories which are manufactured in

    different increments for various scenarios.

    Coaxial cable is widely used for cable television systems, office buildings, and

    other work-sites for local area networks. The cables consist of copper or aluminum wire

    wrapped with insulating layer typically of a flexible material with a high dielectricconstant, all of which are surrounded by a conductive layer. The layers of insulation help

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    4/52

    minimize interference and distortion. Transmission speed range from 200 million to more

    than 500 million bits per second.

    Optical fiber cable consists of one or more filaments of glass fiber wrapped in

    protective layers that carries data by means of pulses of light. It transmits light which can

    travel over extended distances. Fiber-optic cables are not affected by electromagnetic

    radiation. Transmission speed may reach trillions of bits per second. The transmissionspeed of fiber optics is hundreds of times faster than for coaxial cables and thousands of

    times faster than a twisted-pair wire. This capacity may be further increased by the use of

    colored light, i.e., light of multiple wavelengths. Instead of carrying one message in a

    stream of monochromatic light impulses, this technology can carry multiple signals in a

    single fiber.

    1.2.1.2 Wireless technologies

    Terrestrial microwave Terrestrial microwaves use Earth-based transmitter and

    receiver. The equipment looks similar to satellite dishes. Terrestrial microwaves use low-

    gigahertz range, which limits all communications to line-of-sight. Path between relay

    stations spaced approx, 48 km (30 miles) apart. Microwave antennas are usually placedon top of buildings, towers, hills, and mountain peaks.

    Communications satellites The satellites use microwave radio as their

    telecommunications medium which are not deflected by the Earth's atmosphere. The

    satellites are stationed in space, typically 35,400 km (22,200 miles) (for geosynchronous

    satellites) above the equator.

    Cellular and PCS systems Use several radio communications technologies. The

    systems are divided to different geographic areas. Each area has a low-power transmitter

    or radio relay antenna device to relay calls from one area to the next area.

    Wireless LANs Wireless local area network use a high-frequency radio

    technology similar to digital cellular and a low-frequency radio technology. Wireless

    LANs use spread spectrum technology to enable communication between multiple

    devices in a limited area. An example of open-standards wireless radio-wave technology

    is IEEE.

    Infrared communication can transmit signals between devices within small

    distances of typically no more than 10 meters. In most cases, line-of-sight propagation is

    used, which limits the physical positioning of communicating devices.

    A global area network (GAN) is a network used for supporting mobile

    communications across an arbitrary number of wireless LANs, satellite coverage areas,

    etc.

    1.2.2 Scale or Categories of Network1.2.2.1 Personal area network

    A personal area network (PAN) is a computer network used for communication

    among computer and different information technological devices close to one person.

    Some examples of devices that are used in a PAN are personal computers, printers, fax

    machines, telephones, PDAs, scanners, and even video game consoles. A PAN may

    include wired and wireless devices. The reach of a PAN typically extends to 10 meters. A

    wired PAN is usually constructed with USB and Firewire connections while technologies

    such as Bluetooth and infrared communication typically form a wireless PAN.

    1.2.2.2 Local area network

    A local area network (LAN) is a network that connects computers and devices in alimited geographical area such as home, school, computer laboratory, office building, or

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    5/52

    closely positioned group of buildings. Each computer or device on the network is a node.

    Current wired LANs are most likely to be based on Ethernet technology, although new

    standards like ITU-T G.hn also provide a way to create a wired LAN using existing home

    wires (coaxial cables, phone lines and power lines).

    1.2.2.3 Home networkA home network is a residential LAN which is used for communication between

    digital devices typically deployed in the home, usually a small number of personal

    computers and accessories, such as printers and mobile computing devices. An important

    function is the sharing of Internet access, often a broadband service through a cable TV or

    Digital Subscriber Line (DSL) provider.

    1.2.2.4 Campus network

    A campus network is a computer network made up of an interconnection of local

    area networks (LANs) within a limited geographical area. The networking equipment

    (switches, routers) and transmission media (optical fiber, copper plant, Cat5 cabling etc.)

    are almost entirely owned (by the campus tenant / owner: an enterprise, university,government etc.).

    In the case of a university campus-based campus network, the network is likely to

    link a variety of campus buildings including, for example, academic colleges or

    departments, the university library, and student residence halls.

    1.2.2.5 Backbone network

    A Backbone network or network backbone is part of a computer network

    infrastructure that interconnects various pieces of network, providing a path for the

    exchange of information between different LANs or subnetwork. A backbone can tie

    together diverse networks in the same building, in different buildings in a campus

    environment, or over wide areas. Normally, the backbone's capacity is greater than that of

    the networks connected to it.

    A large corporation which has many locations may have a backbone network that

    ties all of these locations together, for example, if a server cluster needs to be accessed by

    different departments of a company which are located at different geographical locations.

    The equipment which ties these departments together constitutes the network backbone.

    Network performance management including network congestion is critical parameters

    taken into account when designing a network backbone.

    A specific case of a backbone network is the Internet backbone, which is the set of

    wide-area network connections and core routers that interconnect all networks connected

    to the Internet.

    1.2.2.6 Metropolitan area network

    A Metropolitan area network (MAN) is a large computer network that usually

    spans a city or a large campus.

    1.2.2.7 Wide area network

    A wide area network (WAN) is a computer network that covers a large geographic

    area such as a city, country, or spans even intercontinental distances, using a

    communications channel that combines many types of media such as telephone lines,

    cables, and air waves. A WAN often uses transmission facilities provided by common

    carriers, such as telephone companies. WAN technologies generally function at the lower

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    6/52

    three layers of the OSI reference model: the physical layer, the data link layer, and the

    network layer. Wide area network is formed by interconnecting Local Area network.

    1.2.2.8 Enterprise private network

    An enterprise private network is a network built by an enterprise to interconnect

    various company sites, e.g., production sites, head offices, remote offices, shops, in orderto share computer resources.

    1.2.2.9 Virtual private network

    A virtual private network (VPN) is a computer network in which some of the links

    between nodes are carried by open connections or virtual circuits in some larger network

    (e.g., the Internet) instead of by physical wires. The data link layer protocols of the virtual

    network are said to be tunneled through the larger network when this is the case. One

    common application is secure communications through the public Internet, but a VPN

    need not have explicit security features, such as authentication or content encryption.

    VPNs, for example, can be used to separate the traffic of different user communities over

    an underlying network with strong security features.

    1.2.2.10 Internetwork

    An internetwork is the connection of two or more private computer networks via a

    common routing technology (OSI Layer 3) using routers. The Internet can be seen as a

    special case of an aggregation of many connected internetwork spanning the whole earth.

    Another such global aggregation is the telephone network.

    1.2.3 Network topology

    Network topology is the layout pattern of interconnections of the various elements

    (links, nodes, etc.) of a computer or biological network. Network topologies may be

    physical or logical. Physical topology refers to the physical design of a network including

    the devices, location and cable installation. Logical topology refers to how data is actually

    transferred in a network as opposed to its physical design. In general physical topology

    relates to a core network whereas logical topology relates to basic network.

    Topology can be understood as the shape or structure of a network. This shape

    does not necessarily correspond to the actual physical design of the devices on the

    computer network. The computers on a home network can be arranged in a circle but it

    does not necessarily mean that it represents a ring topology.

    1.2.3.1 Topology classification

    There are two basic categories of network topologies: Physical topologies Logical topologies

    The shape of the cabling layout used to link devices is called the physical

    topology of the network. This refers to the layout of cabling, the locations of nodes, and

    the interconnections between the nodes and the cabling. The physical topology of a

    network is determined by the capabilities of the network access devices and media, the

    level of control or fault tolerance desired, and the cost associated with cabling or

    telecommunications circuits.

    The logical topology, in contrast, is the way that the signals act on the network

    media, or the way that the data passes through the network from one device to the next

    without regard to the physical interconnection of the devices. A network's logicaltopology is not necessarily the same as its physical topology. For example, the original

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    7/52

    twisted pair Ethernet using repeater hubs was a logical bus topology with a physical star

    topology layout. Token Ring is a logical ring topology, but is wired a physical star from

    the Media Access Unit.

    1.2.3.2 The study of network topology recognizes seven basic topologies:

    Point-to-pointBusStarRingMeshTreeHybridDaisy chain

    1.2.4 Basic hardware components

    Apart from the physical communications media themselves as described above,networks comprise additional basic hardware building blocks interconnecting their

    terminals, such as network interface cards (NIC), hubs, bridges, switches, and routers.

    1.2.4.1 Network interface cards

    A network card, network adapter, or NIC (network interface card) is a piece of

    computer hardware designed to allow computers to physically access a networking

    medium. It provides a low-level addressing system through the use of MAC addresses.

    Each Ethernet network interface has a unique MAC address which is usually

    stored in a small memory device on the card, allowing any device to connect to the

    network without creating an address conflict. Ethernet MAC addresses are composed of

    six octets. Uniqueness is maintained by the IEEE, which manages the Ethernet addressspace by assigning 3-octet prefixes to equipment manufacturers. The list of prefixes is

    publicly available. Each manufacturer is then obliged to both use only their assigned

    prefix and to uniquely set the 3-octet suffix of every Ethernet interface they produce.

    1.2.4.2 Repeaters and hubs

    A repeater is an electronic device that receives a signal, cleans it of 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 without degradation. In most

    twisted pair Ethernet configurations, repeaters are required for cable that runs longer than

    100 meters. A repeater with multiple ports is known as a hub. Repeaters work on the

    Physical Layer of the OSI model. Repeaters require a small amount of time to regeneratethe signal.

    1.2.4.3 BridgesA network bridge connects multiple network segments at the data link layer (layer

    2) of the OSI model. Bridges broadcast to all ports except the port on which the broadcast

    was received. However, bridges do not promiscuously copy traffic to all ports, as hubs do,

    but learn which MAC 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.

    Bridges learn the association of ports and addresses by examining the source

    address of frames that it sees on various ports. Once a frame arrives through a port, its

    source address is stored and the bridge assumes that MAC address is associated with that

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    8/52

    port. The first time that a previously unknown destination address is seen, the bridge will

    forward the frame to all ports other than the one on which the frame arrived.

    Bridges come in three basic types:

    Local bridges: Directly connect local area networks (LANs) Remote bridges: Can be used to create a wide area network (WAN) link between

    LANs. Remote bridges, where the connecting link is slower than the endnetworks, largely have been replaced with routers.

    Wireless bridges: Can be used to join LANs or connect remote stations to LANs.1.2.4.4 Switches

    A network switch is a device that forwards and filters OSI layer 2 datagrams

    (chunks of data communication) between ports (connected cables) based on the MAC

    addresses in the packets. A switch is distinct from a hub in that it only forwards the

    frames to the ports involved in the communication rather than all ports connected. A

    switch breaks the collision domain but represents itself as a broadcast domain. Switches

    make forwarding decisions of frames on the basis of MAC addresses. 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.

    1.2.4.5 Routers

    A router is an internetworking device that forwards packets between networks by

    processing information found in the datagram or packet (Internet protocol information

    from Layer 3 of the OSI Model). In many situations, this information is processed in

    conjunction with the routing table (also known as forwarding table). Routers use routing

    tables to determine what interface to forward packets.

    1.3 Conclusion:

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    9/52

    EXPERIMENT NO: 02

    TITLE OF EXPERIMENT : Study of Operating System andImplementation of LAN

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    10/52

    Operating System and LAN

    2.1 Aim: Study of Operating System and Implementation of LAN

    2.2 Requirement: Two or more computers with NIC installed, Cat-5 (Straight cable)

    with Rj-45 connector, Network or Client operating system software (for example:

    Windows 95/98/2000, Windows XP, Windows NT, etc), Hub/ Switch

    2.3 Procedure:

    2.3.1 Procedure using Static IP address:

    1. Prepare cat-5 Straight cable and follow the following procedure2. Install operating system on the PC3. Insert/Plugged a one side of cat-5 Straight-cable at the NIC port / interface to the

    computer and other side to the HUB/Switch port

    4. Select network neighborhood properties5. Select local area connection properties6. Select Internet protocol (TCP/IP) properties7. Select Static IP address8. Configure the IP address and the Subnet mask9. Repeat the above 5-step for others computer10.Ping the other computer by entering the host name or IP address of other

    computer; from one computer to other computer to confirm the connectivity

    11.Use the IPCONFIG utility to view configured IP Parameter12.Share a folder, Connect to a shared folder, Stop sharing a folder

    2.4. Theory:2.4.1 Operating System:

    An operating system (OS) is software, consisting of programs and data, that runs

    on computers, manages computer hardware resources, and provides common services for

    execution of various application software. The operating system is the most important

    type of system software in a computer system. Without an operating system, a user cannot

    run an application program on their computer, unless the application program is self

    booting.

    For hardware functions such as input and output and memory allocation, the

    operating system acts as an intermediary between application programs and the computer

    hardware,although the application code is usually executed directly by the hardware and

    will frequently call the OS or be interrupted by it. Operating systems are found on almost

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    11/52

    any device that contains a computer from cellular phones and video game consoles to

    supercomputers and web servers.

    Examples of popular modern operating systems are: BSD, Linux, Mac OS X,

    Microsoft Windows, and UNIX.

    2.4.2 Internet Protocol Suite:The Internet Protocol Suite is the set of communications protocols used for the

    Internet and other similar networks. It is commonly also known as TCP/IP named from

    two of the most important protocols in it: the Transmission Control Protocol (TCP) and

    the Internet Protocol (IP), which was the first two networking protocols defined in this

    standard.

    The Internet Protocol Suite consists of four abstraction layers. From the lowest to the

    highest layer, these are the Link Layer, the Internet Layer, the Transport Layer, and the

    Application Layer. The layers define the operational scope or reach of the protocols in

    each layer, reflected loosely in the layer names. Each layer has functionality that solves a

    set of problems relevant in its scope.

    The Link Layer contains communication technologies for the local network thehost is connected to directly, the link. It provides the basic connectivity functions

    interacting with the networking hardware of the computer and the associated management

    of interface-to-interface messaging. The Internet Layer provides communication methods

    between multiple links of a computer and facilitates the interconnection of networks. As

    such, this layer establishes the Internet. It contains primarily the Internet Protocol, which

    defines the fundamental addressing namespaces, Internet Protocol Version 4 (IPv4) and

    Internet Protocol Version 6 (IPv6) used to identify and locate hosts on the network. Direct

    host-to-host communication tasks are handled in the Transport Layer, which provides a

    general framework to transmit data between hosts using protocols like the Transmission

    Control Protocol and the User Datagram Protocol (UDP). Finally, the highest-level

    Application Layer contains all protocols that are defined each specifically for the

    functioning of the vast array of data communications services. This layer handles

    application-based interaction on a process-to-process level between communicating

    Internet hosts.

    2.5 Conclusion:

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    12/52

    EXPERIMENT NO: 03

    TITLE OF EXPERIMENT : Study of IP Address Classes and DHCP

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    13/52

    IP Address Classes and DHCP

    3.1 Aim: Study of IP Address Classes and DHCP.

    3.2 Requirement: Two or more computers with NIC installed, Cat-5 (Straight cable)

    with Rj-45 connector, Network or Client operating system software (for example:

    Windows 95/98/2000, Windows XP, Windows NT, etc), Hub/ Switch

    3.3 Procedure:

    3.3.1 Procedure using Dynamic IP address:

    1. Install Server Operating System on one PC2. Install and configure DHCP service on same PC3. Install Client Operating System on another PC4. Insert/Plugged a one side of cat-5 cable at the NIC port/interface to the computer

    and other side to the HUB/SWITCH port for each computer.

    5. Select network neighborhood properties.6. Select local area connection properties.7. Select Internet protocol (TCP/IP) properties.8. Select Dynamic IP address at Client operating PC (obtain IP address

    automatically)

    3.4 Theory:

    3.4.1 Dynamic Host Configuration Protocol

    The Dynamic Host Configuration Protocol (DHCP) is an automatic configuration

    protocol used on IP networks. Computers that are connected to non-DHCP equipped IP

    networks must be configured before they can communicate with other computers on the

    network. DHCP allows a computer to be configured automatically, eliminating the need

    for intervention by a network administrator. It also provides a central database for

    keeping track of computers that have been connected to the network. This prevents two

    computers from accidentally being configured with the same IP address.

    In the absence of DHCP, hosts may be manually configured with an IP address.Alternatively IPv6 hosts may use stateless address auto configuration to generate an IP

    address. IPv4 hosts may use link-local addressing to achieve limited local connectivity.

    In addition to IP addresses, DHCP also provides other configuration information,

    particularly the IP addresses of local caching DNS resolves. Hosts that do not use DHCP

    for address configuration may still use it to obtain other configuration information.

    There are two versions of DHCP, one for IPv4 and one for IPv6. While both

    versions bear the same name and perform much the same purpose, the details of the

    protocol for IPv4 and IPv6 are sufficiently different that they can be considered separate

    protocols

    3.4.2 How to Install the DHCP Service:

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    14/52

    Before you can configure the DHCP service, you must install it on the server.

    DHCP is not installed by default during a typical installation of Windows Standard Server

    2003 or Windows Enterprise Server 2003. You can install DHCP either during the initial

    installation of Windows Server 2003 or after the initial installation is completed.

    How to Install the DHCP Service on an Existing Server

    1. ClickStart, point to Control Panel, and then clickAdd or Remove Programs.2. In the Add or Remove Programs dialog box, click Add/Remove Windows

    Components.

    3. In the Windows Components Wizard, click Networking Services in theComponents list, and then clickDetails.

    4. In the Networking Services dialog box, click to select the Dynamic HostConfiguration Protocol (DHCP) check box, and then clickOK.

    5. In the Windows Components Wizard, click Next to start Setup. Insert theWindows Server 2003 CD-ROM into the computer's CD-ROM or DVD-ROM

    drive if you are prompted to do so. Setup copies the DHCP server and tool files to

    your computer.

    6. When Setup is completed, clickFinish.3.4.3 How to Configure the DHCP Service:

    After you have installed the DHCP service and started it, you must create a scope,

    which is a range of valid IP addresses that are available for lease to the DHCP client

    computers on the network. Microsoft recommends that each DHCP server in yourenvironment have at least one scope that does not overlap with any other DHCP server

    scope in your environment. In Windows Server 2003, DHCP servers in an Active

    Directory-based domain must be authorized to prevent rogue DHCP servers from coming

    online. Any Windows Server 2003 DHCP Server that determines it to be unauthorized

    will not manage.

    How to Create a New Scope

    1. ClickStart, point to Programs, point to Administrative Tools, and then clickDHCP.

    2. In the console tree, right-click the DHCP server on which you want to create thenew DHCP scope, and then clickNew Scope.

    3. In the New Scope Wizard, clickNext, and then type a name and description forthe scope. This can be any name that you want, but it should be descriptive

    enough so that you can identify the purpose of the scope on your network (for

    example, you can use a name such as "Administration Building Client

    Addresses"). ClickNext.

    4.

    Type the range of addresses that can be leased as part of this scope (for example,use a range of IP addresses from a starting IP address of 192.168.100.1 to an

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    15/52

    ending address of 192.168.100.100). Because these addresses are given to clients,

    they must all be valid addresses for your network and not currently in use. If you

    want to use a different subnet mask, type the new subnet mask. ClickNext.

    5. Type any IP addresses that you want to exclude from the range that you entered.This includes any addresses in the range described in step 4 that may have already

    been statically assigned to various computers in your organization. Typically,

    domain controllers, Web servers, DHCP servers, Domain Name System (DNS)

    servers, and other servers, have statically assigned IP addresses. ClickNext.

    6. Type the number of days, hours, and minutes before an IP address lease from thisscope expires. This determines how long a client can hold a leased address

    without renewing it. ClickNext, and then clickYes, I want to configure these

    options now to extend the wizard to include settings for the most common DHCP

    options. ClickNext.

    7. Type the IP address for the default gateway that should be used by clients thatobtain an IP address from this scope. Click Add to add the default gateway

    address in the list, and then clickNext.

    8. If you are using DNS servers on your network, type your organization's domainname in the Parent domain box. Type the name of your DNS server, and then

    clickResolve to make sure that your DHCP server can contact the DNS server

    and determine its address. Click Add to include that server in the list of DNS

    servers that are assigned to the DHCP clients. Click Next, and then follow thesame steps if you are using a Windows Internet Naming Service (WINS) server,

    by adding its name and IP address. ClickNext.

    9. Click Yes, I want to activate this scope now to activate the scope and allowclients to obtain leases from it, and then clickNext.

    10.ClickFinish.11.In the console tree, click the server name, and then clickAuthorize on the Action

    menu.

    3.5 Conclusion:________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    16/52

    EXPERIMENT NO: 04

    TITLE OF EXPERIMENT : Study of IP Address Subnetting and CIDR

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    17/52

    IP Address Subnetting and CIDR

    4.1 Aim: Study of IP Address Subnetting and CIDR.

    4.2 Theory:

    4.2.1IP Address Subnetting

    4.2.1.1 SubnetworkA subnetwork, or subnet, is a logically visible subdivision of an IP network. The

    practice of dividing a network into subnetworks is called subnetting.

    All computers that belong to a subnet are addressed with a common, identical,

    most-significant bit-group in their IP address. This results in the logical division of an IP

    address into two fields, a network or routing prefix and the rest field. The rest field is a

    specific identifier for the computer or the network interface.

    The routing prefix is expressed in CIDR notation. It is written as the first address

    of a network followed by the bit-length of the prefix, separated by a slash (/) character.

    For example, 192.168.1.0/24 is the prefix of the Internet Protocol Version 4 network starting

    at the given address, having 24 bits allocated for the network prefix, and the remaining 8

    bits reserved for host addressing. The IPv6 address specification 2001:db8::/32 is a largenetwork for 2

    96hosts, having a 32-bit routing prefix. In IPv4 the routing prefix is also

    specified in the form of the subnet mask, which is expressed in quad-dotted decimal

    representation like an address. For example, 255.255.255.0 is the network mask for the

    192.168.1.0/24 prefix.

    Traffic between subnetworks is interchanged with special gateway computers

    called routers; they constitute logical or physical borders between the subnets.

    The benefits of subnetting vary with each deployment scenario. In the address

    allocation architecture of the Internet using Classless Inter-Domain Routing (CIDR) and

    in large organizations, it is necessary to allocate address space efficiently. It may also

    enhance routing efficiency, or have advantages in network management when

    subnetworks are administratively controlled by different entities in a larger organization.

    Subnets may be arranged logically in a hierarchical architecture, partitioning an

    organization's network address space into a tree-like routing structure.

    4.2.1.2 How to Create Subnets?

    1. Determined the number of required network IDs: One for each subnet One for each wide area network connection

    2. Determined the number of required host IDs per subnet: One for each TCP/IP host One for each router interface3. Based on the above requirements, create the following: One subnet mask for your entire network A unique subnet ID for each physical segment A range of host IDs for each subnet

    4.2.2 Classless Inter-Domain Routing

    Classless Inter-Domain Routing (CIDR) is a method for allocating IP addresses

    and routing Internet Protocol packets. The Internet Engineering Task Force introduced

    CIDR in 1993 to replace the previous addressing architecture of Classful network design

    in the Internet. Their goal was to slow the growth of routing tables on routers across the

    Internet, and to help slow the rapid exhaustion of IPv4 addresses.

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    18/52

    IP addresses are described as consisting of two groups of bits in the address: the

    most significant part is the network address which identifies a whole network or subnet

    and the least significant portion is the host identifier, which specifies a particular host

    interface on that network. This division is used as the basis of traffic routing between IP

    networks and for address allocation policies. Classful network design for IPv4 sized the

    network address as one or more 8-bit groups, resulting in the blocks of Class A, B, or Caddresses. Classless Inter-Domain Routing allocates address space to Internet service

    providers and end users on any address bit boundary, instead of on 8-bit segments. In

    IPv6, however, the interface identifier has a fixed size of 64 bits by convention, and

    smaller subnets are never allocated to end users.

    CIDR notation is syntax of specifying IP addresses and their associated routing

    prefix. It appends to the address a slash character and the decimal number of leading bits

    of the routing prefix, e.g., 192.168.0.0/16 for IPv4.

    4.3 Calculation/ Assignment:

    4.3.1 Calculate the total number of subnet, broadcast ID and Subnet ID (Network address)

    of each subnet; subnet mask and CIDR value (for total number of valid host is 126)using Network Address 192.168.1.0.

    4.3.2 Calculate the total number of subnet, total number of valid host in each subnet,

    broadcast ID and Subnet ID (Network address) of each subnet; subnet mask and CIDR

    value (for total number of valid host is 32) using Network Address 192.168.1.0.

    4.3.3 Calculate subnet mask, block size, total number of subnet and valid host for each

    subnet using network Address 192.168.10.0 for CIDR Value /24, /25, /26, /27, /28, /29,

    /30, /31, /32; And write your comment if required !

    4.3.4 Calculate total Subnets, Hosts, Valid subnets, Broadcast address for each subnet and

    valid host for Network Address: 172.16.0.0 / 18

    4.3.5 Calculate total Subnets, Hosts, Valid subnets, Broadcast address for each subnet and

    valid host for Network Address: 172.16.0.0 / 25

    4.3.6 Calculate total Subnets, Hosts, Valid subnets, Broadcast address for each subnet and

    valid host for Network Address: 10.0.0.0 / 16

    4.3.7 Calculate total Subnets, Hosts, Valid subnets, Broadcast address for each subnet and

    valid host for Network Address: 10.0.0.0 / 26

    4.4 Conclusion:

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    19/52

    EXPERIMENT NO: 05

    TITLE OF EXPERIMENT : Installation and Configuration of Web Serverand FTP

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    20/52

    Web Server and FTP

    5.1 Aim: Installation and Configuration of Web Server and FTP

    5.2 Requirement: Windows XP CD, Web Site Design tool (HTML, XML) or Microsoft

    Office (Microsoft Front page), FTP Server Software (Ocean FTP Server, Golden FTP

    Server, Titan FTP Server, etc), FTP Client Software, Internet Explorer.

    5.3 Procedure:

    5.3.1.1 Procedure fro Web Server:1. Install Windows-XP2. Install graphics driver file after installation of Win-XP to improve resolution3. Install Internet Information Service (IIS)4. Install Microsoft office, Microsoft Front page5. Design Web site or Web page in Microsoft Front page6. Save the Site on the location (Like C: drive or E: drive, etc)7. Open Internet Information Service and create virtual directory and load the

    web page or web site on the document option and go with the further setting8. Access the site through another PC by typing "http://IP Address/File name or

    site name"

    5.3.1.2 Installing IIS

    1. To install IIS, add optional components, or remove optional components-2. Click Start, click Control Panel, and click Add or Remove Programs.3. Click Add/Remove Windows Components. The Windows Components

    Wizard appears.

    4. IIS requires that you install certain software on the computer prior toinstallation. Review the IIS Software Checklist below before installing IIS

    5. IIS Software Checklist6. Before you install IIS, you need to install the Windows TCP/IP Protocol.

    5.3.2.1 Procedure for FTP:

    1. Install FTP Server Software on the PC2. Create user account and assign the different permission as per the requirement.3. Install FTP client on another PC from where we want to access the FTP Server

    (By default every PC is a FTP Client).

    5.3.2.2 Procedure to access FTP Server:

    1.

    Go to Command Prompt through Run by typing cmd2. Type FTP Server Address (ftp 10.12.2.3)3. Enter Login name and Password4. Start working (Download and upload the files)5. Open Internet Explorer Bar and access by typing FTP:// Server Address

    (ftp://10.12.2.3)

    6. Enter Login name and Password7. Start working (Download and upload the files)8. Run theNetstatcommand

    5.4 Theory:

    5.4.1. Web Server

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    21/52

    Web server can refer to either the hardware (the computer) or the software (the

    computer application) that helps to deliver content that can be accessed through the

    Internet. We are configuring the Web Server using the inbuilt service (Internet

    Information Service) in the operating system. The most common use of web servers is to

    host web sites but there are other uses like data storage or for running enterprise

    applications.

    5.4.1.1 Internet Information Services (IIS)

    It is a software services that support Web site creation, configuration, and

    management, along with other Internet functions. Internet Information Services (IIS)

    formerly called Internet Information Server is a web server application and set of

    feature extension modules created by Microsoft for use with Microsoft Windows. It is the

    most used web server after Apache HTTP Server. IIS 7.5 supports HTTP, HTTPS, FTP,

    FTPS, SMTP and NNTP. It is an integral part of Windows Server family of products, as

    well as certain editions of Windows XP, Windows Vista and Windows 7.

    5.4.1.2 Hypertext Transfer Protocol

    The Hypertext Transfer Protocol (HTTP) is a networking protocol for distributed,

    collaborative, hypermedia information systems. HTTP is the foundation of data

    communication for the World Wide Web.

    The standards development of HTTP has been coordinated by the Internet

    Engineering Task Force (IETF) and the World Wide Web Consortium (W3C),

    culminating in the publication of a series of Requests for Comments (RFCs).

    5.4.1.3 HTTP Secure

    Hypertext Transfer Protocol Secure (HTTPS) is a combination of the Hypertext

    Transfer Protocol (HTTP) with SSL/TLS protocol to provide encrypted communication

    and secure identification of a network web server. HTTPS connections are often used for

    payment transactions on the World Wide Web and for sensitive transactions in corporate

    information systems.

    5.4.1.4 File Transfer Protocol (FTP)

    A member of the TCP/IP suite of protocols, used to copy files between two

    computers on the Internet. Both computers must support their respective FTP roles: one

    must be an FTP client and the other an FTP server.

    5.4.1.5 .FTPSFTPS (also known as FTP Secure and FTP-SSL) is an extension to the commonly

    used File Transfer Protocol (FTP) that adds support for the Transport Layer Security

    (TLS) and the Secure Sockets Layer (SSL) cryptographic protocols.

    5.4.1.6 Simple Mail Transfer Protocol (SMTP)

    IT is a member of the TCP/IP suite of protocols that governs the exchange of

    electronic mail between message transfer agents.

    5.4.1.7 Network News Transfer Protocol (NNTP)

    A member of the TCP/IP suite of protocols used to distribute network news

    messages to NNTP servers and clients (newsreaders) on the Internet. NNTP is designed

    so that news articles are stored on a server in a central database, thus enabling a user toselect specific items to read.

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    22/52

    5.4.2 File Transfer Protocol (FTP)

    A member of the TCP/IP suite of protocols, used to copy files between two

    computers on the Internet. Both computers must support their respective FTP roles: one

    must be an FTP client and the other an FTP server. Transfers files to and from a computer

    running a File Transfer Protocol (FTP) server service such as Internet InformationServices. FTP can be used interactively or in batch mode by processing ASCII text files.

    5.4.2.1 Ftp Syntax:ftp [-v] [-d] [-i] [-n] [-g] [-s:FileName][-a][-w:WindowSize][-A] [Host] Parameters

    -v Suppresses the display of FTP server responses. -d Enables debugging, displaying all commands passed between the FTP

    client and FTP server.

    -i Disables interactive prompting during multiple file transfers. -n Suppresses the ability to log on automatically when the initial connection

    is made. It specifies a text file that contains ftp commands. These

    commands run automatically after ftp starts. This parameter allows no

    spaces. Use this parameter instead of redirection.

    -a Specifies that any local interface can be use -g Disables file name globing. Glob permits -s: FileName d when binding the FTP data connection. -w: WindowSize Specifies the size of the transfer buffer.

    5.4.2.2 Netstat:

    Displays protocol statistics and current TCP/IP network connections.

    NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval]

    -a Displays all connections and listening ports. -b Displays the executable involved in creating each connection or listening

    port. In some cases well-known executables host multiple independent

    components, and in these cases the sequence of components involved in creating

    the connection or listening port is displayed. In this case the executable name is in

    [] at the bottom, on top is the component it called, and so forth until TCP/IP was

    reached. Note that this option can be time-consuming and will fail unless you have

    sufficient permissions.

    -e Displays Ethernet statistics. This may be combined with the s option. -n Displays addresses and port numbers in numerical form. -o Displays the owning process ID associated with each connection. -p Shows connections for the protocol specified by proto; proto may be any

    of: TCP, UDP, TCPv6, or UDPv6. If used with the s option to display per-

    protocol statistics, proto may be any of: IP, IPv6, ICMP, ICMPv6, TCP, TCPv6,UDP, or UDPv6.

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    23/52

    -r Displays the routing table. -s Displays per-protocol statistics. By default, statistics are shown for IP,

    IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6; the -p option may be used

    to specify a subset of the default. -v When used in conjunction with -b, will display sequence of components

    involved in creating the connection or listening port for all executables.

    Interval Redisplays selected statistics, pausing interval seconds betweeneach display. Press CTRL+C to stop redisplaying statistics. If omitted, Netstat

    will print the current configuration information once.

    5.5 Conclusion:

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    24/52

    EXPERIMENT NO: 06

    TITLE OF EXPERIMENT : Study of DNS, SMTP and POP3

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    25/52

    DNS, SMTP and POP3

    6.1 Aim: Study of DNS, SMTP and POP3

    6.2 Requirement: Windows 2003 Server CD, PC with NIC Installed and all other

    Network

    6.3 Procedure: The procedure for DNS installation and commands for SMTP/POP3 is

    given Annexure 1 & 2 -

    6.4 Theory:

    6.4.1. DNS

    The Domain Name System (DNS) is a hierarchical naming system built on a

    distributed database for computers, services, or any resource connected to the Internet or

    a private network. Most importantly, it translates domain names meaningful to humans

    into the numerical 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, the domain name www.example.com translates to the addresses

    192.0.32.10 (IPv4) and 2620:0:2d0:200::10 (IPv6).

    The Domain Name System makes it possible to assign domain names to groups of

    Internet resources and users in a meaningful way, independent of each entity'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). Users take advantage of this when they recite

    meaningful Uniform Resource Locators (URLs) and e-mail addresses without having to

    know how the computer actually locates 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 and fault tolerant and has

    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 aworldwide, 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, UPCs, International characters in email

    addresses and host names, and a variety of other identifiers could all potentially use DNS.

    The Domain Name System also specifies the technical functionality of this

    database service. It defines the DNS protocol, a detailed definition of the data structures

    and communication exchanges used in DNS, as part of the Internet Protocol Suite.

    6.4.2 SMTP

    Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail

    (e-mail) transmission across Internet Protocol (IP) networks. SMTP includes the extendedSMTP (ESMTP) additions, and is the protocol in widespread use today. SMTP is

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    26/52

    specified for outgoing mail transport and uses TCP port 25. The protocol for new

    submissions is effectively the same as SMTP, but it uses port 587 instead. SMTP

    connections secured by SSL are known by the shorthand SMTPS, though SMTPS is not a

    protocol in its own right.

    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 SMTPfor 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) or a proprietary system (such as Microsoft Exchange or Lotus

    Notes/Domino) to access their mail box accounts on a mail server.

    6.4.3 POP3

    In computing, the Post Office Protocol (POP) is an application-layer Internet

    standard protocol used by local e-mail clients to retrieve e-mail from a remote server over

    a TCP/IP connection. POP and IMAP (Internet Message Access Protocol) are the two

    most prevalent Internet standard protocols for e-mail retrieval. Virtually all modern e-

    mail clients and servers support both. The POP protocol has been developed throughseveral versions, with version 3 (POP3) being the current standard. Like IMAP, POP3 is

    supported by most web mail services such as Hotmail, Gmail and Yahoo! Mail.

    Internet message access protocol (IMAP) is one of the two most prevalent Internet

    standard protocols for e-mail retrieval, the other being the Post Office Protocol (POP).

    Virtually all modern e-mail clients and mail servers support both protocols as a means of

    transferring e-mail messages from a server.

    6.5 Conclusion:

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    27/52

    EXPERIMENT NO: 07

    TITLE OF EXPERIMENT : Configuration of Router and study of Routingbetween the LANs

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    28/52

    Router Configuration and Routing between the LAN

    7.1 Aim: Configuration of Router and study of Routing between the LAN

    7.2 Requirement: PC with OS installed (Windows XP), Console and Cross over Cable,

    Router, Two LAN, etc

    7.3 Procedure:

    1. Attach Console Cable from Com1 port of Computer to Console port ofrouter

    2. Switch on the router3. Open the Hyper Terminal4. Configure the Hyper Terminal with following Port Setting

    a. Bits per second : 9600b. Data bits : 8c. Parity : Noned. Stop bit : 1e. Flow control : None

    5. Wait for booting process of the router6. Configure the Router with the command-line interface from the hyper

    terminal

    7. Attach Computer A to Ethernet Port8. Attach Computer B to Fast Ethernet Port9. Verify the connectivity between the LAN using ping command (ping from

    Computer A to B or vice versa)

    7.4 Theory:

    7.4.1 Router

    A router is a device that forwards data packets between telecommunications

    networks, creating an overlay internetwork. A router is connected to two or more data

    lines from different networks. When data comes in on one of the lines, the router reads

    the address information in the packet to determine its ultimate destination. Then, using

    information in its routing table or routing policy, it directs the packet to the next network

    on its journey or drops the packet. A data packet is typically forwarded from one router to

    another through networks that constitute the internetwork until it gets to its destination

    node.

    Four Router function in your network can be listed as follows:

    Packet Switching Packet Filtering Internetwork communication Path detection/ Selection

    7.4.2 Routing/ routing table

    In computer networking a routing table, or Routing Information Base (RIB), is a

    data table stored in a router or a networked computer that lists the routes to particular

    network destinations, and in some cases, metrics (distances) associated with those routes.

    The routing table contains information about the topology of the network immediately

    around it. The construction of routing tables is the primary goal of routing protocols.

    Static routes are entries made in a routing table by non-automatic means and which are

    fixed rather than being the result of some network topology 'discovery' procedure.

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    29/52

    7.4.2.1 Contents of routing tables

    The routing table consists of at least three information fields:

    1. the network id: i.e. the destination network id2. cost: i.e. the cost or metric of the path through which the packet is to be sent3. next hop: The next hop, or gateway, is the address of the next station to which the

    packet is to be sent on the way to its final destination

    Depending on the application and implementation, it can also contain additional values

    that refine path selection:

    1. quality of service associated with the route. For example, the U flag indicates thatan IP route is up.

    2. links to filtering criteria/access lists associated with the route3. interface: such as eth0 for the first Ethernet card, eth1 for the second Ethernet

    card, etc.

    7.4.3 Cisco IOS Modes of Operation

    The Cisco IOS software provides access to several different command modes.

    Each command mode provides a different group of related commands.

    For security purposes, the Cisco IOS software provides two levels of access to

    commands: user and privileged. The unprivileged user mode is called user EXEC mode.

    The privileged mode is called privileged EXEC mode and requires a password. The

    commands available in user EXEC mode are a subset of the commands available in

    privileged EXEC mode.

    7.4.3.1 User EXEC Mode:

    Logging in to the router places you in user EXEC command mode (unless the

    system is configured to take you immediately to privileged EXEC mode). Typically, login

    will require a username and a password. You may try three times to enter a password

    before the connection attempt is refused.

    The user EXEC mode prompt consists of the hostname of the device followed by

    an angle bracket (>), as shown in the following example:

    Router>

    7.4.3.2 Privileged EXEC Mode:

    Because many privileged EXEC mode commands set operating parameters,

    privileged-level access should be password protected to prevent unauthorized use. The

    privileged EXEC command set includes those commands contained in user EXEC mode.

    Privileged EXEC mode also provides access to configuration modes through the

    configure command, and includes advanced testing commands, such as debug.

    The privileged EXEC mode prompt consists of the hostname of the device

    followed by a pound sign (#), as shown in the following example:

    Router#

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    30/52

    Privileged commands include the following:

    Configure Changes the software configuration.

    Debug Display process and hardware event messages.

    Setup Enter configuration information at the prompts.

    Enter the command disable to exit from the privileged EXEC mode and return touser EXEC mode.

    7.4.3.3 Global Configuration Mode

    The term "global" is used to indicate characteristics or features that affect the

    system as a whole. Global configuration mode is used to configure your system globally,

    or to enter specific configuration modes to configure specific elements such as interfaces

    or protocols. Use the configure terminal command in privileged EXEC mode to enter

    global configuration mode.

    To access global configuration mode, use the following command in privilegedEXEC mode:

    Router# configure terminal

    Enter configuration commands, one per line. End with CNTL/Z.

    Router(config)#

    7.4.3.4 Interface Configuration Mode

    One example of a specific configuration mode you enter from global

    configuration mode is interface configuration mode.

    Many features are enabled on a per-interface basis. Interface configuration

    commands modify the operation of an interface such as an Ethernet, FDDI, or serial port.

    Interface configuration commands always follow an interface command in global

    configuration mode, which defines the interface type.

    To access and list the interface configuration commands, use the following

    command:

    Router(config)# interface serial 0

    Router(config-if)#

    Configuration mode has a set of submodes that you use for modifying interface

    settings, routing protocol settings, line settings, and so forth. Use caution with

    configuration mode because all changes you enter take effect immediately.

    7.5 Conclusion:

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    31/52

    EXPERIMENT NO: 08

    TITLE OF EXPERIMENT : Write a program for Encryption and Decryption

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    32/52

    Encryption and Decryption

    8.1 Aim: To write a program for Encryption and Decryption

    8.2 Requirement: Computer loaded with Matlab or C

    8.3 Theory:8.3.1 RSA Algorithm:

    In cryptography, RSA (which stands for Rivest, Shamir and Adleman who first

    publicly described it) is an algorithm for public-key cryptography. It is the first algorithm

    known to be suitable for signing as well as encryption, and was one of the first great

    advances in public key cryptography. RSA is widely used in electronic commerce

    protocols, and is believed to be sufficiently secure given sufficiently long keys and the

    use of up-to-date implementations.

    8.3.2 Operation: The RSA algorithm involves three steps: key generation, encryption

    and decryption.

    8.3.2.1Key generationRSA involves a public key and a private key. The public key can be known to

    everyone and is used for encrypting messages. Messages encrypted with the public key

    can only be decrypted using the private key. The keys for the RSA algorithm are

    generated the following way:

    1. Choose two distinct prime numbersp and q. For security purposes, the integers p and q should be chosen at random,

    and should be of similar bit-length. Prime integers can be efficiently found

    using a primarily test.

    2. Compute n =pq. n is used as the modulus for both the public and private keys

    3. Compute (n) = (p-1) (q-1), where is Euler's totient function.4. Choose an integer e such that 1 < e < (n) and gcd (e, (n)) = 1, i.e. e and

    (n) are coprime.

    e is released as the public key exponent. e having a short bit-length and small Hamming weight results in more

    efficient encryption - most commonly 0x10001 = 65537. However, small

    values ofe (such as 3) have been shown to be less secure in some settings.

    5. Determine d= e1 mod (n); i.e. dis the multiplicative inverse ofe mod (n). This is more clearly stated as solve for d given (d*e)mod (n) = 1 This is often computed using the extended Euclidean algorithm. dis kept as the private key exponent.

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    33/52

    The public key consists of the modulus n and the public (or encryption) exponent

    e. The private key consists of the private (or decryption) exponent dwhich must be kept

    secret.

    8.3.2.2 Encryption

    Alice transmits her public key (n, e) to Bob and keeps the private key secret. Bobthen wishes to send message M to Alice.

    He first turns M into an integer m, such that 0 < m < n by using an agreed-upon

    reversible protocol known as a padding scheme. He then computes the cipher text ccorresponding to-

    c = me (mod n).This can be done quickly using the method of exponentiation by squaring. Bob

    then transmits c to Alice.

    8.3.2.3 Decryption

    Alice can recover m from c by using her private key exponent dvia computing

    m = cd(mod n).

    Given m, she can recover the original message M by reversing the paddingscheme.

    8.4 Conclusion:

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    34/52

    Program:

    /* C program for the Implementation of RSA Algorithm */

    #include< stdio.h>

    #include< conio.h>

    int phi,M,n,e,d,C,FLAG;

    int check()

    {

    int i;

    for(i=3;e%i==0 && phi%i==0;i+2)

    {

    FLAG = 1;

    return;

    }

    FLAG = 0;}

    void encrypt()

    {

    int i;

    C = 1;

    for(i=0;i< e;i++)

    C=C*M%n;

    C = C%n;

    printf("\n\tEncrypted keyword : %d",C);

    }

    void decrypt()

    {

    int i;

    M = 1;

    for(i=0;i< d;i++)

    M=M*C%n;

    M = M%n;

    printf("\n\tDecrypted keyword : %d",M);

    }

    void main()

    {

    int p,q,s;

    clrscr();

    printf("Enter Two Relatively Prime Numbers\t: ");

    scanf("%d%d",&p,&q);

    n = p*q;

    phi=(p-1)*(q-1);

    printf("\n\tF(n)\t= %d",phi);

    do{

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    35/52

    printf("\n\nEnter e\t: ");

    scanf("%d",&e);

    check();

    }while(FLAG==1);

    d = 1;

    do{

    s = (d*e)%phi;

    d++;

    }while(s!=1);

    d = d-1;

    printf("\n\tPublic Key\t: {%d,%d}",e,n);

    printf("\n\tPrivate Key\t: {%d,%d}",d,n);

    printf("\n\nEnter The Plain Text\t: ");

    scanf("%d",&M);

    encrypt();

    printf("\n\nEnter the Cipher text\t: ");scanf("%d",&C);

    decrypt();

    getch();

    }

    Output:

    Enter Two Relatively Prime Numbers : 7 17

    F(n) = 96

    Enter e : 5

    Public Key : {5,119}

    Private Key : {77,119}

    Enter The Plain Text : 19

    Encrypted keyword : 66

    Enter the Cipher text : 66

    Decrypted keyword : 19 */

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    36/52

    EXPERIMENT NO: 09

    TITLE OF EXPERIMENT : Write a program for Implementation of ShortestPath Algorithm

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    37/52

    Shortest Path

    9.1 Aim: To write a C program for implementation of Shortest Path Routing

    Algorithm

    9.2 Requirement: Computer loaded with C

    9.3 Algorithm:

    1. Start2. Get the total no. of nodes from the User3. Get the adjacent nodes for each main node and get the weights for each arc4. Get the starting and ending node from the User5. Set the permanent label of starting node equal to zero.6. Set the permanent label of other remaining nodes as infinity (i.e. some

    maximum value)

    7. Calculate the temporary labels of adjacent nodes as follows: Minimum [oldvalue (permanent label of source node + weight of arc)]

    8. Select the adjacent node having minimum temporary label and make its labelas permanent

    9. Check whether the selected node is the end node? If YES, then length of shortest path is equal to permanent label of selected

    node

    If NO, consider the selected node as new source node and repeat stepsfrom 7 to 9

    10.Stop9.4 Conclusion:________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    38/52

    Program:

    #include

    #include

    #include

    typedef struct stack{

    int val;

    struct stack *next;

    }st;

    int P[20],T[20],cost[20][20],L[20],last;

    int dijkstra(int ,int ,int );

    void path(int ,int ,int ,int *,int *,int );

    st *push(st *,int );

    st *pop(st *);

    void main()

    {

    int v,temp1,temp2,n,i,j,x = 22,y = 11,a,z,min,done[20],sequence[20],l = 0;

    while(1)

    {

    clrscr();

    printf("\t\t\tDIJKSTRA's SHORTEST PATH ALGORITHM");

    printf("\n\nEnter the no. of nodes in graph :: ");

    scanf("%d",&n);

    if(n

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    39/52

    for(j = 1;j j)

    {

    gotoxy(x,y);

    if(cost[j][i] == 9999)

    printf("-1");

    else

    printf("%d",cost[j][i]);

    cost[i][j] = cost[j][i];

    }else

    {

    gotoxy(x,y);

    scanf("%d",&cost[i][j]);

    if(cost[i][j] == -1)

    cost[i][j] = 9999;

    }

    x = x + 4;

    }

    x = 25;

    y = y + 3;

    }

    while(1)

    {

    clrscr();

    printf("\t\t\tDIJKSTRA's SHORTEST PATH ALGORITHM");

    printf("\n\n\n\n\nEnter the 2 nodes between which path"

    " is to be found :: ");

    scanf("%d %d",&a,&z);

    if(a < 1 || z > n)

    { printf("\nPLEASE ENTER THE NODES WHICH"

    " ARE PRESENT IN GRAPH !!!");

    getch();

    }

    else

    break;

    }

    if(a == z)

    {

    printf("\nLength of shortest path is 0");

    getch();exit(0);

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    40/52

    }

    else if(a > z)

    {

    a = a + z;

    z = a - z;

    a = a - z;}

    for(i = 1;i

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    41/52

    path(n,j,z,done,sequence,l);

    }

    }

    getch();

    }

    int dijkstra(int n,int v,int z)

    {

    int i,j,min = 9999,v1,temp1,temp2;

    for(i = 1;i val = no;temp -> next = top;

    top = temp;

    return top;

    }

    st *pop(st *top)

    {

    top = top -> next;

    return top;

    }

    Output Screen:

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    42/52

    DIJKSTRA's SHORTEST PATH ALGORITHM

    Enter the no. of nodes in graph: 5

    Fill the following adjacency matrix. Enter -1 if no direct edge exists:

    A B C D E

    A 0 1 4 3 1

    B 1 0 2 1 3

    C 4 2 0 3 1

    D 3 1 3 0 1

    E 1 3 1 1 0

    Enter the 2 nodes between which path are to be found: 2 5

    Length of shortest path is 2

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    43/52

    EXPERIMENT NO: 10

    TITLE OF EXPERIMENT : Study of Wireless LAN

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    44/52

    Wireless LAN

    10.1 Aim: Study of Wireless LAN.

    10.2 Requirement: PC/ Laptop with Wireless Interface Card/ Controller (NETGEAR

    WG311), Linksys: Wireless-G Access Point, Ethernet Cross-over Cable, etc.

    10.3 Procedure:

    10.3.1 Peer to Peer WLAN

    Plug-in the Wireless Interface card to the each computer/ Laptop Install the Wireless PCI Adapter software Install NETGEAR WG311 Software Configure the NETGEAR WG311v3 Smart Wizard

    1. Profile: any name2. Network Name(SSID): any name3. Access Type:

    a. Access Point(Infrastructure)b. Computer to computer

    4. Securitya. Disableb. WPA2-PSK[AES]c. WEP

    5. Save Profile6. Apply

    Configure the TCP/IP Properties setting with the Wireless Adapter of eachcomputer and Laptop

    Verify the connection by command ping or by sharing the file from onelocation/ computer and accessing from all other location/ computer

    Note: Assign same SSID and Profile name to the entire computer for easy

    setting and keep security disable.

    10.3.2 Bridge WLAN

    Plug-in the Wireless Interface card to the each computer/ Laptop Install the Wireless PCI Adapter software Installation of bridge/ Access Point

    1. Install Wireless-G Access Pointa. Connect cross cable from computer to Wireless-G Access

    Point

    b. Install the driver of the Wireless-G Access Point2. Configure Wireless-G Access Point

    a. Network Setupb. Basic Wireless Setup (SSID) and MAC id of each computerc. Password, etc

    Configure the TCP/IP Properties setting with the Wireless Adapter of eachcomputer and Laptop

    Search the Wireless Connection (i.e. SSID) from each computer andLaptop

    1. Connect to the SSID connection2.

    Enter the password(passphrase) provided by the administrator forlogin

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    45/52

    Verify the connection by command ping or by sharing the file from onelocation/ computer and accessing from all other location/ computer

    10.4. Theory: Wireless LAN

    A wireless local area network (WLAN) links two or more devices using some

    wireless distribution method (typically spread-spectrum or OFDM radio), and usuallyproviding a connection through an access point to the wider internet. This gives users the

    mobility to move around within a local coverage area and still be connected to the

    network. Most modern WLANs are based on IEEE 802.11 standards, marketed under the

    Wi-Fi brand name.

    Wireless network refers to any type of computer network that is not connected by

    cables of any kind. It is a method by which homes, telecommunications networks and

    enterprise (business) installations avoid the costly process of introducing cables into a

    building, or as a connection between various equipment locations. Wireless

    telecommunications networks are generally implemented and administered using a

    transmission system called radio waves. This implementation takes place at the physical

    level (layer) of the network structure.

    10.4.1 Architecture

    StationsAll components that can connect into a wireless medium in a network are referred

    to as stations. All stations are equipped with wireless network interface controllers

    (WNIC). Wireless stations fall into one of two categories: access points, and clients.

    Access points (APs), normally routers, are base stations for the wireless network. They

    transmit and receive radio frequencies for wireless enabled devices to communicate with.

    Wireless clients can be mobile devices such as laptops, personal digital assistants, IP

    phones and other smart phones, or fixed devices such as desktops and workstations thatare equipped with a wireless network interface.

    Basic service setThe basic service set (BSS) is a set of all stations that can communicate with each

    other. There are two types of BSS: Independent BSS (also referred to as IBSS), and

    infrastructure BSS. Every BSS has an identification (ID) called the BSSID, which is the

    MAC address of the access point servicing the BSS. An independent BSS (IBSS) is an

    ad-hoc network that contains no access points, which means they can not connect to any

    other basic service set. An infrastructure can communicate with other stations not in the

    same basic service set by communicating through access points.

    Extended service setAn extended service set (ESS) is a set of connected BSSs. Access points in an

    ESS are connected by a distribution system. Each ESS has an ID called the SSID which is

    a 32-byte (maximum) character string.

    Distribution systemA distribution system (DS) connects access points in an extended service set. The

    concept of a DS can be used to increase network coverage through roaming between

    cells. DS can be wired or wireless. Current wireless distribution systems are mostly based

    on WDS or MESH protocols, though other systems are in use.

    10.4.2 Types of wireless LAN:

    Peer-to-Peer or ad-hoc wireless LAN

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    46/52

    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).

    A peer-to-peer (P2P) network allows wireless devices to directly communicate

    with each other. Wireless devices within range of each other can discover and

    communicate directly without involving central access points. This method is typicallyused by two computers so that they can connect to each other to form a network.

    BridgeA bridge can be used to connect networks, typically of different types. A wireless

    Ethernet bridge allows the connection of devices on a wired Ethernet network to a

    wireless network. The bridge acts as the connection point to the Wireless LAN.

    Wireless distribution systemA Wireless Distribution System enables the wireless interconnection of access

    points in an IEEE 802.11 network. It allows a wireless network to be expanded using

    multiple access points without the need for a wired backbone to link them, as is

    traditionally required. The notable advantage of WDS over other solutions is that it

    preserves the MAC addresses of client packets across links between access points.

    10.4.3 Types of wireless connection:

    10.4.3.1Wireless Personal Area Networks (WPANs) interconnect devices within a

    relatively small area that is generally within a person's reach. For example, both

    Bluetooth radio and invisible Infrared light provides a WPAN for interconnecting a

    headset to a laptop.

    10.4.3.2 A wireless local area network (WLAN) links two or more devices over a short

    distance using a wireless distribution method, usually providing a connection through an

    access point for Internet access. The use of spread-spectrum or OFDM technologies mayallow users to move around within a local coverage area, and still remain connected to the

    network. Products using the IEEE 802.11 WLAN standards are marketed under the Wi-Fi

    brand name. Fixed wireless technology implements point-to-point links between

    computers or networks at two distant locations, often using dedicated microwave or

    modulated laser light beams over line of sight paths. It is often used in cities to connect

    networks in two or more buildings without installing a wired link.

    10.4.3.3 A wireless mesh network is a wireless network made up of radio nodes

    organized in a mesh topology. Each node forwards messages on behalf of the other nodes.

    Mesh networks can "self heal", automatically re-routing around a node that has lost

    power.

    10.4.3.4 Wireless Metropolitan Area Networks are a type of wireless network that

    connects several wireless LANs. WiMAX is a type of Wireless MAN and it is IEEE

    802.16 standard.

    10.4.3.5 Wireless wide area networks are wireless networks that typically cover large

    areas, such as between neighboring towns and cities, or city and suburb. These networks

    can be used to connect branch offices of business or as a public internet access system.

    The wireless connections between access points are usually point to point microwave

    links using parabolic dishes on the 2.4 GHz band, rather than omnidirectional antennas

    used with smaller networks. A typical system contains base station gateways, accesspoints and wireless bridging relays. Other configurations are mesh systems where each

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    47/52

    access point acts as a relay also. When combined with renewable energy systems such as

    photo-voltaic solar panels or wind systems they can be stand alone systems

    10.5 Conclusion:

    ________________________________________________________________________

    ________________________________________________________________________________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    48/52

    EXPERIMENT NO: 11

    TITLE OF EXPERIMENT : Lab Practice on RouterSim Network

    Visualizer

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    49/52

    Simulation of Router Configuration

    11.1 Aim: Lab Practice on RouterSim Network Visualizer

    11.2 Requirement: PC with OS installed (Windows XP), CCNA Network Visualizer 6.0

    11.3 Assignment:

    11.3.1 LAB Practice A

    Configure the following Scenario:

    Assign Host name and IP Address to each Host Assign Host name to Router Assign IP Address to each Port of Router Verify the Connectivity of each by command ping

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    50/52

    11.3.2 LAB Practice B

    Configure the following Scenario:

    Assign Host name and IP Address to each Host Assign Host name to Router Assign IP Address to each Port of Router Use same network ID for each LAN and also for serial connection between

    Router

    Verify the Connectivity between the LANs

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    51/52

    11.3.3 LAB Practice C

    Configure the following Scenario:

    Assign Host name and IP Address to each Host Assign Host name to Router Assign IP Address to each Port of Router Use same network ID for each LAN and also for serial connection between

    Router

    Verify the Connectivity between the LANs

  • 7/30/2019 CN Lab Manual 2008 Course E TC

    52/52

    11.3.4 LAB Practice D

    Configure the following Scenario:

    Assign Host name and IP Address to each Host Assign Host name to Router Assign IP Address to each Port of Router Use same network ID for each LAN and also for serial connection between

    Router

    Verify the Connectivity between the LANs

    11.4 Conclusion:________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________


Recommended