An-Najah National University: Ipv6 Administration & Basic Networking Commands
An-Najah National University: 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.
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.
2
3 Procedure
Connect the topology shown in Figure.2 which contains the following equipment:
4. Console cables to configure the Cisco IOS devices via the console ports connected to a
windows PC.
5. 2 Ethernet cables.
3
3.1.2 Configure R1 IPv6 address
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.
Question: What is the difference between Link-Local IPv6 address and Global Unicast
address?
4
3.1.3 Configure DHCPv6 pool on R1
Figure 4: IPV6POOL
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.
6
3.1.4 Set the flag on F0/0 for Stateful DHCPv6
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.
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.
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.
9
3. Use ping to verify the connectivity between the 2 PCs using IPv6 addresses, see figures
12 and 13.
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.
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.
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.
12
Figure 17: NetworkInfo.txt After run script
3. Provide two key differences between IP address and MAC address, see figure 18.
13
4. How many network interfaces do you have on your machine? List their names?
See figure 19.
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
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.
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.
16
4. Modify the above command so that you perform the ping only two times. See figure 23.
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.
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.
18
3.4 Domain Names and IP Addresses
2. Get the IP address of the host-name www.google.com. What command would you use?
See figure 28.
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.
19
4. What is the IP address of your local DNS server? See figure 30.
5. Show and explain the content of the file /etc/hosts? See figure 31.
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.
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.
3. Question: What does the command route -n -C do? See figure 34.
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.
1. What is the hardware address of your machine? What command do you use to get this
address info? See figure 35.
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.
1. Explain in details the output of the command netstat -n -t? See figure 37.
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.
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.
(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