On 12.10.2011 01:11, Tiberiu Ungureanu wrote:
> Mă bag și eu ca gâgă:
> Nu ma pricep la quagga, da' am una care merge. Nu primesc rute, dar
> pentru puterea exercitiului i-am zis unui cisco sa-mi dea si mie niste
> amarate de rută in quagga, si apoi am facut dupa cum urmeaza:
>
> -- cut here --
> [tbb@admin ~]$ telnet localhost 2605
> Trying 127.0.0.1...
> Connected to localhost. (127.0.0.1).
> Escape character is '^]'.
>
> Hello, this is Quagga (version 0.98.6).
> Copyright 1996-2005 Kunihiro Ishiguro, et al.
>
>
> User Access Verification
>
> Password:
> Filters-bgpd.OpenTransfer.Com>  en
> Password:
> Filters-bgpd.OpenTransfer.Com# show ip bgp nei 10.254.0.1 ?
>    advertised-routes  Display the routes advertised to a BGP neighbor
>    dampened-routes    Display the dampened routes received from neighbor
>    flap-statistics    Display flap statistics of the routes learned from
> neighbor
>    received           Display information received from a BGP neighbor
>    received-routes    Display the received routes from neighbor
>    routes             Display routes learned from neighbor
>    <cr>
> Filters-bgpd.OpenTransfer.Com# show ip bgp nei 10.254.0.1 routes
> BGP table version is 0, local router ID is 127.0.0.2
> Status codes: s suppressed, d damped, h history, * valid,>  best, i -
> internal
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
>     Network          Next Hop            Metric LocPrf Weight Path
> *>i98.130.0.0/15    10.254.0.1               0    100      0 i
>
> Total number of prefixes 1
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Filters-bgpd.OpenTransfer.Com#
>
> -- end here --
>
> Ai putea sa scriptezi sa se telneteze cineva la quagga ul tau, sa scuipe
> outputu la stdout si tu sa furi numa ultima linie.
>
> Also
>
> -- cut here --
> Filters-bgpd.OpenTransfer.Com# show ip bgp ne 10.254.0.1
> BGP neighbor is 10.254.0.1, remote AS 32392, local AS 32392, internal
> link
>    BGP version 4, remote router ID 10.254.0.1
>    BGP state = Established, up for 07w1d14h
>    Last read 00:00:54, hold time is 180, keepalive interval is 60 seconds
>    Neighbor capabilities:
>      Route refresh: advertised and received(old&  new)
>      Address family IPv4 Unicast: advertised and received
>    Received 644260 messages, 0 notifications, 0 in queue
>    Sent 588227 messages, 1 notifications, 0 in queue
>    Route refresh request: received 0, sent 0
>    Minimum time between advertisement runs is 5 seconds
>
>   For address family: IPv4 Unicast
>    Inbound soft reconfiguration allowed
>    Community attribute sent to this neighbor(both)
>    1 accepted prefixes
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
>    Connections established 2; dropped 1
>    Last reset 07w1d16h, due to BGP Notification send
> Local host: 10.18.255.169, Local port: 45928
> Foreign host: 10.254.0.1, Foreign port: 179
> Nexthop: 10.18.255.169
> Nexthop global: fe80::230:48ff:fe63:1796
> Nexthop local: ::
> BGP connection: non shared network
> Read thread: on  Write thread: off
>
> Filters-bgpd.OpenTransfer.Com#
>
> -- end here --
>
> ai putea iarasi sa scriptezi show bgp ne si sa te intereseze numai linia
> cu "accepted prefixes"
>
> Ajuta?
>

Tiberiu, daca citeai cu atentie ce-am scris in primul post, vedeai si 
rezolvarea rapida pt. ce zici tu aici, cu 'nu' in fata
nu e nevoie sa pun pe nimeni sa se telneteze, exista vtysh pt. asta -> 
vtysh -e "sh ip bgp sum" | awk '/ip_vecin/ {print $10;}' ... tot din 
primul post
nu ma intereseaza numarul de prefixe primite de la fiecare, ci numarul 
de prefixe rezultate in urma selectiei
astea pot fi aflate de la bgpd, zebra sau direct de la kernel
nu vreau sa le numar pt. ca numaratul dureaza si manaca resurse
probabil ca solutia e sa sap prin sursele doamnei Quagga (cand o sa am 
timp ;)), poate rezulta vreun patch, ceva ...



_______________________________________________
RLUG mailing list
[email protected]
http://lists.lug.ro/mailman/listinfo/rlug

Raspunde prin e-mail lui