Switch and basic commands

Data link layer function

Data link establishment, maintenance and teardown
Frame packaging, frame transmission, frame synchronization
Frame error recovery
Flow control

Ethernet MAC address

*Used to identify a single device or a group of devices on an Ethernet.
*The mac address is composed of 48-bit binary, usually divided into six segments, expressed in hexadecimal. Insert picture description here
The first 24 bits are the supplier identification, and the last 24 bits are the unique number of the network card by the supplier.

Ethernet frame format

Switch working principle

1. Learning based on the source MAC address
2. Forwarding based on the known destination MAC address
3. When the destination MAC address is unknown, flood processing
4. When the switch receives a broadcast/multicast frame, unconditional flood processing
5. One interface of the switch can Learning multiple MAC addresses
6. The switch learns the same MAC address, but it is learned from different ports. At this time, this MAC is combined with the learned port.

Switch Ethernet interface working mode
* Simplex: Two data stations can only transmit data in a single direction
* Half duplex: Two data stations can transmit in both directions, but not at the same time
* Duplex: between two data stations Two-way and simultaneous data transmission

Switch broadcast domain: All interfaces are in a broadcast domain.
Switches are divided into different interface modes according to different connection objects:
1. Access mode (computer) An interface can only be divided into one VLAN
2. Trunk trunk link mode (switch) By default, only vlan1 is allowed, and traffic needs to pass through stone caves through other vlans.
3.hybrid mixed mode (computer or switch)

Virtual network: VLAN
benefits/functions:
1. Divide broadcast domain
2. Convenient management
3. Security

Realize the communication technology between different
VLANs : 1. One-arm routing (Layer 2 switch + router)
2. Layer 3 switching

Basic commands

Enter must hit:
User view
System view [Quidway]
Enter system view: system
one level exit: quit
Complete exit: return

*Never time out:
[]user-interface console 0
[]idel-timeout 0 0
*Configure host name:
<>sysyem-view
[]sysname
*Close information prompt:
[]undo info-center enable
<>undo terminal monitor
user Switch the view mode to the system view mode [Huawei]
system-view

Commonly used commands:
1. Historical command query
[Huawei] display history-command

2. Configure the host name
system-view
[Huawei] sysname Router1

3. Status information query
display version ####View the VRP version
display users ####View user terminal information

4. Enter the interface mode and view the information
sys
[Huawei]int e0/0/1
[Huawei-GigabitEthernet0/0/1]dis this ####View the configuration information in the current view

5. Configuration file management command
[Huawei]display saved-configuration ###View the information saved by the device
[Huawei]display current-configuration ###View the current configuration information of the device
reset saved-configuration ###Erasing the information in the storage device Configuration file
compare configuration ###Compare whether the current configuration information is consistent with the saved file in the storage device

6. Close Huawei's information prompt center
[Huawei] undo info-center enable
or
undo terminal monitor

7, eternal time
[Huawei] user-interface console 0
[Huawei-ui-console0] idle-timeout 0 0

8. Configure the duplex and speed command
sys
[Huawei]int g0/0/1
[SW1-Ethernet0/0/1]undo negotiation auto ###Turn off auto negotiation
[SW1-Ethernet0/0/1]speed 100 ### Adjust the speed to 100M
[SW1-Ethernet0/0/1]duplex full ###Adjust to the full-duplex mode, explanation: full: Full-Duplex (full-duplex mode) half: Half-Duplex (half-duplex mode)

9. Save the configuration
save

10. Set the remote login password
[Huawei]user-interface vty 0 4 #0 is the initial value, 4 is the end value. Means that 5 sessions can be opened at the same time to enter the switch to configure the command
[Huawei-ui-vty0-4]authentication-mode password
[Huawei-ui-vty0-4]set authentication password simple 222
[Huawei-ui-vty0-4]user privilege level 3
[Huawei-ui-vty0-4]dis this

Use SecureCRT to link eNSP
●Double-click to open a device with [View] and [Configuration], open [Configuration] -window configuration: serial port number: 2000 ###This is the port number
● Open SecureCRT and click [link]-[Protocol] Telnet ----【Hostname】127.0.0.1----【Prot】2000
●The current terminal is opened—disconnected【disconnect】----session【session options】————Force one character at a time mode【 Force charater at atime mode]—Save【OK】
●Right click on the current terminal—link【reconnect】

Ways to manage equipment:

In-band management: It means that the network management control information and the user bearer service are the same logical channel, that is, the bandwidth management method used.
In-band management methods include: WEB, Telnet (external network IP used in telnet)
Out-of-band management: refers to the network management control information and the network carried by the user are not the same logical channel, that is, the use of the internal network management method, does not occupy Bandwidth
Out-of-band management methods include: console, Tenlet (intranet IP used during telnet)

Huawei command level effect
3-15 Management and Management commands
2 configuration level Business configuration
1 monitoring level System maintenance, business fault diagnosis
0 visit level Network diagnostic commands

The initial user name/password of the Huawei device
Server: root Huawei12#$ 192.168.2.100

The number of VLANs supported by Huawei is: 1-4094

Guess you like

Origin blog.csdn.net/hotshortgg/article/details/111660353