Bfd Tos

Scenario to verify BFD ToS (Type of Service) functionality with BGP. BFD profile tos allows setting the IP ToS field on BFD packets. By default BFD uses CS6 (0xC0). These tests verify that the ToS is applied correctly, can be changed dynamically, and is visible in the actual packets via system journal.

Test BFD Profile ToS

Description

Test that BFD profile tos is applied correctly. Configures a BFD profile with tos 48 on both routers and verifies that BGP establishes, BFD is up with the correct ToS value, and end-to-end connectivity works.

Scenario

Step 1: Set the following configuration in DUT1 :

set interfaces dummy dum0 address 1.1.1.1/24
set interfaces ethernet eth0 address 10.10.0.200/24
set protocols bfd profile BFD_TOS tos 48
set protocols bgp 20 neighbor peer bfd profile BFD_TOS
set protocols bgp 20 neighbor peer remote-address 10.10.0.100
set protocols bgp 20 neighbor peer remote-as 10
set protocols bgp 20 neighbor peer route-map export PERMIT
set protocols bgp 20 redistribute connected route-map REDIS
set protocols logging bgp bfd
set protocols logging bgp neighbor-events
set protocols logging level debugging
set protocols route-map PERMIT rule 1 action permit
set protocols route-map REDIS rule 1 action permit
set protocols route-map REDIS rule 1 match interface dum0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.10.0.100/24
set protocols bfd profile BFD_TOS tos 48
set protocols bgp 10 neighbor peer bfd profile BFD_TOS
set protocols bgp 10 neighbor peer remote-address 10.10.0.200
set protocols bgp 10 neighbor peer remote-as 20
set protocols bgp 10 neighbor peer route-map import PERMIT
set protocols logging bgp bfd
set protocols logging bgp neighbor-events
set protocols logging level debugging
set protocols route-map PERMIT rule 1 action permit
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run the command protocols bgp show ip neighbors on DUT0 and check whether the output matches the following regular expressions:

BGP state = Established
Status: Up
BFD: Type: single hop
Show output
BGP neighbor is 10.10.0.200, remote AS 20, local AS 10, external link
  Local Role: undefined
  Remote Role: undefined
Hostname: osdx
  BGP version 4, remote router ID 10.10.0.200, local router ID 10.10.0.100
  BGP state = Established, up for 00:00:02
  Last read 00:00:01, Last write 00:00:01
  Hold time is 90 seconds, keepalive interval is 30 seconds
  Configured hold time is 90 seconds, keepalive interval is 30 seconds
  Configured tcp-mss is 0, synced tcp-mss is 1448
  Configured conditional advertisements interval is 60 seconds
  Neighbor capabilities:
    4 Byte AS: advertised and received
    AddPath:
      IPv4 Unicast: RX advertised and received
    Paths-Limit:
      IPv4 Unicast: advertised (0) and received (0)
    Long-lived Graceful Restart: advertised and received
      Address families by peer:
    Route refresh: advertised and received
    Enhanced Route Refresh: advertised and received
    Address Family IPv4 Unicast: advertised and received
    Hostname Capability: advertised (name: osdx,domain name: n/a) received (name: osdx,domain name: n/a)
    Version Capability: not advertised not received
    Link-Local Next Hop Capability: not advertised not received
    Graceful Restart Capability: advertised and received
      Remote Restart timer is 120 seconds
      Address families by peer:
            Graceful Restart Capability: advertised and received
      Remote Restart timer is 120 seconds
      Peer has restarted (R-bit is set)
      Peer has restarted (N-bit is set)
      Address families by peer:
        none
  Graceful restart information:
    End-of-RIB send: IPv4 Unicast
    End-of-RIB received: IPv4 Unicast
    Local GR Mode: Helper*
    Remote GR Mode: Helper

    R bit: True
    N bit: True
    Timers:
      Configured Restart Time(sec): 120
      Received Restart Time(sec): 120
      Configured LLGR Stale Path Time(sec): 0
    IPv4 Unicast:
      F bit: False
      End-of-RIB sent: Yes
      End-of-RIB sent after update: Yes
      End-of-RIB received: Yes
      Timers:
        Configured Stale Path Time(sec): 360
        LLGR Stale Path Time(sec): 0
  Message statistics:
    Inq depth is 0
    Outq depth is 0
                         Sent       Rcvd
    Opens:                  2          2
    Notifications:          2          0
    Updates:                1          3
    Keepalives:             1          1
    Route Refresh:          1          2
    Capability:             0          0
    Total:                  7          8

  Prefix statistics:
    Inbound filtered: 0
    AS-PATH loop: 0
    Originator loop: 0
    Cluster loop: 0
    Invalid next-hop: 0
    Withdrawn: 0
    Attributes discarded: 0

  Minimum time between advertisement runs is 0 seconds
  Update delay timer is 0 seconds (remaining: 0)

 For address family: IPv4 Unicast
  Update group 1, subgroup 1
  Packet Queue length 0
  Community attribute sent to this neighbor(all)
  Inbound path policy configured
  Route map for incoming advertisements is *PERMIT
  Outbound updates discarded due to missing policy
  1 accepted, 0 sent prefixes

  Connections established 1; dropped 0
  Last reset 00:00:02,  Cease: connection collision (n/a)
  Message received that caused BGP to send a NOTIFICATION:
    FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
    00610104 0014005A 0A0A00C8 44020601
    04000100 01020202 00020246 00020641
    04000000 14020645 04000101 0102074C
    05000101 00000208 4906046F 73647800
    02044002 C0780209 47070001 01800000
    00
  External BGP neighbor may be up to 1 hops away.
Local host: 10.10.0.100, Local port: 179
Foreign host: 10.10.0.200, Foreign port: 39302
Nexthop: 10.10.0.100
Nexthop global: ::
Nexthop local: ::
BGP connection: shared network
BGP Connect Retry Timer in Seconds: 30
Estimated round trip time: 0 ms
BFD Hold Time (interval 30) timer expires in 0 seconds
Read thread: on  Write thread: on  FD used: 26

  BFD: Type: single hop
  Detect Multiplier: 3, Min Rx interval: 300, Min Tx interval: 300
  Profile: BFD_TOS
  Status: Up, Last update: 0:00:00:01

Step 4: Run the command protocols bfd show peers on DUT0 and check whether the output matches the following regular expressions:

Status: up
ToS: 48
Show output
BFD Peers:
        peer 10.10.0.200 local-address 10.10.0.100 vrf default interface eth0
                ID: 3720495713
                Remote ID: 1440861227
                Active mode
                ToS: 48
                Status: up
                Uptime: 1 second(s)
                Diagnostics: ok
                Remote diagnostics: ok
                Peer Type: dynamic
                RTT min/avg/max: 0/0/0 usec
                Profile: BFD_TOS
                Local timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Transmission interval (actual with jitter): 237ms
                        Detection timeout: 900ms
                        Echo receive interval: disabled
                        Echo transmission interval: disabled
                Remote timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo receive interval: disabled

Step 5: Run the command protocols bgp show ip on DUT0 and check whether the output matches the following regular expressions:

1.1.1.0/24
Show output
BGP table version is 1, local router ID is 10.10.0.100, vrf id 0
Default local pref 100, local AS 10
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.1.1.0/24       10.10.0.200              0             0 20 ?

Displayed 1 routes and 1 total paths

Step 6: Ping the IP address 1.1.1.1 from DUT0:

admin@DUT0$ ping 1.1.1.1 count 1 size 56 timeout 1
Show output
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=64 time=0.304 ms

--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.304/0.304/0.304/0.000 ms

Test BFD ToS Dynamic Change

Description

Test that changing the tos value in the BFD profile updates the BFD session dynamically without tearing it down. The tos is changed from 48 to 184 and back to 48, verifying that show peers reflects each change.

Scenario

Step 1: Set the following configuration in DUT1 :

set interfaces dummy dum0 address 1.1.1.1/24
set interfaces ethernet eth0 address 10.10.0.200/24
set protocols bfd profile BFD_TOS tos 48
set protocols bgp 20 neighbor peer bfd profile BFD_TOS
set protocols bgp 20 neighbor peer remote-address 10.10.0.100
set protocols bgp 20 neighbor peer remote-as 10
set protocols bgp 20 neighbor peer route-map export PERMIT
set protocols bgp 20 redistribute connected route-map REDIS
set protocols logging bgp bfd
set protocols logging bgp neighbor-events
set protocols logging level debugging
set protocols route-map PERMIT rule 1 action permit
set protocols route-map REDIS rule 1 action permit
set protocols route-map REDIS rule 1 match interface dum0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.10.0.100/24
set protocols bfd profile BFD_TOS tos 48
set protocols bgp 10 neighbor peer bfd profile BFD_TOS
set protocols bgp 10 neighbor peer remote-address 10.10.0.200
set protocols bgp 10 neighbor peer remote-as 20
set protocols bgp 10 neighbor peer route-map import PERMIT
set protocols logging bgp bfd
set protocols logging bgp neighbor-events
set protocols logging level debugging
set protocols route-map PERMIT rule 1 action permit
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run the command protocols bgp show ip neighbors on DUT0 and check whether the output matches the following regular expressions:

BGP state = Established
Status: Up
BFD: Type: single hop
Show output
BGP neighbor is 10.10.0.200, remote AS 20, local AS 10, external link
  Local Role: undefined
  Remote Role: undefined
Hostname: osdx
  BGP version 4, remote router ID 10.10.0.200, local router ID 10.10.0.100
  BGP state = Established, up for 00:00:05
  Last read 00:00:04, Last write 00:00:04
  Hold time is 90 seconds, keepalive interval is 30 seconds
  Configured hold time is 90 seconds, keepalive interval is 30 seconds
  Configured tcp-mss is 0, synced tcp-mss is 1448
  Configured conditional advertisements interval is 60 seconds
  Neighbor capabilities:
    4 Byte AS: advertised and received
    AddPath:
      IPv4 Unicast: RX advertised and received
    Paths-Limit:
      IPv4 Unicast: advertised (0) and received (0)
    Long-lived Graceful Restart: advertised and received
      Address families by peer:
    Route refresh: advertised and received
    Enhanced Route Refresh: advertised and received
    Address Family IPv4 Unicast: advertised and received
    Hostname Capability: advertised (name: osdx,domain name: n/a) received (name: osdx,domain name: n/a)
    Version Capability: not advertised not received
    Link-Local Next Hop Capability: not advertised not received
    Graceful Restart Capability: advertised and received
      Remote Restart timer is 120 seconds
      Address families by peer:
            Graceful Restart Capability: advertised and received
      Remote Restart timer is 120 seconds
      Peer has restarted (R-bit is set)
      Peer has restarted (N-bit is set)
      Address families by peer:
        none
  Graceful restart information:
    End-of-RIB send: IPv4 Unicast
    End-of-RIB received: IPv4 Unicast
    Local GR Mode: Helper*
    Remote GR Mode: Helper

    R bit: True
    N bit: True
    Timers:
      Configured Restart Time(sec): 120
      Received Restart Time(sec): 120
      Configured LLGR Stale Path Time(sec): 0
    IPv4 Unicast:
      F bit: False
      End-of-RIB sent: Yes
      End-of-RIB sent after update: Yes
      End-of-RIB received: Yes
      Timers:
        Configured Stale Path Time(sec): 360
        LLGR Stale Path Time(sec): 0
  Message statistics:
    Inq depth is 0
    Outq depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                1          3
    Keepalives:             1          1
    Route Refresh:          1          2
    Capability:             0          0
    Total:                  4          7

  Prefix statistics:
    Inbound filtered: 0
    AS-PATH loop: 0
    Originator loop: 0
    Cluster loop: 0
    Invalid next-hop: 0
    Withdrawn: 0
    Attributes discarded: 0

  Minimum time between advertisement runs is 0 seconds
  Update delay timer is 0 seconds (remaining: 0)

 For address family: IPv4 Unicast
  Update group 1, subgroup 1
  Packet Queue length 0
  Community attribute sent to this neighbor(all)
  Inbound path policy configured
  Route map for incoming advertisements is *PERMIT
  Outbound updates discarded due to missing policy
  1 accepted, 0 sent prefixes

  Connections established 1; dropped 0
  Last reset 00:00:05,  No path to specified Neighbor (n/a)
  External BGP neighbor may be up to 1 hops away.
Local host: 10.10.0.100, Local port: 47562
Foreign host: 10.10.0.200, Foreign port: 179
Nexthop: 10.10.0.100
Nexthop global: ::
Nexthop local: ::
BGP connection: shared network
BGP Connect Retry Timer in Seconds: 30
Estimated round trip time: 0 ms
BFD Hold Time (interval 30) timer expires in 0 seconds
Read thread: on  Write thread: on  FD used: 29

  BFD: Type: single hop
  Detect Multiplier: 3, Min Rx interval: 300, Min Tx interval: 300
  Profile: BFD_TOS
  Status: Up, Last update: 0:00:00:01

Step 4: Run the command protocols bfd show peers on DUT0 and check whether the output matches the following regular expressions:

Status: up
ToS: 48
Show output
BFD Peers:
        peer 10.10.0.200 local-address 10.10.0.100 vrf default interface eth0
                ID: 2196604002
                Remote ID: 3891478258
                Active mode
                ToS: 48
                Status: up
                Uptime: 1 second(s)
                Diagnostics: ok
                Remote diagnostics: ok
                Peer Type: dynamic
                RTT min/avg/max: 0/0/0 usec
                Profile: BFD_TOS
                Local timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Transmission interval (actual with jitter): 243ms
                        Detection timeout: 900ms
                        Echo receive interval: disabled
                        Echo transmission interval: disabled
                Remote timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo receive interval: disabled

Step 5: Modify the following configuration lines in DUT0 :

set protocols bfd profile BFD_TOS tos 184

Step 6: Run the command protocols bfd show peers on DUT0 and check whether the output matches the following regular expressions:

ToS: 184
Show output
BFD Peers:
        peer 10.10.0.200 local-address 10.10.0.100 vrf default interface eth0
                ID: 2196604002
                Remote ID: 3891478258
                Active mode
                ToS: 184
                Status: up
                Uptime: 2 second(s)
                Diagnostics: ok
                Remote diagnostics: ok
                Peer Type: dynamic
                RTT min/avg/max: 0/0/0 usec
                Profile: BFD_TOS
                Local timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Transmission interval (actual with jitter): 297ms
                        Detection timeout: 900ms
                        Echo receive interval: disabled
                        Echo transmission interval: disabled
                Remote timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo receive interval: disabled

Step 7: Modify the following configuration lines in DUT0 :

set protocols bfd profile BFD_TOS tos 48

Step 8: Run the command protocols bfd show peers on DUT0 and check whether the output matches the following regular expressions:

Status: up
ToS: 48
Show output
BFD Peers:
        peer 10.10.0.200 local-address 10.10.0.100 vrf default interface eth0
                ID: 2196604002
                Remote ID: 3891478258
                Active mode
                ToS: 48
                Status: up
                Uptime: 2 second(s)
                Diagnostics: ok
                Remote diagnostics: ok
                Peer Type: dynamic
                RTT min/avg/max: 0/0/0 usec
                Profile: BFD_TOS
                Local timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Transmission interval (actual with jitter): 258ms
                        Detection timeout: 900ms
                        Echo receive interval: disabled
                        Echo transmission interval: disabled
                Remote timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo receive interval: disabled

Step 9: Run the command protocols bgp show ip neighbors on DUT0 and check whether the output matches the following regular expressions:

BGP state = Established
Status: Up
BFD: Type: single hop
Show output
BGP neighbor is 10.10.0.200, remote AS 20, local AS 10, external link
  Local Role: undefined
  Remote Role: undefined
Hostname: osdx
  BGP version 4, remote router ID 10.10.0.200, local router ID 10.10.0.100
  BGP state = Established, up for 00:00:06
  Last read 00:00:05, Last write 00:00:05
  Hold time is 90 seconds, keepalive interval is 30 seconds
  Configured hold time is 90 seconds, keepalive interval is 30 seconds
  Configured tcp-mss is 0, synced tcp-mss is 1448
  Configured conditional advertisements interval is 60 seconds
  Neighbor capabilities:
    4 Byte AS: advertised and received
    AddPath:
      IPv4 Unicast: RX advertised and received
    Paths-Limit:
      IPv4 Unicast: advertised (0) and received (0)
    Long-lived Graceful Restart: advertised and received
      Address families by peer:
    Route refresh: advertised and received
    Enhanced Route Refresh: advertised and received
    Address Family IPv4 Unicast: advertised and received
    Hostname Capability: advertised (name: osdx,domain name: n/a) received (name: osdx,domain name: n/a)
    Version Capability: not advertised not received
    Link-Local Next Hop Capability: not advertised not received
    Graceful Restart Capability: advertised and received
      Remote Restart timer is 120 seconds
      Address families by peer:
            Graceful Restart Capability: advertised and received
      Remote Restart timer is 120 seconds
      Peer has restarted (R-bit is set)
      Peer has restarted (N-bit is set)
      Address families by peer:
        none
  Graceful restart information:
    End-of-RIB send: IPv4 Unicast
    End-of-RIB received: IPv4 Unicast
    Local GR Mode: Helper*
    Remote GR Mode: Helper

    R bit: True
    N bit: True
    Timers:
      Configured Restart Time(sec): 120
      Received Restart Time(sec): 120
      Configured LLGR Stale Path Time(sec): 0
    IPv4 Unicast:
      F bit: False
      End-of-RIB sent: Yes
      End-of-RIB sent after update: Yes
      End-of-RIB received: Yes
      Timers:
        Configured Stale Path Time(sec): 360
        LLGR Stale Path Time(sec): 0
  Message statistics:
    Inq depth is 0
    Outq depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                1          3
    Keepalives:             1          1
    Route Refresh:          1          2
    Capability:             0          0
    Total:                  4          7

  Prefix statistics:
    Inbound filtered: 0
    AS-PATH loop: 0
    Originator loop: 0
    Cluster loop: 0
    Invalid next-hop: 0
    Withdrawn: 0
    Attributes discarded: 0

  Minimum time between advertisement runs is 0 seconds
  Update delay timer is 0 seconds (remaining: 0)

 For address family: IPv4 Unicast
  Update group 1, subgroup 1
  Packet Queue length 0
  Community attribute sent to this neighbor(all)
  Inbound path policy configured
  Route map for incoming advertisements is *PERMIT
  Outbound updates discarded due to missing policy
  1 accepted, 0 sent prefixes

  Connections established 1; dropped 0
  Last reset 00:00:06,  No path to specified Neighbor (n/a)
  External BGP neighbor may be up to 1 hops away.
Local host: 10.10.0.100, Local port: 47562
Foreign host: 10.10.0.200, Foreign port: 179
Nexthop: 10.10.0.100
Nexthop global: ::
Nexthop local: ::
BGP connection: shared network
BGP Connect Retry Timer in Seconds: 30
Estimated round trip time: 0 ms
BFD Hold Time (interval 30) timer expires in 0 seconds
Read thread: on  Write thread: on  FD used: 29

  BFD: Type: single hop
  Detect Multiplier: 3, Min Rx interval: 300, Min Tx interval: 300
  Profile: BFD_TOS
  Status: Up, Last update: 0:00:00:02

Test BFD ToS In Packets

Description

Test that the configured ToS value is present in actual BFD packets. A traffic policy with log is configured to capture BFD packets. The test verifies that the ToS value in the journal changes when the profile is updated.

Scenario

Step 1: Set the following configuration in DUT1 :

set interfaces dummy dum0 address 1.1.1.1/24
set interfaces ethernet eth0 address 10.10.0.200/24
set protocols bfd profile BFD_TOS tos 48
set protocols bgp 20 neighbor peer bfd profile BFD_TOS
set protocols bgp 20 neighbor peer remote-address 10.10.0.100
set protocols bgp 20 neighbor peer remote-as 10
set protocols bgp 20 neighbor peer route-map export PERMIT
set protocols bgp 20 redistribute connected route-map REDIS
set protocols logging bgp bfd
set protocols logging bgp neighbor-events
set protocols logging level debugging
set protocols route-map PERMIT rule 1 action permit
set protocols route-map REDIS rule 1 action permit
set protocols route-map REDIS rule 1 match interface dum0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.10.0.100/24
set protocols bfd profile BFD_TOS tos 48
set protocols bgp 10 neighbor peer bfd profile BFD_TOS
set protocols bgp 10 neighbor peer remote-address 10.10.0.200
set protocols bgp 10 neighbor peer remote-as 20
set protocols bgp 10 neighbor peer route-map import PERMIT
set protocols logging bgp bfd
set protocols logging bgp neighbor-events
set protocols logging level debugging
set protocols route-map PERMIT rule 1 action permit
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run the command protocols bgp show ip neighbors on DUT0 and check whether the output matches the following regular expressions:

BGP state = Established
Status: Up
BFD: Type: single hop
Show output
BGP neighbor is 10.10.0.200, remote AS 20, local AS 10, external link
  Local Role: undefined
  Remote Role: undefined
Hostname: osdx
  BGP version 4, remote router ID 10.10.0.200, local router ID 10.10.0.100
  BGP state = Established, up for 00:00:04
  Last read 00:00:03, Last write 00:00:03
  Hold time is 90 seconds, keepalive interval is 30 seconds
  Configured hold time is 90 seconds, keepalive interval is 30 seconds
  Configured tcp-mss is 0, synced tcp-mss is 1448
  Configured conditional advertisements interval is 60 seconds
  Neighbor capabilities:
    4 Byte AS: advertised and received
    AddPath:
      IPv4 Unicast: RX advertised and received
    Paths-Limit:
      IPv4 Unicast: advertised (0) and received (0)
    Long-lived Graceful Restart: advertised and received
      Address families by peer:
    Route refresh: advertised and received
    Enhanced Route Refresh: advertised and received
    Address Family IPv4 Unicast: advertised and received
    Hostname Capability: advertised (name: osdx,domain name: n/a) received (name: osdx,domain name: n/a)
    Version Capability: not advertised not received
    Link-Local Next Hop Capability: not advertised not received
    Graceful Restart Capability: advertised and received
      Remote Restart timer is 120 seconds
      Address families by peer:
            Graceful Restart Capability: advertised and received
      Remote Restart timer is 120 seconds
      Peer has restarted (R-bit is set)
      Peer has restarted (N-bit is set)
      Address families by peer:
        none
  Graceful restart information:
    End-of-RIB send: IPv4 Unicast
    End-of-RIB received: IPv4 Unicast
    Local GR Mode: Helper*
    Remote GR Mode: Helper

    R bit: True
    N bit: True
    Timers:
      Configured Restart Time(sec): 120
      Received Restart Time(sec): 120
      Configured LLGR Stale Path Time(sec): 0
    IPv4 Unicast:
      F bit: False
      End-of-RIB sent: Yes
      End-of-RIB sent after update: Yes
      End-of-RIB received: Yes
      Timers:
        Configured Stale Path Time(sec): 360
        LLGR Stale Path Time(sec): 0
  Message statistics:
    Inq depth is 0
    Outq depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                1          3
    Keepalives:             1          1
    Route Refresh:          1          2
    Capability:             0          0
    Total:                  4          7

  Prefix statistics:
    Inbound filtered: 0
    AS-PATH loop: 0
    Originator loop: 0
    Cluster loop: 0
    Invalid next-hop: 0
    Withdrawn: 0
    Attributes discarded: 0

  Minimum time between advertisement runs is 0 seconds
  Update delay timer is 0 seconds (remaining: 0)

 For address family: IPv4 Unicast
  Update group 1, subgroup 1
  Packet Queue length 0
  Community attribute sent to this neighbor(all)
  Inbound path policy configured
  Route map for incoming advertisements is *PERMIT
  Outbound updates discarded due to missing policy
  1 accepted, 0 sent prefixes

  Connections established 1; dropped 0
  Last reset 00:00:04,  No path to specified Neighbor (n/a)
  External BGP neighbor may be up to 1 hops away.
Local host: 10.10.0.100, Local port: 36840
Foreign host: 10.10.0.200, Foreign port: 179
Nexthop: 10.10.0.100
Nexthop global: ::
Nexthop local: ::
BGP connection: shared network
BGP Connect Retry Timer in Seconds: 30
Estimated round trip time: 0 ms
BFD Hold Time (interval 30) timer expires in 0 seconds
Read thread: on  Write thread: on  FD used: 29

  BFD: Type: single hop
  Detect Multiplier: 3, Min Rx interval: 300, Min Tx interval: 300
  Profile: BFD_TOS
  Status: Up, Last update: 0:00:00:01

Step 4: Run the command system journal clear on DUT0 and expect the following output:

Show output
Vacuuming done, freed 0B of archived journals from /run/log/journal.
Deleted archived journal /run/log/journal/140771393e044d28bd27951346e92000/system@61afe6542e0643d3bb92b6d7dbca0db5-00000000000156e6-00065359e67b47db.journal (184.0K).
Vacuuming done, freed 184.0K of archived journals from /run/log/journal/140771393e044d28bd27951346e92000.
Vacuuming done, freed 0B of archived journals from /var/log/journal.

Step 5: Modify the following configuration lines in DUT0 :

set interfaces ethernet eth0 traffic policy out LOG_BFD
set traffic policy LOG_BFD rule 1 log prefix BFD_TOS
set traffic policy LOG_BFD rule 1 selector BFD_PKT
set traffic selector BFD_PKT rule 1 destination port 3784
set traffic selector BFD_PKT rule 1 protocol udp

Step 6: Run the command system journal show | tail on DUT0 and check whether the output contains the following tokens:

[BFD_TOS-1] ACCEPT
Show output
Jun 03 14:04:14.556490 osdx OSDxCLI[439192]: User 'admin' added a new cfg line: 'set traffic policy LOG_BFD rule 1 log prefix BFD_TOS'.
Jun 03 14:04:14.652155 osdx OSDxCLI[439192]: User 'admin' added a new cfg line: 'set traffic policy LOG_BFD rule 1 selector BFD_PKT'.
Jun 03 14:04:14.742327 osdx OSDxCLI[439192]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 traffic policy out LOG_BFD'.
Jun 03 14:04:14.812125 osdx OSDxCLI[439192]: User 'admin' added a new cfg line: 'show changes'.
Jun 03 14:04:14.943864 osdx ubnt-cfgd[504696]: inactive
Jun 03 14:04:15.025193 osdx INFO[504724]: FRR daemons did not change
Jun 03 14:04:15.222510 osdx cfgd[1899]: [439192]Completed change to active configuration
Jun 03 14:04:15.223012 osdx OSDxCLI[439192]: User 'admin' committed the configuration.
Jun 03 14:04:15.238511 osdx OSDxCLI[439192]: User 'admin' left the configuration menu.
Jun 03 14:04:15.295164 osdx kernel: [BFD_TOS-1] ACCEPT IN= OUT=eth0 SRC=10.10.0.100 DST=10.10.0.200 LEN=52 TOS=0x10 PREC=0x20 TTL=255 ID=12457 DF PROTO=UDP SPT=49153 DPT=3784 LEN=32

Step 7: Run the command system journal show | tail on DUT0 and check whether the output contains the following tokens:

PREC=0x20
Show output
Jun 03 14:04:14.652155 osdx OSDxCLI[439192]: User 'admin' added a new cfg line: 'set traffic policy LOG_BFD rule 1 selector BFD_PKT'.
Jun 03 14:04:14.742327 osdx OSDxCLI[439192]: User 'admin' added a new cfg line: 'set interfaces ethernet eth0 traffic policy out LOG_BFD'.
Jun 03 14:04:14.812125 osdx OSDxCLI[439192]: User 'admin' added a new cfg line: 'show changes'.
Jun 03 14:04:14.943864 osdx ubnt-cfgd[504696]: inactive
Jun 03 14:04:15.025193 osdx INFO[504724]: FRR daemons did not change
Jun 03 14:04:15.222510 osdx cfgd[1899]: [439192]Completed change to active configuration
Jun 03 14:04:15.223012 osdx OSDxCLI[439192]: User 'admin' committed the configuration.
Jun 03 14:04:15.238511 osdx OSDxCLI[439192]: User 'admin' left the configuration menu.
Jun 03 14:04:15.295164 osdx kernel: [BFD_TOS-1] ACCEPT IN= OUT=eth0 SRC=10.10.0.100 DST=10.10.0.200 LEN=52 TOS=0x10 PREC=0x20 TTL=255 ID=12457 DF PROTO=UDP SPT=49153 DPT=3784 LEN=32
Jun 03 14:04:15.391677 osdx OSDxCLI[439192]: User 'admin' executed a new command: 'system journal show | tail'.

Step 8: Run the command system journal clear on DUT0 and expect the following output:

Show output
Vacuuming done, freed 0B of archived journals from /var/log/journal.
Vacuuming done, freed 0B of archived journals from /run/log/journal.
Deleted archived journal /run/log/journal/140771393e044d28bd27951346e92000/system@61afe6542e0643d3bb92b6d7dbca0db5-0000000000015790-00065359e7110071.journal (84.0K).
Vacuuming done, freed 84.0K of archived journals from /run/log/journal/140771393e044d28bd27951346e92000.

Step 9: Modify the following configuration lines in DUT0 :

set protocols bfd profile BFD_TOS tos 184

Step 10: Run the command system journal show | tail on DUT0 and check whether the output contains the following tokens:

[BFD_TOS-1] ACCEPT
Show output
Jun 03 14:04:15.940654 osdx INFO[504787]: FRR daemons did not change
Jun 03 14:04:15.957658 osdx zebra[8473]: [G6NKK-8C6DV] end_config: VTY:0x55c1a3bdef00, pending SET-CFG: 0
Jun 03 14:04:15.958102 osdx mgmtd[8471]: [G6NKK-8C6DV] end_config: VTY:0x55d4b02f4670, pending SET-CFG: 0
Jun 03 14:04:15.959456 osdx bgpd[504338]: [G6NKK-8C6DV] end_config: VTY:0x564a76612e40, pending SET-CFG: 0
Jun 03 14:04:15.960570 osdx staticd[8478]: [G6NKK-8C6DV] end_config: VTY:0x55dc16fb6ce0, pending SET-CFG: 0
Jun 03 14:04:15.960949 osdx bfdd[504334]: [G6NKK-8C6DV] end_config: VTY:0x5638b91b83f0, pending SET-CFG: 0
Jun 03 14:04:16.031456 osdx cfgd[1899]: [439192]Completed change to active configuration
Jun 03 14:04:16.031909 osdx OSDxCLI[439192]: User 'admin' committed the configuration.
Jun 03 14:04:16.052293 osdx OSDxCLI[439192]: User 'admin' left the configuration menu.
Jun 03 14:04:16.103125 osdx kernel: [BFD_TOS-1] ACCEPT IN= OUT=eth0 SRC=10.10.0.100 DST=10.10.0.200 LEN=52 TOS=0x18 PREC=0xA0 TTL=255 ID=12541 DF PROTO=UDP SPT=49153 DPT=3784 LEN=32

Step 11: Run the command system journal show | tail on DUT0 and check whether the output contains the following tokens:

PREC=0xA0
Show output
Jun 03 14:04:15.957658 osdx zebra[8473]: [G6NKK-8C6DV] end_config: VTY:0x55c1a3bdef00, pending SET-CFG: 0
Jun 03 14:04:15.958102 osdx mgmtd[8471]: [G6NKK-8C6DV] end_config: VTY:0x55d4b02f4670, pending SET-CFG: 0
Jun 03 14:04:15.959456 osdx bgpd[504338]: [G6NKK-8C6DV] end_config: VTY:0x564a76612e40, pending SET-CFG: 0
Jun 03 14:04:15.960570 osdx staticd[8478]: [G6NKK-8C6DV] end_config: VTY:0x55dc16fb6ce0, pending SET-CFG: 0
Jun 03 14:04:15.960949 osdx bfdd[504334]: [G6NKK-8C6DV] end_config: VTY:0x5638b91b83f0, pending SET-CFG: 0
Jun 03 14:04:16.031456 osdx cfgd[1899]: [439192]Completed change to active configuration
Jun 03 14:04:16.031909 osdx OSDxCLI[439192]: User 'admin' committed the configuration.
Jun 03 14:04:16.052293 osdx OSDxCLI[439192]: User 'admin' left the configuration menu.
Jun 03 14:04:16.103125 osdx kernel: [BFD_TOS-1] ACCEPT IN= OUT=eth0 SRC=10.10.0.100 DST=10.10.0.200 LEN=52 TOS=0x18 PREC=0xA0 TTL=255 ID=12541 DF PROTO=UDP SPT=49153 DPT=3784 LEN=32
Jun 03 14:04:16.182356 osdx OSDxCLI[439192]: User 'admin' executed a new command: 'system journal show | tail'.