华为交换机命令
clock timezone CST add 08:00:00
clock datetime 14:58:00 2026-04-29
display clock
user-interface console 0
authentication-mode password
aaa
local-user admin password cipher 123456
local-user admin service-type telnet
local-user admin privilege level 15
telnet server enable
user-interface vty 0 4
protocol inbound telnet
authentication-mode aaa
user privilege level 15
display ip interface brief
display ip routing-table
ip route-static 172.16.30.0 24 10.10.14.4 preference 65
ospf 1 router-id 10.10.10.1
area 0
network 172.16.10.0 0.0.0.255
stp region-configuration
region-name HCIA
instance 2 vlan 2
active region-configuration
stp root primary
stp instance 2 root primary
interface Eth-Trunk 1
trunkport GigabitEthernet 0/0/10 to 0/0/12
interface GigabitEthernet 0/0/1.10
ip address 172.16.10.254 24
dot1q termination vid 10
arp broadcast enable
acl 2000
rule deny source 10.10.10.0 0.0.0.255
rule permit source any
traffic-filter outbound acl 2000
nat address-group 1 10.10.200.1 10.10.200.4
nat outbound 2000 address-group 1
nat server protocol tcp global 10.10.200.4 80 inside 192.168.1.1 80
ip pool hcia-pool
network 192.168.10.0 mask 255.255.255.0
excluded-ip-address 192.168.10.11 192.168.10.253
gateway-list 192.168.10.254
lease day 2
dns-list 8.8.8.8
dhcp enable
dhcp select global
dhcp enable
dhcp select relay
dhcp relay server-ip 10.10.0.1
interface vlanif 10
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 120
vrrp vrid 10 preempt-mode timer delay 20
rip 1
version 2
network 12.0.0.0
import-route bgp
bgp 100
peer 34.1.1.2 as-number 200
ipv4-family unicast
import-route rip 1
network 200.1.1.0 24
traffic classifier jiaoxue
if-match acl 2010
traffic behavior re-dianxin
redirect ip-nexthop 12.1.1.2
traffic policy P
classifier jiaoxue behavior re-dianxin
traffic-policy P inbound

浙公网安备 33010602011771号