Huawei Router Basic Configuration Command

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Huawei Router Basic Configuration Command

Huawei Router Basic Configuration Command

[Liufei]display version; display version information

[Liufei]display current-configuration; display current configuration

[Liufei]display interfaces; display interface information;

[Liufei]display IP route; show that the routing information;

[Liufei]sysname lf123; change the host name

[Liufei]super passwrod 123456; setup password;

[Liufei]interface serial0; into the interface;

[Liufei-serial0]ip address <ip> <mask|mask_len> IP address configured ports;

[Liufei-serial0]undo shutdown; activation port;

[Liufei]link-protocol HDLC; binds HDLC protocol;

[Liufei]user-interface vty 04

[Liufei-ui-vty0-4]authentication-mode password

[Liufei-ui-vty0-4]set authentication-mode password simple 222

[Liufei-ui-vty0-4]user privilege level 3

[Liufei-ui-vty0-4]quit

[Liufei]debugging HDLC all serial0; to display all of the information;

[Liufei]debugging HDLC event serial0; debug event information

[Liufei]debugging HDLC packet serial0; show the package information

1
Static routing:

[Liufei]ip route-static <ip><mask>{interface number|nexthop}[value][reject|blackhole]

For example:

[Liufei]ip route-static 129.1.0.0 16 10.0.0.2

[Liufei]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2

[Liufei]ip route-static 129.1.0.0 16 Serial 2

[Liufei]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2

Dynamic routing:

[Liufei]rip; set dynamic routing

[Liufei]rip work is allowed to work;

[Liufei]rip input set the entrance permit;

[Liufei]rip output; set the export permit

[Liufei-rip]network 1.0.0.0; set the exchange routing network

[Liufei-rip]network all; set the exchange with all network

[Liufei-rip]peer ip-address;

[Liufei-rip]summary routing aggregation;

[Liufei]rip version 1; installed in version 1

[Liufei]rip version 2 multicast; with version 2, multicast

[Liufei-Ethernet0]rip split-horizon; horizontal partitioning

[Liufei]router ID A.B.C.D; configure router ID

[Liufei]ospf enable start OSPF protocol;


2
[Liufei-ospf]import-route direct; introducing the direct route

[Liufei-Serial0]ospf enable area <area_id> OSPF region;

Standard access list command format is as follows:

ACL <acl-number> [match-order config|auto]; the default of the former sequence


matching.

Rule [normal|special]{permit|deny} [source source-addr source-wildcard|any]

An example:

[Liufei]acl 10

[Liufei-acl-10]rule normal permit source 10.0.0.0 0.0.0.255

[Liufei-acl-10]rule normal deny source any

Extended access list configuration command

Extended configuration of TCP/UDP protocol access list:

Rule {normal|special}{permit|deny}{tcp|udp}source {<ip wild>|any}destination <ip wild>|


any}

[operate]

Extended configuration of ICMP protocol access list:

Rule {normal|special}{permit|deny}icmp source {<ip wild>|any]destination {<ip wild>|any]

[icmp-code] [logging]

Extended access control list the meaning of the operators

Equal PortNumber; equal

3
Greater-than PortNumber; greater than

Less-than is PortNumber; less than

Not-equal PortNumber; unequal

Range portnumber1 portnumber2; interval

Extended access control list example

[Liufei]acl 101

[Liufei-acl-101]rule deny souce any destination any

[Liufei-acl-101]rule permit ICMP source any destination any icmp-type echo

[Liufei-acl-101]rule permit ICMP source any destination any icmp-type echo-reply

[Liufei]acl 102

[Liufei-acl-102]rule permit IP source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0

[Liufei-acl-102]rule deny IP source any destination any

[Liufei]acl 103

[Liufei-acl-103]rule permit TCP source any destination 10.0.0.1 0.0.0.0 destination-port


equalFTP

[Liufei-acl-103]rule permit TCP source any destination 10.0.0.2 0.0.0.0 destination-port


equalwww

[Liufei]firewall enable

[Liufei]firewall default permit|deny

[Liufei]int E0

[Liufei-Ethernet0]firewall packet-filter 101 inbound|outbound

Address conversion configuration example

[Liufei]firewall enable
4
[Liufei]firewall default permit

[Liufei]acl 101; the internal host can enter the E0

[Liufei-acl-101]rule deny IP source any destination any

[Liufei-acl-101]rule permit IP source 129.38.1.1 0 destination any

[Liufei-acl-101]rule permit IP source 129.38.1.2 0 destination any

[Liufei-acl-101]rule permit IP source 129.38.1.3 0 destination any

[Liufei-acl-101]rule permit IP source 129.38.1.4 0 destination any

[Liufei-acl-101]quit

[Liufei]int E0

[Liufei-Ethernet0]firewall packet-filter 101 inbound

[Liufei]acl 102; the external host specific and more than 1024 port packet is allowed to
enter the S0

[Liufei-acl-102]rule deny IP source any destination any

[Liufei-acl-102]rule permit TCP source 202.39.2.3 0 destination 202.38.160.1 0

[Liufei-acl-102]rule permit TCP source any destination 202.38.160.1 0 destination-port


great-than

1024

[Liufei-acl-102]quit

[Liufei]int S0

[Liufei-Serial0]firewall packet-filter 102 inbound; 202.38.160.1 is the egress router IP.

[Liufei-Serial0]nat outbound 101 interface; Easy IP, ACL 101 allows IP from this
interfacetransform source address.

5
More related:
HOW TO CONNECT HUAWEI ROUTER USE VPN
HOW TO CONFIGURE HUAWEI AR3200 SERIES ROUTER?
HOW TO CONFIGURE THE PPPOE CLIENT ON HUAWEI AR1200?
More Huawei products and Reviews 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.huanetwork.com


Telephone: +852-30501940
Email: sales@huanetwork.com
Address: 23/F Lucky Plaza, 315-321 Lockhart Road, Wanchai, Hongkong

6
More related:
HOW TO CONNECT HUAWEI ROUTER USE VPN
HOW TO CONFIGURE HUAWEI AR3200 SERIES ROUTER?
HOW TO CONFIGURE THE PPPOE CLIENT ON HUAWEI AR1200?
More Huawei products and Reviews 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.huanetwork.com


Telephone: +852-30501940
Email: sales@huanetwork.com
Address: 23/F Lucky Plaza, 315-321 Lockhart Road, Wanchai, Hongkong

You might also like