Uploaded by 16F-8206 Ali Shahzad

16F-8206 Ali Shahzad 8R Assignment#1

advertisement
Name: Ali Shahzad
Roll No.: 16F-8206.
Course: Computer Networking
Section: 8R
Assignment#1
Question#1
Write down the comprehensive description about different Cisco Router modes. Also describe all the
permissions/commands available in its different modes. (You must know at least user mode, privilege
mode and global configuration commands description)
Ans:
A router is a layer 3 device used to forward packet from one network to another. It forwards the packet
through one of its port based on destination IP address and the entry in the routing table. By using
routing table, it finds an optimized path between the source and destination network.
Let us discuss about Cisco router different modes.
Modes of router
There are mainly 3 modes in router:
1. User execution mode
As soon as the interface up message appears and press enter, the router> prompt will pop up.
This is called user execution mode. This mode is limited to some monitoring commands.
2. Privileged mode
As we type enable to user mode, we enter Privileged mode where we can view and change the
configuration of router. Different commands like show running-configuration, show IP interface
brief etc. can run on this mode which are used for troubleshooting purpose.
3. Global configuration mode
As we type configure terminal to the user mode, we will enter the global configuration mode.
Commands enter in these modes are called global commands and they affect the runningconfiguration of the router. In this mode, different configuration like making local database on
router by providing username and password, can set enable and secret password etc.
Commands with Description
User Mode Commands
1.
2.
3.
4.
show running-config – displays current router configuration for the router.
show startup-config – displays the startup configuration for the router.
reload – restarts the router. Discards running configuration and reloads startup configuration.
copy running-config startup-config – saves the current configuration to NVRAM. The new
configuration takes effect after the router is rebooted.
5. show ip route – displays the contents of the routing table.
6. clear ip route – deletes all routing table entries.
7. show interfaces – displays information about all network interfaces.
Privilege Mode Commands
1.
2.
3.
4.
ip routing – enables IP forwarding.
no ip routing – disables IP forwarding and deletes content of routing table.
ip route-cache – enables route caching (default mode)
no ip route-cache – disables route caching.
5. ip route ipDestinationAddr subnetmask gw_address – adds a static route to the routing
table. gw_address is the IP address of the default gateway (next hop router)
6. ip route ipDestinationAddr subnetmask Interface – like above, but Interface is the network interface
name.
7. no ip route ipDestinationAddr subnetmask gw_address – deletes route table entry.
8. no ip route ipDestinationAddr subnetmask Interface – deletes route table entry.
Global Configuration Commands
1. ip route 10.21.0.0 255.255.0.0 10.11.1.4 – this command adds a route to the routing table for
network 10.21.0.0 with subnet mask 255.255.0.0. 10.11.1.4 is the default gateway (next hop
router) address.
2. ip route 0.0.0.0 0.0.0.0 10.0.4.4 – this command adds 10.0.4.4 as a default gateway.
Selected Interface Configuration Mode Commands
1. no shutdown – enables network interface.
2. shutdown – disables network interface.
3. ip address IPaddress netmask – Sets the IP address and subnet mask for an interface.
Question#2
What is an IP address, its classes, subnet masking/subnetting and Gateways? Give a detailed
description of all these concepts. (You must learn that how to assign an IP for any given class,
how to formulate a subnet mask for corresponding IP and how Gateways are assigned for
different IPs in a network.)
Ans:
IP (Internet Protocol) Address is an address of your network hardware. It helps in connecting your
computer to other devices on your network and all over the world. An IP Address is made up of numbers
or characters.
All devices that are connected to an internet connection have a unique IP address which means there is
a need of billions of IP addresses. This requirement is fulfilled by the new IP version IPv6.
There are two IP versions: IPv4 and IPv6. IPv4 is the older version which has a space of over 4 billion IP
addresses. However, the new IPv6 version can provide up to trillions of IP addresses to fulfill the need of
all internet users and devices.
The IPv4 version used to configure IP addresses in numerical value (numbers) which may conflict with
other IP addresses. That is why IPv6 adopted the hexadecimal method to provide unique IP addresses to
billions of users in the world.
There are a few types of IP addresses like private IP addresses, public IP addresses, static IP addresses
and dynamic IP addresses. Let us talk about these different types of IP addresses one by one:
Private IP Address
A private IP address is the address of your device connected on the home or business network. If you
have a few different devices connected to one ISP (Internet Service Provider), then all your devices will
have a unique private IP address. This IP address cannot be accessed from devices outside your home or
business network. For example: 192.168.1.1
Private IP addresses are not unique because there are limited number of devices on your network.
Public IP Address
Your public IP address is the main IP address to which your home or business network is connected. This
IP address connects you to the world, and it is unique for all users.
Static and Dynamic IP Addresses
All private and public IP addresses can be either static or dynamic. IP addresses that you configure
manually and fix them to the network of your device are called static IP addresses. Static IP addresses
cannot change automatically.
The dynamic IP address configures automatically and assign an IP to your network when you set up the
router with internet. This distribution of IP addresses is managed by Dynamic Host Configuration
Protocol (DHCP). DHCP can be your internet router that assigns an IP address to your network in your
home or business environment.
Subnet Masking
A subnet mask is a 32-bit number created by setting host bits to all 0s and setting
network bits to all 1s. In this way, the subnet mask separates the IP address into the
network and host addresses.
The “255” address is always assigned to a broadcast address, and the “0” address is
always assigned to a network address. Neither can be assigned to hosts, as they are
reserved for these special purposes.
The IP address, subnet mask and gateway or router comprise an underlying structure—
the Internet Protocol—that most networks use to facilitate inter-device communication.
When organizations need additional subnet working, subnetting divides the host
element of the IP address further into a subnet. The goal of subnet masks is simply to
enable the subnetting process. The phrase “mask” is applied because the subnet mask
essentially uses its own 32-bit number to mask the IP address.
Subnetting is the technique for logically partitioning a single physical network into
multiple smaller sub-networks or subnets.
Subnetting enables an organization to conceal network complexity and reduce network
traffic by adding subnets without a new network number. When a single network
number must be used across many segments of a local area network (LAN), subnetting
is essential.
The benefits of subnetting include:



Reducing broadcast volume and thus network traffic
Enabling work from home
Allowing organizations to surpass LAN constraints such as maximum number of
hosts.
Class
Leading
bits
Size
of network
number bit
field
Size
of rest
bit
field
Number
of networks
Number of
addresses
per network
A
0
8
24
128 (27)
16777216 (224) 0.0.0.0
127.255.255.25
5
B
10
16
16
16384 (214)
65536 (216)
128.0.0.0
191.255.255.25
5
C
110
24
8
2097152 (221) 256 (28)
192.0.0.0
223.255.255.25
5
Start
address
End address
The IP address is a 32-bit number that uniquely identifies a network interface on a machine. An IP
address is typically written in decimal digits, formatted as four 8-bit fields separated by periods. Each 8bit field represents a byte of the IP address. This form of representing the bytes of an IP address is often
referred to as the dotted-decimal format.
The bytes of the IP address are further classified into two parts: the network part and the host
part. Figure 3-1 shows the component parts of a typical IP address, 129.144.50.56.
Figure 3-1 Parts of an IP Address
Network Part
This part specifies the unique number assigned to your network. It also identifies the class of network
assigned. In Figure 3-1, the network part takes up two bytes of the IP address.
Host Part
This is the part of the IP address that you assign to each host. It uniquely identifies this machine on your
network. Note that for each host on your network, the network part of the address will be the same, but
the host part must be different.
Download