Junos OS

last person joined: 8 hours ago 

Ask questions and share experiences about Junos OS.
  • 1.  BGP in logical systems

    Posted 02-23-2011 19:44

    I have IBGP and EBGP configured on logical systems, but the BGP routes are not showing up in the routing table. The peer sessions are established. Perhaps the problem is related to logical systems? Or am I missing something obvious?

     

    Here is the configuration:

     

    # show logical systems

     

    A {
        interfaces {
            lt-0/1/0 {
                unit 1 {
                    description to-B;
                    encapsulation ethernet;
                    peer-unit 2;
                    family inet {
                        address 10.10.10.1/30;
                    }
                }
                unit 9 {
                    description to-D;
                    encapsulation ethernet;
                    peer-unit 10;
                    family inet {
                        address 10.10.10.9/30;
                    }
                }
            }
            lo0 {
                unit 1 {
                    family inet {
                        address 192.168.6.5/32;
                    }
                }
            }
        }
        protocols {
            bgp {
                group internal-peers {
                    type internal;
                    local-address 192.168.6.5;
                    neighbor 192.163.6.4;
                    neighbor 192.168.40.4;
                }
                group session-to-AS18 {
                    type external;
                    local-address 10.10.10.9;
                    peer-as 18;
                    neighbor 10.10.10.10;
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface lo0.1 {
                        passive;
                    }
                    interface lt-0/1/0.1;   
                }
            }
        }
        routing-options {
            router-id 192.168.6.5;
            autonomous-system 17;
        }
    }
    B {
        interfaces {
            lt-0/1/0 {
                unit 2 {
                    description to-A;
                    encapsulation ethernet;
                    peer-unit 1;
                    family inet {
                        address 10.10.10.2/30;
                    }
                }
                unit 5 {
                    description to-C;
                    encapsulation ethernet;
                    peer-unit 6;
                    family inet {
                        address 10.10.10.5/30;
                    }
                }
            }
            lo0 {
                unit 2 {
                    family inet {
                        address 192.163.6.4/32;
                    }
                }
            }
        }
        protocols {
            bgp {
                group internal-peers {
                    type internal;
                    local-address 192.163.6.4;
                    neighbor 192.168.40.4;
                    neighbor 192.168.6.5;
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface lo0.2 {       
                        passive;
                    }
                    interface lt-0/1/0.2;
                    interface lt-0/1/0.5;
                }
            }
        }
        routing-options {
            router-id 192.163.6.4;
            autonomous-system 17;
        }
    }
    C {
        interfaces {
            lt-0/1/0 {
                unit 6 {
                    description to-B;
                    encapsulation ethernet;
                    peer-unit 5;
                    family inet {
                        address 10.10.10.6/30;
                    }
                }
            }
            lo0 {
                unit 3 {
                    family inet {
                        address 192.168.40.4/32;
                    }
                }
            }
        }
        protocols {
            bgp {
                group internal-peers {
                    type internal;
                    local-address 192.168.40.4;
                    neighbor 192.163.6.4;
                    neighbor 192.168.6.5;
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface lo0.3 {
                        passive;
                    }
                    interface lt-0/1/0.6;   
                }
            }
        }
        routing-options {
            router-id 192.168.40.4;
            autonomous-system 17;
        }
    }
    D {
        interfaces {
            lt-0/1/0 {
              unit 10 {
                    description to-A;
                    encapsulation ethernet;
                    peer-unit 9;
                    family inet {
                        address 10.10.10.10/30;
                    }
                }
            }
        }
        protocols {
            bgp {
                group session-to-AS17 {
                    type external;
                    local-address 10.10.10.10;
                    peer-as 17;
                    neighbor 10.10.10.9;
                }
            }
        }
        routing-options {
            autonomous-system 18;
        }
    }

     

    > show route logical-system A


    inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    10.10.10.0/30      *[Direct/0] 03:39:01
                        > via lt-0/1/0.1
    10.10.10.1/32      *[Local/0] 03:39:01
                          Local via lt-0/1/0.1
    10.10.10.4/30      *[OSPF/10] 02:47:55, metric 2
                        > to 10.10.10.2 via lt-0/1/0.1
    10.10.10.8/30      *[Direct/0] 00:36:57
                        > via lt-0/1/0.9
    10.10.10.9/32      *[Local/0] 00:36:57
                          Local via lt-0/1/0.9
    192.163.6.4/32     *[OSPF/10] 02:47:55, metric 1
                        > to 10.10.10.2 via lt-0/1/0.1
    192.168.6.5/32     *[Direct/0] 03:32:20
                        > via lo0.1
    192.168.40.4/32    *[OSPF/10] 02:47:55, metric 2
                        > to 10.10.10.2 via lt-0/1/0.1
    224.0.0.5/32       *[OSPF/10] 02:48:45, metric 1
                          MultiRecv

     

    > show bgp summary logical-system A

     

    Groups: 2 Peers: 3 Down peers: 0
    Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
    inet.0                 0          0          0          0          0          0
    Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
    10.10.10.10              18         22         23       0       0        9:14 0/0/0/0              0/0/0/0
    192.163.6.4              17        372        372       0       0     2:47:34 0/0/0/0              0/0/0/0
    192.168.40.4             17        374        375       0       0     2:48:11 0/0/0/0              0/0/0/0



  • 2.  RE: BGP in logical systems

    Posted 02-23-2011 21:48

    I should add that I have tried adding keep all to the BGP stanza. I have also checked to see if the routes are hidden. No luck with those tricks..

     

    Regards,

    Betsy



  • 3.  RE: BGP in logical systems
    Best Answer

    Posted 02-23-2011 22:38

    Hello,

    You have no BGP export policies at all.

    Please configure at least 1 BGP export policy and apply it under group or neighbor level.

    In JUNOS, the default BGP policy is to announce all active BGP routes. If you have no BGP routes in 1st plac, nothing is announced.

    Before you ask - yes, BGP works in logical systems and yes I tried it personally.

    HTH

    Rgds

    Alex 



  • 4.  RE: BGP in logical systems

    Posted 02-24-2011 08:50

    Hi Alex,

     

    I added this snippet and now it's working as I expected. Thanks for your help.

     

    -Betsy

     

    protocols {

        bgp {

            group internal-peers {

                 export [ send-static send-direct ];

            }

        }

     

    }                                      

    policy-options {

        policy-statement send-direct {

            term 2 {

                from protocol direct;

                then accept;

            }

        }

        policy-statement send-static {

            term 1 {

                from protocol static;

                then accept;

            }

        }

    }