Routing

 View Only
last person joined: 3 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Class based forwarding

    Posted 04-29-2024 22:59

    Hi everyone,

    I am trying to understand class based forwarding, I have built a sample topology in EVE-NG 

    SRX is running in packet mode. We are running OSPF between SRX1 and SRX2 on  all interfaces ( ge-0/0/0, ge-0/0/1, ge-0/0/2, ge-0/0/3).

    SRX1 is learning 199.199.199.0/24 over all three links:

    Linux8 machine is sending traffic with DSCP  CS3 to 199.199.199.199 ( linux6).

    I want to use class based forwarding  to direct all traffic received on ge-0/0/0  with DSCP CS3 to next hop ge-0/0/1. 

    In order to accomplish, this I have deployed following config on SRX1 but it is not working.

    MF filter defined and applied under ge-0/0/0 on SRX1:

    set firewall family inet filter MF term CS3 from dscp cs3
    set firewall family inet filter MF term CS3 then forwarding-class CS3
    set firewall family inet filter MF term CS3 then accept

    set interfaces ge-0/0/0 unit 0 family inet filter input MF
    set interfaces ge-0/0/0 unit 0 family inet address 188.188.188.1/24

    A class  based forwarding policy is configured:

    set class-of-service forwarding-policy next-hop-map TEST forwarding-class CS3 next-hop ge-0/0/1.0

    A policy is defined referencing the above CBF:

    set policy-options policy-statement CBF term T1 then cos-next-hop-map TEST
    set policy-options policy-statement CBF term T1 then accept

    This policy is then applied to forwarding table:

    set routing-options forwarding-table export CBF

    But SRX1 is not using ge-0/0/1 for the traffic. I verified Linux8 is sending traffic with DSCP CS3:

    Below is the full config on SRX1:

    set version 12.1X47-D20.7
    set system host-name SRX1
    set interfaces ge-0/0/0 unit 0 family inet filter input MF
    set interfaces ge-0/0/0 unit 0 family inet address 188.188.188.1/24
    set interfaces ge-0/0/1 unit 0 family inet address 100.100.100.1/24
    set interfaces ge-0/0/2 unit 0 family inet address 200.200.200.1/24
    set interfaces ge-0/0/3 unit 0 family inet address 201.201.201.1/24
    set routing-options forwarding-table export CBF
    set protocols ospf area 0.0.0.0 interface all
    set policy-options policy-statement CBF term T1 then cos-next-hop-map TEST
    set policy-options policy-statement CBF term T1 then accept
    set policy-options policy-statement LB then load-balance per-packet
    set policy-options policy-statement LB then accept
    set class-of-service forwarding-policy next-hop-map TEST forwarding-class CS3 next-hop ge-0/0/1.0
    set class-of-service forwarding-classes queue 1 CS1
    set class-of-service forwarding-classes queue 2 CS2
    set class-of-service forwarding-classes queue 3 CS3
    set class-of-service forwarding-classes queue 4 CS4
    set security forwarding-options family inet6 mode packet-based
    set security forwarding-options family mpls mode packet-based
    set firewall family inet filter MF term CS3 from dscp cs3
    set firewall family inet filter MF term CS3 then forwarding-class CS3
    set firewall family inet filter MF term CS3 then accept
    set firewall family inet filter MF term ELSE then accept

    ####################################################################################

    What am I missing ?

    Much appreciated!!



    ------------------------------
    Be kind!!
    ------------------------------


  • 2.  RE: Class based forwarding

    Posted 05-01-2024 03:36

    Hi,

    I would suggest to try 2 things

    • Try to use IP address instead of interface as next-hop in COS forwarding policy.
    • In policy statement itself, I think accept action is unnecessary for T1 term, just COS next-hop-map should be enough.


    ------------------------------
    FARID AKHUNDOV
    ------------------------------



  • 3.  RE: Class based forwarding

    Posted 05-02-2024 19:47

    Thanks Farid, I will give a try with IP, I followed the instruction  below that says next-hop has to be interface . I will let you know.

    https://www.juniper.net/documentation/us/en/software/junos/cos/topics/concept/cos-configuring-cos-based-forwarding.html

    When you configure CBF with OSPF as the interior gateway protocol (IGP), you must specify the next hop as an interface name or next-hop alias, not as an IPv4 or IPv6 address.



    ------------------------------
    Be kind!!
    ------------------------------



  • 4.  RE: Class based forwarding

    Posted 05-05-2024 19:21

    No joy Farid!!

    I  used IP for next hop as suggested but it did not work, 



    ------------------------------
    Be kind!!
    ------------------------------