Huawei Cheat Sheet

***Port channel

Router

[Huawei]interface Eth-Trunk 1

[Huawei-Eth-Trunk1]trunkport GigabitEthernet 6/0/0 to 6/0/1

 

Switch

[Huawei]interface Eth-Trunk 1

[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/7 to 0/0/8

 

display interface Eth-Trunk1

 

Lacp mode

Router

[Huawei]interface Eth-Trunk 1

[Huawei-Eth-Trunk1]mode lacp-static

[Huawei]interface GigabitEthernet 6/0/0

[Huawei-GigabitEthernet6/0/0]eth-trunk 1

[Huawei]interface GigabitEthernet 6/0/1

[Huawei-GigabitEthernet6/0/1]eth-trunk 1

 

Switch

[Huawei]interface Eth-Trunk 1

[Huawei-Eth-Trunk1]mode lacp-static

[Huawei]interface GigabitEthernet 0/0/7

[Huawei-GigabitEthernet0/0/7]eth-trunk 1

[Huawei]interface GigabitEthernet 0/0/8

[Huawei-GigabitEthernet0/0/8]eth-trunk 1

 

***STP mode

[Huawei]stp mode rstp

[Huawei]interface Eth-Trunk 1

[Huawei-Eth-Trunk1]stp disable

 

***STP Priority

[Huawei]stp root primary

[Huawei]stp root secondary

display stp

 

***bpdu protection violation recovery

[huawei]error-down auto-recovery cause bpdu-protection interva 300

[huawei]stp bpdu-protection

 

 

***STP root protection

[Huawei]interface gigabitethernet 0/0/3

[Huawei-gigabitethernet0/0/3]stp root-protection

 

display stp int gig0/0/3

display stp brief

 

 

***STP loop protection

[Huawei]interface gigabitethernet 0/0/3

[Huawei-gigabitethernet0/0/3]stp loop-protection

 

 

***MST router and switch

[AR2]int gi 6/0/0

port link-type trunk

port trunk allow-pass vlan all

vlan batch 10 20 30 40 50 60

stp mode mstp

stp region-configuration

region-name RG1

revision-level 1

instance 1 vlan 10 30 50

instance 2 vlan 20 40 60

active region-configuration

 

display stp region-configuration

display stp

display stp instance 1

 

***MST root bridge primary secondary

[LSW1]stp instace 0 priority 0 [cist root bridge primary]

[LSW1]stp instance 1 priority 0 [root bridge(primary)]

[LSW1]stp instance 2 priority 4096 [root bridge backup]

 

***Stp priority apply into interface

[LSW1]int gi 0/0/3

stp instance 1 port priority 16

stp instance 1 cost 10000

***IP Address configuration

system-view

sysname R1

interface gig 0/0/0

ip address 10.1.12.1 24

***OSPF configuration

router-id 1.1.1.1

ospf 1

area 0

network 10.1.12.0 0.0.0.255

display ospf peer brief

display ip routing-table

***OSPF Passive interface configuration

router-id 1.1.1.1

ospf 1

area 0

network 10.1.12.0 0.0.0.255

silent interface loopback 0

 

***OSPF DR BDR Manual Selection

DR

<AR4>system-view

[AR4]interface gigabitethernet 0/0/0

[AR4-GigabitEthernet0/0/0]ospf dr-priority 100

BDR                    

<AR4>system-view

[AR4]interface gigabitethernet 0/0/0

[AR4-GigabitEthernet0/0/0]ospf dr-priority 50

No DR BDR Selection

<AR4>system-view

[AR4]interface gigabitethernet 0/0/0

[AR4-GigabitEthernet0/0/0]ospf dr-priority 0

***Route Map/Route policy

Ip ip-prefix 172_routes index 5 permit 172.0.0.0 8 less-equal 32

Route-policy 172_limit deny node 5

If-match ip-prefix 172 routes

Route-policy 172_limit permit node 10

***OSPF Virtual Link

[AR5]ospf 1

[AR5-ospf-1]area 1

[AR5-ospf-1-area-0.0.0.1]vlink-peer 10.10.10.1

[AR5-ospf-1-area-0.0.0.1]return

Display ospf vlink

***ISIS Configuration

isis 1

cost-style wide

is-level level-1/level-2/level-1/2

network-entity 49.0011.0000.0000.0001.00

import-route isis level-2 into level-1   [redistribution]

attached-bit advertise never

summary 192.168.64.0 255.255.252.0  level 2/level 1[prefix summary]

interface GigabitEthernet0/0/0

isis enable 1

display isis peer

display isis interface GigabitEthernet0/0/0

display bfd session all

display isis lsdb 0000.0000.0004.00-01 verbose

BFD Enable  ISIS

bfd
interface GigabitEthernet0/0/0

ip address 10.10.20.3 255.255.255.0

isis enable 1

isis bfd enable

***BFD Enable BGP

bfd

#

bgp 888

peer 7.7.7.2 as-number 7685

peer 192.168.5.3 as-number 888

peer 192.168.5.3 connect-interface LoopBack0

peer 192.168.5.3 bfd enable

#

ipv4-family unicast

undo synchronization

peer 7.7.7.2 enable

peer 7.7.7.2 route-policy TO-AS7685 export

peer 7.7.7.2 advertise-community

peer 192.168.5.3 enable

peer 192.168.5.3 next-hop-local

peer 192.168.5.3 advertise-community

#

 

***Pull Up Route

ip route-static 172.16.0.0 24 null 0

***Route tag

Route-policy R2I deny node 5

If-match tag 200

Route-policy R2I permit node 10

 

Route-policy R2I permit node 5

Apply tag 200

***configure MPLS LDP

mpls lsr-id 1.1.1.1

mpls

mpls ldp

interface gig 0/0/0

mpls

mpls ldp

display mpls ldp peer

display mpls ldp session

display mpls ldp lsp

***prefix filtering for ldp

edge router

ip ip-prefix prefix1 permit 192.168.12.0 24  (edge to core peering)

mpls ldp

inbound peer 2.2.2.2 fec ip-prefix prefix1

display mpls lsp

display current configuration

***vrf/vpn instance create

ip vpn-instance VPN1

route-distinguisher 1:1

vpn-target 1:2 both

 

interface gig 0/0/1

ip binding vpn-instance VPN1

ip address 10.1.14.1 24

display ip vpn-instance verbose

 

***Core Network BGP and MP-BGP

bgp 123

peer 2.2.2.2 as-number 123

peer 2.2.2.2 connect-interface loopback 0

ipv4-family vpnv4 unicast

peer 2.2.2.2 enable

***PE CE BGP configuration

bgp 123

ipv4-family vpn-instance VPN1

peer 10.1.14.4 as-number 14

import-route  direct   [Redistribute directly connected route]

 

display bgp vpnv4 vpn-instance VPN1 peer

display bgp peer

display ip routing-table vpn-instance VPN1

********************RR Server

bgp 6500

peer 1.1.1.1 as-number 6500

peer 1.1.1.1 connect-interface LoopBack0

peer 3.3.3.3 as-number 6500

peer 3.3.3.3 connect-interface LoopBack0

#

ipv4-family unicast

undo synchronization

peer 1.1.1.1 enable

peer 1.1.1.1 reflect-client

peer 3.3.3.3 enable

peer 3.3.3.3 reflect-client

#

ipv4-family vpnv4

undo policy vpn-target  [most important]

peer 1.1.1.1 enable

peer 1.1.1.1 reflect-client

peer 3.3.3.3 enable

peer 3.3.3.3 reflect-client

 

 

 

 

******************RR client

bgp 6500

peer 2.2.2.2 as-number 6500

peer 2.2.2.2 connect-interface LoopBack0

#

ipv4-family unicast

undo synchronization

peer 2.2.2.2 enable

#

ipv4-family vpnv4

policy vpn-target

peer 2.2.2.2 enable

peer 2.2.2.2 next-hop-invariable  [most important its for next hop unchanged]

 

display bgp vpnv4 all peer

 

ping -a 192.168.1.1(Source) 192.168.2.1(destination)

*******************

<Huawei> save all     [conf save]

You may also like...

Leave a Reply

Your email address will not be published.