当前位置:网站首页>Basic principle and configuration of switch
Basic principle and configuration of switch
2022-07-16 07:46:00 【Free to Superman】
Catalog
One . Data link layer functions
3、 ... and . How switches work
One . Data link layer functions
The data link layer is responsible for
1、 Establishment of data link 、 Maintenance and removal
Physical address 、 Network topology
2、 Frame packaging 、 Frame transmission 、 Frame synchronization
Framing : Encapsulate data in frames , Send... In order
Delimitation and synchronization : produce / Identify frame boundaries
3、 Frame error recovery
Error recovery : Retransmission is adopted
4、 flow control
Flow control and adaptive control : Ensure the stability of intermediate transmission equipment and the matching of transmission rate between transceiver and transmitter
Two . Ethernet
1. Ethernet MAC Address
Ethernet MAC Address by 48 Bit binary number composition , Usually divided into 6 paragraph , In hexadecimal notation , for example :08 - 00 - 5a - e3 - 93 - 6c. The top 24 Bit is the manufacturer to IEEE The requested vendor number , after 24 Bit is the serial number of the network interface card .
MAC Address No 8 Position as 0 when , It means that we should MAC The address is unicast address ; by 1 when , It means that we should MAC The address is multicast MAC Address . The address of a physical network card must be a unicast address , That is the first. 8 It must be 0; A multicast address is a logical address , Used to represent a group of recipients , Not a receiver .
2. Ethernet frame format
Lead code : It is used to synchronize the sending and receiving rates of both parties in the process of data transmission
Frame start delimiter : Used to identify the beginning of Ethernet frame
Destination address : The goal is MAC
source address : Source MAC
type : Identify the type of upper layer protocol , Such as 0800H Express IP agreement
data : Upper data
Frame check sequence : Check data and fill fields by cyclic redundancy check , Equivalent to error checking , If correct , receive data , If not , Retransmission .
The preamble is part of the physical layer encapsulation , Sort the data , Retransmission in segments , When the last frame is checked, check whether the transmitted data corresponds , If the data corresponds to the time of sending , Then it means that the data is complete , The transmission succeeded ; If it is not a one-to-one correspondence , It indicates that the transmission was unsuccessful , Need to retransmit .
3、 ... and . How switches work
1. The principle of switch forwarding
The initial state ,MAC Address learning , Broadcast unknown data frame , The receiver responds , The switch realizes unicast communication
analysis : The initial state of the switch is unknown ,A Want to be with B signal communication , First , Switch to learn MAC Address ,A and B When communicating , Go through the switch , At this time, exchange opportunity records A Of MAC Address and interface . Only A, No, B, So the switch should broadcast ( Flooding state ), Notify all hosts , If you are looking for your own, open it , If you don't find your own, discard the data .B After seeing that you are looking for yourself , To give A Respond ,B to A The response also needs to go through the switch , At this time, exchange opportunity records B Of MAC Address and interface . such A Follow B Unicast communication is realized .

2、 Working mode of Ethernet interface
Simplex : Data can only be transmitted in a single direction between two data
Half duplex : Data can be transmitted Bi directionally between two data stations , But not at the same time
full duplex : Two data stations can transmit data in both directions and at the same time
3、 Basic commands of the switch
1. Switch from user view mode to system view mode
[Huawei]system-view
2、 Configure host name
[Huawei]system-view
3、 Status information query
[Huawei]display version -------- see VRP edition
[Huawei]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、 Profile management commands
[Huawei]display saved-configuration ----------> View the information saved by the device
[Huawei]display current-configuration-----------> View information about the current configuration of the device
reset saved-configuration-------------> Erase the configuration file from the storage device ( initialization )
compare configuration---------------> Compare whether the current configuration information is consistent with the saved file in the storage device
6、 Shut down Huawei's Information Center
[Huawei]undo info-center enable perhaps undo terminal monitor
7、 Never time out
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
8、 Configure duplex and rate commands
sys
[Huawei]int g0/0/1
[SW1-Ethernet0/0/1]undo negotiation auto---------------> Turn off auto negotiation
[SW1-Ethernet0/0/1]speed 100-----------------------------> Adjust to rate 100M
[SW1-Ethernet0/0/1]duplex full ----------------------------> Switch to full duplex mode
explain :full:Full-Duplex( Full duplex mode ),half:Half-Duplex( Half duplex mode )
9、 Save settings
save
expand :
10、 Set remote login password
[Huawei]user-interface vty 0 4
#0 Is the initial value ,4 Is the end value . Open at the same time 5 A session enters the switch to configure commands
[Huawei-ui-vty0-4]authenticaation-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 link eNSP
● Double click to open a device 【 View 】 and 【 To configure 】, open 【 To configure 】--- Window configuration : Serial number :2000 ### This is the port number
● open SecureCRT Click on 【 link 】---【Protocol】Telnet----【Hostname】127.0.0.1----【Prot】2000
● The current terminal is opened --- To break off 【disconnect】---- conversation 【session options】----- Force one character pattern at a time 【Force charater at atime mode】--- preservation 【OK】
● Right click the current terminal --- link 【reconnect】
Huawei switch command :
Three views of Huawei switches :
<Huawei> User view
[Huawei] The system view
[Huawei-Ethernet0/0/1] Interface view
[Huawei-vlan10]vlan View
<Huawei>display version // View version number
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.110 (S3700 V200R001C00) VRP: The operating system platform of Huawei equipment , After installing this system, many protocols can be supported , Function, etc
Copyright (c) 2000-2011 HUAWEI TECH CO., LTD // Indicate that this is a Huawei device
Quidway S3700-26C-HI Routing Switch uptime is 0 week, 0 day, 0 hour, 3 minutes // Indicate how long it has been running , Start counting when you turn it on
<Huawei>dis ver ---> Commands can be abbreviated
<Huawei>display saved-configuration Use display saved-configuration The command can view the configuration file information when the switch is next started
<Huawei>display current-configuration The configuration in effect during the operation of the switch is called the current configuration
<Huawei>display startup When the switch is powered on , Read the configuration file from the default storage path to initialize the switch , Therefore, the configuration in this configuration file is called initial configuration
---- More ---- Appear when there are too many commands to turn over more, Press the space and enter key to continue reading , If you don't watch it, just ctrl+c
<Huawei>system-view or <Huawei>sys // Enter the system view
[Huawei]sysname sw1 or [Huawei]sys sw1 // Change device name , distinguish 2 A short sys It means different
[sw1]display bridge mac-address
System bridge MAC address: 4c1f-ccf1-10b5 // Displays the switch mac Address
<Huawei>dis int Ethernet0/0/1 // View interface details , Including status 、mac Address, etc
Ethernet0/0/1 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID : 1, TPID : 8100(Hex), The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-ccf1-10b5
Last physical up time : 2021-02-19 17:04:16 UTC-08:00
Last physical down time : 2021-02-19 16:23:41 UTC-08:00
Current system time: 2021-02-19 17:09:28-08:00
Hardware address is 4c1f-ccf1-10b5
Last 300 seconds input rate 0 bytes/sec, 0 packets/sec
Last 300 seconds output rate 0 bytes/sec, 0 packets/sec
Input: 0 bytes, 0 packets
Output: 17017 bytes, 143 packets
Input:
Unicast: 0 packets, Multicast: 0 packets
Broadcast: 0 packets
Output:
Unicast: 0 packets, Multicast: 143 packets
Broadcast: 0 packets
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]display this // Display the current configuration of the interface
[Huawei]quit // Go back to the next level
<Huawei>
[Huawei-Ethernet0/0/1]return // If cross layer return is used return or ctrl+z
<Huawei>
<Huawei>save // Save settings
[Huawei]clear configuration interface e0/0/1 // Clear the interface configuration , Interface needs to be specified
<Huawei>reset saved-configuration—— Clear the saved configuration
<Huawei>reboot—— restart ( The unsaved current configuration will disappear )
?: Order help / Command prompt
TAB key : Command Completion
<Huawei>sys // For setting console Never time out when connecting lines , The default is 10min
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0
Switch to other interfaces directly in interface mode without exiting the current view
[SW1]int e0/0/2
[SW1-Ethernet0/0/2]int e0/0/1
[SW1-Ethernet0/0/1]
see mac Address table
<SW1>dis mac-address
Configure duplex mode and rate
[SW1-Ethernet0/0/1]undo negotiation auto # Turn off the self negotiation function , The default is auto negotiation , You need to turn it off first and then set the rate manually
[SW1-Ethernet0/0/1]duplex full/half //full full duplex ,half Half duplex
[SW1-Ethernet0/0/1]speed 10/100 // Configure interface rate 10M/100M
<SW1>undo terminal monitor Turn off the monitoring function
Info: Current terminal monitor is off.
[R1]undo info-center enable It is forbidden to pop up interface information
Info: Information center is disabled.
If you want to cancel the command or activate the interface, you can use undo
边栏推荐
- Pytest series-01-installation and introduction
- POI框架学习-导入导出案例
- Is it true that you can't do software testing until you're 35? So what should I do I'm 36
- Longest ascending subsequence longest common subsequence maximum field and longest non repeating subsequence
- Byte test director stayed up for 10 days, and the test post interview script came out of the liver, giving you wings to your big factory dream~
- 【LeetCode】307. 区域和检索 - 数组可修改
- Basic introduction to flask 6 - Context
- 【LeetCode】1217. Play chips
- Redis master-slave cluster construction and sentinel mode configuration
- 静态路由的原理和配置
猜你喜欢

TCP protocol details

Is it reliable to switch to software testing at the age of 30? The mental journey of a person who came here is for you who are confused

從功能測試到自動化測試,實現薪資翻倍,我整理的超全學習指南【附學習筆記】

After 3 months of job hunting, most resumes are dead in the sea. When it comes to manual testing, they shake their heads again and again ~ it's too difficult

Interface test and interface test automation

help one another in defense work

求职3个月,简历大多都石沉大海,一说是手工测试都连连摇头~太难了

三层交换与VRRP

0 1背包 填表实现

jmeter中设置登录接口只调用一次
随机推荐
How to self-study software testing? [super comprehensive analysis from 0 to 1] (with learning notes)
交换机基本原理与配置
一次简单的 JVM 调优,拿去写到简历里
Jenkins中设置展示Allure报告小结
主从复制读写分离保姆级教学
Longest ascending subsequence longest common subsequence maximum field and longest non repeating subsequence
The core difference between fairness and unfairness of reentrantlock
Pytest series-01-installation and introduction
DIY a cache
作为测试开发岗的面试官,我都是怎么选人的?
help one another in defense work
Data storage and disaster recovery (2nd Edition) editor in chief Lu Xianzhi Wu Chunling comprehensive training answer
socket详解
"Finally I left bytek..." confession of a test engineer with an annual salary of 40W
5年经验之谈:月薪3000到30000,测试工程师的变“行”记...
3、 Experimental report on the implementation of SMB sharing and FTP construction by freenas
Du test de fonction au test automatique pour doubler le salaire, mon guide d'apprentissage Super complet [joindre les notes d'apprentissage]
Scheduledthreadpoolexecutor source code and error explanation
Mvcc multi version concurrency control
静态路由的原理和配置