DCN Manual 2019
DCN Manual 2019
DCN Manual 2019
LABORATORY MANUAL
2020
Experiment-1
Aim: To study Cisco packet tracer.
Objectives:
1. Study Cisco packet tracer.
2. Design simple LAN.
This bar provides the File, Options, and Help menus. You will find basic
1 Menu Bar commands such as Open, Save, Print, and Preferences in these menus. You
will also be able to access the Activity Wizard from the File menu.
This bar provides shortcut icons to the File menu commands, including the
Activity Wizard. On the right, you will also find the Network Information
2 Main Tool Bar
button, which you can use to enter a description for the current network (or
any text you wish to include).
This bar provides access to these commonly used workspace tools: Select,
3 Common Tools Bar Move Layout, Place Note, Delete, Inspect, Add Simple PDU, and Add
Complex PDU.
Logical/Physical You can toggle between the Physical Workspace and the Logical Workspace
4
Workspace Bar with the tabs on this bar.
This area is where you will create your network, watch simulations, and view
5 Workspace
many kinds of information and statistics.
Realtime/Simulation You can toggle between Realtime Mode and Simulation Mode with the tabs
6
Bar on this bar.
This box is where you choose devices and connections to put onto the
Network Component
7 workspace. It contains the Device-Type Selection Box and the Device-
Box
Specific Selection Box.
This box contains the type of devices and connections available in Packet
Device-Type Selection
8 Tracer. The Device-Specific Selection Box will change depending on which
Box
type of devices you clicked.
Device-Specific This box is where you choose specifically which devices you want to put in
9
Selection Box your network and which connections to make.
User Created Packet This window manages the packets you put in the network during simulation
10
Window scenarios.
Repeat the same steps to connect all other devices to each other.
Click on PC0
Choose the Config tab. It is here that you can change the name of PC0. It is also here where you
would enter a Gateway IP Address, also known as the default gateway. This would be the IP address
of the local router.
Click on Desktop tab and then onto IP Configuration in order to configure the IP address and
subnet mask for PC0.
Conclusion:
Experiment-2
Data Communication Network | 6
L.D. College of Engineering EC Department
Repeat the same steps to connect all other devices to each other.
Click on PC0
Choose the Config tab. It is here that you can change the name of PC0. It is also here where you
would enter a Gateway IP Address, also known as the default gateway. This would be the IP address
of the local router.
Click on Desktop tab and then onto IP Configuration in order to configure the IP address and
subnet mask for PC0.
You can also configure the router through the IOS Command Line Interface by manually entering
the network commands.
Let’s have a look at some of the network commands that we use while configuring the router
manually.
To help the user keep track of what mode they are in, the command-line prompt changes each
time you enter a different mode. When you switch from unprivileged mode to privileged
mode(with help of enable command), the prompt changes from:
Router> enable
to
Router#
To configure any feature of the router, you must enter configuration mode. This is the first sub-
mode of the parent mode. In the parent mode, you issue the command config.
Router#config
Router(config)#
It is a good idea to name your router so that you can easily identify it. You do this in configuration
mode with the hostname command.
Router(config)#hostname ExampleName
ExampleName(config)#
To display the current state of the routing table, use the show ip route command in EXEC mode.
showip route [[ip-address [mask] [longer-prefixes]] | [protocol [process-id]]]
Data Communication Network | 10
L.D. College of Engineering EC Department
Router#showip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Single click on the second event’s Info box to view the Ethernet frame with the encapsulated
IPPacket and the encapsulated ICMP message “At Device” PC0.
The PDU (Protocol Data Unit) is displayed in three different formats, OSI Model, Inbound PDU
Details and OutboundPDU Details. View them.
Click on the Outbound PDU Details tab to see the protocol details including the layer 2
Ethernetframe, the layer 3 IP packet and ICMP message.
Single click on the second event’s Info box to view the Ethernet frame with the encapsulated
IPPacket and the encapsulated ICMP message “At Device” PC0.
The PDU (Protocol Data Unit) is displayed in three different formats, OSI Model, Inbound PDU
Details and OutboundPDU Details. View them.
Click on the Outbound PDU Details tab to see the protocol details including the layer 2
Ethernetframe, the layer 3 IP packet and ICMP message.
Conclusion:
Experiment-3
Aim:To study ICMP message using Ping Command.
Objectives:
1. To study ping command in command prompt.
2. To find the minimum size of data in ICMP packet for Ethernet.
ICMP differs in purpose from TCP and UDP in that it is not used to send and receive data between end
systems. It is usually not used directly by user network applications, with some notable exceptions being the
ping tool and tracert.
ICMP messages are constructed at the IP layer, usually from a normal IP datagram that has generated an
ICMP response. IP encapsulates the appropriate ICMP message with a new IP header (to get the ICMP
message back to the original sending host) and transmits the resulting datagram in the usual manner.
For example, every machine (such as intermediate routers) that forwards an IP datagram has to decrement
the time to live (TTL) field of the IP header by one; if the TTL reaches 0, an ICMP Time to live exceeded in
transit message is sent to the source of the datagram.Each ICMP message is encapsulated directly within a
single IP datagram, and thus, like UDP, ICMP is unreliable.
Although ICMP messages are contained within standard IP datagram, ICMP messages are usually processed
as a special case, distinguished from normal IP processing, rather than processed as a normal sub-protocol of
IP. In many cases, it is necessary to inspect the contents of the ICMP message and deliver the appropriate
error message to the application that generated the original IP packet, the one that prompted the sending of
the ICMP message.
Many commonly-used network utilities are based on ICMP messages. The tracert command is implemented
by transmitting UDP datagram with specially set IP TTL header fields, and looking for ICMP Time to live
exceeded in transit (above) and "Destination unreachable" messages generated in response. The related ping
utility is implemented using the ICMP "Echo request" and "Echo reply" message
Ping [-t] [-a] [-ncount] [-lsize] [-f] [-iTTL] [-vTOS] [-rcount] [-scount] [-wtimeout] [-R] [-Ssrcaddr] [-4] [-
6] target [/?]
-t = Using this option will ping the target until you force it to stop using Ctrl-C.
-a = this ping command option will resolve, if possible, the hostname of an IP address target.
-ncount = this option sets the number of ICMP Echo Request messages to send. If you execute the ping
command without this option, four requests will be sent.
-lsize = Use this option to set the size, in bytes, of the echo request packet from 32 to 65,527. The ping
command will send a 32 byte echo request if you don't use the -l option.
-f = Use this ping command option to prevent ICMP Echo Requests from being fragmented by routers
between you and the target. The -f option is most often used to troubleshoot Path Maximum Transmission
Unit (PMTU) issues.
-iTTL = this option sets the Time to Live (TTL) value, the maximum of which is 255.
-vTOS = this option allows you to set a Type of Service (TOS) value. Beginning in Windows 7, this option
no longer functions but still exists for compatibility reasons.
-rcount = Use this ping command option to specify the number of hops between your computer and the
target computer or device that you'd like to be recorded and displayed. The maximum value for count is 9 so
uses the tracert command instead if you're interested in viewing all hops between two devices.
-scount = Use this option to report the time, in Internet Timestamp format, that each echo request is received
and echo reply is sent. The maximum value for count is 4 meaning that only the first four hops can be time
stamped.
-wtimeout = Specifying a timeout value when executing the ping command adjusts the amount of time, in
milliseconds, that ping waits for each reply. If you don't use the -w option, the default timeout value is used
which is 4000, or 4 seconds.
-R = this option tells the ping command to trace the round trip path.
-4 = this forces the ping command to use IPv4 only but is only necessary if target is a hostname and not an
IP address.
-6 = this forces the ping command to use IPv6 only but as with the -4 option, is only necessary when pinging
a hostname.
Target= this is the destination you wish to ping, either an IP address or a hostname.
/?= Use the help switch with the ping command to show detailed help about the command's several options.
Note: The -f, -v, -r, -s, -j, and -k options work when pinging IPv4 addresses only. The -R and -S options
only work with IPv6.
Procedure:
ping 127.0.0.1
In the above example, I'm pinging 127.0.0.1, also called the IPv4 localhost IP address or IPv4 loopback IP
address, without options.
Using the ping command to ping 127.0.0.1 is an excellent way to test that Windows' network features are
working properly but it says nothing about your own network hardware or your connection to any other
computer or device. The IPv6 version of this test would be ping ::1.
ping -a LD
In this example I'm asking the ping command to find the IP address assigned to hostnameLD but otherwise
ping it as normal.
ping -t -6 server
In this example, I force the ping command to use IPv6 with the -6 option and continue to ping
SERVER indefinitely with the -t option.
Find the minimum size of data that can be carried by the Ethernet standard if ‘do not fragment’ bit is set.
Conclusion:
Experiment-4
Aim:To studytracert and arp commands in command prompt.
Objectives:
3. To study tracert command in command prompt.
4. To study arp command in command prompt.
Apparatus:Personal Computer, Command prompt
Theory:
Many commonly-used network utilities are based on ICMP messages. The tracert command is implemented
by transmitting UDP datagram with specially set IP TTL header fields, and looking for ICMP Time to live
exceeded in transit (above) and "Destination unreachable" messages generated in response. The related ping
utility is implemented using the ICMP "Echo request" and "Echo reply" message
The TRACERT diagnostic utility determines the route taken to a destination by sending Internet Control
Message Protocol (ICMP) echo packets with varying IP Time-To-Live (TTL) values to the destination. Each
router along the path is required to decrement the TTL on a packet by at least 1 before forwarding it, so the
TTL is effectively a hop count. When the TTL on a packet reaches 0, the router should send an ICMP Time
Exceeded message back to the source computer.
TRACERT determines the route by sending the first echo packet with a TTL of 1 and incrementing the TTL
by 1 on each subsequent transmission until the target responds or the maximum TTL is reached. The route is
determined by examining the ICMP Time Exceeded messages sent back by intermediate routers. Note that
some routers silently drop packets with expired TTLs and are invisible to TRACERT.
TRACERT prints out an ordered list of the routers in the path that returned the ICMP Time Exceeded
message. If the -d switch is used (telling TRACERT not to perform a DNS lookup on each IP address), the
IP address of the near- side interface of the routers is reported.
In the following example, the packet must travel through two routers (157.54.48.1 and 11.1.0.67) to get to
host 11.1.0.1. In this example, the default gateway is 157.54.48.1 and the IP address of the router on the
11.1.0.0 network is at 11.1.0.67.
C:\>tracert 11.1.0.1
1 2 ms 3 ms 2 ms 157.54.48.1
2 75 ms 83 ms 88 ms 11.1.0.67
3 73 ms 79 ms 93 ms 11.1.0.1
Trace complete.
The TRACERT command can be used to determine where a packet stopped on the network. In the following
example, the default gateway has determined that there is not a valid path for the host on 22.110.0.1. There
is probably a router configuration problem or the 22.110.0.0 network does not exist (a bad IP address).
C:\>tracert 22.110.0.1
Trace complete.
TRACERT is useful for troubleshooting large networks where several paths can be taken to arrive at the
same point, or where many intermediate systems (routers or bridges) are involved.
ARP
Displays and modifies entries in the Address Resolution Protocol (ARP) cache, which contains one or more
tables that are used to store IP addresses and their resolved Ethernet or Token Ring physical addresses.
There is a separate table for each Ethernet or Token Ring network adapter installed on your computer. Used
without parameters, arp displays help.
Syntax
arp [-a [InetAddr] [-N IfaceAddr]] [-g [InetAddr] [-N IfaceAddr]] [-d InetAddr [IfaceAddr]] [-
s InetAddrEtherAddr [IfaceAddr]]
Parameters
-a [InetAddr] [-N IfaceAddr] :
Displays current ARP cache table for all interfaces. To display the ARP cache entry for a specific IP
address, use arp -a with the InetAddr parameter, where InetAddr is an IP address. To display the ARP cache
table for a specific interface, use the -N IfaceAddr parameter where IfaceAddr is the IP address assigned to
the interface. The -Nparameter is case-sensitive.
-s InetAddrEtherAddr [IfaceAddr] : Adds a static entry to the ARP cache that resolves the IP
address InetAddr to the physical address EtherAddr. To add a static ARP cache entry to the table for a
specific interface, use the IfaceAddr parameter whereIfaceAddr is an IP address assigned to the interface.
Procedure:
TRACERT Syntax
There are several command-line switches that can be used with TRACERT, but they are usually not needed
for standard troubleshooting.
TRACERT syntax:
tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
Parameters:
-d
Specifies to not resolve addresses to host names.
-h maximum_hops
Specifies the maximum number of hops to search for target.
-j host-list
Specifies loose source route along the host-list.
-w timeout
Waits the number of milliseconds specified by timeout for each
reply.
target_name
Name or IP address of the target host.
You can use the -j option to force the outgoing datagram to pass through a specific router. To use the -j
option in this manner, use the IP source route option. For example, if you type tracert HostName, you find
that the used path is as follows:
* <router1>
* <router2>
* <router3>
* <router4>
* <hostname>
To find the path to router4 and back to the computer, type tracert -j <router4><MyComputer>.
The path to router4 and back to the computer is traced. In this example, the path is typically the following:
* <router1>
* <router2>
* <router3>
* <router4>
* <router3>
* <router2>
* <router1>
* <mycomputer>
tracert www.google.com
Using the tracert command as shown above, we're asking tracert to show us the path from the local computer
all the way to the network device with the hostname www.google.com.
In this example we can see that tracert identified fifteen network devices including our router
at 192.168.91.1 and all the way through to the target of www.google.com which we now know uses
the public IP address of 173.194.38.177.
tracert -d www.ldce.edu
In this final tracert command example, you can see that we are requesting the path to a website, this
time www.ldce.edu, but now we are preventing tracert from resolving hostnames by using the -d option.
As we can see, tracert did not resolve any hostnames this time which significantly sped up the process.
ARP
To display the ARP cache tables for all interfaces, type:
arp -a
To display the ARP cache table for the interface that is assigned the IP address 10.0.0.99, type:
arp -a -N 10.0.0.99
To add a static ARP cache entry that resolves the IP address 10.0.0.80 to the physical address 00-AA-00-4F-
2A-9C, type:
arp -s 10.0.0.80 00-AA-00-4F-2A-9C
Conclusion:
Data Communication Network | 29
L.D. College of Engineering EC Department
Experiment-5
Data Communication Network | 30
L.D. College of Engineering EC Department
Objectives:
1. To configure network of 4 LANs.
2. To compute static routing.
Apparatus:Personal Computer, Cisco Packet tracer 5.3.
Theory:
Static routing is not really a routing protocol. Static routing is simply the process of manually entering routes into a
device's routing table via a configuration file that is loaded when the routing device starts up. As an alternative,
these routes can be entered by a network administrator who configures the routes manually. Since these manually
configured routes don't change after they are configured (unless a human changes them) they are called 'static' routes.
Static routing also does not handle failures in external networks well because any route that is configured manually
must be updated or reconfigured manually to fix or repair any lost connectivity.
Figure:
Procedure:
Addressing Table
Router0>enable
Router0#config terminal
Router0(config)#interface FastEthernet 0/0
Router0(config-if)#ip address 74.125.10.1 255.0.0.0
Router0(config-if)#no shutdown
Router0(config-if)#exit
Router0(config)#interface Serial 0/1
Router0(config-if)#ip address 164.5.6.1 255.255.0.0
Router0(config-if)#no shutdown
Router0(config-if)#exit
Router0(config)#interface Serial 0/0
Router0(config-if)#ip address 172.10.1.1 255.255.0.0
Router0(config-if)#clock rate 64000
Router0(config-if)#no shutdown
In the same way, configure Router1, Router2 and Router 3 as well with the entries shown in addressing
table.
(2) In our network design, there are 8 networks and hence each router should have 8 different entries in its
routing table to be reachable to each and every device in the network. We can see the routing table of a
particular router with the help of show ip route command.
Data Communication Network | 32
L.D. College of Engineering EC Department
Router0#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - Periodic downloaded static route
As you can see here, instead of 8 entries, there are only 3 entries in the table, which are directly connected
to Router0.
For the rest of the 5 entries, we need to make static routes.
(3) Configuring static routes: Static routes can be configured with the help of following command:
Now, in order to configure the 5 static routes on Router0, go to CLI mode of Router 0 and perform
following steps:
Router0>enable
Router0#configure terminal
Router0(config)#interface Serial0/1
Router0(config)#ip route 192.168.1.0 255.255.255.0 164.5.6.2
Router0(config)#ip route 50.0.0.0 255.0.0.0 164.5.6.2
Router0(config)#ip route 125.0.0.0 255.0.0.0 172.10.1.2
Router0(config)#ip route 134.0.0.0 255.0.0.0 172.10.1.2
Router0(config)#ip route 10.0.0.0 255.0.0.0 172.10.1.2
Now, process show ip route command again on Router0 and you will be able to see 8 entries out of which 3
will be directly connected (C) and 5 will be static (S).
Router0#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
In the same way, configure static router for other routers as well.
(4) Now to check the connectivity across the routers, click on PC1 which is in network 74.0.0.0 and wants to
ping to PC4 which is in network 192.168.1.0 with two one more network in between the 2 PCS i.e.
164.5.0.0.
Conclusion:
Experiment-6
Routing Updates
RIP sends its complete routing table out to all active interfaces at regular intervals (every 30 seconds) and when the
network topology changes. When a router receives a routing update that includes changes to an entry, it updates its
routing table to reflect the new route. The metric value for the path is increased by one, and the sender is indicated as
the next hop. RIP routers maintain only the best route (the route with the lowest metric value) to a destination. After
updating its routing table, the router immediately begins transmitting routing updates to inform other network routers
of the change. These updates are sent independently of the regularly scheduled updates that RIP routers send.
Addressing Table
Host Interface IPAddress Subnet Mast Default
Router 0 FastEthernet0/0 74.125.10.1 255.0.0.0 Gateway
N/A
Serial 0/0 172.10.1.1 255.255.0.0 N/A
Serial 0/1 164.5.6.1 255.255.0.0 N/A
Router 2 FastEthernet0/0 10.10.1.1 255.0.0.0 N/A
Serial 0/0 134.10.1.1 255.255.0.0 N/A
Serial 0/1 172.10.1.2 255.255.0.0 N/A
Router 3 FastEthernet0/0 125.23.5.1 255.0.0.0 N/A
Serial 0/0 50.50.1.2 255.0.0.0 N/A
Serial 0/1 134.10.1.2 255.255.0.0 N/A
Router 1 FastEthernet0/0 192.168.1.1 255.255.255. N/A
Serial 0/0 164.5.6.2 0
255.255.0.0 N/A
Serial 0/1 50.50.1.1 255.0.0.0 N/A
PC0 NIC 74.125.10.2 255.0.0.0 74.125.10.1
PC1 NIC 74.125.10.3 255.0.0.0 74.125.10.1
PC2 NIC 10.10.1.2 255.0.0.0 10.10.1.1
PC3 NIC 10.10.1.3 255.0.0.0 10.10.1.1
Figure:
Instructions
1. Router 0 is connected to two networks i.e. 192.168.10.0 and 172.168.0.0. Hence, to configure RIP protocol,
the command used is “router rip” and then the networks that need to be connected to.
Router>enable
Router#configure terminal
Router(config)#router rip
Router0(config-router)#network 172.10.0.0
Router0(config-router)#network 165.5.0.0
Router0(config-router)#network 74.0.0.0
Router(config-router)#
Router(config-router)#exit
2. Do the same on 2nd router as well. Router 1 is connected to two networks i.e. 172.168.0.0 and 34.0.0.0.
Conclusion:
Experiment-7
Aim:ToConfigure a network with sub-netting along with DNS Server.
Objectives:
1. To perform sub-netting.
2. To configure DNS server.
Apparatus:Personal Computer, Cisco Packet tracer 5.3
Theory:
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 sub-networks, it allows you to create a network
of interconnecting sub-networks. Each data link on this network would then have a unique network/sub-network ID.
Any device, or gateway, connecting n networks/sub-networks has n distinct IP addresses, one for each network / sub-
network that it interconnects.
In order to subnet a network, extend the natural mask using some of the bits from the host ID portion of the address to
create a sub-network 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.00000000
255.255.255.224 - 11111111.11111111.11111111.11100000
----------------------------------------|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 (it is very important to remember this).
Note: There are two ways to denote these masks. First, since you are using three bits more than the "natural" Class C
mask, you can denote these addresses as having a 3-bit subnet mask. Or, secondly, the mask of 255.255.255.224 can
also be denoted as /27 as there are 27 bits that are set in the mask. This second method is used with CIDR. With this
method, one of these networks can be described with the notation prefix/length. For example, 204.17.5.32/27 denotes
the network 204.17.5.32 255.255.255.224.
In our network, we want to make 5 sub-networks, and hence we need minimum 2 3 = 8 sub-network scheme.
The network address taken into consideration is 192.168.10.0 and the default mask for this network is
255.255.255.0. Since, we want to make 8 sub-networks and hence we would be taking only 3 bits from the
net id for the subnet id as 23 = 8.
Also, the number of bits assigned now would be 24(net id) + 3(subnet id) + 5(host id).
Hence, /27 will be used to denote the ip address for the particular network.
Figure:
Procedure:
The addresses assigned to the sub networks should be in the range provided above.
The configuration is listed as shown below.
Addressing Table
Host Subnet Interface IPAddress Subnet Mast Default Gateway
Router 0 FastEthernet0 192.168.10.1 255.255.255.224 N/A
/0
FastEthernet0 192.168.10.40 255.255.255.224 N/A
/1
Ethernet0/0/0 12.10.78.2 255.0.0.0 N/A
Ethernet0/1/0 192.168.10.135 255.255.255.224 N/A
Ethernet0/2/0 192.168.10.100 255.255.255.224 N/A
Ethernet0/3/0 192.168.10.65 255.255.255.224 N/A
Router 4 FastEthernet0 12.10.78.3 255.0.0.0 N/A
/0
FastEthernet0 172.56.89.2 255.255.0.0 N/A
Router 2 /1
FastEthernet0 172.56.89.3 255.255.0.0 N/A
/0
FastEthernet0 75.67.10.2 255.0.0.0 N/A
Server1 /1
FastEthernet 192.168.10.91 255.255.255.0 192.168.10.64
DNS
PC0 1st NIC 192.168.10.12/27 255.255.255.224 192.168.10.1/27
The Domain Name System (DNS) is a standard technology for managing the names of Web sites and other Internet
domains. DNS technology allows you to type names into your Web browser like compnetworking.about.com and
your computer to automatically find that address on the Internet. A key element of the DNS is a worldwide collection
of DNS servers.
A DNS server is any computer registered to join the Domain Name System. A DNS server runs special-purpose
networking software, features a public IP address, and contains a database of network names and addresses for other
Internet hosts.
IP address lookup is the process of translating between IP addresses and Internet domain/computer names. Forward
IP address lookup converts an Internet name to an address. Reverse IP address lookup converts the number to the
name.
Several Internet services support both forward and reverse IP lookup for public addresses. On the Internet, these
services rely on the Domain Name System (DNS) and are known asDNS lookup and reverse DNS lookup services.
See the sidebar for locations of some popular DNS lookup sites.
Instructions
1. In any one of the subnet, set up a local DNS server, the local client will send requests to this DNS Server for
accessing the web address www.google.com which in turn will look up for the web address.
In the local DNS Server, we need to make a record for the web address that we are looking up to. Hence, the web
server’s address is 75.67.10.3.
(2) On the web server, we again need to make a record of the web address that we are accessing which is
www.google.com which is located at 100.1.100.1.
(3) On a local PC, in the same sub-network, where DNS Server is configured and provide the address of
DNS server on the local PC.
(4) Now go to the web browser of the local PC and type www.google.com and you will get the page that
has been made on the web server.
Conclusion:
PRACTICAL – 8
Data Communication Network | 43
L.D. College of Engineering EC Department
Objectives:
Theory:
The Internet is expanding at an exponential rate. As the amount of information and resources increases, it is
becoming a requirement for even the smallest businesses and homes to connect to the Internet. Network
Address Translation (NAT) is a method of connecting multiple computers to the Internet (or any other IP
network) using one IP address. This allows home users and small businesses to connect their network to the
Internet cheaply and efficiently.
The impetus towards increasing use of NAT comes from a number of factors:
A world shortage of IP addresses
Security needs
Ease and flexibility of network administration
The basic purpose of NAT is to multiplex traffic from the internal network and present it to the Internet as if
it was coming from a single computer having only one IP address.
In NAT terminology, the inside network is the set of networks that are subject to translation. The outside
network refers to all other addresses. Usually these are valid addresses located on the Internet. The following
list of NAT terms is defined:
Inside local address: The IPv4 address that is assigned to a host on the inside network. The inside
local address is likely not an IPv4 address assigned by the Network Information Center or service
provider.
Inside global address: A legitimate IPv4 address assigned by the NIC or service provider that
represents one or more inside local IPv4 addresses to the outside world.
Outside local address: The IPv4 address of an outside host as it appears to the inside network. Not
necessarily legitimate, the outside local address is allocated from a routable address space on the
inside.
Outside global address: The IPv4 address that is assigned to a host on the outside network by the
host owner. The outside global address is allocated from a globally routable address or network
space.
STATIC NAT
In static NAT, the computer with the IP address of 192.168.32.10 will always translate to 213.18.123.110
Addressing Table
Host Interface IPAddress Subnet Mast Default Gateway
Router 0 FastEthernet0/0 10.1.1.1 255.0.0.0 N/A
NAT Router (Inside local)
FastEthernet0/1 192.168.10.2 255.255.255.0 N/A
(Inside global)
Router 1 FastEthernet0/0 192.168.10.3 255.255.255.0 N/A
FastEthernet0/1 34.34.5.6 255.0.0.0 N/A
PC0 NIC 10.1.1.2 255.0.0.0 10.1.1.1
PC1 NIC 10.1.1.3 255.0.0.0 10.1.1.1
Server0 NIC 34.34.5.7 255.0.0.0 34.34.5.6
DYNAMIC NAT
Dynamic NAT is similar to static NAT in that the NAT router creates a one-to-one mapping between an inside
local and inside global address and changes the IP addresses in packets as they exit and enter the inside network.
However, the mapping of an inside local address to an inside global address happens dynamically. Dynamic NAT
accomplishes this by setting up a pool of possible inside global addresses and defining criteria for the set of inside
local IP addresses whose traffic should be translated with NAT.
With dynamic NAT, you can configure the NAT router with more IP addresses in the inside local address list than
in the inside global address pool. When the number of registered public IP addresses is defined in the inside global
address pool, the router allocates addresses from the pool until all are allocated. If a new packet arrives, and it
needs a NAT entry, but all the pooled IP addresses are already allocated, the router discards the packet. The user
must try again until a NAT entry times out, at which point the NAT function works for the next host that sends a
packet. This can be overcome through the use of Port Address Translation (PAT).
Procedure:
1. Establish static translation between an inside local address and an inside global address.
Enter the no ipnat inside source static global command to remove the static source translation.
Router(config-if)#ipnat inside This means that we are specifying FastEthernet 0/0 having
network id 10.0.0.0 as the inside local network or private network.
6. Use the command show ipnat translations in EXEC mode to display active translation information.
Router#showipnat translations
Addressing Table
Host Interface IPAddress Subnet Mast Default Gateway
R1 FastEthernet0/0 192.168.1.7 255.255.255.0 N/A
NAT Router
FastEthernet0/1 202.96.1.1 255.255.255.0 N/A
Goal: Visualize how to configure dynamic NAT and see its effect on ping.
Topology: H1 and H2 are in the inside network. Their gateway is R1. R2 is located in the outside network.
Steps: 1) Configure dynamic NAT at R1. The public address pool contains one address
2) H1 ping R2. Ping's source address and Echo's destination address are mapped by NAT.
3) View NAT translation table and statistics to see the effect of ping on NAT.
STEPS
1. Define a pool of global addresses to be allocated as needed.
Enter the no ipnat pool global command to remove the pool of global addresses.
2. Define a standard access control list (ACL) that permits the addresses that are to be translated.
Enter the no access-list access-list-number global command to remove the ACL.3. Mark the interface as
connected to the inside.
3. Establish dynamic source translation, specifying the ACL that was defined in the prior step.
// Map inside adresses allowed by ACL to addresses from the address pool.
Enter the no ipnat inside source global command to remove the dynamic source translation.
R1(config-if)#ipnat outside
An ICMP flow is record from the Ping/Echo traffic. NAT describes how to map addresses for packets
belong to this flow.
CONCLUSION:
Practical-09
AIM:To Configuration of frame relay& Wireless LAN using access point and wireless
router.
Objectives:
Theory:
A) Frame Relay is a protocol standard for LAN internetworking which provides a fast and efficient method
of transmitting information from a user device to LAN bridges and routers.
The Frame Relay protocol uses a frame structured similar to that of LAPD, except that the frame header is
replaced by a 2-byte Frame Relay header field. The Frame Relay header contains the user-specified DLCI
field, which is the destination address of the frame. It also contains congestion and status signals which the
network sends to the user.
These two factors make Frame Relay a desirable choice for data transmission; however, they also necessitate
testing to determine that the system works properly and that data is not lost.
B) A wireless access point connects wireless clients to the wired LAN. Its job is to convert the TCP/IP data
packets from their 802.11 frame encapsulation format in the air to the 802.3 Ethernet frame format on the
wired Ethernet network. Wireless clients must associate with an access point to join the 802.11 network and
obtain network services. It is similar to the plugging in to a wired LAN. Access point oversees a DCF called
CSMA/CA. This simply means that devices on WLAN must wait until the medium is free before sending. If
an access point receives data from a client station, it sends an acknowledgement to the client that the data
has been received. This acknowledgement keeps the client from assuming that a collision occurred and
prevents a data retransmission by the client. If two clients are at the maximum range to reach the access
point, they will not be able to reach each other. So neither of those stations senses the other on the medium,
and they may end up transmitting simultaneously.
This practical covers how to configure an access point in packet tracer. Given is the network topology
designed in the practical. Packet tracer has two wireless devices that may be added to networking scenarios.
Procedure:
A.
The following topology is designed for the practical.
Router(config)#interface fa0/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#exit
Router(config-if)#ip address 200.0.0.1 255.255.255.0
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 20.0.0.0
Router(config-router)#network 200.0.0.0
In the configuration tab, enter the DLCI for the serial communications from routers sequentially.
Router(config-if)#encapsulation frame-relay
Similarly, follow this step for router-1 and router-2.
B.
Packet tracer has two wireless devices that may be added to networking scenarios.
Set the IPv6 settings of the device from config tab as auto config as shown in the figure.
Mention the channel name which is provided in the access point in the SSID field of the
wireless interface.
Step-02: The router and the end devices can be configured as the devices used in other networks.
Conclusion:
Experiment-10
Aim:Implement the data link layer framing methods.
Objectives:
1. Implement the data link layer framing method, bit stuffing.
2. Implement the data link layer framing method, character stuffing.
Apparatus:Personal Computer, Turbo C
Theory:
The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. Our
postal system practices a type of framing. The simple act of inserting a letter into an envelope separates one
piece of information from another; the envelope serves as the delimiter.
The new technique allows data frames to contain an arbitrary number if bits and allows character codes with
an arbitrary no of bits per character. Each frame begins and ends with special bit pattern, 01111110, called a
flag byte. Whenever the sender’s data link layer encounters five consecutive ones in the data, it
automatically stuffs a 0 bit into the outgoing bit stream. This bit stuffing is analogous to character stuffing,
in which a DLE is stuffed into the outgoing character stream before DLE in the data.
The framing method gets around the problem of resynchronization after an error by having each frame start
with the ASCII character sequence DLE STX and the sequence DLE ETX. If the destination ever losses the
track of the frame boundaries all it has to do is look for DLE STX or DLE ETX characters to figure out. The
data link layer on the receiving end removes the DLE before the data are given to the network layer. This
technique is called character stuffing
Procedure:
A) ALGORITHM:
Begin
Step 1: Read frame length n
Step 2: Repeat step (3 to 4) until i<n(: Read values in to the input frame (0’s and 1’s) i.e.
Step 3: initialize I i=0;
Step 4: read a[i] and increment i
Step 5: Initialize i=0, j=0,count =0
Step 6: repeat step (7 to 22) until i<n
Step 7: If a[i] == 1 then
Step 8: b[j] = a[i]
Step 9: Repeat step (10 to 18) until (a[k] =1 and k<n and count <5)
Step 10: Initialize k=i+1;
Step 11: Increment j and b[j]= a[k];
Step 12: Increment count;
Step 13: if count =5 then
Step 14: increment j,
Step 15: b[j] =0
Step 16: end if
Step 17: i=k;
Step 18: increment k
Step 19: else
Step 20: b[j] = a[i]
Step 21: end if
Step 22: increment I and j
Step 23: print the frame after bit stuffing
Step 24: repeat step (25 to 26) until i< j
Step 25: print b[i]
Step 26: increment i
End
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int a[20],b[30],i,j,k,count,n;
clrscr();
printf("Enter frame length:");
scanf("%d",&n);
printf("Enter input frame (0's & 1's only):");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
i=0; count=1; j=0;
while(i<n)
{
if(a[i]==1)
{
b[j]=a[i];
for(k=i+1;a[k]==1 && k<n && count<5;k++)
{
j++;
b[j]=a[k];
count++;
if(count==5)
{
j++;
b[j]=0;
}
i=k;
}}
else
{
b[j]=a[i];
}
i++;
j++;
}
printf("After stuffing the frame is:");
for(i=0;i<j;i++)
printf("%d",b[i]);
getch();
}
OUTPUT:
B) ALGORITHM:
Begin
Step 1: Initialize I and j as 0
Step 2: Declare n and pos as integer and a [20],b [50],ch as character
Step 3: read the string a
Step 4: find the length of the string n, i.e n-strlen(a)
Step 5: read the position, pos
Step 6: if pos> n then
Step 7: print invalid position and read again the position, pos
Step 8: end if
Step 9: read the character, ch
Step 10: Initialize the array b, b[0…5] as ’d’, ’l’, ’e’, ’s’ ,’t’ ,’x’respectively
Step 11: j=6;
Step 12: Repeat step[(13to22) until i<n
Step 13: if i==pos-1 then
Step 14: initialize b array,b[j],b[j+1]…b[j+6] as‘d’, ‘l’, ‘e’ ,’ch, ’d’, ‘l’,‘e’respectively
Step 15: increment j by 7, i.e j=j+7
Step 16: end if
Step 17: if a[i]==’d’ and a[i+1]==’l’ and a[i+2]==’e’ then
Step 18: initialize array b, b[13…15]=’d’, ‘l’, ‘e’ respectively
Step 19: increment j by 3, i.e j=j+3
Step 20: end if
Step 21: b[j]=a[i]
Step 22: increment I and j;
Step 23: initialize b array,b[j],b[j+1]…b[j+6] as‘d’, ‘l’,‘e’ ,’e’,‘t’, ‘x’,‘\0’respectively
Step 24: print frame after stiuffing
Step 25: print b
End
SOURCE CODE:
//PROGRAM FOR CHARACTER STUFFING
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<process.h>
void main()
{
int i=0,j=0,n,pos;
char a[20],b[50],ch;
clrscr();
printf("enter string\n");
scanf("%s",&a);
n=strlen(a);
printf("enter position\n");
scanf("%d",&pos);
if(pos>n)
{
printf("invalid position, Enter again :");
scanf("%d",&pos);
}
printf("enter the character\n");
ch=getche();
b[0]='d';
b[1]='l';
b[2]='e';
b[3]='s';
b[4]='t';
b[5]='x';
j=6;
while(i<n)
{
if(i==pos-1)
{
b[j]='d';
b[j+1]='l';
b[j+2]='e';
b[j+3]=ch;
b[j+4]='d';
b[j+5]='l';
b[j+6]='e';
j=j+7;
}
if(a[i]=='d' && a[i+1]=='l' && a[i+2]=='e')
{
b[j]='d';
b[j+1]='l';
b[j+2]='e';
j=j+3;
}
b[j]=a[i];
i++;
j++;
}
b[j]='d';
b[j+1]='l';
b[j+2]='e';
b[j+3]='e';
b[j+4]='t';
b[j+5]='x';
b[j+6]='\0';
printf("\nframe after stuffing:\n");
printf("%s",b);
getch();
}
OUTPUT:
Conclusion:
Experiment-11
Aim:To implement Dijktra’s algorithm using ‘C’ language to find the shortest path
within a subnet.
Theory:
Dijkstra's algorithm is a graph search algorithm that solves the single-source shortest path problem for a
graph with nonnegative edge path costs, producing a shortest path tree. This algorithm is often used in
routing and as a subroutine in other graph algorithms.
For a given source vertex (node) in the graph, the algorithm finds the path with lowest cost (i.e. the shortest
path) between that vertex and every other vertex. It can also be used for finding costs of shortest paths from
a single vertex to a single destination vertex by stopping the algorithm once the shortest path to the
destination vertex has been determined. For example, if the vertices of the graph represent cities and edge
path costs represent driving distances between pairs of cities connected by a direct road, Dijkstra's algorithm
can be used to find the shortest route between one city and all other cities. As a result, the shortest path first
is widely used in network routing protocols, most notably IS-IS and OSPF (Open Shortest Path First).
Let the node at which we are starting be called the initial node. Let the distance of node Y is the distance
from the initial node to Y. Dijkstra's algorithm will assign some initial distance values and will try to
improve them step by step.
1. Assign to every node a tentative distance value: set it to zero for our initial node and to infinity for all
other nodes.
2. Mark all nodes unvisited. Set the initial node as current. Create a set of the unvisited nodes called the
unvisited set consisting of all the nodes except the initial node.
3. For the current node, consider all of its unvisited neighbors and calculate their tentative distances.
For example, if the current node A is marked with a tentative distance of 6, and the edge connecting
it with a neighbor B has length 2, then the distance to B (through A) will be 6+2=8. If this distance is
less than the previously recorded tentative distance of B, then overwrite that distance. Even though a
neighbor has been examined, it is not marked as "visited" at this time, and it remains in the unvisited
set.
4. When we are done considering all of the neighbors of the current node, mark the current node as
visited and remove it from the unvisited set. A visited node will never be checked again; its distance
recorded now is final and minimal.
5. If the destination node has been marked visited (when planning a route between two specific nodes)
or if the smallest tentative distance among the nodes in the unvisited set is infinity (when planning a
complete traversal), then stop. The algorithm has finished.
6. Set the unvisited node marked with the smallest tentative distance as the next "current node" and go
back to step 3.
Data Communication Network | 66
L.D. College of Engineering EC Department
Procedure:
Pseudocode
In the following algorithm, the code u := vertex in Q with smallest dist[], searches for the vertex u in the
vertex set Q that has the least dist[u] value. That vertex is removed from the set Q and returned to the user.
Distance between(u, v) calculates the length between the two neighbor-nodes u and v. The variable alt on
lines 20 & 22 is the length of the path from the root node to the neighbor node v if it were to go through u. If
this path is shorter than the current shortest path recorded for v, that current path is replaced with this alt
path. The previous array is populated with a pointer to the "next-hop" node on the source graph to get the
shortest route to the source.
functionDijkstra(Graph, source):
for each vertex v in Graph: // Initializations
dist[v] := infinity ; // Unknown distance function from
// source to v
previous[v] := undefined ; // Previous node in optimal path
end for// from source
Conclusion:
Experiment-12
Aim: To study encryption and decryption.
Theory:
In cryptography, encryption is the process of encoding messages (or information) in such a way that
eavesdroppers or hackers cannot read it, but that authorized parties can. In an encryption scheme, the
message or information is encrypted using an encryption algorithm, turning it into an unreadable cipher text.
This is usually done with the use of anencryption key, which specifies how the message is to be encoded.
Any adversary that can see the ciphertext should not be able to determine anything about the original
message. An authorized party, however, is able to decode the ciphertext using a decryptionalgorithm that
usually requires a secret decryption key that adversaries do not have access to. For technical reasons, an
encryption scheme usually needs a key-generation algorithm, to randomly produce keys.
There are two basic types of encryption schemes: private-key encryption and public-key encryption. In
private-key schemes, the encryption and decryption keys are the same. Thus communicating parties must
agree on a secret key before they wish to communicate. By contrast, in public-key schemes, the encryption
key is public: that is, anyone (friend or foe) has access to the encryption key, and can encrypt messages.
However only the receiving party has access to the decryption key and thus is the only one capable of
reading the encrypted messages. Public-key encryption is a relatively recent invention: historically, all
encryption schemes have been private-key schemes.
Encryption has long been used by militaries and governments to facilitate secret communication. It is now
commonly used in protecting information within many kinds of civilian systems. For example, the Computer
Security Institute reported that in 2007, 71% of companies surveyed utilized encryption for some of their
data in transit, and 53% utilized encryption for some of their data in storage.Encryption can be used to
protect data "at rest", such as files on computers and storage devices (e.g. USB flash drives). In recent years
there have been numerous reports of confidential data such as customers' personal records being exposed
through loss or theft of laptops or backup drives. Encrypting such files at rest helps protect them should
physical security measures fail. Digital rights management systems which prevent unauthorized use or
reproduction of copyrighted material and protect software against reverse engineering are another somewhat
different example of using encryption on data at rest.
Encryption is also used to protect data in transit, for example data being transferred via networks (e.g.
the Internet, e-commerce),mobile telephones, wireless microphones, wireless
intercom systems, Bluetooth devices and bank automatic teller machines. There have been numerous reports
of data in transit being intercepted in recent years. Encrypting data in transit also helps to secure it as it is
often difficult to physically secure all access to networks.
Encryption, by itself, can protect the confidentiality of messages, but other techniques are still needed to
protect the integrity and authenticity of a message; for example, verification of a message authentication
code (MAC) or a digital signature. Standards andcryptographic software and hardware to perform
encryption are widely available, but successfully using encryption to ensure security may be a challenging
problem. A single slip-up in system design or execution can allow successful attacks. Sometimes an
adversary can obtain unencrypted information without directly undoing the encryption.
Digital signature and encryption must be applied at message creation time (i.e. on the same device it has
been composed) to avoid tampering. Otherwise any node between the sender and the encryption agent could
potentially tamper it. It should be noted that encrypting at the time of creation only adds security if the
encryption device itself has not been tampered with.
main()
{
int
key,i,f=0;
char *str;
clrscr();
printf("Enter String to be Encrypted: ");
gets(str);
printf("Enter Cipher key : ");
scanf("%d",&key);
follow:
for(i=0;i<strlen(str);i++)
{
str[i]=str[i]^key;
}
if(f==0)
{
printf("\nEncrypted String is %s",str);
getch();
f=1;
goto follow;
}
printf("\nDecrypted String is %s",str);
getch();
}
#include<stdio.h>
#include<conio.h>
void
main()
{
int
i,j,len,c,d,f=0;
char *str;
clrscr();
printf("Enter the string to be Transposed :");
gets(str);
len=strlen(str);
c=len/2;
if(len%2==1)
goto odd;
else
goto even;
odd: c++;
even: cont:
for(i=0;i<len/2;i++)
{
if(i%2 == 0)
{
d=str[i];
str[i]=str[i+c];
str[i+c]=d;
}
else
{
d=str[i];
str[i]=str[len-i-1];
str[len-i-1]=d;
}
}
if(f==0)
{
printf("\nTransposed String is %s",str);
getch();
}
}
Output:
CONCLUSION: