Computer Networking Technology, Lab Reports of Computer Networks

Computer Networking Technology Lab Manual

Typology: Lab Reports

2019/2020

Uploaded on 12/05/2020

sushil-ingole
sushil-ingole 🇮🇳

1 document

1 / 52

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Software Laboratory –I Lab Manual TE IT, Sem- II
Department of Information Technology, MMCOE, Pune-52Page 1
Marathwada Mitra Mandal’s
COLLEGE OF ENGINEERING
S. No. 18, Plot No. 5/3, Karvenagar, PUNE 411 052
Tel: 020-25473160 Fax: 020-25470909
Website: www.mmcoe.edu.in
DEPARTMENT OF INFORMATION TECHNOLOGY
LABORATORY MANUAL
TE (INFORMATION TECHNOLOGY) (SEMESTER I)
SOFTWARE LABORATORY-IV
2015 course
Teaching Scheme: Practical 2hrs/week
Examination Scheme:Term Work: 25 Marks
Practical: 25 Marks
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34

Partial preview of the text

Download Computer Networking Technology and more Lab Reports Computer Networks in PDF only on Docsity!

Marathwada Mitra Mandal’s

COLLEGE OF ENGINEERING

S. No. 18, Plot No. 5/3, Karvenagar, PUNE – 411 052 Tel: 020-25473160 Fax: 020- Website: www.mmcoe.edu.in

DEPARTMENT OF INFORMATION TECHNOLOGY

LABORATORY MANUAL

TE (INFORMATION TECHNOLOGY) (SEMESTER – I)

SOFTWARE LABORATORY-IV

2015 course

Teaching Scheme: Practical 2hrs/week

Examination Scheme:Term Work: 25 Marks

Practical: 25 Marks

Marathwada Mitra Mandal's

COLLEGE OF ENGINEERING

Karvenagar, Pune – 52

Vision of the Institute

To aspire for the welfare of society through excellence in science and technology.

Mission of the Institute

 Mould young talent for higher endeavours.

 Meet the challenges of globalization.

 Commit for social progress with values and ethics.

 Orient faculty and students for research and development.

 Emphasize excellence in all disciplines.

DEPARTMENT OF INFORMATION TECHNOLOGY

Vision of the Department

To emerge as a centre of excellence in IT education, research and innovation in

Information Technology for enrichment of society.

Mission of the Department

 To cater IT industry with engineers having theoretical and practical background

with rich skill set.

 To pursue advancement in knowledge in field of information technology.

 To inculcate budding IT engineers with logical thinking, analytical aptitude,

leadership and creativity.

Marathwada Mitra Mandal's COLLEGE OF ENGINEERING

Karvenagar, Pune – 52

DEPARTMENT OF INFORMATION TECHNOLOGY

Programme Educational Objectives (PEOs)

The students of Information Technology Program after passing out will:

PEO

Possess adequate knowledge and skills in Mathematics, Engineering and

Information Technology for analyzing, designing and implementing

complex problems of any domain with innovative approaches.

PEO

Possess an inclination and technical competency towards professional

growth, research, entrepreneurship and higher studies in the field of

Information Technology at global level.

PEO

Possess interpersonal and leadership skills along with ethical practices,

societal contributions through communities and life- long learning.

Programme Specific Outcomes (PSOs)

The students will be able to:

PSO

Develop and analyze quality computer applications by applying knowledge

of software engineering, algorithms, programming, databases and

networking.

PSO

Pursue advanced knowledge and professional development in the field of

information technology.

Course Outcomes

Course Outcome

Statement

On completion of this course the student should be able to

314450.1 Understand responsibilities, services offered, protocol used at^ network layer, understand different addressing techniques,networking commands and implement a small size network 314450.2 Understand responsibilities, services offered, protocol used at transport layer and use networking and simulation tools and explore protocol design 314450.3 Understand and explore the different protocols at application layer and configure client server environment to use application layer protocols. 314450.4 Understand the different wireless technologies and IEEE standards.

314450.5 Understand, explore and implement adhoc networks and study network & transport layer protocols for wireless network 314450.6 Understand, explore and implement^ applications on recent trends in network domain.

Assignment No. 1

Aim: Explore and Study of TCP/IP utilities and Network Commands on Linux.

Ping, Tracert/Traceroute/Tracepath, ipconfig / ifconfig, NSlookup , Hostname,Arp, Whois , Finger, Netstat , Port Scan / nmap, Route

Objectives: To understand networking commands in Linux

Course Outcome achieved:

CO1. To know responsibilities, services offered, protocol used at network network layer, understand different addressing techniques,networking commands and implement a small size network

Theory:

1. ifconfig - configure a network interface

Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed. If no arguments are given, ifconfig displays the status of the currently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single -a argment is given, it displays the status of all interfaces, even those that are down. Otherwise, it configures an interface.

OPTIONS -a display all interfaces which are currently available, even if down

-s display a short list (like netstat -i)

-v be more verbose for some error conditions

Viewing The Configuration Of A Specific Interface

To view the configuration of a specific interface, specify its name as an option. For instance,

ifconfig eth

...will display the configuration of device eth0 only.

Enabling And Disabling An Interface

When a network interface is active, it can send and receive data; when it is inactive, it is not able to transmit or receive. You can use ifconfig to change the status of a network interface from inactive to active, or vice-versa.

To enable an inactive interface, provide ifconfig with the interface name followed by the keyword up.

Enabling or disabling a device requires superuser permissions, so you will either have to be logged in as root, or prefix your command with sudo to run it with superuser privileges.

To activateinterface eth0, the command is :

sudo ifconfig eth1 up

To disable the wireless network interface wlan0 , use the command:

sudo ifconfig wlan0 down

Configuring An Interface

ifconfig can be used at the command line to configure (or re-configure) a network interface. This is often unnecessary, since this configuration is typically handled by a script when you boot the system. If you'd like to do so manually, you will need superuser privileges, so we'll use sudo again when running these commands.

To assign a static IP address to an interface, specify the interface name and the IP address. For example, to assign the IP address 69.72.169.1 to the interface wlan0 , use the command:

sudo ifconfig wlan0 69.72.169.

To assign a network mask to an interface, use the keyword netmask and the netmask address. For instance, to configure the interface eth1 to use a network mask of 255.255.255.0 , the command would be:

sudo ifconfig eth1 netmask 255.255.255.

To assign a broadcast address to an interface, use the keyword broadcast and the broadcast address. For instance, to configure the interface wlan1 to use a broadcast address of 172.16.25.98, the command would be:

sudo ifconfig wlan1 broadcast 172.16.25.

These configurations can combined in a single command. For instance, to configure interface eth0 to use the static IP address 192.168.2.5 , the network mask 255.255.255.0 , and the broadcast address 192.168.2.7 , the command would be:

sudo ifconfig eth0 192.168.2.5 netmask 255.255.255.0 broadcast 192.168.2.

2. Ping

Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) Echo Request messages. The receipt of corresponding Echo Reply messages are displayed, along with round-trip times.

OPTIONS

-s Finger displays the user's login name, real name, terminal name and write status (as a ``*'' after the terminal name if write permission is denied), idle time, login time, office location and office phone number. Login time is displayed as month, day, hours and minutes, unless more than six months ago, in which case the year is displayed rather than the hours and minutes.Unknown devices as well as nonexistent idle and login times are displayed as single asterisks.

-l Produces a multi-line format displaying all of the information described for the -s option as well as the user's home directory,home phone number, login shell, mail status, and the contents of the files “.plan”, “.project”, “.pgpkey” and “.forward” from the user's home directory.

-p Prevents the -l option of finger from displaying the contents of the “.plan”, “.project” and “.pgpkey” files.

-m Prevent matching of user names. User is usually a login name; however, matching will also be done on the users' real names,unless the -m option is supplied. All name matching performed by finger is case insensitive.

5. traceroute - print the route packets trace to network host

DESCRIPTION traceroute tracks the route packets taken from an IP network on their way to a given host. It utilizes the IP protocol's time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to the host.

This program attempts to trace the route an IP packet would follow to some internet host by launching probe packets with a small ttl (time to live) then listening for an ICMP "time exceeded" reply from a gateway. We start our probes with a ttl of one and increase by one until we get an ICMP "port unreachable" (or TCP reset), which means we got to the "host", or hit a max (which defaults to 30 hops). Three probes (by default) are sent at each ttl setting and a line is printed showing the ttl, address of the gateway and round trip time of each probe. The address can be followed by additional information when requested. If the probe answers come from different gateways, the address of each responding system will be printed. If there is no response within a 5.0 seconds (default), an "*" (asterisk) is printed for that probe.

6. nslookup - command is used to query Internet name servers interactively for information.

nslookup , which stands for "name server lookup", is a useful tool for finding out information about a named domain.By default, nslookup will translate a domain name to an IP address (or vice versa). For instance, to find out what the IP address of microsoft.com is, you could run the command:

nslookup microsoft.com

...and you would receive a response like this:

Server: 8.8.8. Address: 8.8.8.8# Non-authoritative answer:

Name: microsoft.com Address: 134.170.185. Name: microsoft.com Address: 134.170.188.

Here, 8.8.8.8 is the address of our system's Domain Name Server. This is the server our system is onfigured to use to translate domain names into IP addresses. " #53 " indicates that we are communicating with it on port 53, which is the standard port number domain name servers use to accept queries.

Reverse DNS Lookups

We can also perform the above operation in reverse by providing the IP address rather than the domain name. For instance, the command:

nslookup 134.170.185.

...will return information resembling the following:

Server: 8.8.8. Address: 8.8.8.8# Non-authoritative answer: 46.185.170.134.in-addr.arpa name = grv.microsoft.com.

7. hostname - command shows or sets the system hostname. hostname is used to display the system's DNS name, and to display or set its hostname or NIS (Network Information Services) domain name. When called without any arguments, hostname will display the name of the system as returned by the gethostname function. When called with one argument or with the --file option, hostname will set the system's host name using the sethostname function. Only the superuser can set the host name. The host name is usually set once at system startup in the script /etc/init.d/hostname.sh normally by reading the contents of a file which contains the host name, e.g., /etc/hostname.

  1. Arp - manipulates or displays the kernel's IPv4 network neighbour cache. It can add entries to the table, delete one, or display the current content.ARP stands for Address Resolution Protocol , which is used to find the address of a network neighbor for a given IPv4 address.

MODES arp with no mode specifier will print the current content of the table. It is possible to limit the number of entries printed, by specifying an hardware address type, interface name or host address.

arp -d address will delete a ARP table entry. Root or netadmin priveledge is required to do this. The entry is found by IP address.If a hostname is given, it will be resolved before looking up the entry in the ARP table.

arp -s address hw_addr is used to set up a new table entry. The format of the hw_addr parameter is dependent on the hardware class, but for most classes one can assume that the usual presentation can be used. For the Ethernet class, this is 6 bytes in hexadecimal, separated by colons. When adding proxy arp entries (that is those with the publish flag set a netmask may be specified to proxy arp for entire subnets. This is not good practice, but is supported by older kernels because it can be useful. If the temp flag is

Assignment No. 2

Title of Assignment:

Using a Network Simulator (e.g. packet tracer) Configure Sub-netting of a given network ,Super-netting of a given networks.

Objectives: To design and implement small size network by sunetting and supernetting

Course Outcome :

CO1 : To know responsibilities, services offered, protocol used at network network layer, understand different addressing techniques, networking commands and implement a small size network

Theory:

Network ID

First address of subnet is called network ID. This address is used to identify one segment or broadcast

domain from all the other segments in the network.

Block Size

Block size is the size of subnet including network address, hosts addresses and broadcast address.

Broadcast ID

There are two types of broadcast, direct broadcast and full broadcast.

Direct broadcast or local broadcast is the last address of subnet and can be hear by all hosts in subnet.

Full broadcast is the last address of IP classes and can be hear by all IP hosts in network. Full broadcast address is 255.255.255.

The main difference between direct broadcast and full broadcast is that routers will not propagate local

broadcasts between segments, but they will propagate directed broadcasts.

Host Addresses

All address between the network address and the directed broadcast address is called host address for the subnet. You can assign host addresses to any IP devices such as PCs, servers, routers, and switches.

Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. If you do not subnet, you are only able to use one network from your Class A, B, or C network, which is unrealistic.

Each data link on a network must have a unique network ID, with every node on that link being a member of the same network. If you break a major network (Class A, B, or C) into smaller subnetworks, it allows you to create a network of interconnecting subnetworks. Each data link on this network would then have a unique network/subnetwork ID. Any device, or gateway, that connects n networks/subnetworks has n distinct IP addresses, one for each network / subnetwork that it interconnects.

In order to subnet a network, extend the natural mask with some of the bits from the host ID portion of the address in order to create a subnetwork ID. For example, given a Class C network of 204.17.5.0 which has a natural mask of 255.255.255.0, you can create subnets in this manner:

204.17.5.0 - 11001100.00010001.00000101. 255.255.255.224 - 11111111.11111111.11111111. --------------------------|sub|----

By extending the mask to be 255.255.255.224, you have taken three bits (indicated by "sub") from the original host portion of the address and used them to make subnets. With these three bits, it is possible to create eight subnets. With the remaining five host ID bits, each subnet can have up to 32 host addresses, 30 of which can actually be assigned to a device since host ids of all zeros or all ones are not allowed. So, with this in mind, these subnets have been created.

Network address Subnet Mask host address range

204.17.5.0 255.255.255.224 host address range 1 to 30 204.17.5.32 255.255.255.224 host address range 33 to 62 204.17.5.64 255.255.255.224 host address range 65 to 94 204.17.5.96 255.255.255.224 host address range 97 to 126 204.17.5.128 255.255.255.224 host address range 129 to 158 204.17.5.160 255.255.255.224 host address range 161 to 190 204.17.5.192 255.255.255.224 host address range 193 to 222 204.17.5.224 255.255.255.224 host address range 225 to 254

Supernetting is the opposite of Subnetting. In subnetting, a single big network is divided into multiple smaller subnetworks. In Supernetting, multiple networks are combined into a bigger network termed as a Supernetwork or Supernet.

Supernetting is mainly used in Route Summarization, where routes to multiple networks with similar network prefixes are combined into a single routing entry, with the routing entry pointing to a Super network, encompassing all the networks. This in turn significantly reduces the size of routing tables and also the size of routing updates exchanged by routing protocols.

Assignment No. 3

Title of Assignment:

Using a Network Simulator (e.g. packet tracer) Configure a router using router commands, Access Control

lists – Standard & Extended

Objectives: To Study Configuration of a router (Ethernet & serial Interface )

Course Outcome achieved:

CO1: To know responsibilities, services offered, protocol used at network network layer, understand different addressing techniques,networking commands and implement a small size network

Theory:

Introduction to access list:

An access list is essentially a list of condition. Packets can be very useful when u need to do exercise control over network traffic. An access list would be your tool of choice for design making in these situation .One of the most common and easiest way to to understand uses of lists is filtering unwanted packet when implementing security policy.

1. Access Control List Types

Cisco ACLs are divided into types. Standard IP, Extended IP, IPX, Appletalk, etc. Here we will just go over the standard and extended access lists for TCP/IP. As you create ACLs you assign a number to each list, however, each type of list is limited to an assigned range of numbers. This makes it very easy to determine what type of ACL you will be working with.

2. TCP/IP Access Lists

You can have up to 99 Standard IP Access Lists ranging in number from 1 to 99, the Extended IP Access Lists number range is assigned from 100 to 199. The most common use of the Extended IP access list to is create a packet filtering firewall. This is where you specify the allowed destinations of each packet from an allowed source.

3. Standard IP Access Lists

A Standard Access List only allows you to permit or deny traffic from specific IP addresses. The destination of the packet and the ports involved do not matter.

Here is an example:

access-list 10 permit 192.168.3.0 0.0.0.

This list allows traffic from all addresses in the range 192.168.3.0 to 192.168.3.

You can see how the last entry looks similar to a subnet mask, but with Cisco ACLs they use inverse subnet masks. Also realize that by default, there is an implicit deny added to every access list. If you entered the command: show access-list 10 The output would be:

access-list 10 permit 192.168.3.0 0.0.0. access-list 10 deny any

4. Extended IP Access Lists

Extended ACLs allow you to permit or deny traffic from specific IP addresses to a specific destination IP address and port. It also allows you to specify different types of traffic such as ICMP, TCP, UDP, etc. Needless to say, it is very grangular and allows you to be very specific. If you intend to create a packet filtering firewall to protect your network it is an Extended ACL that you will need to create.

Typically you would allow outgoing traffic and incoming initiated traffic. In other words, you want your users to be able to connect to web servers on the internet for browsing but you do not want anyone on the Internet to be able to connect to your machines. This will require 2 ACLs. One to only limit our users on the company network to only use a web browser (so this will block outgoing FTP, e-mail, Kazaa, napster, online gaming, etc.) The other access-list will only allow incoming traffic from the Internet that has been initiated from a machine on the inside. This is called an established connection. Let's see what our access list would look like for starters:

Assumptions: internal network: 63.36.9.

access-list 101 - Applied to traffic leaving the office (outgoing)

access-list 102 - Applied to traffic entering the office (incoming)

ACL 101 access-list 101 permit tcp 63.36.9.0 0.0.0.255 any eq 80

ACL 102 access-list 102 permit tcp any 63.36.9.0 0.0.0.255 established

  1. Rename the Router

To specify or modify the host name for the router, global configuration command HOSTNAME is used.

Hostname is case sensitive. The host name is used in prompts and default configuration filenames.

Router(config)# hostname How2Pass

The factory-assigned default host name is router.

Setting the System Clock

The system clock runs from the moment the system starts up and keeps track of the current date and time

based on Coordinated Universal Time (UTC), also known as Greenwich Mean Time (GMT). The system

Router(config)# line console 0

Router(config-line)# password How2pass

vty lines password

Virtual terminal lines (vty) are used to allow remote access to the router (by telneting through its interfaces).

The router has five virtual terminal lines by default.

Router(config)# line vty 0 4

Router(config-line)# password How2Pass

Setting Privileged Access Password

To set a local password to control access to various privilege levels, use the enable password global

configuration command. Use the no form of this command to remove the password requirement.

An enable password is defined as follows:

Must contain from 1 to 25 uppercase and lowercase alphanumeric characters.

Must not have a number as the first character.

Can have leading spaces, but they are ignored. However, intermediate and trailing spaces are recognized.

Router(config)# enable password How2Pass

Setting Secret (Encrypted) Password

To set an encrypted local password to control access to various privilege levels, use the enable secret global

configuration command. Use the no form of this command to remove the password requirement.

Router(config)# enable secret How2pass

Conclusion: Hence we have successfully studied router configuration with standard and extended access list.

FAQ:

  1. Differentiate between router and a switch?
  2. How do router route packets?
  3. What is a firewall, proxy server?

Assignment No. 4

Aim: Using a Network Simulator (e.g. packet tracer) Configure EIGRP – Explore Neighbor-ship Requirements and Conditions, its K Values Metrics Assignment and Calculation, RIPv2 and EIGRP on same network. WLAN with static IP addressing and DHCP with MAC security and filters

Objectives: To understand protocol used at different layers of network

Course Outcome achieved:

CO1: To know responsibilities, services offered, protocol used at network network layer, understand

different addressing techniques,networking commands and implement a small size network

CO4: To know the different wireless technologies and IEEE standards.

Theory:

Routing Information Protocol (RIP)

The Routing Information Protocol (RIP) is one of the oldest distance-vector routing protocols which employ the hop count as a routing metric. RIP prevents routing loops by implementing a limit on the number of hops allowed in a path from source to destination. The largest number of hops allowed for RIP is 15, which limits the size of networks that RIP can support.RIP implements the split horizon, route poisoning and holddown mechanisms to prevent incorrect routing information from being propagated.In RIPv1 router broadcast updates with their routing table every 30 seconds. In the early deployments, routing tables were small enough that the traffic was not significant. As networks grew in size, however, it became evident there could be a massive traffic burst every 30 seconds, even if the routers had been initialized at random times.

In most networking environments, RIP is not the preferred choice for routing as its time to converge and scalability are poor compared to EIGRP, OSPF.RIP uses the User Datagram Protocol (UDP) as its transport protocol, and is assigned the reserved port number 520

1)RIPv1 is Classful routing protocol and RIPv2 Classless routing protocol.

  1. In RIPv1, subnet masks are NOT included in the routing update and In RIPv2 Subnet masks are included in the routing update.

  2. RIPv2 multicasts the entire routing table to all adjacent routers at the address 224.0.0.9, as opposed to RIPv1 which uses broadcast (255.255.255.255). Unicast addressing is still allowed for special applications.

Configure RIP routing protocol

It requires only two steps to configure the RIP routing.

 Enable RIP routing protocol from global configuration mode.  Tell RIP routing protocol which networks you want to advertise.

Eg: Router0(config)#router rip