IPv4 Addressing and Routing Lab Guide
IPv4 Addressing and Routing Lab Guide
[Link]
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.
[Link].Objectives
Upon completion of this task, you will be able to:
[Link].Networking Topology
R1, R2, and R3 are gateways of their networks. You need to configure these gateways to connect these networks.
Figure [Link] topology for IPv4 addressing and routing
[Link] Configuration
[Link].Configuration Roadmap
Configure IP addresses for the interfaces on the routers.
Configure static routes to interconnect the routers.
[Link].Configuration Procedure
R1:
R2:
R3:
Display the IP address of the current interface and the routing table of 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.
R1:
R2:
R3:
InLoopBack0 uses the fixed loopback address [Link]/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.
R1 GigabitEthernet0/0/1 [Link]/24
GigabitEthernet0/0/3 [Link]/24
R2 GigabitEthernet0/0/3 [Link]/24
GigabitEthernet0/0/4 [Link]/24
R3 GigabitEthernet0/0/1 [Link]/24
GigabitEthernet0/0/3 [Link]/24
R1:
R2:
R3:
# Use the ping tool to test the connectivity.
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 [Link]/32
R2 LoopBack0 [Link]/32
R3 LoopBack0 [Link]/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:
Using the ping –a source-ip-address destination-ip-address command to specify the source and destination IP
addresses of ping packets. At this point, the router does not have a route to the destination IP address. Therefore, the
ping operation fails.
# Test connectivity.
# Test the connectivity between the loopback0 interfaces of the routers by referring to the proceeding description.
Configure a path from R3 to R2 via R1 as the backup path from LoopBack0 of R3 to LoopBack0 of R2.
R2:
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.
----End
[Link] 2: OSPF Routing
[Link]
● Multicast packet transmission to reduce load on the switches that are not running OSPF
● Classless Inter-Domain Routing (CIDR)
● Load balancing among equal-cost routes
● 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.
[Link].Objectives
Upon completion of this task, you will be able to:
[Link].Networking Topology
R1, R2, and R3 are gateways of their networks. You need to configure OSPF to enable connectivity between the
networks. Figure 2.2 Lab topology for configuring OSPF
Lab Configuration
Configuration Roadmap
Create OSPF processes on the devices and enable OSPF on the interfaces.
Configure OSPF authentication.
Configure OSPF to advertise default routes.
Control OSPF route selection using costs.
Configuration Procedure
# Follow steps 1, 2, 3, and 4 in lab 1 to name the routers and configure the IP addresses of the physical and loopback
interfaces.
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 [Link] 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.
R1:
The display ospf peer command displays information about neighbors in each OSPF area. The information includes the
area to which the neighbor belongs, router ID of the neighbor, neighbor status, DR, and BDR.
Authentication is not configured on other routers. Therefore, the authentication fails and no neighbor is available.
R3 has established a neighbor relationship with R1 and R2. Note: OSPF interface authentication and area authentication
implement OSPF packet authentication on OSPF interfaces.
Assume that R1 is the egress of all networks. Therefore, R1 advertises the default route to OSPF.
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.
R2:
R3:
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.
----End
UNIT 3 Creating a Switched
Ethernet Network
To meet this requirement, user ports of identical services on S1 and S2 can be assigned to the same
VLAN, and ports with specified MAC addresses on S2 can be assigned to a VLAN.
# Shut down GE0/0/11 and GE0/0/12 on S1. This step applies only to the environment described in
HCIA-Datacom Lab Construction Guide V1.0.
[R3]interface GigabitEthernet0/0/2
[S3]interface GigabitEthernet0/0/1
[S3-GigabitEthernet0/0/1]undo portswitch
The undo portswitch command changes the working mode of Ethernet interfaces from Layer 2 mode to
Layer 3 mode.
[S4]interface GigabitEthernet0/0/2
[S4-GigabitEthernet0/0/2]undo portswitch
# Set the IP addresses of VLANIF3 on S3 and S4 to [Link]/24 and [Link]/24, respectively. (For
scenario 2: S3 and S4 do not support switching from Layer 2 interfaces to Layer 3 interfaces.)
Configure ports on S3 and S4 as access ports and assign them to corresponding VLANs.
# Create VLANIF interfaces and configure IP addresses.
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.
[S2]vlan batch 2 to 3 10
The port link-type { access | hybrid | trunk } command specifies the link type of an interface, which can
be Access, Trunk, or Hybrid.
The port default vlan vlan-id command configures the default VLAN of an interface and assigns the
interface to the VLAN.
# Configure the ports connecting S1 and S2 as trunk ports and allow only packets from VLAN 2 and
VLAN 3 to pass through.
The port trunk allow-pass vlan command assigns a trunk port to the specified VLANs.
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.
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
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.
[S1]display vlan
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.
STP defined in IEEE 802.1D has evolved to the Rapid Spanning Tree Protocol (RSTP) defined in IEEE
802.1W, and the Multiple Spanning Tree Protocol (MSTP) defined in IEEE 802.1S.
# Shut down unnecessary ports. This step applies only to the environment described in HCIA-Datacom Lab
Construction Guide V1.0.
# Shut down GigabitEthernet0/0/12 between S1 and S2.
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.
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.
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.
[S2]stp root secondary
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.
# Based on the root bridge ID and port information on each switch, the current topology is as follows:
Modify device parameters to make GigabitEthernet0/0/2 of S4 the root port.
# Display the STP information on S4.
After the mode is changed, the topology of the spanning tree is not affected.
Configure edge ports.
# GigabitEthernet 0/0/10-0/0/24 of S3 are connected only to terminals and need to be configured as edge
ports.
A device provides multiple Ethernet ports, many of which have the same configuration. Configuring them
one by one is tedious and error-prone. An easy way is to add such ports to a port group and configure the
group. The system will automatically execute the commands on all ports in the group.
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 interface eth-trunk command displays the view of an existing Eth-Trunk or creates an Eth-Trunk
and displays its view. The number 1 in this example indicates the port number.
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.
Before changing the working mode of an Eth-Trunk, ensure that the Eth-Trunk has no member port.
The mode lacp command sets the working mode of an Eth-Trunk to LACP.
# Configure port priorities so that GigabitEthernet0/0/11 and GigabitEthernet0/0/12 can have a higher
priority.
Link Aggregation Control Protocol data units (LACPDUs) are sent and received by both endpoints of a
link aggregation group in LACP mode.
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.
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.
The lower threshold for the number of active links is set to 2. Therefore, the Eth-Trunk is shut down.
Although GigabitEthernet0/0/10 is Up, it is still in Unselect state.
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
Simulate terminal users on R2 and R3 and assign IP addresses [Link]/24 and [Link]/24 to the
interfaces.
The gateway addresses of R2 and R3 are [Link] and [Link] respectively.
On S1, assign GigabitEthernet0/0/2 and GigabitEthernet0/0/3 to VLAN 2 and VLAN 3, respectively.
3.4.2 Lab Configuration
<R3>system-view
The link between S1 and R1 must allow packets from VLAN 2 and VLAN 3 to pass through because R1 needs to
terminate the VLAN tags of packets exchanged between VLANs.
A subinterface is created and the subinterface view is displayed. In this example, 2 indicates the
subinterface number. It is recommended that the subinterface number be the same as the VLAN ID.
The dot1q termination vid vlan-id command configures the VLAN ID for Dot1q termination on a
subinterface.
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.
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.
r-VLAN communication.
# Delete the configuration in the previous step.
# Create a VLANIF interface on S1.
[S1]interface Vlanif 2
The interface vlanif vlan-id command creates a VLANIF interface and displays the VLANIF interface
view. You must create a VLAN
[S1]interface Vlanif 3
----End
UNIT 4 Network Security Basics and Network
Access
4.1.1 Introduction
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 1: Configure an ACL on the VTY interface of R3 to allow R1 to log in to R3 through Telnet
using the IP address of loopback 1.
# Configure an ACL on R3
4.1.3 Verification
1. On R1, telnet to the server with the source IP address [Link] specified.
2. On R1, telnet to the server with the source IP address [Link] specified.
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
There is Error due to the system not let me enter the password I set up.
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 R1:
For R2:
For R3:
# Configure the Telnet function on R1 and R3 for subsequent verification.
# Test connectivity.
Step-2: The enterprise obtains the public IP addresses ranging from [Link] to [Link] and needs the
dynamic NAT function.
# Test connectivity.
Step-2: The IP address of GigabitEthernet0/0/4 on R2 is dynamically assigned (e.g. through DHCP or
PPPoE dialup), you need to configure Easy IP.
# Test Connectivity
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.
UNIT 5 Basic Network Service and Application
Configuration
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.5 Quiz
1. Does FTP work in active or passive mode by default?
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 Lab 2: DHCP Configuration
Lab Configuration
Step 4 Enable the DHCP server function on GigabitEthernet 0/0/4 of R2 to assign an IP address
to R3.
5.2.3 Verification
Useful when multiple interfaces share Used when each interface needs a
Usage scenario
the same pool different IP range
2. If there are multiple global address pools, how do you determine the global address pool for a
DHCP client?
-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.
# Configure VLANs.
# Configure interface IP addresses.
# Configure DHCP.
Configure the APs to bring them online.
import telnetlib
import time
Import the telnetlib and time modules. The two modules are provided by Python and do not need to be
installed.
This section describes the common classes and methods of the Telnetlib as the client, for example, the
read_until, read_very_eager(), and write() methods in the Telnet class. For more Telnet methods, see
the official telnetlib document at [Link]
By default, Python executes all code in sequence without intervals. When you use Telnet to send
configuration commands to a switch, the switch may not respond in time or the command output may
be incomplete. In this case, you can use the sleep method in the time module to manually pause the
program.
host = '[Link]'
password = 'Huawei@123'
tn = [Link](host)
Create two variables. host and password are the login address and password of the device respectively,
which are the same as those configured on the device. In this example, only the Telnet password is
configured for login. Therefore, no user name is required.
[Link]() indicates that the Telnet() method in the telnetlib class is invoked. This method
contains login parameters, including the IP address and port number. If no port information is entered,
port 23 is used by default.
In this example, tn = [Link](host) indicates that you log in to the device whose host is
[Link] and assign the value of [Link](host) to tn.
tn.read_until(b"Password:")
When you log in to the device at [Link] through Telnet, the following information is displayed:
Note that the program does not know what information needs to be read. Therefore, read_until() is
used to indicate that the information in the brackets needs to be read.
In this example, tn.read_until(b"Password:") indicates that data is read until "Password: "is displayed.
The letter "b" before "Password:" indicates that the default Unicode code in Python3 is changed to
bytes. This is the requirement of the function on the input data. For details, see the official document of
telnetlib. If this parameter is not carried, the program reports an error.
[Link]([Link]('ascii') + b"\n")
After Password: is displayed in the code, the program enters the password. This parameter has been
defined and is used as the Telnet login password. Use write() to write the password.
After logging in to the device through Telnet, use the Python script to issue commands on the device.
[Link](b'display cu \n')
write() is used to enter commands to the device. The display cu command is the abbreviated form of the
display current-configuration command, which displays the current configuration of the device.
[Link](1)
[Link](1) is used to pause the program for one second to wait for the output of the switch before
executing subsequent code. If the waiting time is not specified, the program directly executes the next
line of code. As a result, no data can be read.
print(tn.read_very_eager().decode('ascii'))
print() indicates that the contents in the brackets are displayed on the console.
In this example, the code is used to display the output by S1 within one second on the console after the
display cu command is executed.
[Link]()
The session is closed by invoking close(). The number of VTY connections on the device is limited.
Therefore, you need to close the Telnet session after running the script.
UNIT 9 Configuring a Campus Network
Networking Topology
Networking Topology
Floors in use:
Each active floor has a small equipment room for network devices
1st Floor: Core Network LayerCore Switch: Located in the core equipment room.
Router/Firewall: For internet access and security.
VLAN Segmentation:
Inter-floor Connectivity
Fiber or high-speed uplinks from each floor's distribution switch to the 1st-floor core switch.
Equipment Roles
Here are five important pieces of information that should be obtained from the company during the
requirement collection and analysis phase of the network construction project:
(e.g., 100 Mbps for admin users, 1 Gbps for R\&D users)
5. Future scalability and expansion plans (e.g., adding more departments or upgrading to Wi-Fi 6 in the
next year)
1. Project Budget:
Analysis: The project has a tight budget, so the network must be built using cost-effective solutions
while still meeting functional requirements. This means prioritizing essential components, choosing
affordable hardware, and considering scalable technologies that allow for future expansion without
large additional costs.
Analysis: Both wired and wireless terminals need to be supported. This requires planning for a robust
wired network with sufficient bandwidth and also ensuring wireless coverage across all floors. A wireless
solution like Wi-Fi access points will need to be carefully deployed to ensure adequate signal strength
and security.
3. Number of Terminals:
Analysis: The first floor has a high number of wireless terminals (100), while the second and third floors
need to accommodate a significant number of wired terminals (200) and some wireless terminals (50).
This means the network must support a high volume of wired connections (with adequate ports and
switches) as well as sufficient wireless access points to cover the needs of users on each floor.
Analysis: The use of SNMP (Simple Network Management Protocol) means the network should be
designed to be easily monitored and managed from a central point. SNMP-compatible devices like
managed switches, routers, and wireless access points should be used. Network performance
monitoring tools must also be integrated for proactive management.
Analysis: With 100 Mbit/s wired access required and mostly internal traffic, the network must be
designed to handle a significant load efficiently. The core network devices, such as switches and routers,
should support high throughput and low latency, ensuring smooth internal communication. Network
traffic patterns should be closely monitored to ensure no bottlenecks in key areas.
6. Availability Requirements:
Analysis: The network needs to be redundant and failover-capable, especially at the Layer 3 level. This
means implementing features like redundant links, possibly using spanning tree protocol (STP) for Layer
2 redundancy and dynamic routing protocols for Layer 3 failover. Core network components (routers,
switches) should have backup power supplies or be deployed in a fault-tolerant manner to ensure
continuous availability.
7. Security Requirements:
Analysis: Since network traffic needs to be controlled, strong security measures are required. This may
include configuring firewalls, VPNs for remote access, and applying access control policies at both the
network and device levels. The network design should incorporate segmentation (e.g., VLANs) to isolate
sensitive departments (like R\&D) from other areas.
Analysis: The company will be using static IP addresses for egress devices to connect to the Internet. This
means a reliable routing setup will be needed to handle the static IP configuration, and devices on the
network will need to be correctly configured for outbound traffic. NAT (Network Address Translation)
may be used for devices behind the gateway to access the Internet.