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

An-Najah National University: Ipv6 Administration & Basic Networking Commands

This document provides instructions for an experiment on IPv6 administration and basic networking commands in Linux. It involves configuring IPv6 addresses on a router and PCs, setting up a DHCPv6 pool to assign addresses, and verifying connectivity using commands like ping. The key tasks covered are IPv6 configuration on routers and PCs, setting up a DHCPv6 pool to dynamically assign IPv6 addresses, and using basic networking commands in Linux like ifconfig, ping, and scripts to view interface information and test connectivity.

Uploaded by

Hadeel Sedawei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

An-Najah National University: Ipv6 Administration & Basic Networking Commands

This document provides instructions for an experiment on IPv6 administration and basic networking commands in Linux. It involves configuring IPv6 addresses on a router and PCs, setting up a DHCPv6 pool to assign addresses, and verifying connectivity using commands like ping. The key tasks covered are IPv6 configuration on routers and PCs, setting up a DHCPv6 pool to dynamically assign IPv6 addresses, and using basic networking commands in Linux like ifconfig, ping, and scripts to view interface information and test connectivity.

Uploaded by

Hadeel Sedawei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

An-Najah National University

Department of Networks & Information Security

Networks Administration Lab Experiment#8

IPv6 Administration & Basic Networking


Commands

2020-2021
1 Abstract
The purpose of this experiment is to practice IPv6 administration on routers fol-
lowed by executing a set of networking basic commands under Linux to get familiar with
automating simple networking tasks.

2 Overview
Network administration involves configuring, managing, diagnosing, and trou-
bleshooting network related issues. Such objectives can be achieved through using the proper
tools devoted for this purpose. Most often, such tools are software applications embedded in
the operating system. The basic tasks for such tools typically involve:
• Configuration of different routers, switches, and hosts.
• Configuration of DHCP to dynamically assign IPv4/IPv6 addresses.
• Testing network connectivity and getting statistics of the communication.
• Viewing and analysing the traffic sent/received by the computer. The tools for performing
the above networking tasks differ from one operating system variant to another. Furthermore,
on the same operating system, they might be different from one version to another. However,
they provide similar level of functionality.

2.1 Linux Tools for Network Administration

In Linux, network administration tools can be used either through the Command
Line Interface (CLI) or the Graphical User Interface (GUI). However, using CLI is often used
for two reasons: First, when using the CLI, it is very easy to perform the same functionality
using GUI (however, vice versa is not true). Second, some networking equipments (such as
routers and switches) are managed only through the CLI.

1
2.2 IPv6

When compared to IPv4, IPv6 has a larger 128-bit address space which contains 340
undecillion addresses. IPv6 solves limitations with IPv4 and adds enhancement like address
auto-configuration. The rapidly increasing Internet population, depletion of IPv4, issues with
NAT, and the Internet of Things are reasons for the creation of IPv6.
IPv6 addresses are 128 bits divided as shown in Figure 1.

Figure 1: IPv6 Bits

An IPv6 could be assigned to the host using various methods:


• Manually configuring the IPv6 address on a host is similar to configuring an IPv4 address
• Dynamic assignment of IPv6 addresses:
-SLAAC only.
-SLAAC and Stateless DHCPv6.
-Stateful DHCPv6.

2
3 Procedure

3.1 IPv6 Configuration

3.1.1 Topology Cabling

Connect the topology shown in Figure.2 which contains the following equipment:

1. 1 Router (Cisco 2811).

2. 1 Switch (Cisco 2960).

3. 2 PCs (Ubuntu, Windows with putty).

4. Console cables to configure the Cisco IOS devices via the console ports connected to a
windows PC.

5. 2 Ethernet cables.

Figure 2: Network Topology

3
3.1.2 Configure R1 IPv6 address

1. Enable IPv6 unicast routing as follows:


R1(config)# ipv6 unicast-routing

2. Assign the IPv6 unicast address to interface F0/0 as follows:


R1(config)#int f0/0 R1(config-if)# ipv6 address 2001:db8:acad:a::1/64

3. Assign FE80::1 as the IPv6 link-local address for interface F0/0 as follows:
R1(config-if)# ipv6 address fe80::1 link-local
See figure 3.

Figure 3: Configure R1 IPv6 address

Question: What is the difference between Link-Local IPv6 address and Global Unicast
address?

4
3.1.3 Configure DHCPv6 pool on R1

1. Add the network prefix to the pool as follows:


R1(config)# ipv6 dhcp pool IPV6POOL
R1(config-dhcpv6)# address prefix 2001:db8:acad:a::/64
See figure 4.

Figure 4: IPV6POOL

2. Assign the domain name and DNS Server address as follows:


R1(config-dhcpv6)# domain-name NetAdmin.Lab
R1(config-dhcpv6)# dns-server 2001:db8:acad:a::abcd
R1(config-dhcpv6)# exit
See figure 5.

Figure 5: domain name and DNS Server

5
3. Assign the DHCPv6 pool to the interface as follows:
R1(config)# interface f0/0
R1(config-if)# ipv6 dhcp server IPV6POOL
See figure 6.

Figure 6: DHCPv6 pool

4. Verify DHCPv6 pool settings as follows:


R1 # show ipv6 dhcp pool
See figure 7

Figure 7: Verify DHCPv6 pool

6
3.1.4 Set the flag on F0/0 for Stateful DHCPv6

Apply the following set of commands:


R1(config)# interface f0/0
R1(config-if)# ipv6 nd managed-config-flag
R1(config-if)# no shutdown
R1(config-if)# end
See figure 8.

Figure 8: flag on F0/0

7
3.1.5 Verify Stateful DHCPv6 setting on R1

Issue the show ipv6 interface f0/0 command to verify that the interface is in stateful
DHCPv6 mode, see figure 9.

Figure 9: show ipv6 interface f0/0

8
3.1.6 Setting IPv6 Addresses on PCs and Testing the Connection

1. Set the IPv6 Address on the PC to obtain from DHCP and verify that PC received an IPv6
address, see figure 10.

Figure 10: Set the IPv6 Address

2. Connect the windows PC NIC to the switch and verify that it has received an IPv6 ad-
dress from the DHCPv6 server, see figure 11.

Figure 11: received an IPv6 address

9
3. Use ping to verify the connectivity between the 2 PCs using IPv6 addresses, see figures
12 and 13.

Figure 12: ifconfig on linux

Figure 13: ping from windows to linux

10
Step 8: Verify IPv6 address Binding on R1 as follows:
-Issue the show ipv6 dhcp binding command to verify that the PCs received their IPv6 unicast
addresses from the DHCP pool, see figure 14.

Figure 14: show ipv6 dhcp binding

Question: What protocol is used to enable DHCPv6 client/server communication?


Answer:The Dynamic Host Configuration Protocol (DHCP) is a network management protocol
used on Internet Protocol (IP) networks, whereby a DHCP server dynamically assigns an IP
address and other network configuration parameters to each device on the network, so they
can communicate with other IP networks.

11
3.2 Network Interface Information

1. You are connected to other computers in the lab in a LAN. Extract the following infor-
mation about your network interface:

(a) IP address.

(b) Subnet mask.

(c) MAC address.

(d) default gateway


See figure 15.

Figure 15: information about network interface

2. Write a bash shell script that automatically gets the above information and stores them
in a file named NetworkInfo.txt, see figures 16 and 17.

Figure 16: script

12
Figure 17: NetworkInfo.txt After run script

3. Provide two key differences between IP address and MAC address, see figure 18.

Figure 18: MAC address vs IP address

13
4. How many network interfaces do you have on your machine? List their names?
See figure 19.

Figure 19: network interfaces

Two interfaces ”enp0s3” and ”lo”.

5. Show the information related only to the interface through which you are connected to
the LAN, see figure 20.
the enp0s3 interface which connected to the LAN

Figure 20: enp0s3 interface

14
6. Show the information related to a virtual interface you have on your machine. What is
the name of this interface? What is it used for?
The ”lo” is loopback interface which is the virtual interface
The loopback interface is used to identify the device. While any interface address can be
used to determine if the device is online, the loopback address is the preferred method.
Whereas interfaces might be removed or addresses changed based on network topology
changes, the loopback address never changes
See figure 21.

Figure 21: lo interface

15
3.3 Network Connectivity

1. Question: What protocol is typically used to test whether one computer can communi-
cate with another? On which TCP/IP layer does this protocol function?
Answer: Typically, the ICMP protocol is used to test the connectivity, which is at the
Network layer.

2. Use ping command to test the connectivity with your gateway. See figure 22.
Question: What performance metric can you measure using ping?
Answer: The command “ping” is used for measuring the metric of connectivity between
two endpoints.

Figure 22: Test the connectivity with the gateway

3. Question: Explain the result of the ping command.


Answer: The ping command sends one datagram per second and prints one line of output
for every response received. The ping command calculates round-trip times and packet
loss statistics, and displays a brief summary on completion. The ping command com-
pletes when the program times out or on receipt of a SIGINT signal. The Host parameter
is either a valid host name or Internet address.

16
4. Modify the above command so that you perform the ping only two times. See figure 23.

Figure 23: Ping only two times

5. Write a bash shell script that receives a website name as input. Then, it prints the round
trip time it takes to communicate with that website. See figures 24 and 25.

Figure 24: Script to prints the round trip time

Figure 25: Run the script

6. Question: Some organizations do not allow ICMP messages to be sent/received and thus,
prohibit the ping process. Explain why?
Answer: to protect from DoS attacks, Ping flood is a simple denial-of-service attack
where the attacker overwhelms the victim with ICMP Echo Request (ping) packets. It is
most successful if the attacker has more bandwidth than the victim.

17
7. Question: Assume that your organization does not allow ICMP messages. How can you
send a ping request?
Answer: The command “nping” to send encapsulated pings, in case of the ICMP mes-
sages are not allowed.

8. Write two commands to check the route to a destination. See figures 26 and 27.

Figure 26: check the route to a destination - tracepath tool

Figure 27: check the route to a destination - traceroute tool

Question: What protocol is used for this purpose?


Answer: ICMP protocol,

18
3.4 Domain Names and IP Addresses

1. Question: What is the key objective of DNS?


Answer: The key objective of DNS server is where the computer goes to translate a web
address or computer name into an IP address.

2. Get the IP address of the host-name www.google.com. What command would you use?
See figure 28.

Figure 28: IP address of the host-name - nslookup tool

3. Given the IP address 172.217.17.36, get the host-name of that address. How can you do
that if possible? See figure 29.

Figure 29: host-name of IP address - nslookup tool

19
4. What is the IP address of your local DNS server? See figure 30.

Figure 30: IP address of local DNS server

5. Show and explain the content of the file /etc/hosts? See figure 31.

Figure 31: /etc/hosts file

The /etc/hosts is an operating system file that translate hostnames or domain names to
IP addresses.

6. Question: What is the difference between using DNS server and the file /etc/hosts?
Answer: Answer: The difference is that “/etc/hosts” is STATIC whereas DNS is DY-
NAMIC. DNS lookups are good for a specified time period after which the client will
re-query. DNS servers can also be smart about what they return - acting as simple load
spreaders for example or failing over to backup servers.

20
7. Write a bash shell script that reads a list of host-names from an input file and generates
a file in which all the IP addresses of those hosts are written. See figure 32.

Figure 32: Script - IP address of the host-name

3.5 Routing Tables

1. Question: What is the difference between a routing table of a host and routing table of
a router?
Answer: A routing table on the host yields the forwarding address of the router to be
used to reach the desired destination network ID. Routing table is a data table stored in a
router or a networked computer that lists the routes to particular network destinations,
the routing table contains information about the topology of the network immediately
around it. The construction of routing tables is the primary goal of routing protocols.
Static routes are entries made in a routing table by non-automatic means and which are
fixed rather than being the result of some network topology ”discovery” procedure.

21
2. Show the routing table of your machine. See figure 33.

Figure 33: Routing table of machine

3. Question: What does the command route -n -C do? See figure 34.

Figure 34: Command route (-n -C)

Answer: The option “-C” is for the kernel routing cache, which stores recently used
routing entries in a fast and convenient hash lookup table, and is consulted before the
routing tables. If the kernel finds a matching entry during route cache lookup, it will
forward the packet immediately and stop traversing the routing tables.

3.6 Hardware Address

1. What is the hardware address of your machine? What command do you use to get this
address info? See figure 35.

Figure 35: Hardware address of machine

22
2. Question: What is the purpose of ARP protocol?
Answer: Address Resolution Protocol (ARP) is a protocol for mapping an Internet Pro-
tocol address (IP address) to a physical machine address that is recognized in the local
network.

3. From your computer, get the MAC address of the neighboring computer? How can you
do that? See figure 36.

Figure 36: MAC address of the neighboring computer

3.7 Network Statistics and Other Information

1. Explain in details the output of the command netstat -n -t? See figure 37.

Figure 37: netstat -n -t command

Is a command line utility that can be used to list out all the network (socket) connec-
tions on a system. It lists out all the tcp, udp socket connections and the unix socket
connections.

23
2. Write a bash shell script that writes the foreign addresses for all TCP connections in the
established state? See figure 38.

Figure 38: Script - the foreign addresses for all TCP connections

3. Explain the objective of the command netstat -s. See figure 39.

Figure 39: netstat -s command

netstat -s: command to print out network statistics like total number of packets received
and transmitted by protocol type and so on. To list out statistics of all packet types.

24
4. Write a command that gets the total number of packets received in a UDP connection?
See figure 40.

Figure 40: Total number of packets received in a UDP connection

5. Explain the objective of the following files:

(a) /etc/network/interfaces
Used to set the IP address, netmask and default gateway. A line that starts with the
iface keyword introduces each interface.

(b) /etc/services
Defines the standard services such as FTP, HTTP and mail with thies well known
ports.

4 Conclusion
In summary, Linux has several tools to be used for network management. Each
tool could be used for different purpose, either for viewing configurations, testing the connec-
tivity for the network or analyzing the traffic through the computer. CLI is more preferred by
administrators because of its easiness and availability in many network equipments.

5 Reference
1. https://en.wikipedia.org/wiki/Dynamic Host Configuration Protocol#:

2. https://www.quora.com/What-is-the-difference-between-IP-address-and-MAC-address-
and-how-they-are-used

3. https://www.google.com/search?sxsrf=ALeKk00rRaD6alayWqYxEPHo2Xvt93wcPQ

25

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy