Junos OS

 View Only
last person joined: 17 hours ago 

Ask questions and share experiences about Junos OS.
  • 1.  Subscriber BGP session (routing-service )

    Posted 05-16-2023 05:31

    Hello community!
    Model: mx80-t
    Junos: 20.2R1-S2.1
    There was a need to setup a bgp multihop session with a subscriber with dhcp static lease. According to the documentation, I need to add to the configuration to dynamic-profile "routing-service enable" stanza in vlan and demux profiles. My configuration:
    vlan profile

    VLAN_RANGE_ANY_RS {
        interfaces {
            "$junos-interface-ifd-name" {
                unit "$junos-interface-unit" {
                    actual-transit-statistics;
                    demux-source inet;
                    routing-service {
                        enable;
                    }                       
                    proxy-arp;
                    vlan-tags outer "$junos-vlan-id";
                    demux-options {
                        underlying-interface "$junos-interface-ifd-name";
                    }
                    family inet {
                        unnumbered-address lo0.0 preferred-source-address x.x.x.x;
                    }
                }
            }
        }
    }
    


    dhcp profile

    INTERNET {
        routing-instances {
            "$junos-routing-instance" {
                interface "$junos-interface-name" {
                    any;
                }
                routing-options {
                    access {
                        route $junos-framed-route-ip-address-prefix next-hop "$junos-framed-route-nexthop";
                    }
                }
            }
        }
        interfaces {
            demux0 {
                unit "$junos-interface-unit" {
                    routing-service {
                        enable;
                    }
                    demux-options {
                        underlying-interface "$junos-underlying-interface";
                    }
                    family inet {
                        demux-source {
                            $junos-subscriber-ip-address;
                        }
                        unnumbered-address "$junos-loopback-interface" preferred-source-address "$junos-preferred-source-address";
                    }
                }
            }
        }
    }
    


    also to this subscriber has activated service with policer only. vlan interface create correctly, but demux0.xxxxxxxx not created with error:
    May 16 11:55:22  rtestroom-1 jdhcpd: NACK received for profile request with id=0x3d70df0 from bbe-smgd daemon: Failed to create pseudo ifl retry TRUE result 0x00000034
    if i remove "routing-service" from dhcp profile - all work correctly, bgp session is up, but received route from peer does not have a next-hop 

    > show route 10.254.197.0 
    
    10.254.197.0/24    *[BGP/170] 00:01:28, localpref 100, from RR1
                          AS path: 65530 I, validation-state: unverified
                        >
                        [BGP/170] 00:01:28, localpref 100, from RR2
                          AS path: 65530 I, validation-state: unverified
                        >
    
    > show route 10.254.197.0 extensive          
    
    inet.0: 1688 destinations, 3474 routes (1688 active, 0 holddown, 4 hidden)
    10.254.197.0/24 (2 entries, 1 announced)
    TSI:
    KRT in-kernel 10.254.197.0/24 -> {indirect(1048643)}
            *BGP    Preference: 170/-101
                    Next hop type: Indirect, Next hop index: 0
                    Address: 0x59d1e94
                    Next-hop reference count: 3
                    Source: RR1
                    Next hop type: Private unicast, Next hop index: 0
                    Next hop: , selected
                    Protocol next hop: Subscriber_IP
                    Indirect next hop: 0x5af0704 1048643 INH Session ID: 0x185
                    State: <Active Int Ext>
                    Local AS: ... Peer AS: ...
                    Age: 2:54 	Metric2: 0 
                    Validation State: unverified 
                    Task: ...
                    Announcement bits (2): 0-KRT 7-Resolve tree 3 
                    AS path: 65530 I  (Originator)
                    Cluster list:  RR1
                    Originator ID: BGP_PEER
                    Accepted
                    Localpref: 100
                    Router ID: RR1
                    Indirect next hops: 1
                            Protocol next hop: Subscriber_IP
                            Indirect next hop: 0x5af0704 1048643 INH Session ID: 0x185
                            Indirect path forwarding next hops: 1
                                    Next hop type: Private unicast
                                    Next hop: 
                                   Subscriber_IP/32 Originating RIB: inet.0
                                      Node path count: 1
                                      Forwarding nexthops: 1
                                            Next hop type: Private unicast
                                            Next hop: 
    


    and no connectivity to host in network 10.254.197.0/24... 
    how to use parameter "routing-service" correctly?



  • 2.  RE: Subscriber BGP session (routing-service )

    Posted 05-17-2023 09:11

    Have no real experience with this feature, just an advice to try to look in shmlogs. It's very obscure and almost undocumented but with right filters applied to a right log it can help to find the root cause.