MPLS调试笔记二支持命令测试

Switch 命令测试

Mpls 使用命令中的options

BCM.0> mpls options Type=PORT

        RePLace                    0x00000001

        WithID                     0x00000002

        DRop                       0x00000010

        NetWork                    0x00000020

        ControlWord                0x00000040

        SEQuenced                  0x00000080

        CouNTed                    0x00000100

        IntPriSet                  0x00000200

        IntPriMap                  0x00000400

        ColorMap                   0x00000800

        EgressTunnel               0x00001000

        ServiceTagged              0x00004000

        ServiceVlanAdd             0x00008000

        ServiceVlanReplace         0x00010000

        ServiceVlanDelete          0x00020000

        ServiceVlanTpidReplace     0x00040000

        InnerVlanPreserve          0x00800000

BCM.0>

BCM.0> mpls  options Type=PortMatch

        Port                       0x00000002

        PortVlan                   0x00000003

        PortVlanStacked            0x00000005

        Label                      0x00000007

        LabelPort                  0x00000008

        LabelVlan                  0x00000009

BCM.0>

BCM.0>

BCM.0>

BCM.0>

BCM.0> mpls options Type=MplsSwitch

        LookupInnerLabel           0x00000001

        CouNTed                    0x00000002

        IntPriSet                  0x00000004

        IntPriMap                  0x00000008

        ColorMap                   0x00000010

        OUTerEXP                   0x00000020

        OUTerTTL                   0x00000040

        INnerEXP                   0x00000080

        INnerTTL                   0x00000100

        TTLDECrement               0x00000200

BCM.0>

BCM.0>

BCM.0> mpls options Type=MplsEgressLabel

        TTLSET                     0x00000001

        TTLCoPy                    0x00000002

        TTLDECrement               0x00000004

        EXPSET                     0x00000008

        EXPREMark                  0x00000010

        EXPCoPy                    0x00000020

        PRISET                     0x00000040

        PRIREMark                  0x00000080

BCM.0>

Vlan  24 情况

BCM.0> vlan 24

Current settings:

        VRF=0

        OuterTPID=0x8100

        LearnDisable=0

        UnknownIp6McastToCpu=0

        UnknownIp4McastToCpu=0

        Ip4Disable=0

        Ip6Disable=0

        Ip4McastDisable=0

        Ip6McastDisable=0

        Ip4McastL2Disable=0

        Ip6McastL2Disable=0

        L3VrfGlobalDisable=0

        MplsDisable=0

        CosqEnable=0

        MiMTermDisable=0

        Cosq=0

        Ip6McastFloodMode=MCAST_FLOOD_UNKNOWN

        Ip4McastFloodMode=MCAST_FLOOD_UNKNOWN

        L2McastFloodMode=MCAST_FLOOD_UNKNOWN

        IfClass=0


Pbmp

BCM.0> pbmp

Current bitmaps:

     FE   ==> 0x000000000000000000000000

     GE   ==> 0x000000000000000003fffffc

     XE   ==> 0x000000000000000000000000

     E    ==> 0x000000000000000003fffffc

     HG   ==> 0x00000000000000003c000000

     IL   ==> 0x000000000000000000000000

     SCH  ==> 0x000000000000000000000000

     HL   ==> 0x000000000000000000000000

     HG2  ==> 0x000000000000000000000000

     ST   ==> 0x00000000000000003c000000

     S    ==> 0x000000000000000000000000

     GX   ==> 0x00000000000000003c000000

     XL   ==> 0x000000000000000000000000

     MXQ  ==> 0x000000000000000000000000

     XG   ==> 0x000000000000000000000000

     XQ   ==> 0x00000000000000003c000000

     XT   ==> 0x000000000000000000000000

     CL   ==> 0x000000000000000000000000

     AXP  ==> 0x000000000000000000000000

     HPLT ==> 0x000000000000000000000000

     PORT ==> 0x00000000000000003ffffffc

     CMIC ==> 0x000000000000000000000001

     LB   ==> 0x000000000000000000000002

     MMU  ==> 0x000000000000000000000000

     ALL  ==> 0x00000000000000003fffffff

 

同时添加连续多个端口到VLAN 中

BCM.0> pbmp ge10-ge11

    0x000000000000000000003000 ==> ge10-ge11

BCM.0>

BCM.0> vlan create 21

BCM.0> vlan add 21 PortBitMap=0x000000000000000000003000

BCM.0> vlan show 21

vlan 21 ports ge10-ge11 (0x000000000000000000003000), untagged none (0x000000000000000000000000) MCAST_FLOOD_UNK 

Phy地址show

BCM.0> phy ge10

Port ge10 (PHY addr 0x0b): BCM54640 (54640 Gigabit PHY Driver)

        0x00: 0x1140    0x01: 0x79ed    0x02: 0x0362    0x03: 0x5db1

        0x04: 0x05e1    0x05: 0x41e1    0x06: 0x0067    0x07: 0x2001

        0x08: 0x0000    0x09: 0x0600    0x0a: 0x0000    0x0b: 0x0000

        0x0c: 0x0000    0x0d: 0x0000    0x0e: 0x0000    0x0f: 0x3000

        0x10: 0x0021    0x11: 0x2300    0x12: 0x0000    0x13: 0x0000

        0x14: 0x0000    0x15: 0x5b80    0x16: 0x0000    0x17: 0x0f42

        0x18: 0x7067    0x19: 0xf514    0x1a: 0x240e    0x1b: 0xffff

        0x1c: 0x7ea8    0x1d: 0x00cd    0x1e: 0x0000    0x1f: 0x0000

BCM.0>

BCM.0> phy ge11

Port ge11 (PHY addr 0x0c): BCM54640 (54640 Gigabit PHY Driver)

        0x00: 0x1140    0x01: 0x79c9    0x02: 0x0362    0x03: 0x5db1

        0x04: 0x05e1    0x05: 0x0000    0x06: 0x0064    0x07: 0x2001

        0x08: 0x0000    0x09: 0x0600    0x0a: 0x0000    0x0b: 0x0000

        0x0c: 0x0000    0x0d: 0x0000    0x0e: 0x0000    0x0f: 0x3000

        0x10: 0x0021    0x11: 0x0000    0x12: 0x0000    0x13: 0x0000

        0x14: 0x0000    0x15: 0x5000    0x16: 0x0000    0x17: 0x0f42

        0x18: 0x7067    0x19: 0x1000    0x1a: 0x0000    0x1b: 0xffff

        0x1c: 0x7e08    0x1d: 0x0000    0x1e: 0x0000    0x1f: 0x0000

 

Ps ge9-ge10

BCM.0> ps ge9-ge10

           ena/  speed/ link auto    STP                  lrn  inter   max  loop

      port link  duplex scan neg?   state   pause  discrd ops   face frame  back

       ge9  up   100M FD   SW  Yes  Forward  TX RX   None   FA  SGMII  2000

      ge10  up   100M FD   SW  Yes  Forward  TX RX   None   FA  SGMII  2000

BCM.0>

 

 

Rate

BCM.0> rate

Current settings:

cpu0: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge0: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge1: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge2: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge3: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge4: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge5: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge6: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge7: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge8: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 ge9: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge10: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge11: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge12: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge13: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge14: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge15: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge16: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge17: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge18: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge19: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge20: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge21: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge22: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

ge23: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 hg0: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 hg1: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 hg2: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

 hg3: Bcast=FALSE ; Mcast=FALSE ; Dlfbc=FALSE ;

rxmon show

BCM.0> rxmon show

RX Info @ time=924862370: started. Last fill 924850412. Thread is running.

    +verbose for more info

    Pkt Size 1600. Pkts/Chain 4. All COS PPS 500. Burst 500. Flags 0.

    Sys PPS 0. Sys tokens 0. Sys fill 8244194.

    Cntrs:  Pkts 427056. Last start 427056. Tunnel 0. Owned 0.

        Bad Hndlr 0. No Hndlr 0. Not Running 0.

        Thrd Not Running 0. DCB Errs 0.

  Registered callbacks:

        cpu_packet_mon Priority=100. Argument=0x0. COS 0xffffffffffff.

                   Packets handled 427056, owned 0.

        RX CMD     Priority=100. Argument=0x0. COS 0xffffffffffff.

                   Packets handled 0, owned 0.

        Discard    Priority=  0. Argument=0x0. COS 0xffffffffffff.

                   Packets handled 0, owned 0.

  Channel Info

    Chan 1 is running: Chains 4. COS 0xff. DCB/pkt 1

        rpkt 427228. rbyte 56394096. dpkt 0. dbyte 0. mem fail 0 flags 0.

  Queue Info

    Queue 0: PPS 0. CurPkts 0. TotPkts 427272. Disc rate 0, qlen 0.

    Queue 1: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 2: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 3: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 4: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 5: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 6: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 7: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 8: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 9: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 10: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 11: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 12: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 13: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 14: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 15: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 16: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 17: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 18: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 19: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 20: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 21: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 22: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 23: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 24: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 25: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 26: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 27: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 28: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 29: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 30: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 31: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 32: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 33: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 34: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 35: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 36: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 37: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 38: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 39: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 40: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 41: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 42: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 43: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 44: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 45: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 46: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

    Queue 47: PPS 0. CurPkts 0. TotPkts 0. Disc rate 0, qlen 0.

BCM.0>

 

Rxcfg

BCM.0> rxcfg

Current RX configuration:

    Pkt Size 8192. Pkts/chain 4. All COS PPS 1000. Burst 100

    Channel 0:  Chains 0. PPS 0. COSBMP 0x0.

    Channel 1:  Chains 4. PPS 1000. COSBMP 0xff.

    Channel 2:  Chains 0. PPS 0. COSBMP 0x0.

    Channel 3:  Chains 0. PPS 0. COSBMP 0x0.

    System wide rate limit:  0

BCM.0> rxmon start

NOTE:  'debugmod diag rx' required for rxmon output

BCM.0> rxcfg 0 PKTSIZE=100

BCM.0> rxcfg

Current RX configuration:

    Pkt Size 100. Pkts/chain 4. All COS PPS 1000. Burst 100

    Channel 0:  Chains 4. PPS 1000. COSBMP 0xff.

    Channel 1:  Chains 4. PPS 1000. COSBMP 0xff.

    Channel 2:  Chains 0. PPS 0. COSBMP 0x0.

    Channel 3:  Chains 0. PPS 0. COSBMP 0x0.

    System wide rate limit:  0

 

 

Show chips

BCM.0> show chips

Known chips:

Index   Chip            Chip   Dev/Rev  Driver Dev/Rev

0       BCM56300_A0     0xb300 0x01     0xb504 0x01

1       BCM56301_A0     0xb301 0x01     0xb504 0x01

2       BCM56302_A0     0xb302 0x01     0xb504 0x01

3       BCM56303_A0     0xb303 0x01     0xb504 0x01

4       BCM56304_A0     0xb304 0x01     0xb504 0x01

5       BCM56305_A0     0xb305 0x01     0xb504 0x01

6       BCM56306_A0     0xb306 0x01     0xb504 0x01

7       BCM56307_A0     0xb307 0x01     0xb504 0x01

8       BCM56308_A0     0xb308 0x01     0xb504 0x01

9       BCM56309_A0     0xb309 0x01     0xb504 0x01

10      BCM56300_A1     0xb300 0x02     0xb504 0x01

 

11      BCM56301_A1     0xb301 0x02     0xb504 0x01

Cos

BCM.0> cos port show PortBitMap=ge9

 

  Port ge9 COS configuration:

 ------------------------------

  Config (max queues): 8

  Schedule mode: weighted round-robin

  Weighting (in packets):

    COSQ 0 = 0 packets

    COSQ 1 = 0 packets

    COSQ 2 = 0 packets

    COSQ 3 = 0 packets

    COSQ 4 = 0 packets

    COSQ 5 = 0 packets

    COSQ 6 = 0 packets

    COSQ 7 = 0 packets

  Priority to queue mappings:

    PRIO 0 ==> COSQ 0

    PRIO 1 ==> COSQ 1

    PRIO 2 ==> COSQ 2

    PRIO 3 ==> COSQ 3

    PRIO 4 ==> COSQ 4

    PRIO 5 ==> COSQ 5

    PRIO 6 ==> COSQ 6

    PRIO 7 ==> COSQ 7

    PRIO 8 ==> COSQ 7

    PRIO 9 ==> COSQ 7

    PRIO 10 ==> COSQ 7

    PRIO 11 ==> COSQ 7

    PRIO 12 ==> COSQ 7

    PRIO 13 ==> COSQ 7

    PRIO 14 ==> COSQ 7

PRIO 15 ==> COSQ 7

 

更改调度方式

BCM.0>  cos simple

BCM.0>  cos port show PortBitMap=ge9

 

  Port ge9 COS configuration:

 ------------------------------

  Config (max queues): 1

  Schedule mode: simple round-robin

  Weighting (in packets):

    COSQ 0 = 0 packets

  Priority to queue mappings:

    PRIO 0 ==> COSQ 0

    PRIO 1 ==> COSQ 0

    PRIO 2 ==> COSQ 0

    PRIO 3 ==> COSQ 0

    PRIO 4 ==> COSQ 0

    PRIO 5 ==> COSQ 0

    PRIO 6 ==> COSQ 0

    PRIO 7 ==> COSQ 0

    PRIO 8 ==> COSQ 0

    PRIO 9 ==> COSQ 0

    PRIO 10 ==> COSQ 0

    PRIO 11 ==> COSQ 0

    PRIO 12 ==> COSQ 0

    PRIO 13 ==> COSQ 0

    PRIO 14 ==> COSQ 0

    PRIO 15 ==> COSQ 0

BCM.0>  cos weight

Current settings:

        W0=0

        W1=0

        W2=0

        W3=0

        W4=0

        W5=0

        W6=0

        W7=0

BCM.0>  cos weight  W0=1  W1=2 W2=3 W3=4 W4=5 W5=6 W6=7 W7=8

BCM.0> cos port show PortBitMap=ge9

 

  Port ge9 COS configuration:

 ------------------------------

  Config (max queues): 1

  Schedule mode: weighted round-robin

  Weighting (in packets):

    COSQ 0 = 1 packets

  Priority to queue mappings:

    PRIO 0 ==> COSQ 0

    PRIO 1 ==> COSQ 0

    PRIO 2 ==> COSQ 0

    PRIO 3 ==> COSQ 0

    PRIO 4 ==> COSQ 0

    PRIO 5 ==> COSQ 0

    PRIO 6 ==> COSQ 0

    PRIO 7 ==> COSQ 0

    PRIO 8 ==> COSQ 0

    PRIO 9 ==> COSQ 0

    PRIO 10 ==> COSQ 0

    PRIO 11 ==> COSQ 0

    PRIO 12 ==> COSQ 0

    PRIO 13 ==> COSQ 0

    PRIO 14 ==> COSQ 0

    PRIO 15 ==> COSQ 0

 

Cos带宽

BCM.0> cos bandwidth_show

  COSQ bandwith configuration:

    port | q | KbpsMin  | KbpsMax  | Flags

    -----+---+----------+----------+-------

     ge0 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     ge1 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     ge2 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     ge3 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     ge4 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     ge5 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     ge6 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     ge7 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     ge8 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     ge9 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge10 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge11 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge12 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge13 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge14 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge15 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge16 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge17 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge18 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge19 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge20 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge21 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge22 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

    ge23 | 0 |        0 |        0 |      0

    -----+---+----------+----------+-------

     hg0 | 0 |        0 |        0 |      0

     hg0 | 8 |        0 |        0 |      0

    -----+---+----------+----------+-------

     hg1 | 0 |        0 |        0 |      0

     hg1 | 8 |        0 |        0 |      0

    -----+---+----------+----------+-------

     hg2 | 0 |        0 |        0 |      0

     hg2 | 8 |        0 |        0 |      0

    -----+---+----------+----------+-------

     hg3 | 0 |        0 |        0 |      0

     hg3 | 8 |        0 |        0 |      0

 

 

Dtag 修改 show

BCM.0> dtag

port 0:ge0      double tag mode none (disabled), tpid 0x8100

port 0:ge1      double tag mode none (disabled), tpid 0x8100

port 0:ge2      double tag mode none (disabled), tpid 0x8100

port 0:ge3      double tag mode none (disabled), tpid 0x8100

port 0:ge4      double tag mode none (disabled), tpid 0x8100

port 0:ge5      double tag mode none (disabled), tpid 0x8100

port 0:ge6      double tag mode none (disabled), tpid 0x8100

port 0:ge7      double tag mode none (disabled), tpid 0x8100

port 0:ge8      double tag mode none (disabled), tpid 0x8100

port 0:ge9      double tag mode external (customer), tpid 0x8100

port 0:ge10     double tag mode internal (service provider), tpid 0x8100

port 0:ge11     double tag mode none (disabled), tpid 0x8100

port 0:ge12     double tag mode none (disabled), tpid 0x8100

 

Fp 疑点

 

 

这两个action是什么意思?

 

 

使用ACL 红黄包统计

BCM.0> fp qset add srcmac

BCM_FIELD_QSET_ADD(SrcMac) okay

BCM.0> fp group create 0 0

BCM.0> fp entry create 0 10

BCM.0> fp qual 10 srcmac 0x1122 0xffff

BCM.0> fp policer create polid=1 mode=Committed cbs=0x80 cir=0x40 colorblind=1

BCM.0> fp policer attach entry=10 level=0 polid=1

BCM.0> fp action add 10 gpdropprecedence 1

BCM.0> fp action add 10 rpdropprecedence 2

BCM.0> fp action add 10 newtc 3 0

FP(unit 0) Error: bcm_field_action_add() failed: Feature unavailable【没执行成功,好像也没影响到最终功能 2014】.11.6

BCM.0> fp stat create group=0 type0=GreenPackets type1=RedPackets

Stat created with id: 1

BCM.0> fp stat attach entry=10 StatId=1

BCM.0> fp entry install 10

BCM.0> fp stat get statid=1 type=greenpackets

The value is: 0x00

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x00

 

之前统计不对,因为发包格式不对。

修改发包格式

 

这里ACL 规则是匹配源MAC

再查红绿包统计情况

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x0d657b1

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x0d6e0e0

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x0d76cad

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x0d7fdb7

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x0d8842b

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x0d91fcb

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x0d9f810

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x0dab5ef

BCM.0> fp stat get statid=1 type=RedPackets

The value is: 0x01b615c0

绿包

BCM.0> fp stat get statid=1 type=greenpackets

The value is: 0x07c69

BCM.0> fp stat get statid=1 type=greenpackets

The value is: 0x07c8e

BCM.0> fp stat get statid=1 type=greenpackets

The value is: 0x07cd3

BCM.0> fp stat get statid=1 type=greenpackets

The value is: 0x07cfa

BCM.0> fp stat get statid=1 type=greenpackets

The value is: 0x07d37

 

 

 

Linkscan

BCM.0> linkscan

LINKscan: Linkscan enabled

LINKscan:   Software polling interval: 250000 usec

LINKscan:   Software Port BitMap 0x00000000000000003ffffffc: ge,hg

LINKscan:   Hardware Port BitMap 0x000000000000000000000000: none

LINKscan:   Disabled Port BitMap 0x000000000000000000000000: none

BCM.0>

快速索引表的名字

BCM.0> listmem

 Flags   Name                  Entry/Copy Description

 -----C  ALTERNATE_EMIRROR_BITMAP   64      Source Modid based blocking mask table

 -----C  ARB_TDM_TABLE           128      Arbiter TDM Table

 -----C  CPU_COS_MAP             128      index by COPYTO_CPU reasons code a...

 -----C  CPU_COS_MAP_DATA_ONLY   128      CPU_COS_MAP Data SRAM for CPU_COS_...

 -----C  CPU_COS_MAP_ONLY        128      CPU_COS_MAP TCAM only view

 -----C  CPU_TS_MAP              256      vlan range match table

 -----C  DSCP_TABLE             1920      DSCP_TABLE (all info)

 ------  E2E_HOL_STATUS           64      E2E_HOL_STATUS (all info)

 ------  EFP_COUNTER_TABLE       512      COUNTER TABLE FOR THE EFP

 ------  EFP_METER_TABLE         512      METER TABLE STRUCTURES FOR THE EFP

 -----C  EFP_POLICY_TABLE        512      POLICY TABLE FOR DETERMINING ACTIO...

 --A--C  EFP_TCAM                512      TCAM FOR EFP

 -----C  EGR_DSCP_ECN_MAP         64      Egress DSCP Table to select the ne...

 -----C  EGR_DSCP_TABLE         1920      Egress DSCP Table to select the ne...

 -----C  EGR_EM_MTP_INDEX         32      Mirror to Port Table.

Index is con...

 --A--C  EGR_ERSPAN                8      Contains the ERSPAN header for eac...

 -----C  EGR_IM_MTP_INDEX         32      Mirror to Port Table to be used fo...

 -----C  EGR_IPMC               2048      Per IPMC group attributes needed i...

 -----C  EGR_IP_TUNNEL           512      Egress IP Tunnel Table. Used to Ma...

 -----C  EGR_IP_TUNNEL_IPV6      256      IPV6 view of the Egress IP Tunnel ...

 -----C  EGR_IP_TUNNEL_MPLS      512      MPLS view of the Egress IP Tunnel ...

 -----C  EGR_L3_INTF            4096      L3 Interface Table

 -----C  EGR_L3_NEXT_HOP        8192      Next Hop Table

 -----C  EGR_MAC_DA_PROFILE      128      MAC-DA values for use when doing M...

 -----C  EGRESS_MASK            4096      egress mask table

 -----C  EGR_MOD_MAP             256      Egress Module Remapping Table

 -----C  EGR_MPLS_EXP_MAPPING_1  512      Mapping table for Internal Priorit...

 -----C  EGR_MPLS_EXP_MAPPING_2  512      Mapping table for Internal Priorit...

 -----C  EGR_MPLS_EXP_PRI_MAPPING   64      Mapping table for EXP to .1p/cfi. ...

 -----C  EGR_MPLS_PRI_MAPPING    512      Mapping table for Internal Priorit...

 -----C  EGR_MPLS_VC_AND_SWAP_LABEL_TABLE 4096      MPLS VC and SWAP Label Table, Feat...

 ------  EGR_PERQ_XMT_COUNTERS   344      Per-port Per-queue transmit counte...

 -----C  EGR_PRI_CNG_MAP        1920      Per port egress priority/CFI mappi...

 -----C  EGR_PW_INIT_COUNTERS   2048      L2 MPLS Pseudo-wire Initiation Pkt...

 -----C  EGR_VLAN               4096      Vlan Membership Table for Egress

 -----C  EGR_VLAN_STG            256      Egress Spanning Tree Stage Table

 -----C  EGR_VLAN_TAG_ACTION_PROFILE   64      Egress VLAN Tag Action Profile Table.

 --h--C  EGR_VLAN_XLATE         8192      EGR_VLAN_XLATE (all info)

 -----C  EGR_VLAN_XLATE_SCRATCH    1      Egress Vlan Translate Scratch Tabl...

 -----C  EM_MTP_INDEX              4      Egress Mirror to Port Table

 ------  FP_COUNTER_TABLE       2048      COUNTER TABLE FOR THE FP

 -----C  FP_GLOBAL_MASK_TCAM    2048      PORT BITMAP TCAM ENTRY FOR EACH IF...

 ------  FP_METER_TABLE         2048      METER TABLE STRUCTURES FOR THE FP

 -----C  FP_POLICY_TABLE        2048      POLICY TABLE FOR DETERMINING ACTIO...

 -----C  FP_PORT_FIELD_SEL        64      FIELD SELECT VALUE FOR EACH SLICE ...

 -----C  FP_PORT_METER_MAP        30      FP_PORT_METER_MAP TABLE STRUCTURES...

 -----C  FP_RANGE_CHECK           32      RANGE CHECK VALUES FOR FP

 -----C  FP_SLICE_KEY_CONTROL      1      SLICE KEY GENERATION CONTROLS FOR ...

 --A--C  FP_SLICE_MAP              1      SLICE MAPPING CONTROLS FOR IFP

 

 

 ------  FP_STORM_CONTROL_METERS  120      STORM CONTROL METER TABLE STRUCTUR...

 --A--C  FP_TCAM                2048      TCAM FOR FP

 -----C  UDF_OFFSET              384      FP UDF offset table

 -----C  HG_TRUNK_FAILOVER_SET     4      Higig Trunk Failover Set Table

 -----C  IARB_TDM_TABLE          128      Arbiter TDM Table

 -----C  IFP_PORT_FIELD_SEL       30      FIELD SELECT VALUE FOR EACH SLICE ...

 -----C  IFP_REDIRECTION_PROFILE  256      Contains the number of members in ...

 -----C  IM_MTP_INDEX              4      Ingress Mirror to Port Table

 -----C  ING_DVP_TABLE          8192      Used to generte a NHI from the DVP...

 -----C  ING_L3_NEXT_HOP        8192      Reduced version of L3_NEXT_HOP tab...

 ------  ING_MOD_MAP             128      Ingress Module Remapping Table

 ------  ING_MPLS_EXP_MAPPING    128      EXP to Internal Priority and Color...

 -----C  ING_PRI_CNG_MAP        1071      Per port ingress priority/CFI mapp...

 -----C  ING_PW_TERM_COUNTERS   2048      Pseudo-wire Termination Byte count...

 -----C  ING_PW_TERM_SEQ_NUM    2048      Pseudo-wire Termination Sequence N...

 -----C  ING_SERVICE_PRI_MAP     256      Ingress Class of Service instance ...

 -----C  ING_VLAN_RANGE          128      vlan range match table

 -----C  ING_VLAN_TAG_ACTION_PROFILE   64      ACTIONS for the VXLT stage

 -----C  INITIAL_ING_L3_NEXT_HOP 8192      Reduced version of L3_NEXT_HOP tab...

 -----C  INITIAL_L3_ECMP        2048      Initial L3 Equal Cost Multipath table

 -----C  INITIAL_L3_ECMP_GROUP  2048      Contains the number of members in ...

 -----C  IPORT_TABLE              30      IPORT_TABLE (all info)

 -----C  IPV4_IN_IPV6_PREFIX_MATCH    4      IPv6 in IPv6 Address Prefix Matchi...

 -----C  IPV6_PROXY_ENABLE       128      Source Trunk Map Table

 -----C  L2MC                   1024      L2 Multicast table

 --h---  L2_ENTRY              32768      L2 ENTRY

 --h---  L2_ENTRY_ONLY         32768      HW managed L2_ENTRY table only.  D...

 -----C  L2_ENTRY_OVERFLOW         2      L2_ENTRY_OVERFLOW (all info)

 -----C  L2_ENTRY_SCRATCH          1      Single L2_ENTRY that is usable by ...

 --h---  L2_HITDA_ONLY          4096      HW managed L2_HITDA_ONLY table.  J...

 --h---  L2_HITSA_ONLY          4096      HW managed L2_HITSA_ONLY table.  J...

 ------  L2_MOD_FIFO             128      FIFO for operations that MODify th...

 --A--C  L2_USER_ENTRY           128      L2_USER_ENTRY (all info)

 -----C  L2_USER_ENTRY_DATA_ONLY  128      Data SRAM for L2_USER_ENTRY TCAM.

 --A--C  L2_USER_ENTRY_ONLY      128      TCAM for guaranteed L2 entries and...

 --A---  L3_DEFIP               6144      L3 Default IP Route (LPM) TCAM vie...

 --A---  L3_DEFIP_128            256      L3 Default IP Route (LPM) TCAM vie...

 -----C  L3_DEFIP_128_DATA_ONLY  256      L3 Default IP Route (LPM) Data SRA...

 ------  L3_DEFIP_128_HIT_ONLY   256      L3_DEFIP Hit bit table, FeatureSpe...

 --A--C  L3_DEFIP_128_ONLY       256      L3 Default IP Route (LPM) TCAM onl...

 -----C  L3_DEFIP_DATA_ONLY     6144      L3 Default IP Route (LPM) Data SRA...

 ------  L3_DEFIP_HIT_ONLY      6144      L3_DEFIP Hit bit table

 --A--C  L3_DEFIP_ONLY          6144      L3 Default IP Route (LPM) TCAM onl...

 -----C  L3_ECMP                2048      ECMP table for route selection

 -----C  L3_ECMP_GROUP          2048      Contains the number of members in ...

 ------  L3_ENTRY_HIT_ONLY       512      L3 Hit bit table

 --h---  L3_ENTRY_IPV4_MULTICAST 4096      L3 routing table IPV4 MULTICAST view

 --h---  L3_ENTRY_IPV4_MULTICAST_SCRATCH    1      L3 routing table IPV4 MULTICAST_SC...

 --h---  L3_ENTRY_IPV4_UNICAST  8192      L3 routing table IPV4 UNICAST view

 --h---  L3_ENTRY_IPV4_UNICAST_SCRATCH    1      L3 routing table IPV4 UNICAST view...

 --h---  L3_ENTRY_IPV6_MULTICAST 2048      L3 routing table IPV6 MULTICAST view

 --h---  L3_ENTRY_IPV6_MULTICAST_SCRATCH    1      L3 routing table IPV6 MULTICAST_SC...

 --h---  L3_ENTRY_IPV6_UNICAST  4096      L3 routing table IPV6 UNICAST view

 --h---  L3_ENTRY_IPV6_UNICAST_SCRATCH    1      L3 routing table IPV6 UNICAST view...

 --h---  L3_ENTRY_ONLY          8192      L3 routing table with fb_regs arch...

 --h---  L3_ENTRY_VALID_ONLY     512      L3 routing table Valid Bits only v...

 ------  L3_IIF                 6144      Layer 3 Input Interface Properties

 -----C  L3_IPMC                2048      IP multicast table

 -----C  L3_MTU_VALUES         10240      index by ING_L3_NEXT_HOP.L3_OIF or...

 --A--C  L3_TUNNEL               256      L3_TUNNEL(all info)

 -----C  LMEP                    512

 -----C  LMEP_1                  512      LMEP extension

Flags: (r)eadonly, (d)ebug, (s)orted, (h)ashed C(A)M, (c)bp, (b)ist-able, (C)achable

 

创建多播组添加端口到多播组

命令不识别

BCM.0> MCASTREP

Unknown command: MCASTREP

BCM.0> MCASTREP

Unknown command: MCASTREP

BCM.0> mcrep group create 1

Unknown command: mcrep

BCM.0>

 

Mirror 用命令行不知道如何实现

BCM.0> mir

Current settings:

        Mode=Off

        Port=, -1

        IngressBitMap=0x0000000000000000000000000000000000000000000000000000000000000000, no

        EgressBitMap=0x0000000000000000000000000000000000000000000000000000000000000000, non

BCM.0>


L2 show

BCM.0> l2 show

mac=01:00:00:00:00:01 vlan=28673 GPORT=0x0 modid=0 port=0/cpu0 Static Hit CPU MCast=50331655

mac=00:00:00:00:00:02 vlan=28673 GPORT=0x18000001 port=402653185(mpls) Hit

mac=00:00:00:00:00:10 vlan=23 GPORT=0x0 modid=0 port=0/cpu0 Static L3



  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值