huawei switch configuration commands

8
Huawei switch configuration commands Huawei router switch configuration commands: computer command PCAlogin:root; root users The password:linux password is Linux; #shutdown-hnow shutdown; #init0 shutdown; #logout; user logoff #login; user login #ifconfig displays the IP address; #ifconfigeth0netmask; set the IP address #ifconfigeht0netmaskdown; disable IP address #routeadd0.0.0.0gw; set the gateway #routedel0.0.0.0gw delete gateway; #routeadddefaultgw; set the gateway #routedeldefaultgw delete gateway; #route display gateway; #ping; send ECHO packets #telnet; remote login Huawei router switch configuration commands: switch command [Quidway]discur displays the current configuration; [Quidway]displaycurrent-configuration displays the current configuration; [Quidway]displayinterfaces display interface information; [Quidway]displayvlanall displays the routing information; [Quidway]displayversion; display version information [Quidway]superpassword; modify privileged user password [Quidway]sysname switch name; [Quidway]interfaceethernet0/1; into the interface view [Quidway]interfacevlanx; into the interface view [Quidway-Vlan-interfacex]ipaddress10.65.1.1255.255.0.0; VLAN IP address configuration [Quidway]iproute-static0.0.0.00.0.0.010.65.1.2; static routing = gateway [Quidway]rip; three layer exchange support [Quidway]local-userftp [Quidway]user-interfacevty04; enter virtual terminal [S3026-ui-vty0-4]authentication-modepassword; set the password mode [S3026-ui-vty0-4]setauthentication-modepasswordsimple222; set the password [S3026-ui-vty0-4]userprivilegelevel3; user level 1

Upload: huanetwork

Post on 15-May-2015

15.071 views

Category:

Technology


1 download

DESCRIPTION

Leading Huawei networking products distributor - Huanetwork.com Huawei switch configuration commands

TRANSCRIPT

Page 1: Huawei switch configuration commands

Huawei switch configuration commands

Huawei router switch configuration commands: computer command

PCAlogin:root; root users

The password:linux password is Linux;

#shutdown-hnow shutdown;

#init0 shutdown;

#logout; user logoff

#login; user login

#ifconfig displays the IP address;

#ifconfigeth0netmask; set the IP address

#ifconfigeht0netmaskdown; disable IP address

#routeadd0.0.0.0gw; set the gateway

#routedel0.0.0.0gw delete gateway;

#routeadddefaultgw; set the gateway

#routedeldefaultgw delete gateway;

#route display gateway;

#ping; send ECHO packets

#telnet; remote login

Huawei router switch configuration commands: switch command

[Quidway]discur displays the current configuration;

[Quidway]displaycurrent-configuration displays the current configuration;

[Quidway]displayinterfaces display interface information;

[Quidway]displayvlanall displays the routing information;

[Quidway]displayversion; display version information

[Quidway]superpassword; modify privileged user password

[Quidway]sysname switch name;

[Quidway]interfaceethernet0/1; into the interface view

[Quidway]interfacevlanx; into the interface view

[Quidway-Vlan-interfacex]ipaddress10.65.1.1255.255.0.0; VLAN IP address configuration

[Quidway]iproute-static0.0.0.00.0.0.010.65.1.2; static routing = gateway

[Quidway]rip; three layer exchange support

[Quidway]local-userftp

[Quidway]user-interfacevty04; enter virtual terminal

[S3026-ui-vty0-4]authentication-modepassword; set the password mode

[S3026-ui-vty0-4]setauthentication-modepasswordsimple222; set the password

[S3026-ui-vty0-4]userprivilegelevel3; user level

[Quidway]interfaceethernet0/1 entered the port mode;

[Quidway]inte0/1 entered the port mode;

[Quidway-Ethernet0/1]duplex{half|full|auto}; working state port configuration

[Quidway-Ethernet0/1]speed{10|100|auto} configure the port work rate;

[Quidway-Ethernet0/1]flow-control; configuration port flow control1

Page 2: Huawei switch configuration commands

[Quidway-Ethernet0/1]mdi{across|auto|normal}; configuration port flush twisting

[Quidway-Ethernet0/1]portlink-type{trunk|access|hybrid}; set the port mode

[Quidway-Ethernet0/1]portaccessvlan3; add the port to VLAN

[Quidway-Ethernet0/2]porttrunkpermitvlan{ID|All}; trunk VLAN allowed

[Quidway-Ethernet0/3]porttrunkpvidvlan3; set the trunk port of PVID

[Quidway-Ethernet0/1]undoshutdown activation port;

[Quidway-Ethernet0/1]shutdown; closed port

[Quidway-Ethernet0/1]quit; return

Create a VLAN [Quidway]vlan3;

[Quidway-vlan3]portethernet0/1; add port in VLAN

[Quidway-vlan3]porte0/1 shorthand method;

[Quidway-vlan3]portethernet0/1toethernet0/4; add port in VLAN

[Quidway-vlan3]porte0/1toe0/4 shorthand method;

[Quidway]monitor-port; designated port mirroring

[Quidway]portmirror; assigned port mirroring

[Quidway]portmirrorint_listobserving-portint_typeint_num; specify a mirror and mirror

[Quidway]descriptionstring specifies the VLAN description character;

[Quidway]description; deletion of VLAN description character

Check the VLAN settings to [Quidway]displayvlan[vlan_id];

[Quidway]stp{enable|disable}; set the spanning tree, is turned off by default

[Quidway]stppriority4096; set spantree priority

[Quidway]stproot{primary|secondary}; set as the root or root backup

[Quidway-Ethernet0/1]stpcost200; set the switch port cost

[Quidway]link-aggregatione0/1toe0/4ingress|both port polymerization;

[Quidway]undolink-aggregatione0/1|all; start port channel number

[SwitchA-vlanx]isolate-user-vlanenable; set master VLAN

[SwitchA]isolate-user-vlansecondary; set the main VLAN including VLAN

[Quidway-Ethernet0/2]porthybridpvidvlan; VLAN PVID

Remove VLAN PVID [Quidway-Ethernet0/2]porthybridpvid;

[Quidway-Ethernet0/2]porthybridvlanvlan_id_listuntagged; set no identification VLAN

If the package of vlanid is consistent with PVId, then remove the default PVID=1 VLAN

information.

So the PVID is set for the vlanid, set VLAN untagged. Exchange

Huawei router switch configuration commands: router command

[Quidway]displayversion; display version information

[Quidway]displaycurrent-configuration displays the current configuration;

[Quidway]displayinterfaces display interface information;

[Quidway]displayiproute displays the routing information;

[Quidway]sysnameaabbcc; change the host name

[Quidway]superpasswrod123456; set the password

[Quidway]interfaceserial0 into the interface;

[Quidway-serial0]ipaddress configure the port IP address;2

Page 3: Huawei switch configuration commands

[Quidway-serial0]undoshutdown activation port;

[Quidway]link-protocolhdlc binds HDLC protocol;

[Quidway]user-interfacevty04

[Quidway-ui-vty0-4]authentication-modepassword

[Quidway-ui-vty0-4]setauthentication-modepasswordsimple222

[Quidway-ui-vty0-4]userprivilegelevel3

[Quidway-ui-vty0-4]quit

[Quidway]debugginghdlcallserial0 display all of the information;

Debugging [Quidway]debugginghdlceventserial0 event information;

[Quidway]debugginghdlcpacketserial0; show the package information

Huawei router switch configuration commands: static routing:

[Quidway]iproute-static{interfacenumber|nexthop}[value][reject|blackhole]

For example: [Quidway]iproute-static129.1.0.01610.0.0.2

[Quidway]iproute-static129.1.0.0255.255.0.010.0.0.2

[Quidway]iproute-static129.1.0.016Serial2

[Quidway]iproute-static0.0.0.00.0.0.010.0.0.2

Huawei router switch configuration commands: dynamic routing:

[Quidway]rip; set dynamic routing

[Quidway]ripwork is allowed to work;

[Quidway]ripinput; set the entrance permit

[Quidway]ripoutput; set the export permit

[Quidway-rip]network1.0.0.0; set the exchange routing network

[Quidway-rip]networkall; set the exchange with all network

[Quidway-rip]peerip-address;

[Quidway-rip]summary routing aggregation;

[Quidway]ripversion1; set up work in version 1

With version 2, [Quidway]ripversion2multicast; multicast

[Quidway-Ethernet0]ripsplit-horizon; horizontal partitioning

[Quidway]routeridA.B.C.D; configure router ID

[Quidway]ospfenable; OSPF protocol

[Quidway-ospf]import-routedirect; introducing the direct route

The [Quidway-Serial0]ospfenablearea configuration OSPF region;

Huawei router switch configuration commands: standard access list command

format is as follows:

The default acl[match-orderconfig|auto]; the former sequence matching.

Rule[normal|special]{permit|deny}[sourcesource-addrsource-wildcard|any]

Example: [Quidway]acl10

[Quidway-acl-10]rulenormalpermitsource10.0.0.00.0.0.255

[Quidway-acl-10]rulenormaldenysourceany

Huawei router switch configuration commands: extended access list configuration

command3

Page 4: Huawei switch configuration commands

Extended configuration of TCP/UDP protocol access list:

Rule{normal|special}{permit|deny}{tcp|udp}source{|any}destination|any}

[operate]

Extended configuration of ICMP protocol access list:

Rule{normal|special}{permit|deny}icmpsource{|any]destination{|any]

[icmp-code][logging]

Huawei router switch configuration commands: extended access control list the meaning

of the operators

Is equal to equalportnumber;

Greater than greater-thanportnumber;

Less than less-thanportnumber;

Not-equalportnumber unequal;

Rangeportnumber1portnumber2; interval

Huawei router switch configuration commands: extended access list example

[Quidway]acl101

[Quidway-acl-101]ruledenysouceanydestinationany

[Quidway-acl-101]rulepermiticmpsourceanydestinationanyicmp-typeecho

[Quidway-acl-101]rulepermiticmpsourceanydestinationanyicmp-typeecho-reply

[Quidway]acl102

[Quidway-acl-102]rulepermitipsource10.0.0.10.0.0.0destination202.0.0.10.0.0.0

[Quidway-acl-102]ruledenyipsourceanydestinationany

[Quidway]acl103

[Quidway-acl-103]rulepermittcpsourceanydestination10.0.0.10.0.0.0destination-

portequalftp

[Quidway-acl-103]rulepermittcpsourceanydestination10.0.0.20.0.0.0destination-

portequalwww

[Quidway]firewallenable

[Quidway]firewalldefaultpermit|deny

[Quidway]inte0

[Quidway-Ethernet0]firewallpacket-filter101inbound|outbound

Huawei router switch configuration commands: address conversion configuration

example

[Quidway]firewallenable

[Quidway]firewalldefaultpermit

[Quidway]acl101; internal host can enter the E0

[Quidway-acl-101]ruledenyipsourceanydestinationany

[Quidway-acl-101]rulepermitipsource129.38.1.10destinationany

[Quidway-acl-101]rulepermitipsource129.38.1.20destinationany

[Quidway-acl-101]rulepermitipsource129.38.1.30destinationany

[Quidway-acl-101]rulepermitipsource129.38.1.40destinationany

[Quidway-acl-101]quit

[Quidway]inte04

Page 5: Huawei switch configuration commands

[Quidway-Ethernet0]firewallpacket-filter101inbound

[Quidway]acl102; the external host specific and more than 1024 port packet is allowed to

enter the S0

[Quidway-acl-102]ruledenyipsourceanydestinationany

[Quidway-acl-102]rulepermittcpsource202.39.2.30destination202.38.160.10

[Quidway-acl-102]rulepermittcpsourceanydestination202.38.160.10destination-portgreat-

than

1024

[Quidway-acl-102]quit

[Quidway]ints0

[Quidway-Serial0]firewallpacket-filter102inbound; 202.38.160.1 is the router IP.

[Quidway-Serial0]natoutbound101interface; Easyip, acl101 allows IP from this interface

transform source address.

Huawei router switch configuration commands: internal server address conversion

configuration command (static NAT):

Natserverglobal[port]insideport[protocol]; global_port does not write when using

inside_port

[Quidway-Serial0]natserverglobal202.38.160.1inside129.38.1.1ftptcp

[Quidway-Serial0]natserverglobal202.38.160.1inside129.38.1.2telnettcp

[Quidway-Serial0]natserverglobal202.38.160.1inside129.38.1.3wwwtcp

A public IP:202.38.160.101~202.38.160.103 can use. Foreign access (the original

examples);

[Quidway]nataddress-group202.38.160.101202.38.160.103pool1; set up address pool

[Quidway]acl1

[Quidway-acl-1]rulepermitsource10.110.10.00.0.0.255 specifies the allowable internal

network;

[Quidway-acl-1]ruledenysourceany

[Quidway-acl-1]intserial0

Remove the IP [Quidway-Serial0]natoutbound1address-grouppool1; foreign access from

the address pool in S0 port

[Quidway-Serial0]natserverglobal202.38.160.101inside10.110.10.1ftptcp

[Quidway-Serial0]natserverglobal202.38.160.102inside10.110.10.2wwwtcp

[Quidway-Serial0]natserverglobal202.38.160.1028080inside10.110.10.3wwwtcp

[Quidway-Serial0]natserverglobal202.38.160.103inside10.110.10.4smtpudp

Huawei router switch configuration commands: PPP settings: [Quidway-s0]link-

protocolppp; the default protocol

Huawei router switch configuration commands: PPP verification:

The main prescription: pap|chap

[Quidway]local-userq2password{simple|cipher}hello; router 1

[Quidway]interfaceserial0

[Quidway-serial0]pppauthentication-mode{pap|chap}5

Page 6: Huawei switch configuration commands

[Quidway-serial0]pppchapuserq1; PAP, not this sentence

Huawei routing switch configuration commands: PAP is prescription:

[Quidway]interfaceserial0; router 2

[Quidway-serial0]ppppaplocal-userq2password{simple|cipher}hello

Huawei router switch configuration commands: chap is prescription:

[Quidway]interfaceserial0; router 2

[Quidway-serial0]pppchapuserq2; its router name

[Quidway-serial0]local-userq1password{simple|cipher}hello; the other router name

Frame relay frame-relay (two: 6-61)

[q1]frswitching

[q1]ints1

[q1-Serial1]ipaddress192.168.34.51255.255.255.0

[q1-Serial1]link-protocolfr; encapsulation frame relay protocol

[q1-Serial1]frinterface-typedce

[q1-Serial1]frdlci100

[q1-Serial1]frinarp

[q1-Serial1]frmapip192.168.34.52dlci100

[q2]ints1

[q2-Serial1]ipaddress192.168.34.52255.255.255.0

[q2-Serial1]link-protocolfr

[q2-Serial1]frinterface-typedte

[q2-Serial1]frdlci100

[q2-Serial1]frinarp

[q2-Serial1]frmapip192.168.34.51dlci100

Huawei router switch configuration commands: frame relay monitoring

[q1]displayfrlmi-info[]interfacetypenumber]

[q1]displayfrmap

[q1]displayfrpvc-info[serialinterface-number][dlcidlci-number]

[q1]displayfrdlci-switch

[q1]displayfrinterface

[q1]resetfrinarp-info

[q1]debuggingfrall[interfacetypenumber]

[q1]debuggingfrarp[interfacetypenumber]

[q1]debuggingfrevent[interfacetypenumber]

[q1]debuggingfrlmi[interfacetypenumber]

Huawei router switch configuration commands: start the FTP service:

[Quidway]local-userftppassword{simple|cipher}aaaservice-typeftp

[Quidway]ftpserverenable

6

Page 7: Huawei switch configuration commands

More related:

HUAWEI SWITCH CONFIGURATION COMMANDS

HUAWEI ROUTER AND SWITCH CONFIGURATION COMMANDS

ABOUT BASIC QOS POLICY FOR HUAWEI ROUTER

More information you can visit http://www.huanetwork.com/blog

Huanetwork.com is a world leading Huawei networking products distributor, we wholesale

original new Huawei networking equipments, including Huawei switches, Huawei routers,

Huaweisymantec security products, Huawei IAD, Huawei SFP and other Huawei networking

products. Our customers include telecom operators, Huawei resellers, ISP and system integrators.

Right now most of our sales are contributed by regular customers

Our website: http://www. hu anetwork.com

Telephone: +852-30501940

Email:  [email protected]

Address: 23/F Lucky Plaza, 315-321 Lockhart Road, Wanchai, Hongkong

7