[eNSP Practice] eNSP Practical Chapter (2) Simple Configuration of Switches and Hosts (Detailed Explanation with Pictures and Texts)

write in front

In fact, I introduced the use of routers in the previous article, but many netizens sent me private messages and said: "Blogger, I am a novice, can you tell me the difference between routers and switches? Look, this guy is dizzy." Then I will list the general differences as follows:
A switch connects computers with different IP addresses and shares a network cable; a router uses the same IP for different computers, just like A big road divides into many small roads. In a word, the router is connected to the external network, and the switch is connected to the internal network.
Switches are addressed using the well-known MAC address, which is the unique physical address of each device, while routers are addressed through IP addresses. To put it bluntly, the switch (data link layer) looks for the physical address, and the router (network layer) looks for the software address.
Insert image description here
Let’s use an easy-to-understand analogy: a router is like the main switch for tap water in your home. Once it is turned off, all faucets will run out of water. The switch is like the water distribution pipes in bathrooms, kitchens, sinks, etc. , which helps the router expand the use of connection ports under the same network layer. The premise is that the router must be turned on.
In addition, everyone must remember that routers are better than switches. They have firewall functions to prevent broadcast storms. They can divide broadcast domains to prevent communication congestion and security. Vulnerabilitiesetc., but the switch does not have them.

involving knowledge

The difference between routers and switches, the practical operation and use of eNSP switches, how to use eNSP to simulate switch work, and the interconnection test between switches and hosts.
原创于博主IT黄大大及微信公众号《IT黄大大》更多知识可关注哈!!

1. Switch experiment

Purpose: It mainly allows everyone to realize the basic configuration of the switch and the host, command debugging, etc. on the simulator, and become more proficient in the role of the switch and the basic configuration.

1.1 Experimental conditions

Hard conditions: eNSP simulation software, two PC hosts (on eNSP), one LSW switch (on eNSP)
Environmental conditions< /span>: The eNSP simulator can normally start the device, type commands, and run commands

1.2 Experimental steps

A. Open the eNSP software and create a topology

Insert image description here

B. Set up the connection between the host and the switch

As shown in the figure, drag two hosts and a switch to the topology and connect them with copper lines. When connecting, select Ethernet 0/0/1 when selecting PC1.
Insert image description here

Connect the other end to LSW1, select the G0/0/1 port, as shown below, you can complete the connection between a single host and the switch
Insert image description here
Also configure the connection between PC2 and LSW1, PC2 E0/0/1 is connected to G0/0/2 of LSW1, as shown in the figure below:
Insert image description here
In this way, we have basically built a small 'Switch-Host' ecology, here is how to enable them to communicate with each other.

C. Configure switches and hosts

Next, we follow steps 1 and 2 shown in the figure below, first select all devices and connections, and then click the green triangle to release the start button, which means starting all devices.
Insert image description here

[Solution to the red dot problem]
After starting up, you will find that the connected nodes are still marked in red. This troubled me as a beginner for two days, because red means unreasonable, no matter No matter how you configure it later, it will be useless, which means that PC1 will never be able to ping PC2.
(1) First make sure that all machines are up. The status after they are up is as follows:
Insert image description here

(2) After getting up, the red status will change to green status after a while (don’t be impatient, wait a moment, you can use data packet capture if it remains unchanged)
The following is normal IP settings and subnet masks and gateway settings for different network segments
Double-click PC1 to enter the host configuration pop-up page, configure its IP, subnet mask and other information as shown below; then click the Apply button ;
Insert image description here
Configure the basic configuration information of PC2 in the same way (same network segment as PC1)
Insert image description here

D. Verify the interoperability of devices on different network segments

Open the settings of PC1, click the command line in the tab bar, and ping the host address of PC2, 192.168.1.2, as shown below, which is the description of the packets that can be pinged.
Insert image description here

1.3 Check the MAC address through the switch

Right-click the switch and click CLI, execute the following command to view the MAC addresses of the two connected hosts (remember that the two hosts must communicate first)
Insert image description here
In fact, I only used PC1 to ping at the beginning. PC2, and then directly used the switch to check the mac, and found that there was no response at all when executing the command line, it was in an intact state:
Insert image description here
After struggling for a while, I found the answer by searching the Internet for the reason. The main reason The switch initially has an empty MAC table, so it is not displayed. You perform a data communication and the MAC address table is learned. You can see it by executing display mac-address again.


write at the end

Looking forward to making progress with everyone, I am a novice on the Internet, take one step at a time, and work hard together in 2024. This article is personally tested and summarized, it is true and effective
原创于博主IT黄大大及微信公众号《IT黄大大》
If you need to reprint, please state the source, thank you understanding! !

Guess you like

Origin blog.csdn.net/hdp134793/article/details/134810644