admin 发表于 2026-2-28 12:55:00

H3C s6800 交换机配置vlan、dhcp、vlan标签(truck)

H3C s6800 交换机配置vlan、dhcp、vlan标签(truck)

创建vlan:

vlan 1372
exit
vlan 1371
exit


设置vlan ip:

interfaceVlan-interface 1371
%Jan1 02:27:30:667 2011 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface1371 changed to up.
%Jan1 02:27:30:669 2011 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface1371 changed to up.

ip address 10.17.18.254 255.255.255.0
exit




配置指定端口trunk 并运行vlan 1371和1372通过:

interface Ten-GigabitEthernet 2/0/1
port link-type trunk
port trunk permit vlan 1371 1372
exit

interface Ten-GigabitEthernet 2/0/3
port link-type trunk
port trunk permit vlan 1371 1372
exit


admin 发表于 2026-2-28 13:06:04

display interface Vlan-interface1372
Vlan-interface1372
Current state: UP
Line protocol state: UP
Description: Vlan-interface1372 Interface
Bandwidth: 10000000 kbps
Maximum transmission unit: 1500
Internet address: 10.17.19.254/24 (Primary)
IP packet frame type: Ethernet II, hardware address: 48bd-3db9-ab6d
IPv6 packet frame type: Ethernet II, hardware address: 48bd-3db9-ab6d
Last clearing of counters: Never
Input (total):360 packets, 37896 bytes
Output (total):0 packets, 0 bytes

display interface Ten-GigabitEthernet 2/0/33
Ten-GigabitEthernet2/0/33
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: 48bd-3db9-ab91
Description: Ten-GigabitEthernet2/0/33 Interface
Bandwidth: 1000000 kbps
Loopback is not set
Media type is optical fiber, port is 1000_BASE_SX_SFP
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 10000
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
Known-unicast max-ratio: 100%
PVID: 1372
MDI type: Automdix
Port link-type: Access
Tagged VLANs:   None
Untagged VLANs: 1372
Port priority: 0
Last link flapping: 0 hours 36 minutes 19 seconds
Last clearing of counters: Never
Current system time:2011-01-01 02:45:16
Last time when physical state changed to up:2011-01-01 02:08:57
Last time when physical state changed to down:2011-01-01 00:02:17
Peak input rate: 75 bytes/sec, at 2011-01-01 02:14:20
Peak output rate: 88 bytes/sec, at 2011-01-01 02:14:20
Last 300 seconds input: 0 packets/sec 17 bytes/sec 0%
Last 300 seconds output: 0 packets/sec 83 bytes/sec 0%
Input (total):424 packets, 43288 bytes
         33 unicasts, 124 broadcasts, 267 multicasts, 0 pauses
Input (normal):424 packets, - bytes
         33 unicasts, 124 broadcasts, 267 multicasts, 0 pauses
Input:0 input errors, 0 runts, 0 giants, 0 throttles
         0 CRC, 0 frame, - overruns, 0 aborts
         - ignored, - parity errors
Output (total): 1242 packets, 174362 bytes
         44 unicasts, 6 broadcasts, 1192 multicasts, 0 pauses
Output (normal): 1242 packets, - bytes
         44 unicasts, 6 broadcasts, 1192 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
         0 aborts, 0 deferred, 0 collisions, 0 late collisions
         0 lost carrier, - no carrier
               
         
display interface Ten-GigabitEthernet 2/0/1
Ten-GigabitEthernet2/0/1
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: 48bd-3db9-ab71
Description: Ten-GigabitEthernet2/0/1 Interface
Bandwidth: 10000000 kbps
Loopback is not set
Media type is optical fiber, port is 10G_BASE_SR_SFP
10Gbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 10000
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
Known-unicast max-ratio: 100%
PVID: 1
MDI type: Automdix
Port link-type: Trunk
VLAN Passing:   1(default vlan), 1371-1372
VLAN permitted: 1(default vlan), 1371-1372
Trunk port encapsulation: IEEE 802.1q
Port priority: 0
Last link flapping: 0 hours 36 minutes 11 seconds
Last clearing of counters: Never
Current system time:2011-01-01 02:45:26
Last time when physical state changed to up:2011-01-01 02:09:15
Last time when physical state changed to down:2011-01-01 02:09:14
Peak input rate: 2 bytes/sec, at 2011-01-01 02:10:18
Peak output rate: 85 bytes/sec, at 2011-01-01 02:34:16
Last 300 seconds input: 0 packets/sec 0 bytes/sec 0%
Last 300 seconds output: 0 packets/sec 82 bytes/sec 0%
Input (total):13 packets, 1018 bytes
         0 unicasts, 0 broadcasts, 13 multicasts, 0 pauses
Input (normal):13 packets, - bytes
         0 unicasts, 0 broadcasts, 13 multicasts, 0 pauses
Input:0 input errors, 0 runts, 0 giants, 0 throttles
         0 CRC, 0 frame, - overruns, 0 aborts
         - ignored, - parity errors
Output (total): 1419 packets, 186293 bytes
         0 unicasts, 75 broadcasts, 1344 multicasts, 0 pauses
Output (normal): 1419 packets, - bytes
         0 unicasts, 75 broadcasts, 1344 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
         0 aborts, 0 deferred, 0 collisions, 0 late collisions
         0 lost carrier, - no carrier
               

display stp brief
MST ID   Port                              RoleSTP State   Protection
0      Ten-GigabitEthernet2/0/1            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/3            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/5            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/7            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/9            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/11         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/21         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/23         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/25         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/27         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/29         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/31         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/33         DESIFORWARDINGNONE

admin 发表于 2026-2-28 13:18:10

display interface Ten-GigabitEthernet 2/0/1
Ten-GigabitEthernet2/0/1
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: 48bd-3db9-ab71
Description: Ten-GigabitEthernet2/0/1 Interface
Bandwidth: 10000000 kbps
Loopback is not set
Media type is optical fiber, port is 10G_BASE_SR_SFP
10Gbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 10000
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
Known-unicast max-ratio: 100%
PVID: 1
MDI type: Automdix
Port link-type: Trunk
VLAN Passing:   1(default vlan), 1371-1372
VLAN permitted: 1(default vlan), 1371-1372
Trunk port encapsulation: IEEE 802.1q
Port priority: 0
Last link flapping: 0 hours 48 minutes 15 seconds
Last clearing of counters: Never
Current system time:2011-01-01 02:57:30
Last time when physical state changed to up:2011-01-01 02:09:15
Last time when physical state changed to down:2011-01-01 02:09:14
Peak input rate: 2 bytes/sec, at 2011-01-01 02:10:18
Peak output rate: 85 bytes/sec, at 2011-01-01 02:34:16
Last 300 seconds input: 0 packets/sec 0 bytes/sec 0%
Last 300 seconds output: 0 packets/sec 75 bytes/sec 0%
Input (total):13 packets, 1018 bytes
         0 unicasts, 0 broadcasts, 13 multicasts, 0 pauses
Input (normal):13 packets, - bytes
         0 unicasts, 0 broadcasts, 13 multicasts, 0 pauses
Input:0 input errors, 0 runts, 0 giants, 0 throttles
         0 CRC, 0 frame, - overruns, 0 aborts
         - ignored, - parity errors
Output (total): 1845 packets, 242218 bytes
         0 unicasts, 89 broadcasts, 1756 multicasts, 0 pauses
Output (normal): 1845 packets, - bytes
         0 unicasts, 89 broadcasts, 1756 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
         0 aborts, 0 deferred, 0 collisions, 0 late collisions
         0 lost carrier, - no carrier
               
         
display interface Ten-GigabitEthernet 2/0/1 | include error
Input:0 input errors, 0 runts, 0 giants, 0 throttles
       - ignored, - parity errors
Output: 0 output errors, - underruns, - buffer failures

display mac-address interface Ten-GigabitEthernet 2/0/1
MAC Address      VLAN ID    State            Port/Nickname            Aging

admin 发表于 2026-2-28 13:37:32


display vlan 1372
VLAN ID: 1372
VLAN type: Static
Route interface: Configured
IPv4 address: 10.117.189.254
IPv4 subnet mask: 255.255.255.0
Description: VLAN 1372
Name: VLAN 1372
Tagged ports:   
    Ten-GigabitEthernet2/0/1(U)      
    Ten-GigabitEthernet2/0/3(U)      
    Ten-GigabitEthernet2/0/5(U)      
    Ten-GigabitEthernet2/0/7(U)      
    Ten-GigabitEthernet2/0/9(U)      
    Ten-GigabitEthernet2/0/11(U)      
    Ten-GigabitEthernet2/0/21(U)      
    Ten-GigabitEthernet2/0/23(U)      
    Ten-GigabitEthernet2/0/25(U)      
    Ten-GigabitEthernet2/0/27(U)      
    Ten-GigabitEthernet2/0/29(U)      
    Ten-GigabitEthernet2/0/31(U)      
Untagged ports:
    Ten-GigabitEthernet2/0/33(U)      


display interface Vlan-interface1372
Vlan-interface1372
Current state: UP
Line protocol state: UP
Description: Vlan-interface1372 Interface
Bandwidth: 10000000 kbps
Maximum transmission unit: 1500
Internet address: 10.117.189.254/24 (Primary)
IP packet frame type: Ethernet II, hardware address: 48bd-3db9-ab6d
IPv6 packet frame type: Ethernet II, hardware address: 48bd-3db9-ab6d
Last clearing of counters: Never
Input (total):360 packets, 37896 bytes
Output (total):0 packets, 0 bytes

dis
display in
display int
display interface t
display interface Ten-GigabitEthernet 2/0/33
Ten-GigabitEthernet2/0/33
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: 48bd-3db9-ab91
Description: Ten-GigabitEthernet2/0/33 Interface
Bandwidth: 1000000 kbps
Loopback is not set
Media type is optical fiber, port is 1000_BASE_SX_SFP
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 10000
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
Known-unicast max-ratio: 100%
PVID: 1372
MDI type: Automdix
Port link-type: Access
Tagged VLANs:   None
Untagged VLANs: 1372
Port priority: 0
Last link flapping: 0 hours 36 minutes 19 seconds
Last clearing of counters: Never
Current system time:2011-01-01 02:45:16
Last time when physical state changed to up:2011-01-01 02:08:57
Last time when physical state changed to down:2011-01-01 00:02:17
Peak input rate: 75 bytes/sec, at 2011-01-01 02:14:20
Peak output rate: 88 bytes/sec, at 2011-01-01 02:14:20
Last 300 seconds input: 0 packets/sec 17 bytes/sec 0%
Last 300 seconds output: 0 packets/sec 83 bytes/sec 0%
Input (total):424 packets, 43288 bytes
         33 unicasts, 124 broadcasts, 267 multicasts, 0 pauses
Input (normal):424 packets, - bytes
         33 unicasts, 124 broadcasts, 267 multicasts, 0 pauses
Input:0 input errors, 0 runts, 0 giants, 0 throttles
         0 CRC, 0 frame, - overruns, 0 aborts
         - ignored, - parity errors
Output (total): 1242 packets, 174362 bytes
         44 unicasts, 6 broadcasts, 1192 multicasts, 0 pauses
Output (normal): 1242 packets, - bytes
         44 unicasts, 6 broadcasts, 1192 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
         0 aborts, 0 deferred, 0 collisions, 0 late collisions
         0 lost carrier, - no carrier
               
         
display interface Ten-GigabitEthernet 2/0/1
Ten-GigabitEthernet2/0/1
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: 48bd-3db9-ab71
Description: Ten-GigabitEthernet2/0/1 Interface
Bandwidth: 10000000 kbps
Loopback is not set
Media type is optical fiber, port is 10G_BASE_SR_SFP
10Gbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 10000
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
Known-unicast max-ratio: 100%
PVID: 1
MDI type: Automdix
Port link-type: Trunk
VLAN Passing:   1(default vlan), 1371-1372
VLAN permitted: 1(default vlan), 1371-1372
Trunk port encapsulation: IEEE 802.1q
Port priority: 0
Last link flapping: 0 hours 36 minutes 11 seconds
Last clearing of counters: Never
Current system time:2011-01-01 02:45:26
Last time when physical state changed to up:2011-01-01 02:09:15
Last time when physical state changed to down:2011-01-01 02:09:14
Peak input rate: 2 bytes/sec, at 2011-01-01 02:10:18
Peak output rate: 85 bytes/sec, at 2011-01-01 02:34:16
Last 300 seconds input: 0 packets/sec 0 bytes/sec 0%
Last 300 seconds output: 0 packets/sec 82 bytes/sec 0%
Input (total):13 packets, 1018 bytes
         0 unicasts, 0 broadcasts, 13 multicasts, 0 pauses
Input (normal):13 packets, - bytes
         0 unicasts, 0 broadcasts, 13 multicasts, 0 pauses
Input:0 input errors, 0 runts, 0 giants, 0 throttles
         0 CRC, 0 frame, - overruns, 0 aborts
         - ignored, - parity errors
Output (total): 1419 packets, 186293 bytes
         0 unicasts, 75 broadcasts, 1344 multicasts, 0 pauses
Output (normal): 1419 packets, - bytes
         0 unicasts, 75 broadcasts, 1344 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
         0 aborts, 0 deferred, 0 collisions, 0 late collisions
         0 lost carrier, - no carrier
               

display stp brief
MST ID   Port                              RoleSTP State   Protection
0      Ten-GigabitEthernet2/0/1            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/3            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/5            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/7            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/9            DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/11         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/21         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/23         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/25         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/27         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/29         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/31         DESIFORWARDINGNONE
0      Ten-GigabitEthernet2/0/33         DESIFORWARDINGNONE


display mac-address interface Ten-GigabitEthernet 2/0/1
MAC Address      VLAN ID    State            Port/Nickname            Aging
display ip routing-table

Destinations : 13
页: [1]
查看完整版本: H3C s6800 交换机配置vlan、dhcp、vlan标签(truck)