Data Communication Group Assignment
Data Communication Group Assignment
1
Course Title:Data Communication and Computer Network Course Code: SWEG2106
GROUP ASSIGNMENT
Step 1 Log in to the CLI of the router through the console port.
Step 2 Display the basic device information.
.
Step 3 Complete basic device configurations.
# Enter the interface view and configure the IP address of the interface.
# Display the current device configuration.
Step 4 Save the current configuration of the device.
2.1.1.Introduction
2.1.1.1.About This Lab
Internet Protocol version 4 (IPv4) is a core protocol of the TCP/IP protocol suite and works at the Internet layer in the
TCP/IP model or the network layer in the Open System Interconnection (OSI) model. The network layer provides
connectionless data transmission. Each IP datagram is transmitted independently, removing the need to establish a
connection before IP datagrams are sent.
Routing is the basic element of data communication networks. It is the process of selecting paths on a network along
which packets are sent from a source to a destination.
In this lab activity, you will configure IPv4 addresses and static IPv4 routes, and understand basic routing principles in
the process.
2.1.1.2.Objectives
Upon completion of this task, you will be able to:
● Learn how to configure static routes and understand the conditions for the static routes to
take effect
● Learn how to test the connectivity of the network layer by using the ping tool
● Learn how to configure static routes and understand their application scenarios
2.1.1.3.Networking Topology
R1, R2, and R3 are gateways of their networks. You need to configure these gateways to connect these networks.
Figure 2.1.Lab topology for IPv4 addressing and routing
2.1.2.Lab Configuration
2.1.2.1.Configuration Roadmap
Configure IP addresses for the interfaces on the routers.
Configure static routes to interconnect the routers.
2.1.2.2.Configuration Procedure
Step 7 Complete basic device configuration.
# Name the devices.
R1:
R2:
R3:
Step 8 Display the IP address of the current interface and the routing table of the router.
# Display the interface status on the router.
R1:
R2:
R3:
The display ip interface brief command displays the brief information about interface IP addresses, including the IP
addresses, subnet masks, physical status, link-layer protocol status, and number of interfaces in different states.
GigabitEthernet0/0/1 and GigabitEthernet0/0/3 on R1 are not configured with IP addresses. Therefore, the IP
Address/Mask field is in the unassigned state, the Protocol field is in the down state, and the Physical field is in the up
state.
# Display the routing table on the router (R2 in this example).
R1:
R2:
R3:
InLoopBack0 is a default loopback interface.
InLoopBack0 uses the fixed loopback address 127.0.0.1/8 to receive data packets destined for the host where
InLoopBack0 resides. The IP address of the InLoopBack0 interface cannot be changed or advertised using a routing
protocol.
Step 9 Configure IP addresses for physical interfaces.
# Configure IP addresses for physical interfaces based on the following table.
R1 GigabitEthernet0/0/1 10.0.13.1/24
GigabitEthernet0/0/3 10.0.12.1/24
R2 GigabitEthernet0/0/3 10.0.12.2/24
GigabitEthernet0/0/4 10.0.23.2/24
R3 GigabitEthernet0/0/1 10.0.13.3/24
GigabitEthernet0/0/3 10.0.23.3/24
R1:
R2:
R3:
The preceding command output shows that three direct routes are automatically generated for each interface after
the IP addresses of the interfaces are configured, which are
R1 LoopBack0 10.0.1.1/32
R2 LoopBack0 10.0.1.2/32
R3 LoopBack0 10.0.1.3/32
Loopback interfaces are logical interfaces manually configured and do not exist physically. Logical interfaces can be
used to exchange data. A loopback interface is always Up at the physical layer and link layer unless it is manually shut
down. Generally, a loopback interface uses a 32-bit mask. Loopback interfaces are used for the following purposes:
R3:
# Shut down GigabitEthernet0/0/3 interface on R1 and R2 to invalidate the route with the highest priority.
# Display the routing table on R2 and R3. The command output shows that the routes with a lower priority are
activated when the routes with a higher priority are invalidated.
R2:
R3:
In this case, the original static route becomes invalid and the static route with a lower priority is activated.
# Test connectivity.
R3:
The tracert command displays the path of packets from the source to the destination.
The command output shows that the data packets pass through GigabitEthernet0/0/1 and GigabitEthernet0/0/3 of R3
and are then forwarded to GigabitEthernet0/0/4 of R2.
In some lab environments, the devices may not respond to ICMP packets for security reasons.
Therefore, the results may vary. You can press Ctrl+C to end the tracert operation.
Step 7 Configure default routes to connect the LoopBack0 interface of R1 and the LoopBack0 interface of R2.
# Restore the interfaces and delete the configured routes.
2.2.1.Introduction
2.2.1.1About This Lab
The Open Shortest Path First (OSPF) protocol is a link-state Interior Gateway Protocol (IGP) developed by the Internet
Engineering Task Force (IETF). Currently, OSPF Version 2 (RFC2328) is used for IPv4. As a link-state protocol, OSPF has
the following advantages:
● Multicast packet transmission to reduce load on the switches that are not running OSPF
● Packet authentication
With the preceding advantages, OSPF is widely accepted and used as an IGP.
In the lab activity, you will understand basic OSPF configurations and principles by configuring single-area OSPF.
2.2.1.2.Objectives
Upon completion of this task, you will be able to:
R1:
R2:
R3:
You can set OSPF parameters only after creating an OSPF process. OSPF supports multiple independent processes on
one device. Route exchange between different OSPF processes is similar to that between different routing protocols.
You can specify a process ID when creating an OSPF process. If no process ID is specified, the default process ID 1 is
used.
# Create an OSPF area and specify the interfaces on which OSPF is to be enabled.
The area command creates an OSPF area and displays the OSPF area view.
The network network-address wildcard-mask command specifies the interfaces on which OSPF is to be enabled. OSPF
can run on an interface only when the following two conditions are met:
The mask length of the interface's IP address is not shorter than that specified in the network
command. OSPF uses reverse mask. For example 0.0.0.255 indicates that the mask length is
24 bits.
The address of the interface must be within the network range specified in the network
command.
-In this example, OSPF can be enabled on the three interfaces, and they are all added to area 0.
-If the wildcard mask in the network command is all 0s and the IP address of the interface is the same as the IP
address specified in the network-address command, the interface also runs OSPF.
Authentication is not configured on other routers. Therefore, the authentication fails and no neighbor is available.
# Configuring interface authentication on R2.
The default-route-advertise command advertises the default route to a common OSPF area. If the always argument is
not specified, the default route is advertised to other routers only when there are active non-OSPF default routes in
the routing table of the local router. In this example, no default route exists in the local routing table. Therefore, the
always argument needs to be used.
# Display the IP routing tables of R2 and R3.
R2:
R3:
Step 6 Change the cost values of interfaces on R1 so that LoopBack0 on R1 can reach LoopBack0 on R2 via R3.
# According to the routing table of R1, the cost of the route from R1 to LoopBack0 of R2 is 1, and the cost of the route
from R1 to R2 via R3 is 2. Therefore, you only need to change the cost of the route from R1 to LoopBack0 of R2 to
ensure that the value is greater than 2.
In this case, the next hop of the route from R1 to LoopBack0 on R2 is GigabitEthernet0/0/1 on R3.
# Verify the result by issuing Tracert commands.
----End
UNIT 3 Creating a Switched Ethernet
Network
[R3]interface GigabitEthernet0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.1.10.1 24
# Set the IP addresses of S3 and S4 to 10.1.3.1/24 and 10.1.3.2/24, respectively. (For scenario 1: S3 and S4 support
switching from Layer 2 interfaces to Layer 3 interfaces.)
[S3]interface GigabitEthernet0/0/1
[S3-GigabitEthernet0/0/1]undo portswitch
The interface changes to Layer 3 mode.
The undo portswitch command changes the working mode of Ethernet interfaces from Layer 2 mode to Layer 3
mode.
[S3-GigabitEthernet0/0/1]ip address 10.1.3.1 24
[S4]interface GigabitEthernet0/0/2
[S4-GigabitEthernet0/0/2]undo portswitch
[S4-GigabitEthernet0/0/2]ip address 10.1.3.2 24
# Set the IP addresses of VLANIF3 on S3 and S4 to 10.1.3.1/24 and 10.1.3.2/24, respectively. (For scenario 2: S3
and S4 do not support switching from Layer 2 interfaces to Layer 3 interfaces.)
Create VLAN 3 on S3 and S4.
Configure ports on S3 and S4 as access ports and assign them to corresponding VLANs.
Create a VLAN.
Create VLANs 2, 3, and 10 on S1 and S2.
[S1]vlan batch 2 to 3 10
Info: This operation may take a few seconds. Please wait for a moment...done.
VLANs 2, 3, and 10 are created successfully.
The vlan vlan-id command creates a VLAN and displays the VLAN view. If the VLAN exists, the VLAN view is
displayed.
The vlan batch { vlan-id1 [ to vlan-id2 ] } command creates VLANs in batches.
[S2]vlan batch 2 to 3 10
The undo port trunk allow-pass vlan command deletes a trunk port from the specified VLANs.
By default, VLAN 1 is in the allowed list. If VLAN 1 is not used for any service, it needs to be deleted for security
purposes.
Configure MAC address-based VLANs.
As shown in the networking diagram, R3 simulates a special service PC. Assume that the MAC address of the PC is
a008-6fe1-0c46. The PC is expected to connect to the network through any of GigabitEthernet0/0/1,
GigabitEthernet0/0/2, and GigabitEthernet0/0/3 on S2 and transmit data through VLAN 10.
# Configure S2 to associate the MAC address of the PC with VLAN 10.
The VLAN membership depends on the source MAC addresses of packets, and VLAN tags are added accordingly.
This VLAN assignment method is independent of the location, providing a higher level of security and flexibility.
[S2] vlan 10
[S2-vlan10] mac-vlan mac-address a008-6fe1-0c46
The mac-vlan mac-address command associates a MAC address with a VLAN.
# Set GigabitEthernet0/0/1, GigabitEthernet0/0/2, and GigabitEthernet0/0/3 on S2 to hybrid ports and configure
them to allow packets from MAC address-based VLANs to pass through.
On access and trunk ports, MAC address-based VLAN assignment can be used only when the VLAN is the same as
the PVID. Therefore, it is recommended that you configure MAC address-based VLAN assignment on a hybrid port
to receive untagged packets from multiple VLANs.
The port hybrid untagged vlan command assigns a hybrid port to the specified VLANs to allow untagged frames
to pass through.
# Configure the ports connecting S1 and S2 to allow packets from VLAN 10 to pass through.
The ports need to allow tagged frames from multiple VLANs to pass through. Therefore, the ports can be configured
as trunk ports.
# Configure S2 and enable MAC address-based VLAN assignment on GE0/0/1, GE0/0/2, and GE0/0/3.
To enable a port to forward packets based on associations between MAC addresses and VLANs, you must run the
mac-vlan enable command.
The mac-vlan enable command enables MAC address-based VLAN assignment on a port.
Display the configuration information.
# Display the VLAN information on the switch.
[S1]display vlan
The display vlan command displays information about VLANs.
The display vlan verbose command displays detailed information about a specified VLAN, including the ID, type,
description, and status of the VLAN, status of the traffic statistics function, ports in the VLAN, and mode in which
the ports are assigned to the VLAN.
# Display the MAC address-based VLAN configuration on the switch.
The display mac-vlan command displays the configuration of MAC address-based VLAN assignment.
3.1.3 Verification
Test the device connectivity and verify the VLAN configuration.
Ping S4 from S3 and ensure that the ping operation is successful.
Ping other devices from R1 and ensure that the ping operation fails.
Run the display mac-address verbose command on S1 and S2 to check the MAC address tables on the
switches.
Enable STP.
# Enable STP globally.
The stp enable command enables STP, RSTP, or MSTP on a switching device or a port. By default, STP, RSTP, or
MSTP is enabled on switches.
# Change the spanning tree mode to STP.
The stp mode{mstp | rstp | stp} command sets the operation mode of the spanning tree protocol on a switching
device. By default, the switching device operates in MSTP mode. The spanning tree mode of the current device has
been changed to STP.
The displayed information also includes port status information, which is not included in the preceding output.
# Based on the root bridge ID and port information on each switch, the current topology is as follows:
The dotted line indicates that the link does not forward service data.
This topology is for reference only and may not be the same as the actual spanning tree topology in the lab environment.
Modify device parameters to make S1 the root bridge and S2 the secondary root bridge.
# Change the bridge priorities of S1 and S2.
[S1]stp root primary
Owning to the importance of the root bridge, the switch with high performance and network hierarchy is generally
chosen as a root bridge. The priority of such a device, however, may be not that high. Therefore, setting a high
priority for the switch is necessary so that the switch can be elected as the root bridge. The stp root command
configures the switch as a root bridge or secondary root bridge of a spanning tree.
● The stp root primary command specifies a switch as the root switching device. In
this case, the priority value of the switch is 0 in the spanning tree and the priority
cannot be changed.
● The stp root secondary command specifies a switch as the secondary root bridge. In
this case, the priority value of the switch is 4096 and the priority cannot be changed.
In this case, the bridge ID of S1 is the same as the root bridge ID, and the root path cost is 0, indicating that S1 is the
root bridge of the current network.
# Display the brief STP status information on all devices.
[S2]display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/10 ROOT FORWARDING NONE
0 GigabitEthernet0/0/11 ALTE DISCARDING NONE
0 GigabitEthernet0/0/13 DESI FORWARDING NONE
0 GigabitEthernet0/0/14 DESI FORWARDING NONE
# Based on the root bridge ID and port information on each switch, the current topology is as follows:
The stp edged-port enable command sets the current port as an edge port. If a port of a switching device receives a
BPDU after being configured as an edge port, the switching device will automatically set the port as a non-edge port
and recalculate the spanning tree.
----End
3.2.3 Verification
Mark the root bridge and the role of each port in the lab environment based on the actual network
convergence.
Disable any port on any switch and check whether the traffic can reach all other switches through the backup
links.
The mode command configures the working mode of the Eth-Trunk, which can be LACP or manual load balancing.
By default, the manual load balancing mode is used. Therefore, the preceding operation is unnecessary and is
provided for demonstration purpose only.
# Add a port to the Eth-Trunk.
You can enter the interface view of an individual port and add it to an Eth-Trunk. You can also run the trunkport
command in the Eth-Trunk interface view to add multiple ports to the Eth-Trunk.
Before changing the working mode of an Eth-Trunk, ensure that the Eth-Trunk has no member port.
# Change the aggregation mode.
The mode lacp command sets the working mode of an Eth-Trunk to LACP.
Note: The command is mode lacp-static in some versions.
Link Aggregation Control Protocol data units (LACPDUs) are sent and received by both endpoints of a link
aggregation group in LACP mode.
First, the actor is elected.
The system priority field is compared. The default priority value is 32768, and a lower value indicates a
higher priority. The endpoint with a higher priority is elected as the LACP actor.
If there is a tie in priority, the endpoint with a smaller MAC address becomes the actor.
After the actor is elected, the devices at both ends select active ports according to the port priority settings on the
actor.
# Set the upper and lower thresholds of active ports.
The bandwidth and status of an Eth-Trunk depend on the number of active ports. The bandwidth of an Eth-Trunk is
the total bandwidth of all member ports in Up state. You can set the following thresholds to stabilize an Eth-Trunk's
status and bandwidth as well as reduce the impact brought by frequent changes of member link status.
● Lower threshold: When the number of active ports falls below this threshold, the Eth-
Trunk goes Down. This threshold determines the minimum bandwidth of an Eth-
Trunk and is configured using the least active-linknumber command.
● Upper threshold: When the number of active ports reaches this threshold, the
bandwidth of the Eth-Trunk will not increase even if more member links go Up. The
upper threshold ensures network availability and is configured using the max active-
linknumber command.
# Enable the preemption function.
In LACP mode, when an active link fails, the system selects the backup link with the highest priority to replace the
faulty one. If the faulty link is recovered and has a higher priority than the backup link, the recovered link can
restore the active status if preemption is enabled. The lacp preempt enable command enables LACP preemption.
By default, this function is disabled.
# Display the status of the current Eth-Trunk.
[S1-GigabitEthernet0/0/12]undo shutdown
The preemption function is enabled on the Eth-Trunk. Therefore, when GigabitEthernet0/0/11 and
GigabitEthernet0/0/12 enter the Up state, GigabitEthernet0/0/11 and GigabitEthernet0/0/12 have a higher priority
than GigabitEthernet0/0/10. As a result, GigabitEthernet0/0/10 enters the Unselect state. In addition, to ensure link
stability, the default preemption hold time is 30 seconds. Therefore, preemption occurs 30 seconds after the ports are
enabled.
# Change the load balancing mode of the Eth-Trunk to destination IP address-based load balancing.
To ensure proper load balancing between physical links of an Eth-Trunk and avoid link congestion, use the load-
balance command to set the load balancing mode of the Eth-Trunk. Load balancing is valid only for outgoing traffic;
therefore, the load balancing modes for the ports at both Verification ends can be different.
3.4 Lab 4: Inter-VLAN Communication
3.4.1 Introduction
3.4.1.1 About This Lab
VLANs are separated at Layer 2 to minimize broadcast domains. To enable the communication between
VLANs,Huawei provides a variety of technologies. The following two technologies are commonly used:
● Dot1q termination subinterface: Such subinterfaces are Layer 3 logical interfaces.
Similar to a VLANIF interface, after a dot1q termination subinterface and its IP
address are configured, the device adds the corresponding MAC address entry and
sets the Layer 3 forwarding flag to implement Layer 3 communication between
VLANs. A Dot1q termination subinterface applies to scenarios where a Layer 3
Ethernet port connects to multiple VLANs.
● VLANIF interface: VLANIF interfaces are Layer 3 logical interfaces. After a
VLANIF interface and its IP address are configured, the device adds the MAC
address and VID of the VLANIF interface to the MAC address table and sets the
Layer 3 forwarding flag of the MAC address entry. When the destination MAC
address of a packet matches the entry, the packet is forwarded at Layer 3 to
implement Layer 3 communication between VLANs.
In this lab activity, you will use two methods to implement inter-VLAN
communication.
3.4.1.2 Networking Topology
R2 and R3 belong to different VLANs and they need to communicate with each other through VLANIF interfaces
and Dot1q termination subinterfaces.
Simulate terminal users on R2 and R3 and assign IP addresses 192.168.2.1/24 and 192.168.3.1/24 to the
interfaces.
The gateway addresses of R2 and R3 are 192.168.2.254 and 192.168.3.254 respectively.
On S1, assign GigabitEthernet0/0/2 and GigabitEthernet0/0/3 to VLAN 2 and VLAN 3, respectively.
<R3>system-view
Enter system view, return user view with Ctrl+Z.
In this example, when GigabitEthernet0/0/1 receives data tagged with VLAN 2, it sends the data to subinterface 2
for VLAN termination and subsequent processing. The data sent from subinterface 2 is also tagged with VLAN 2.
[R1-GigabitEthernet0/0/1.2]arp broadcast enable
Subinterfaces for VLAN tag termination cannot forward broadcast packets and automatically discard them upon
receiving. To allow such subinterfaces to forward broadcast packets, the ARP broadcast function must be enabled
using the arp broadcast enable command. By default, this function is enabled on some devices.
# Test the connectivity between VLANs.
r-VLAN communication.
# Delete the configuration in the previous step.
An Access Control List (ACL) is a powerful network security feature used to filter
traffic based on defined rules. In networking, ACLs are applied to router or switch
interfaces to control which packets are allowed or denied based on criteria such as
source or destination IP address, protocol type, or port numbers. This allows
administrators to enforce security policies, limit network access, and protect sensitive
resources from unauthorized users.
There are two main types of ACLs: standard and extended. Standard ACLs filter
traffic only by source IP address, while extended ACLs can filter by source and
destination IP, protocol type (like TCP or UDP), and port numbers, giving much finer
control. ACLs can be applied inbound (on traffic entering an interface) or outbound
(on traffic leaving an interface), and they process rules in sequence—once a match is
found, the corresponding action (permit or deny) is applied. Proper use of ACLs helps
enhance security, manage bandwidth, and restrict access to critical network segments.
For R1:
For R2:
For R3:
Method 2: Configure an ACL on the physical interface of R2 to allow R1 to log in to R3 through Telnet
from the IP address of the physical interface.
# Display ACL configuration on R2
4.1.3 Verification
1. On R1, telnet to the server with the source IP address 10.1.1.1 specified.
2. On R1, telnet to the server with the source IP address 10.1.4.1 specified.
4.2 Lab 2: Local AAA Configuration
4.2.1 Introduction
AAA (Authentication, Authorization, and Accounting) configuration is a security framework
used in network devices to control user access and track user activity. In the context of router or
switch configuration, AAA helps ensure that only authorized users can log in to the device
(Authentication), assigns specific permissions to each user based on their role (Authorization),
and records what each user does during their session (Accounting). By configuring AAA, network
administrators can integrate login access with a central server like RADIUS or TACACS+, apply
fine-grained control over administrative privileges, and maintain logs for auditing and
troubleshooting. This enhances the overall security and accountability of network operations.
4.2.1.2 Networking Topology
For R2:
Step-2: Configure an AAA shcema
# Configure authentication and authorization
Step-3: Create the domain and apply the AAA schema to the domain
Step-4: Configure local users
# Create a local user and password
There is Error due to the system not let me enter the password I set up.
# Display the online users on R2.
Due to the above Error, the ‘AuthenStatus’ = ‘not pass’ since the system let not me
enter password.
4.3.1 Introduction
NAT (Network Address Translation) is a technique used in computer
networking to allow multiple devices on a local private network to access external
networks, such as the internet, using a single public IP address. NAT helps conserve
global IP address space and enhances network security by hiding internal IP addresses.
It operates by translating private IP addresses of internal hosts to a public IP address
as traffic leaves the network and vice versa for incoming traffic. There are different
types of NAT, including static NAT (one-to-one mapping), dynamic NAT (many-to-
many using a pool), and PAT (Port Address Translation, also called NAT overload,
which maps many private IPs to one public IP using port numbers).
To configure NAT on a Huawei router using eNSP, for example, you typically define
an ACL to specify the internal IP addresses, then configure a NAT address pool (for
dynamic NAT) or specify interfaces (for easy NAT or PAT), and finally apply NAT
to the outbound interface.
For R2:
For R3:
Step-2: The enterprise obtains the public IP addresses ranging from 1.2.3.10 to 1.2.3.20 and needs the
dynamic NAT function.
# Test connectivity.
# Test Connectivity
Step 26 Step-4: R3 needs to provide network services (telnet in this example) for users
on the public network. Because R3 does not have a public IP address, you need to configure NAT
server on the outbound interface of R2.
Step 27
UNIT 5 Basic Network Service and
Application Configuration
1.1.3 5.1.1Introduction
This lab exercise focuses on the configuration and management of file transfer
services using multiple supported protocols, including File Transfer Protocol (FTP),
Trivial File Transfer Protocol (TFTP), and Secure File Transfer Protocol (SFTP).
These protocols provide flexible options for file management depending on specific
service requirements and security considerations.
Network devices can operate in either server or client mode:In server mode, the
device allows remote clients to access and manage files stored on it, facilitating file
transfers between the device and client systems.
In client mode, the device connects to a remote server to perform file management
tasks and transfer files as necessary.
Through this lab, learners will gain practical experience in configuring file transfer
functions on network devices and understand the appropriate use cases for each
protocol based on operational needs.
5.1.3 Verification
#Display the file directories of R1 and R2.
Answer:
FTP works in active mode by default.
In active mode, the client opens a random port, and the server connects back to the
client using port 20 for data transfer.
In passive mode, the server opens a random port, and the client connects to that port
for data transfer
5.2.3 Verification
5.2.3.1 Display the IP addresses and routes of R1 and R3
-The DHCP server selects the first matching global address pool based on the client’s
request IP subnet.
- The device checks the giaddr (Gateway IP Address) field or the source interface of
the DHCP request.
- It matches the address pool's network statement with the client’s network segment.
Networking Topology
Step 3: Configure a link local address for the interface and test the
configuration.
# Configure an interface to automatically generate a link-local address.
# Display the IPv6 status of the interface and test the connectivity.
# Test network connectivity between R1 and R2.
# Test connectivity