Huawei switches and ONU configuration commands

Write By: administratorPublished In: Huawei ONU ONTCreated Date: 2019-07-09Hits:451Comment:0

Huawei switches and ONU configuration commands

Huawei switches and ONU configuration commands


[Quidway]dis cur                                          ;Show Current configuration
[Quidway]display current-configuration                    ;Show Current configuration  
[Quidway]display interfaces                               ;displaying interface information
[Quidway]display vlan all                                 ;Show routing information
[Quidway]display version                                  ;Display version Information 
[Quidway]super password                                   ;To modify a privileged user password
[Quidway]sysname                                          ;Switch naming
[Quidway]interface ethernet 0/1                         ;Enter interface view 
[Quidway]interface vlan x                                 ;Enter interface view
[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;Configure the IP address of the VLAN 
[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2        ;Static route = Gateway 
[Quidway]rip                                              ;Three-layer switching support
[Quidway]local-user ftp   
[Quidway]user-interface vty 0 4                           ;Enter Virtual terminal 
[S3026-ui-vty0-4]authentication-mode password             ;Set Password mode 
[S3026-ui-vty0-4]set authentication-mode password simple 222  ;Set Password
[S3026-ui-vty0-4]user privilege level 3         ;User Level  
[Quidway]interface ethernet 0/1            ;Enter Port mode 
[Quidway]int e0/1                                             ;Enter Port mode 
[Quidway-Ethernet0/1]duplex {half|full|auto}                  ;Configure Port operating status 
[Quidway-Ethernet0/1]speed {10|100|auto}                      ;Configure Port operating Rate
[Quidway-Ethernet0/1]flow-control                             ;Configure Port Flow Control
[Quidway-Ethernet0/1]mdi {across|auto|normal}                 ;Configuring the port for flat-connection twisting
[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid}     ;Set Port operating mode
[Quidway-Ethernet0/1]port access vlan 3                       ;Add current port to VLAN  
[Quidway-Ethernet0/2]port trunk permit vlan {ID|All}          ;VLAN allowed on trunk
[Quidway-Ethernet0/3]port trunk pvid vlan 3                   ;Setting the trunk port Pvid
[Quidway-Ethernet0/1]undo shutdown                            ;Activating ports  
[Quidway-Ethernet0/1]shutdown                                 ;Close port 
[Quidway-Ethernet0/1]quit                                     ;Return        
[Quidway]vlan 3                                               ;Creating VLAN
[Quidway-vlan3]port ethernet 0/1                              ;Adding ports to VLANs 
[Quidway-vlan3]port e0/1                                      ;Shorthand method   
[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4              ;Adding ports to VLANs
[Quidway-vlan3]port e0/1 to e0/4                                                                                 ;Shorthand method

[Quidway]debugging hdlc all serial0                     ;Show All information 
[Quidway]debugging hdlc event serial0                   ;Debug event Information 
[Quidway]debugging hdlc packet serial0    v              ;Displaying information about a package 
Static routes:  
[Quidway]ip route-static {interface number|nexthop}[value][reject|blackhole] 
For example:  
[Quidway]ip route-static 129.1.0.0 16 10.0.0.2  
[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2 
[Quidway]ip route-static 129.1.0.0 16 Serial 2  
[Quidway]ip route-static 0.0.0.0 0.0.0.0  10.0.0.2   
Dynamic routing: 
[Quidway]rip                                              ;Set up dynamic routing
[Quidway]rip work                                         ;Set work allow 
[Quidway]rip input                                        ;Set portal Allow 
[Quidway]rip output                                       ;Set export allow
[Quidway-rip]network 1.0.0.0                              ;Setting up a switched routing network 
[Quidway-rip]network all                                  ;Set up with all network switching 
[Quidway-rip]peer ip-address                              ;  
[Quidway-rip]summary                                      ;Route aggregation 
[Quidway]rip version 1                                    ;Setup works in version 1
[Quidway]rip version 2 multicast                          Set version 2, multicast mode
[Quidway-Ethernet0]rip split-horizon                      ;Horizontal separation  
[Quidway]router id A.B.C.D                                ;Configure the ID of the router
[Quidway]ospf enable                                      ;Start the OSPF protocol 
[Quidway-ospf]import-route direct                         ;Introducing a direct route 
[Quidway-Serial0]ospf enable area               ;Configuring the OSPF area  
The standard access List command format is as follows:
acl [match-order config|auto]               ;The default order matches.
rule [normal|special]{permit|deny} [source source-addr source-wildcard|any] 
Cases:[Quidway]acl 10  
[Quidway-acl-10]rule normal permit source 10.0.0.0 0.0.0.255 
[Quidway-acl-10]rule normal deny source any   
Extended access Control List configuration commands configure the extended access list for the TCP\/UDP protocol:
rule {normal|special}{permit|deny}{tcp|udp}source {|any}destination |any} 
[operate]   
To configure an extended access list for the ICMP protocol: 
rule {normal|special}{permit|deny}icmp source {|any]
destination {|any] [icmp-code] [logging]   
Meaning of Extended access control list operators
equal portnumber             ;Equals 
greater-than portnumber                                    ;Greater than 
less-than portnumber                                       ;Less than
not-equal portnumber                                       ;Range
range portnumber1 portnumber2                              ;Interval 
Examples of extended access control lists 
[Quidway]acl 101  
[Quidway-acl-101]rule deny souce any destination any  
[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo 
[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo-reply  [Quidway]acl 102  
[Quidway-acl-102]rule permit ip source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0 [Quidway-acl-102]rule deny ip source any destination any   
[Quidway]acl 103  
[Quidway-acl-103]rule permit tcp source any destination 10.0.0.1 0.0.0.0 destination-port equal ftp  
[Quidway-acl-103]rule permit tcp source any destination 10.0.0.2 0.0.0.0 destination-port equal www    
[Quidway]firewall enable  
[Quidway]firewall default permit|deny 
[Quidway]int e0  
[Quidway-Ethernet0]firewall packet-filter 101 inbound|outbound     Address Translation Configuration Example 
[Quidway]firewall enable  
[Quidway]firewall default permit  
[Quidway]acl 101                                                ;Internal designated host can enter E0
[Quidway-acl-101]rule deny ip source any destination any
[Quidway-acl-101]rule permit ip source 129.38.1.1 0 destination any 
[Quidway-acl-101]rule permit ip source 129.38.1.2 0 destination any 
[Quidway-acl-101]rule permit ip source 129.38.1.3 0 destination any 
[Quidway-acl-101]rule permit ip source 129.38.1.4 0 destination any 
[Quidway-acl-101]quit 
[Quidway]int e0 
[Quidway-Ethernet0]firewall packet-filter 101 inbound    
[Quidway]acl 102                         ;External specific hosts and packets larger than 1024 allow access to S0
[Quidway-acl-102]rule deny ip source any destination any  
[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0  
[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 destination-port great-than 1024  
[Quidway-acl-102]quit  
[Quidway]int s0  
[Quidway-Serial0]firewall packet-filter 102 inbound      ;Set 202.38.160.1 is router egress IP。  
[Quidway-Serial0]nat outbound 101 interface   ;Is Easy ip,Will acl 101The allowed IP transforms the source address from the time this interface is out.  
Internal server address Translation Configuration command (static NAT):
 nat server global [port] inside port [protocol]       ;global_port Use Inside_port when not writing
[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.1 ftp tcp 
[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.2 telnet tcp  
[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.3 www tcp    
has a public network IP:202.38.160.101~202.38.160.103 can be used.             ;External visit (original example) 
[Quidway]nat address-group 202.38.160.101 202.38.160.103 pool1   ;Create an address pool
[Quidway]acl 1  [Quidway-acl-1]rule permit source 10.110.10.0 0.0.0.255          ;Specify the allowed internal network [Quidway-acl-1]rule deny source any 
[Quidway-acl-1]int serial 0  
[Quidway-Serial0]nat outbound 1 address-group pool1    ;Removing IP from the address pool at the S0 port for external access    
[Quidway-Serial0]nat server global 202.38.160.101 inside 10.110.10.1 ftp tcp 
[Quidway-Serial0]nat server global 202.38.160.102 inside 10.110.10.2 www tcp  
[Quidway-Serial0]nat server global 202.38.160.102 8080 inside 10.110.10.3 www tcp 
[Quidway-Serial0]nat server global 202.38.160.103 inside 10.110.10.4 smtp udp   PPPP Settings  
[Quidway-s0]link-protocol ppp                                  ;The default protocol   
PPP Authentication:  
Master recipe :pap|chap  
[Quidway]local-user q2 password {simple|cipher} hello          ;Router 1
[Quidway]interface serial 0  
[Quidway-serial0]ppp authentication-mode {pap|chap}  
[Quidway-serial0]ppp chap user q1                              ;papWhen, without this sentence  
PAP is a recipe:  
[Quidway]interface serial 0                                    ;Router 2
[Quidway-serial0]ppp pap local-user q2 password {simple|cipher} hello  
CHAP is a recipe for:
[Quidway]interface serial 0                                    ;Router 2 
[Quidway-serial0]ppp chap user q2                              ;Own router name 
[Quidway-serial0]local-user q1 password {simple|cipher} hello  ;The name of the other router 
Frame Relay Frame-relay (two fascicle 6-61) 
[q1]fr switching [q1]int s1  
[q1-Serial1]ip address 192.168.34.51 255.255.255.0  
[q1-Serial1]link-protocol fr                                   ;Sealing and Binding Relay protocol
[q1-Serial1]fr interface-type dce 
[q1-Serial1]fr dlci 100 [q1-Serial1]fr inarp  
[q1-Serial1]fr map ip 192.168.34.52 dlci 100   
[q2]int s1  
[q2-Serial1]ip address 192.168.34.52 255.255.255.0 
[q2-Serial1]link-protocol fr 
[q2-Serial1]fr interface-type dte  
[q2-Serial1]fr dlci 100 
[q2-Serial1]fr inarp  
[q2-Serial1]fr map ip 192.168.34.51 dlci 100  
Frame Relay Monitoring
[q1]display fr lmi-info[]interface type number] 
[q1]display fr map  
[q1]display fr pvc-info[serial interface-number][dlci dlci-number] 
[q1]display fr dlci-switch 
[q1]display fr interface  
[q1]reset fr inarp-info  
[q1]debugging fr all[interface type number] 
[q1]debugging fr arp[interface type number] 
[q1]debugging fr event[interface type number] 
[q1]debugging fr lmi[interface type number]   
To start the FTP service: 
[Quidway]local-user ftp password {simple|cipher} aaa service-type ftp 
[Quidway]ftp server enable

Leave A Comment

Captcha