Navigating the CLI-
Navigating the Command Line Interface (CLI) involves interacting with a text-based
interface to control and manage a computer or software.
And it is used by many network engineers to configure a device.
Command Line Basics:
● Understanding the prompt: Recognizing the command prompt and
knowing when the system is ready for input.
● Typing commands: Learning how to enter commands and execute them.
File System Navigation:
● Changing directories: Using commands like cd to navigate between
different directories.
● Listing files and directories: Using commands like ls (on Unix-like
systems) or dir (on Windows) to see the contents of the current directory.
Pathnames:
● Absolute vs. relative paths: Understanding the difference between
specifying a file or directory location with respect to the root directory or
the current working directory.
● Special characters in paths: Dealing with spaces, special characters, and
escaping mechanisms.
File and Directory Manipulation:
● Creating and removing files and directories: Using commands like touch,
mkdir, rm, and rmdir.
● Copying, moving, and renaming: Utilizing commands like cp, mv, and
rename.
File and Text Manipulation:
● Viewing file contents: Using commands like cat, more, less, or type (on
Windows).
● Editing files: Using text editors like nano, vim, emacs, or redirecting output
to a file.
Command Syntax and Options:
● Understanding command structure: Recognizing the format of commands,
including command name and options.
● Using command options: Exploring additional functionalities provided by
various options.
File Permissions and Ownership:
● Managing file permissions: Using commands like chmod (Unix-like
systems) or icacls (Windows) to control who can read, write, or execute
files.
● Changing file ownership: Using commands like chown (Unix-like systems)
or takeown (Windows).
Command History:
● Reviewing and reusing commands: Utilizing command history and
shortcuts to save time and avoid retyping.
Pipelines and Redirection:
● Chaining commands: Using the pipe (|) to pass the output of one
command as the input to another.
● Redirecting input and output: Using symbols like >, <, >> to control where
command input comes from and where output goes.
Wildcards and Regular Expressions:
● Using wildcards: Employing symbols like * and ? for pattern matching in
file and directory names.
● Regular expressions: Understanding basic regular expressions for more
advanced pattern matching.
Environment Variables:
● Setting and displaying environment variables: Using commands like
export (Unix-like systems) or set (Windows).
System Information:
● Gathering information about the system: Using commands like uname,
hostname, systeminfo, etc., to obtain details about the system.
Scripting and Automation:
● Writing simple scripts: Creating basic shell scripts to automate repetitive
tasks.
● Understanding scripting languages: Familiarity with languages like Bash,
PowerShell, or Python for more advanced automation.
File System Navigation and Management-
file system is used to store files used and generated by the system, for example, image
files, configuration files, logging files and accounting files.
The file commands allow you to copy, create, move, and delete files and directories,
navigate to a different directory, display file or directory contents and the image version.
Although some of the storage devices on routers are not actually compact flash devices
(for example, cf1: on the 7950 XRS is an internal SSD), we refer to all storage devices as
compact flash.
● Compact Flash Devices- CompactFlash cards are a form of flash memory
storage, which means they use non-volatile memory (usually NAND flash) to
store data.
● URL’s-
● Logs and Monitoring- Network devices generate logs and monitoring data that
can be stored in the file system.
● Security Policies- File system security is vital in routing and switching
environments. Access control lists (ACLs) and file permissions on the device's
file system can be configured to restrict access to sensitive configuration files
and logs.
VRP-
-Versatile routing platform
-Also known as the universal routing platform, it is the operating system platform
of all data communication products based on IP/ATM architecture.
-Huawei products that run the VRP operating system include routers, LAN
switches, ATM switches, dial-up access servers, IP telephony gateways,
carrier-grade integrated service access platforms, intelligent service selection
gateways, and dedicated hardware firewalls.
- VRP provides a modular architecture with rich functional features.
-VRP is Huawei's fully autonomous intellectual property network operating
system that provides a consistent network interface, user interface, and
management interface for a variety of hardware platforms, and offers a flexible
and versatile application solution with more than 300 features
-
-
Establishing a single switched network-
Define Network Requirements:
● Identify the requirements of your network, including the number of
devices, the physical layout of the space, and the bandwidth needs. This
information helps determine the number and type of switches needed.
Choose Switches:
● Select switches that meet the requirements of your network. Consider
factors such as the number of ports, supported data rates, and any
additional features needed (e.g., VLAN support, Power over Ethernet).
Physical Installation:
● Install the switches in appropriate locations within the network. Ensure
they are mounted securely and have adequate ventilation.
Connect Switches:
● Interconnect the switches using Ethernet cables. This forms the backbone
of the switched network. Use the appropriate cable types (e.g., Cat5e,
Cat6) depending on the network speed requirements.
Connect End-User Devices:
● Connect computers, printers, and other end-user devices to the switch
ports. Ensure proper cable termination and that devices are configured
with appropriate IP addresses (either statically or through DHCP).
Configure Switches:
● Access the switch management interface (usually through a web browser
or command-line interface) and configure basic settings. This may include
assigning IP addresses, setting up VLANs (if needed), and enabling
features like spanning tree protocol for loop prevention.
VLAN Configuration (Optional):
● If your network requires segmentation, configure Virtual LANs (VLANs) on
the switches. VLANs separate the network into logical segments,
providing improved security and performance.
Spanning tree protocol-
Spanning Tree Protocol (STP) is used to make a loop free network by monitoring the
network to track all the
links and shut down the least redundant ones. Root bridge is a switch in a single VLAN
or whole topology
(according to the type of STP standard used) which is responsible for distributing
BPDUs and block the least
redundant port.
Types of Spanning Tree Protocol (STP) –
1. 802.1D – This is also known as CST (Common Spanning Tree).
- It is a spanning tree standard developed by IEEE which elects only one root bridge per
whole topology.
-All the traffic flows over the same path (the best path to the root bridge) but this doesn’t
always hold good as there can be scenarios in which the optimized path to reach a
VLAN is different from the path obtained on electing the root bridge.
-It is very slow as it takes 32 seconds to converge.
Advantages: ∙ Less CPU and memory required.
Disadvantage: ∙ Lesser optimization as the path calculated as the best cost to root
bridge might not be the best path to reach a network.
∙ No load balancing.
2. Per VLAN Spanning Tree + (PVST+) – It is a spanning tree standard developed by
Cisco for its devices which finds the root bridge per VLAN.
- It is Cisco's default version of STP. It finds separate 802.1d spanning tree instances for
each VLAN.
Advantages: ∙ PVST+ provides more optimization on the performance of a network than
CST as it selects root bridges per VLAN.
∙ Bandwidth consumption is lesser than CST.
∙ Optimum load balancing is achieved.
Disadvantages: ∙ This is slow as CST i.e convergence time is slow. By default, Cisco
switches take 50 seconds for converging.
∙ More resources (CPU and memory) are required.
3. 802.1w – Rapid Spanning Tree Protocol (RSTP) – It is a spanning standard developed
by IEEE which provides faster convergence than CST but holds the same idea of finding
a single root bridge in the topology.
4. 802.1s (Multiple Spanning Tree) :-This standard is developed by IEEE in which
grouping of VLANs is done and for each single group, RSTP is run.
-This is basically a Spanning Tree Protocol running over another Spanning Tree Protocol.
Advantages: ∙ High redundancy
∙ load balancing can be achieved.
∙ lower CPU and memory usage is required
Disadvantages: ∙ More configuration is required and not easy to implement.