h3c s5024p Switch h3c ar28-31 Router Commands
Switch command switches for each view:
Note that the command executes in the corresponding view
- Type the QUIT command under User view to disconnect from the switch. Type the QUIT command in other views to return to the previous view, type the return command, or use the shortcut key <Ctrl+Z> to return directly to the user view.
- <Quidway> sys into system view
- Note that the commands you can find in different views are different, so be sure to enter the correct view
Users of the switch
There are three kinds of user interface on the network device, vty user refers to the user through Telnet access, vty user refers to the user who accesses the switch through Telnet, H3C s5000p series switch can only have one vty user, because you connect telnet to configure the switch, If a lot of users are connected to Telnet, everyone is in the configuration, who in the end to listen to
The Aux user refers to the remote access through the modem user, con user refers to the user through the serial port access. The Aux and console share a single port in the H3C s5000p.
Help
- The command-line interface provides full help and partial help.
- Full Help
- In either view, type "? Command gets all the commands in the view and their simple descriptions;
- Type a command followed by a space-delimited "? If the location is a keyword, all keywords and their simple descriptions are listed;
Like what:
[Switch2]ip?
Route-static Specify static route
Show Cleanup Configuration
Display Current-configuration
Display Saved-configuration
Save
Restore default
This command is used to erase the Ethernet switch profile in the EEPROM to ensure that the switch restores the configuration file to factory settings when it is rebooted
Reboot
This command is used to restart the switch. The restore default command is used to erase the configuration information in the EEPROM, but the configuration information in the switch RAM still works, and only the restart switch can completely clear the configuration information in the switch RAM and EEPROM.
The reboot command is used in conjunction with the Restore default command to clear the configuration information for the switch.
Configuring IP addresses to eliminate IP address renaming
<Quidway> SYS????????????
[quidway] sysname Switch1
?
[Switch1] Interface Vlan-interface 1
[Switch1-vlan-interface] IP addr 192.168.10.1 255.255.255.0 IP address and subnet mask
?
?
[Quidway-ethernet0/1]undo IP Address
?
Ping the test network on a large scale is good
Please ping each other at the same time on SW1 and Sw2 with large packets and multiple times.
<sw1>ping-s 1000-c 1000 10.0.0.2
- s PacketSize : echo-request length of the Message data field (not including IP and the ICMP message header), in bytes,
- C Count : Send ICMP echo-request number of messages, range 1 ~ 4294967295 .
10.0.0.2 you're going to send me + each reply message must have a + a byte!
ICMPis (Internet Control Message Protocol) is used toIPcontrol messages are passed between the host and the router. At the network layerIPprotocol. The control message refers to the message that the network is not accessible, whether the host is available, whether the route is available, and so on. When you encounterIPdata cannot access the target,IP ICMP messages are automatically sent when the router is unable to forward packets at the current transfer rate .
icmp icmp The message determines the type of error that occurred and determines how the failed packet can be better re-sent. But icmp The only function is to report a problem instead of correcting the error, and the task of correcting the error is done by the sender.
ICMP Common types: It's not a mistake. ICMP Package has Echo Reply of the
Ping command to send to a specific host ICMP information, the destination host returns ICMP Response.
VLAN command to show VLAN conditions
Display VLAN 1
VLAN state:802.1q VLAN
VLAN id:1
VLAN type:static
Route interface:configured
IP address:10.0.0.2
Subnet mask:255.0.0.0
Tagged Ports:none
untagged Ports:
GIGABITETHERNET0/1 GIGABITETHERNET0/2 GIGABITETHERNET0/3
GIGABITETHERNET0/4 GIGABITETHERNET0/5 GIGABITETHERNET0/6
GIGABITETHERNET0/7 GIGABITETHERNET0/8 GIGABITETHERNET0/9
GIGABITETHERNET0/10 GIGABITETHERNET0/11 GIGABITETHERNET0/12
Creating a VLAN requires only VLAN 2 to add ports to the VLAN
[Switch2-vlan1]vlan 2
[Switch2-vlan2]port G0/3
[Switch2-vlan2]port G0/4
[Switch2-vlan2]display VLAN 2
Note that G is shorthand for gigabitethernet.
?
Remove the port from the VLAN and let the port go back to VLAN 1
[Switch2]vlan 2
[Switch2-vlan2]undo Port G0/3
[Switch2-vlan2]undo Port G0/4
?
Configure the port as Trunk
The s5000p Ethernet port has two types of links: access and trunk. A port of type access can belong to only one VLAN, which is typically used to connect to a computer's port, and a trunk-type port that allows multiple VLANs to receive and send packets of multiple VLANs, typically for ports connected between switches.
?
The first step is to enter the Ethernet port view
[Switch2-vlan3]interface G0/22 or abbreviated int G0/22
[Switch2-gigabitethernet0/22]port Link-type Trunk
[Switch2-gigabitethernet0/22]port trunk pvid VLAN 100
The default VLAN ID of the trunk port is configured, by default the trunk port is pvid to 1, and the 2 ports on the trunk Pvid must have the same value to communicate correctly.
PVID to be port-base Vlan ID , which is the port's virtual LAN ID when the port is transmitting and receiving data frames . VLAN TAG tags.
[Switch2-gigabitethernet0/22]port trunk Permit VLAN 2 to 3 allows 2 and 3vlan frames through
? In general it is best to specify the ports allowed through which specific VLANs, do not set allow all VLANs to pass through.
?
Information on the display port
Display int G0/22
Port Link-type:trunk
?
Show MAC Address
<switch2>dis mac-address
Reading entire MAC table. Please wait ...
MAC ADDR VLAN ID State PORT INDEX AGING time (s)
?
0025-64a3-1d0d 1 learned gigabitethernet0/8 AGING
0025-64A3-BC10 1 learned gigabitethernet0/4 AGING
0025-64a3-be06 1 learned gigabitethernet0/6 AGING
?
---3 MAC address (es) found---
?
The two-tier switch has a basic Mac that can be seen in show version
Base Ethernet MAC address:00e0. b0e7.349c
?
Each port of the switch has its own MAC address and is added one at a
For example, if the MAC address of the switch is 000d0.0000.0000.
So, E0/1 's MAC address is 00d0.0000.0001
E0/2 's MAC address is 00d0.0000.0002
Switch Address learning principle
That's what you're talking about. Switch works: Layer switching technology is the development of relatively mature, two-layer switch is a data link layer equipment, can identify the data in the packetMACaddress information, according toMACaddresses to be forwarded, and theseMACThe address and the corresponding port are recorded in an internal address table. The specific workflow is as follows:?
(1)when a switch receives a packet from a port, it first reads the source in the headerMACaddress so that it knows the sourceMACThe address of the machine is connected to which port;?
(2)then read the purpose in the BaotouMACaddress, and find the appropriate port in the Address table;?
(3)as the table has with this purposeMACaddress corresponding to the port, the packet is copied directly to this port;?
(4)if the corresponding port is not found in the table, the packet is broadcast to all ports, and when the destination machine responds to the source machine, the switch can learn a purposeMACThe address corresponds to which port, and it is no longer necessary to broadcast all the ports the next time the data is transferred. ?
continuous cycle of this process, for the whole networkMACaddress information can be learned, the second layer of the switch is to establish and maintain its own table of addresses.
If there's a broadcast storm,
Just pull the cable out, or you can't stop it no matter what key you press.
?
Manually specifying the port rate and how it works
[Sw1]int E0/1
[Sw1-ethernet0/1]speed 100
[Sw1-ethernet0/1]duplex Full
?
Manually close a port
[Sw1-ethernet0/2]shu
?
Configuring ports to converge on a port and a port preferably continuous
Before configuring port aggregation, first ensure that all converged ports of SW1 and SW2 must work in full duplex mode and must work at the same rate (not working in self-negotiation mode). To meet this requirement, manually configure the following commands:
[Sw1]int E0/1
[Sw1-ethernet0/1]speed 100
[Sw1-ethernet0/1]duplex Full
[Sw1-ethernet0/1]int E0/2
[Sw1-ethernet0/2]speed 100
[Sw1-ethernet0/2]duplex Full
?
[Sw2]int E0/1
[Sw2-ethernet0/1]speed 100
[Sw2-ethernet0/1]duplex Full
[Sw2-ethernet0/1]int E0/2
[Sw2-ethernet0/2]speed 100
[Sw2-ethernet0/2]duplex Full
?
[Sw2-gigabitethernet0/5]link-aggregation G0/4 to G0/5
?
Configure Port Mirroring
Our goal is to monitor traffic on the port E0/1 on the e0/24 of the SW2. We only need to configure the port e0/24 as the mirror port of the port E0/1, so that the traffic on all E0/1 will be copied to e0/24, so we can monitor the traffic on all E0/1 with our LAN monitoring software. The specific configuration is:
?
Mirroring-port G0/1
Monitoring-port g0/24
24 Port Monitoring 1 ports
Router commands each view switch
User view: The prompt for the user view is <quidway> In this view you can view the simple running status and statistics of the router.
System view: The system view prompt is [Quidway], in the user view entered command System-view Enter the system view, in the system view can complete the configuration of the system parameters.
Ethernet Port View: The prompt for the Ethernet port view is [QUIDWAY-ETHERNET0/1], enter the command in System view interface Ethernet 0/1 to enter this view, you can configure the Ethernet interface parameters in this view.
Same/asynchronous Serial Port view: The prompt for the same/asynchronous serial port view is [quidway-serial1/0], and you can enter this view by typing interface serial 1/0 under System View, where the same/asynchronous serial port parameters are configurable.
?
Configuring and eliminating Ethernet port IP
[Quidway]int ethernet0/0
[Quidway-ethernet0/0]ip address 2.1.1.2 255.255.255.0
?
Configure router serial port static routing
Configuring the Router serial port
[Quidway]interface serial 1/0
[Quidway-serial1/0]ip route-static 2.1.4.0 255.255.255.0 2.1.2.2
[Quidway-serial1/0]ip Address 2.1.2.1 255.255.255.0
Show routing Table
Dis IP rout
Routing table:public Net
Destination/mask Protocol Pre cost Nexthop Interface
2.1.1.0/24 DIRECT 0 0 2.1.1.2 ethernet0/0
2.1.1.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0
2.1.2.0/24 DIRECT 0 0 2.1.2.1 serial1/0
2.1.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
2.1.2.2/32 DIRECT 0 0 2.1.2.2 serial1/0
2.1.4.0/24 STATIC 0 2.1.2.2 serial1/0
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
?
H3C s5024p switch h3c ar28-31 router command