0% found this document useful (0 votes)
50 views

CN - 1 Sample Lab Programs

The document discusses configuring a DHCP server to automatically assign IP addresses to systems on a network. It explains that a DHCP server allows computers to request IP addresses and network settings from a central server rather than requiring static configuration of each system. Instructions are provided for setting up a DHCP server and assigning IP addresses to a PC from the DHCP pool.

Uploaded by

kannanperu123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

CN - 1 Sample Lab Programs

The document discusses configuring a DHCP server to automatically assign IP addresses to systems on a network. It explains that a DHCP server allows computers to request IP addresses and network settings from a central server rather than requiring static configuration of each system. Instructions are provided for setting up a DHCP server and assigning IP addresses to a PC from the DHCP pool.

Uploaded by

kannanperu123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Department of Information Science and Engineering

LAB PROGRAMS FOR COMPUTER NETWORKS-1

DNS server configuration in Packet Tracer


A Domain Name Service(DNS) server resolves host names into IP addresses. Although we can
access a network host using its IP address, DNS makes it easier by allowing us use domain
names which are easier to remember. For example its much easier to access google website by
typing http://www.google.com as compared to typing http://208.117.229.214. In either case,
you’ll access google website, but using domain name is obviously easier.

Now, before any host can use a DNS service, we must configure a DNS server first. For
example, when you type the URL http://www.google.com in your browser, the host will query
the DNS server for the IP address of http://www.google.com. The DNS server will
resolve http://www.google.com into an IP address then answer back the host with the IP
address.

An HTTP server is a web server. It stores web resources that can be accessed by a web
client. Your PC’s browser(a web client) requests for web resources from a web server over
the internet.Web resources are files such as text and images that the server will give to the
client on request.
Configuration of PC

Configuration of Web Server


Configuration of DNS Server
Demo of TCP and HTTP using Cisco packet tracer

1.Use Simulation Mode Select the PC with IP Address 192.168.1.3 . Click on the webBrowser and
type 192.168.2.2 . Show the Demo of TCP by right clicking on the Envelop. Note down the values at
every Layer.

PDU information at Web server

Demo of UDP with DNS

1. At the same PC in Simulation mode select web Browser and type bmsce.in
2. Show the demo of UDP with DNS

3. At the DNS Server


Note down the output at each level with neat explanation.
Network Address Translation

Design a network that provides a pool of private IP addresses at each LANs. The LAN s in

turn connected to a WAN Gate way Router with a pubic IP address provided by ISP.

For a computer to communicate with the Internet as a whole, it must have an IP address. Using
the IPv4 system, these are unique, 32-bit numbers that are broken up into four different binary
octets. It doesn’t matter whether it’s a server, or a computer, or an Xbox. If it doesn’t have an
IP address, it’s not getting online.
But, there simply isn’t enough IP addresses to go around to give each host their own address.
So, in order to make better use of the extremely limited address space available, we use
Network Address Translation.
Network Address Translation allows a single device to sit between a local area network and
the Internet, and forward traffic to the appropriate host. You probably know this as your router.
The advantage of this is multiple computers can share the same IP public address.
This single device (usually a router, switch, or hardware firewall) modifies IP packet headers
on the fly, ensuring that the contents of the packet get to the intended destination. However, it
comes with a downside, as it becomes exponentially harder for hosts outside the local network
to communicate with servers that are located behind the router.
There are multiple ways in which Network Address Translation can work, with the three of the
most common being Dynamic NAT, Static NAT, and Overloading.

1) Dynamic NAT
With Dynamic NAT, a router will maintain a list of public IP addresses. When a host behind
the network needs to transmit or receive, the router will select one of the public IP addresses
that is not currently in use, and forward any packets accordingly. As a result, this means a
host’s IP address can change at any given moment.
But crucially, it means a large pool of hosts can share a significantly smaller pool of IP
addresses. This was vital, given the impending exhaustion of the available pool of IPv4
addresses.

2) Overloading (PAT)
A common way of performing network address translation is through something called
‘Overloading’, where multiple internal IP addresses are mapped to a single public IP address.
This is done by giving each internal host a corresponding port. For instance, suppose you’ve
got three computers on an internal network, and a public IP address of 212.18.123.123. Each
of those internal computers could theoretically be accessible via 212.18.123.123:2001,
212.18.123.123:2002 and 212.18.123.123:2003.
This is commonly known as Port Address Translation (PAT), Single-Address NAT, and port-
level multiplexed NAT.

3) Static NAT
Finally, let’s talk about Static NAT.
Internal networks, like your home or office network, do not use the same IP addressing system
that’s used on the public Internet. Any networked device effectively has two IP addresses. The
first is a private one, and that’s only reachable from within that network. The second is the one
that’s externally accessible.
Static NAT makes it possible to create a direct, one-to-one link between a private IP address
and a static, public IP address.

Dynamic Network Address Translation


Step 1: Draw the topology as shown below

Configure the devices with the IP address as shown in above figure.

Step 2: Configure the router 0 as below


• Click on the router 0
• Select CLI
• Execute the following commands

Router>enable
Router#configure terminal
Router(config)#interface fastethernet 0/0
Router(config)#ip nat inside
Router(config)#interface fastethernet 0/1
Router(config)#ip nat outside
Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)#ip nat pool public-ips 117.45.23.2 117.45.23.5 netmask 255.255.255.0
Router(config)#ip nat inside source list 1 pool public-ips overload

Step 3: Ping from PC2 to Router 1 and check the NAT table
To see NAT table select inspect tool at right side and click on router 0 then select NAT table.
Step 1: Design the network as shown in the figure.

Step 2: To configure the routers use the Console.

Procedure to Configure the Router Using Console

1. Connect PC and Router using Console Cable.


2. PC using RS232C and Router to Console Port.
3. Click on PC
4. Select Terminal. Click OK. Now the PC will be used to configure the Router.
Step 3: configure two ports fast0/0 and fast1/0

Step 4: Configure Default Gateway of Router – Gateway Router

Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shut

Router#enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa1/0
Router(config-if)#ip add 117.45.23.2 255.255.255.0
Router(config-if)#no shut
Step 5: configure NATing at Gate way Router

Router(config-if)#interface fastEthernet 0/0


Router(config-if)#ip nat inside
Router(config-if)#exit

Router(config-if)#interface fastEthernet 0/0


Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#interface fastEthernet 1/0
Router(config-if)#ip nat outside
Router(config-if)#access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)#ip nat inside source list 1 interface fastEthernet 1/0 overload
Router(config)#
Step 7: Click on PC3 and configure the ports fast0/0

Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip add 117.45.23.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#
Step 8: Ping PC to ISP Router and check the nat table
Router#enable
Router#show ip nat translations
Department of Information Science and Engineering
LAB PROGRAMS FOR COMPUTER NETWORKS-1

DHCP Server:- The DHCP (Dynamic Host Configuration Protocol) is a network protocol
used to assign IP automatically to the systems with the help of a machine called DHCP server.
A DHCP Server allows computers to request an IP address and networking parameters
automatically. If you do not have a DHCP Server to configure IP addresses automatically to
the PCs then you need to assign a static or manual IP address on the Computers. So in simple
words, we can say that DHCP Server is only used for assigning the IP addresses to the Systems
automatically.
Configuration of DHCP Server

Assign IP address to the PC

You might also like