BGP load sharing with bandwidth

We are running eBGP between two routers. We had a 250 M PVC between the two routers on OSM STM4 ATM interface. We need to increase the B/W between the two routers to 350M, but because there's a limitation on the PVC size for the OSM STM4 ATM card (Max. size of the PVC is 300M), so we created new PVC between the two routers on the same circuits (and of course the same interfaces). Now I need to enable the load sharing between the two routers taking the PVC B/W in consideration.. So I prepared this config, is it right and full? Or Am I missing anything here..
RouterA:
Router bgp 100
Neighbor 10.1.1.1 remote-as 200 (10.1.1.1 is loop back address fro Router B)
Neighbor 10.1.1.1 ebgp-multihop
bgp dmzlink-bw
neighbor 10.1.1.1 dmzlink-bw
neighbor 10.1.1.1 send-community both
maximum-paths ebgp 2
RouterB:
Router bgp 100
Neighbor 10.10.1.1 remote-as 200 (10.10.1.1 is loop back address fro Router A)
Neighbor 10.10.1.1 ebgp-multihop
neighbor 10.10.1.1 send-community both
bgp dmzlink-bw
neighbor 10.10.1.1 dmzlink-bw
maximum-paths ebgp 2

I implmented these changes but did not work, becuase the command neighbor 10.10.1.1 dmzlink-bw is not supported with multihop (Neighbor 10.10.1.1 ebgp-multihop).
I removed the loopback BGP neighbor and created 2 BGP neighbors with the directly connected interfaces IP's and applied same configuration and now it works fine.. Here's show Ip route (Ip's and AS numbers have been chnaged)
R1#sh ip ro 10.10.0.1
Routing entry for 10.10.0.0/20
Known via "bgp xxxxx", distance 20, metric 10
Tag xxxx, type external
Last update from x.x.x.x 00:00:24 ago
Routing Descriptor Blocks:
* x.x.x.x, from x.x.x.x, 00:00:24 ago
Route metric is 10, traffic share count is 240
AS Hops 1
Route tag xxxxx
y.y.y.y, from y.y.y.y, 00:00:24 ago
Route metric is 10, traffic share count is 83
AS Hops 1
Route tag xxxx
notice the traffic share count
traffic share count is 240 (for peer #1)
traffic share count is 83 (for peer # 2)
It's almost 3:1

Similar Messages

  • BGP - Load sharing - q

    My server LAN is – 172.30.1.0/24 , and using BGP for primary and secondary Links on a single HUB Router,
    I need to Load share the secondary Link by specific ip address ,
    172.30.1.5 and 172.30.1.6 server traffic only via the Secondary Link using BGP on Router.
    Note : When secondary is down it should use primary Link for all my spoke sites
    Need help what to change on HUB and spoke Router BGP configs

    I agree with Rick, some more details would be helpful.  However from your description it sounds as though you have a hub with multiple spokes and you are exchanging routes between them using BGP. You want traffic between the spokes and hub for the specific server IPs you provided to use the secondary link ?
    If so the problem you have trying it with BGP is the return traffic. ie. you could advertise the server IPs as host addresses from the hub site down both links and use AS prepending so the secondary link was preferred at all spoke sites. All spokes would then use the secondary link to send traffic to these servers.
    The issue with that though is when the servers reply the destination IP is one of the spokes site addresses. How are you going to make sure that the secondary link is used for this traffic. You cannot tell the hub router to use the secondary for all spoke addresses because then all return traffic would go via the secondary link ie. all return traffic being for any device sending traffic back to the spokes.
    So i don't think BGP is the solution to this or it could only be a partial solution. PBR could solve the problem of the return traffic though so you could either -
    1) use PBR on the hub router and PBR for all the spoke routers. This would be quite a lot of config as you would need to update all routers.
    or
    2) use BGP to make sure the spokes use the secondary link for traffic to the specific servers and then use PBR on the hub to make sure traffic from these specific servers uses the secondary link. The advantage of this would be all the configuration would only be on the hub router.
    If you do use PBR you may also need to track the availability of the link so that if it failed it would failover to the other link.
    Having said that, Rick may know of a better way to do this though, so some more specifics would be helpful.
    Jon

  • Simple Load Sharing With Static Routes

    The scenario given below, L3 switch connected to 2 local LAN routers which in turn connected to internet router.
    I would like to distribute the internet traffic from local LAN(L3 switch) on both RTRA and RTRB by adding static routes on L3 switch. How can I achieve this without configuring the routing protocol.
    ---------------RTRA----
    L3SWITCH-------RTRB----INTERNET-RTR

    Hi
    If its simple internet traffic do keep in mind about the local NAT commands which has to be configured accordingly with route-maps here.
    If you are having your own block of ip address space then better to run bgp between the providers.
    regds

  • BGP load sharing ?

    Hi,
    got a customers who's connected to one of our PE using 2 links.
    2 BGP sessions have been set (we can't peer on loopbacks), the ebgp multipath option is set, I seen the same routes twice with equal cost on my PE, but customers report that one link is at 80% of usage whereas the other rarely goes up to 20%.
    Cef is configue "per destination".
    Can't see why I have this behaviour except that someone on customer routeur is running heavy traffic TCP soft like P2P.
    Are there some caveheats on "loadsharing" with BGP on MPLS VPN architectures ?
    Thanks

    Hi,
    did you see 2 IP routes on remote PEs as well?
    You might run into one problem coming from BGP maximum path for iBGP being 1 by default.
    So you could try
    router bgp 65000
    addressfamily ipv4 vrf MyVRF
    maximum-path ibgp 2
    on all REMOTE PE, as they are learning the redundant CE routes through iMBGP and will not install both into the VRF routing table.
    If you have route reflectors in place, then you will need to have different RD on the two VRFs the redundant CE interfaces are bound to.
    Additionally on all remote PEs:
    router bgp 65000
    addressfamily ipv4 vrf MyVRF
    maximum-path ibgp 2 import 2
    egards
    Martin

  • Configure bgp with load sharing

    Hi,
    We have 2 Lines to sprint on the same AS,
    on our side we have 2 routers that running ebgp to sprint and ibgp between them.
    now all the traffic go through one line only and if the primary line fail the traffic go through the backup.
    we run eigrp on all our routers in all the sites and we have redestribute between bgp and eigrp also on the 2 routers that run ebgp to sprint.
    we want to move to load sharing between those line base on sites , i mean some local soureces address will go through the backup line and the other go through the primary , same with the inbound traffic to those site&address .
    what is the best way to do it, and how ?
    Regards
    Ronen.

    you can only do load sharing. You cannot do load balancing because BGP selects only a single best
    path to a destination among the BGP routes that are learned from the different ASs
    http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml

  • MP-BGP and MPLS multipath load sharing

    Hi,
    I am trying to PoC MPLS multi path load sharing by using per-PE-per-VRF RDs in the network.
    I have a simple lab setup with AS65000 which consists of SITE1 PE1&PE2 routers (10.250.0.101 and 10.250.0.102), route reflector RR in the middle (10.250.0.55) and SITE2 PE1&PE2 routers (10.250.0.201 and 10.250.0.202). PE routers only do iBGP peering with centralized route reflector and passing route to 10.1.1.0/24 prefix (learned from single CE router) with 100:1 and 100:2 RDs for specific VRF.
    Route reflector gets routes with multiple RDs, makes copies of these routes in order to make local comparison to RD 55:55 configured, uses these routes and install multiple paths into its routing table (all PE routers and RR have "maximum-paths eibgp 4" configured):
    RR#sh ip bgp vpnv4 all
    BGP table version is 7, local router ID is 10.250.0.55
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
       Network          Next Hop            Metric LocPrf Weight Path
    Route Distinguisher: 55:55 (default for vrf VRF-A) VRF Router ID 10.250.0.55
    * i10.1.1.0/24      10.250.0.102             0    100      0 65001 i
    *>i                 10.250.0.101             0    100      0 65001 i
    Route Distinguisher: 100:1
    *>i10.1.1.0/24      10.250.0.101             0    100      0 65001 i
    Route Distinguisher: 100:2
    *>i10.1.1.0/24      10.250.0.102             0    100      0 65001 i
    RR#sh ip route vrf VRF-A
    <output omitted>
         10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
    B       10.1.1.0/24 [200/0] via 10.250.0.102, 00:45:52
                              [200/0] via 10.250.0.101, 00:46:22
    BUT, for some reason RR doest reflects routes with multiple RDs down to SITE2 PE1&PE2 - its own clients:
    RR#sh ip bgp vpnv4 all neighbors 10.250.0.201 advertised-routes
    Total number of prefixes 0
    RR#sh ip bgp vpnv4 all neighbors 10.250.0.202 advertised-routes
    Total number of prefixes 0
    Here comes RR BGP configuration:
    router bgp 65000
    no synchronization
    bgp router-id 10.250.0.55
    bgp cluster-id 1.1.1.1
    bgp log-neighbor-changes
    neighbor 10.250.0.101 remote-as 65000
    neighbor 10.250.0.101 update-source Loopback0
    neighbor 10.250.0.101 route-reflector-client
    neighbor 10.250.0.101 soft-reconfiguration inbound
    neighbor 10.250.0.102 remote-as 65000
    neighbor 10.250.0.102 update-source Loopback0
    neighbor 10.250.0.102 route-reflector-client
    neighbor 10.250.0.102 soft-reconfiguration inbound
    neighbor 10.250.0.201 remote-as 65000
    neighbor 10.250.0.201 update-source Loopback0
    neighbor 10.250.0.201 route-reflector-client
    neighbor 10.250.0.201 soft-reconfiguration inbound
    neighbor 10.250.0.202 remote-as 65000
    neighbor 10.250.0.202 update-source Loopback0
    neighbor 10.250.0.202 route-reflector-client
    neighbor 10.250.0.202 soft-reconfiguration inbound
    no auto-summary
    address-family vpnv4
      neighbor 10.250.0.101 activate
      neighbor 10.250.0.101 send-community both
      neighbor 10.250.0.102 activate
      neighbor 10.250.0.102 send-community both
      neighbor 10.250.0.201 activate
      neighbor 10.250.0.201 send-community both
      neighbor 10.250.0.202 activate
      neighbor 10.250.0.202 send-community both
    exit-address-family
    address-family ipv4 vrf VRF-A
      maximum-paths eibgp 4
      no synchronization
      bgp router-id 10.250.0.55
      network 10.255.1.1 mask 255.255.255.255
    exit-address-family
    SITE1 PE1 configuration:
    router bgp 65000
    no synchronization
    bgp router-id 10.250.0.101
    bgp log-neighbor-changes
    neighbor 10.250.0.55 remote-as 65000
    neighbor 10.250.0.55 update-source Loopback0
    neighbor 10.250.0.55 soft-reconfiguration inbound
    no auto-summary
    address-family vpnv4
      neighbor 10.250.0.55 activate
      neighbor 10.250.0.55 send-community both
    exit-address-family
    address-family ipv4 vrf VRF-A
      neighbor 10.1.101.2 remote-as 65001
      neighbor 10.1.101.2 activate
      neighbor 10.1.101.2 soft-reconfiguration inbound
      maximum-paths eibgp 4
      no synchronization
      bgp router-id 10.250.0.101
    exit-address-family
    SITE1 PE2 configuration is similar to SITE1 PE1. They both do eBGP peering with dualhomed CE router in AS65001 which announces 10.1.1.0/24 prefix into VRF-A table.
    My question is: clearly, the issue is that RR doesn't reflect any routes to its clients (SITE2 PE1&PE2) for 10.1.1.0/24 prefix with 100:1 and 100:2 RDs that dont match it's locally configured RD 55:55 for VRF-A, although they are present in its BGP/RIB tables and used for multipathing. Is this an expected behavior or some feature limitation for specific platform or IOS version? Currently, in this test lab setup I run IOS 12.4(24)T8 on all the devices.
    Please, let me know if any further details are needed to get an idea of why this well known and widely used feature is not working correctly in my case. Thanks a lot!
    Regards,
    Sergey

    Hi Ashish,
    I tried to remove VRF and address family configurations completely from RR.
    router bgp 65000
    no synchronization
    bgp router-id 10.250.0.55
    bgp cluster-id 1.1.1.1
    bgp log-neighbor-changes
    neighbor 10.250.0.101 remote-as 65000
    neighbor 10.250.0.101 update-source Loopback0
    neighbor 10.250.0.101 route-reflector-client
    neighbor 10.250.0.101 soft-reconfiguration inbound
    neighbor 10.250.0.102 remote-as 65000
    neighbor 10.250.0.102 update-source Loopback0
    neighbor 10.250.0.102 route-reflector-client
    neighbor 10.250.0.102 soft-reconfiguration inbound
    neighbor 10.250.0.201 remote-as 65000
    neighbor 10.250.0.201 update-source Loopback0
    neighbor 10.250.0.201 route-reflector-client
    neighbor 10.250.0.201 soft-reconfiguration inbound
    neighbor 10.250.0.202 remote-as 65000
    neighbor 10.250.0.202 update-source Loopback0
    neighbor 10.250.0.202 route-reflector-client
    neighbor 10.250.0.202 soft-reconfiguration inbound
    no auto-summary
    address-family vpnv4
      neighbor 10.250.0.101 activate
      neighbor 10.250.0.101 send-community both
      neighbor 10.250.0.102 activate
      neighbor 10.250.0.102 send-community both
      neighbor 10.250.0.201 activate
      neighbor 10.250.0.201 send-community both
      neighbor 10.250.0.202 activate
      neighbor 10.250.0.202 send-community both
    exit-address-family
    After this, RR doesn't accept any routes at all from S1PE1&S1PE2 routers, thus not reflecting any routes down to its clients S2PE1&S2PE2 as well:
    S1PE1#sh ip bgp vpnv4 all
    BGP table version is 6, local router ID is 10.250.0.101
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
       Network          Next Hop            Metric LocPrf Weight Path
    Route Distinguisher: 100:1 (default for vrf VRF-A) VRF Router ID 10.250.0.101
    *> 10.1.1.0/24      10.1.101.2               0             0 65001 i
    S1PE1#sh ip bgp vpnv4 all neighbors 10.250.0.55 advertised-routes
    BGP table version is 6, local router ID is 10.250.0.101
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
       Network          Next Hop            Metric LocPrf Weight Path
    Route Distinguisher: 100:1 (default for vrf VRF-A) VRF Router ID 10.250.0.101
    *> 10.1.1.0/24      10.1.101.2               0             0 65001 i
    Total number of prefixes 1
    S1PE2#sh ip bgp vpnv4 all
    BGP table version is 6, local router ID is 10.250.0.102
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
       Network          Next Hop            Metric LocPrf Weight Path
    Route Distinguisher: 100:2 (default for vrf VRF-A) VRF Router ID 10.250.0.102
    *> 10.1.1.0/24      10.1.201.2               0             0 65001 i
    S1PE2#sh ip bgp vpnv4 all neighbors 10.250.0.55 advertised-routes
    BGP table version is 6, local router ID is 10.250.0.102
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
       Network          Next Hop            Metric LocPrf Weight Path
    Route Distinguisher: 100:2 (default for vrf VRF-A) VRF Router ID 10.250.0.102
    *> 10.1.1.0/24      10.1.201.2               0             0 65001 i
    Total number of prefixes 1
    RR#sh ip bgp vpnv4 all
    RR#sh ip bgp vpnv4 all neighbors 10.250.0.101 routes
    Total number of prefixes 0
    RR#sh ip bgp vpnv4 all neighbors 10.250.0.102 routes
    Total number of prefixes 0
    Any feedback is appreciated. Thanks.
    Regards,
    Sergey

  • BGP requirements and load sharing

    Hi !
    I have been reading memory requirements for running BGP. But, for a tipical scenario with dual ISP for load sharing which are the requirements for the router ?
    Could we use a 1841 or thinking about 37x5 or higher router ? I know that it depends on size for routing table, AS, and so on but what is the rule of thumb for choosing the correct router ?
    Thanks
    Rafa
    http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml#conf2
    Load Sharing When Dual-Homed to One Internet Service Provider (ISP) Through a Single Local Router
    http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094a83.shtml
    Achieve Optimal Routing and Reduce BGP Memory Consumption

    Routes is one constraint and traffic is one more and the kind of policies i apply would be another. If i took a default from my upstream with about 1 MB of traffic, i would definitely look at 1841. If received routes ( atleast 20,000) and about 1 MB or 2 MB and 2 or more upstreams, I may even settle for a 3850.

  • Error while loading shared libraries libnnz10.so with brconnect

    Hi
    I am experiencing some problems within an installation, brconnect seems to be looking for oracle 10 libraries? while my oracle is a 9.2 !
    these are the logs:
    ERROR CJS-00288  Could not update database statistics.<br>DIAGNOSIS: Command brconnect -u / -c -f crsyn -o SAPXID returned 127.<br>SOLUTION: See brconnect.log for details.
    brconnect.log:
    Execution of the command "/sapmnt/XIE/exe/brconnect -u / -c -f crsyn -o SAPXID" finished with return code 127. Output:
    /sapmnt/XIE/exe/brconnect: error while loading shared libraries: libnnz10.so: cannot open shared object file: No such file or directory
    Yes, that's true, libnnz10.so does not exist, it happened something similar with the library libclntsh.so.10.1, I only have a libclntsh.so, with a softlink from libclntsh.so.9.
    maybe the brtools imagine I have an oracle 10?
    I specified a 9.2 Oracle during the installation!
    Many thanks, Mario.

    >
    Tecnica de Sistemas wrote:
    > I am experiencing some problems within an installation, brconnect seems to be looking for oracle 10 libraries? while my oracle is a 9.2 !
    > [...]
    > I specified a 9.2 Oracle during the installation!
    Installation of what?
    Clearly the BRTOOLS are version 700, so, even when you specified that Oracle 9i was to be installed the BRTOOLS delivered are the mentioned version and you
    must install the oracle 10g instant client or
    replace the version 700 by version 640
    Regards

  • MPLS Load Balancing/Sharing with TE or CEF or Both?

    So I am just playing around in GNS3 trying to set up multiple ECMP links between to P routers like this;
    CE1 -- PE1 -- P1 == P2 -- PE2 -- CE2
    (There are actually four links between P1 & P2!)
    I have set up a pseudoswire xconnect from PE1 to PE2 so CE1 & 2 can ping each other on the same local subnet range. That works just fine.
    My question is this:
    I have configured "ip load-sharing per-packet" on each of the four interfaces on P1 and P2 that are facing each other (I know per-packet balancing is frowned upon but lets not talk about that right now!) and this works, traffic is distributed across all links (I can see with packet captures in GNS3).
    Where does "ip load-sharing per-packet" fit in to the chain of events with regards to MPLS and CEF etc?; So, with MPLS enabled everywhere the two P routers are forwarding based on labels and not IP address. With MPLS enabled, does this command force the P routers to load-balance each MPLS frame as it comes in, round-robbin'ing the ingress frames across all links, the same as it would if it were a plain IP packet? So the command is ignorate of the kind of traffic being used? Or is the P router looking down into the MPLS frame for the IP in the IP packet?
    Also, in order to get the same sort of performance boost you get from per-packet load balancing, seeing as I am using MPLS here, should I be using some francy MPLE TE to do this instead of that interface sub-command?
    If I remove that command, I seem to always use link 2 for sending traffic towards P2 from P1, and link 3 for receiving the return traffic from P2 to P1. This is presumably because the ICMP packets have nothing to hash on except the source and destination IP addresses, so they always hash to the same physical links. Without using that command how else can I make use of the four links?

    Hello Jwbensley,
    first of all,
    "ip load-sharing per-packet" is not a viable option as it causes out  of order issues.
    Real world devices perform load balancing based on the second (more internal ) label value so to achieve some load balancing for example multiple pseudowires must be defined between the same pair of PE nodes.
    L3 VPN use different internal labels for different customer prefixes of the same VRF site ( unless some special command is used to say use one label per VRF site)
    >> f I remove that command, I seem to always use link 2 for sending traffic towards P2 from P1, and link 3 for receiving the return traffic from P2 to P1
    This is the expected behaviour in this scenario.
    With MPLS TE you can achieve results similar to the use of multiple pseudowires /LSPs : forms of load sharing not true load balancing. In all cases in MPLS world flow based and not per packet
    Hope to help
    Giuseppe

  • Install RAC failed with root.sh error while loading shared libraries: libst

    Hi ,
    I install rac under vmware workstation using this atricle .
    http://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnCentos4UsingVMware.php
    everything work smoothly but I faced error with root.sh
    Failed to upgrade Oracle Cluster Registry configuration
    I found metlalink talk about missing compat-libstdc++-33-3.2.3-47.3.ia64.rpm and must be installed according to
    that .
    The probelm rasied when run
    /u01/app/oracle/product/10.2.0/crs/bin/crsctl.bin: error while loading shared libraries: libstdc++.so.5: cannot
    open shared object file: No such file or directory
    Failure initializing entries in /etc/oracle/scls_scr/rac2.
    Linux version is RHE4
    [oracle@rac1 bin]$ uname -a
    Linux rac1.localdomain 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
    when install this package it does not work
    [root@rac1 RPMS]# rpm -Uvh compat-libstdc++-33-3.2.3-47.3.ia64.rpm
    warning: compat-libstdc++-33-3.2.3-47.3.ia64.rpm: V3 DSA signature: NOKEY, key ID b38a8516error: Failed
    dependencies:
    libc.so.6.1()(64bit) is needed by compat-libstdc++-33-3.2.3-47.3.ia64 libc.so.6.1(GLIBC_2.2)(64bit)
    is needed by compat-libstdc++-33-3.2.3-47.3.ia64 libc.so.6.1(GLIBC_2.3)(64bit) is needed by compat-
    libstdc++-33-3.2.3-47.3.ia64 libgcc_s.so.1()(64bit) is needed by compat-libstdc++-33-3.2.3-47.3.ia64
    libgcc_s.so.1(GCC_3.0)(64bit) is needed by compat-libstdc++-33-3.2.3-47.3.ia64 libgcc_s.so.1(GCC_3.3)(64bit)
    is needed by compat-libstdc++-33-3.2.3-47.3.ia64 libgcc_s.so.1(GLIBC_2.0)(64bit) is needed by compat-
    libstdc++-33-3.2.3-47.3.ia64 libm.so.6.1()(64bit) is needed by compat-libstdc++-33-3.2.3-47.3.ia64
    compat-libstdc++ = 7.3-2.96.128 is needed by (installed) compat-libstdc++-devel-7.3-2.96.128.i386 compat-
    libstdc++ = 7.3 is needed by (installed) compat-gcc-c++-7.3-2.96.128.i386[root@rac1 RPMS]#
    My probelm cannot install this packages ? What shoudl I do .

    user12010537 wrote:
    Hi ,
    I found metlalink talk about missing compat-libstdc++-33-3.2.3-47.3.ia64.rpm and must be installed according to
    Linux version is RHE4
    [root@rac1 RPMS]# rpm -Uvh compat-libstdc++-33-3.2.3-47.3.ia64.rpm
    warning: compat-libstdc++-33-3.2.3-47.3.ia64.rpm: V3 DSA signature: NOKEY, key ID b38a8516error: Failed
    dependencies:
    libc.so.6.1()(64bit) is needed by compat-libstdc++-33-3.2.3-47.3.ia64
    My probelm cannot install this packages ? What shoudl I do .
    Hi,
    You need to install the dependency package first like glibc, etc
    also see the output from runcluvfy, it should show which packages need to installed
    Cheers

  • Linux JVM: How to load shared libraries with mutual/circular dependencies

    Hi,
    I am using the API
    System.loadLibrary(String name)
    to dynamically link shared libaries to Linux JVM.
    The shared libraries has complex circular symbol dependencies among them.
    I am not able to load shared libraries due to java.lang.UnsatisfiedLinkError.
    Any ideas on how a number of shared libraries with interdependent realtionships
    could be successfully linked in to the Linux JVM?
    Thanks,
    Soumen.
    Background
    ===========
    Successful execution of native code within Java virtual machine in a
    host platform, has two necessary prerequisites:
    Prerequisite 1: The native code is written to the JNI specification
    Prerequisite 2: The native code is dynamically linked with Java virtual
    machine.
    The second step is achieved via simple Java interface, System.loadLibrary:
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#loadLibrary(java.lang.String)
    However, implementation of this interface is highly platform dependent
    in regards to exact nature of dynamic linking process.
    Tests
    =====
    I made three shared libraries libfeatureA.so, libfeatureB.so and libfeatureC.so.
    Feature A and Feature B are mutually dependent on each other (i.e cicular
    dependencies between libfeatureA.so, libfeatureB.so) whereas libfeatureC.so
    has no external dependencies.
    Case 1
    I could link libfeatureC.so with java.
    Case 2
    Java failed to resolve circular dependency between libfeatureA.so, libfeatureB.so
    resulting in linking failure. There may be repackaging workarounds which I have
    not yet explored.
    Java source code
    ================
    class TestLoadLibrary
    static
    System.loadLibrary("featureB");
    System.loadLibrary("featureA");
    System.loadLibrary("featureB");
    public static void main(String[] args)
    System.out.println("In TestLoadLibrary.main()");
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /homes/soumen/work/event/featureB/libfeatureB.so.1.0: /homes/soumen/work/ev B.so.1.0: undefined symbol: featureA_func2
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1737)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1662)
    at java.lang.Runtime.loadLibrary0(Runtime.java:817)
    at java.lang.System.loadLibrary(System.java:986)
    at TestLoadLibrary.<clinit>(TestLoadLibrary.java:5)

    The use of "dlopen() application programming" to achieve dynamic link closure works if there are
    no circular dependencies. For example, I have the following dependency:
    libfeatureD.so ==> libfeatureC.so
    Even if I call Java APIs in correct dependency order, i.e.,
    System.loadLibrary("featureC");
    System.loadLibrary("featureD");
    there would be java.lang.UnsatisfiedLinkError for call System.loadLibrary("featureD").
    Now, I have a JNI method implementation, which makes native API call in same dependency order:
    dlopen("libfeatureC.so", RTLD_LAZY|RTLD_GLOBAL);
    dlopen("libfeatureD.so", RTLD_LAZY|RTLD_GLOBAL);
    and now System.loadLibrary calls succeed. Note that I had to set environment
    variable LD_LIBRARY_PATH so that dlopen call would find libraries to load.
    In other words, from a JNI programming point of view, "linking chasm" has been crossed.
    I am looking at circular dependency issue, i.e.,
    libfeatureA.so <==> libfeatureB.so
    There may be library repackaging workaround.
    If anybody knows any workaround, please post.
    -Soumen Sarkar
    JNI code
    ========
    #include <jni.h>
    #include "TestLoadLibrary.h"
    #include <stdio.h>
    #include <string.h>
    #include <dlfcn.h>
    JNIEXPORT void JNICALL Java_TestLoadLibrary_libLoadNative
    (JNIEnv * jenv, jclass class, jobjectArray libNames)
    printf("native: In TestLoadLibrary.libLoadNative()\n");
    char linuxLibName[1024];
    jsize idx = 0;
    jsize nLibs = (*jenv)->GetArrayLength(jenv, libNames);
    for(idx = 0; idx < nLibs; ++idx)
    /* obtain the current object from the object array */
    jobject myObject = (*jenv)->GetObjectArrayElement(jenv, libNames, idx);
    /* Convert the object just obtained into a String */
    const char libName = (jenv)->GetStringUTFChars(jenv,myObject,0);
    strcpy(linuxLibName, "lib");
    strcat(linuxLibName, libName);
    strcat(linuxLibName, ".so");
    printf("\nnative: Trying to open lib with name %s\n", linuxLibName);
    void* handle = dlopen(linuxLibName, RTLD_LAZY|RTLD_GLOBAL);
    if(handle == 0)
    fputs ("\nnative: Could not load lib\n", stderr);
    fputs (dlerror(), stderr);
    else
    printf("\nnative: Loaded lib %s\n", linuxLibName);
    /* Free up memory to prevent memory leaks */
    (*jenv)->ReleaseStringUTFChars(jenv, myObject, libName);
    return;

  • Multihomed eBGP load balancing with 3 ISP's

    We currently peer with 2 ISPs using BGP in an active/failover configuration.  My company wants to move to a 3 ISP model where Internet traffic is split across the 3 providers so that bandwidth is equally distributed on outgoing traffic across our 2 /22 ARIN IP ranges.  This is from our 2 edge switches that have VSS.  
    Within my limited knowledge of BGP, I have determined that we could do load sharing pretty easily by adding multiple default routes and breaking up our /22's into /24 and advertising them that way.  However, I don't think this satisfies the request that downtime must be seamless, should one link drop.  
    Currently, our ISP's advertise default routes.  From the research that I've done, we could get close to load balanced links if we receive full BGP routes and community settings and definitions.  I'm nervous about this because it looks really complicated, and I don't want our AS to turn into a transit AS.  I've been told the same can be accomplished with only partial BGP routes and community settings and definitions.  
    Personally, I think we just need a WAN load balancer.  However, given the request, is there a thread out there that can explain this, or can someone discuss this requested scenario a little bit?  
    Thanks!

    Hi there
    First question would be what is the required reconvergence time for the applications using the Internet? Should an outage occur, when do they lose their state? Once you know that, you then have a target to aim for in terms of recovery
    With regards load-balancing, with BGP we are always talking inbound and outbound.
    The outbound solution is relatively simple - each ISP advertises a default route to your Internet edge router(s). Create an eBGP session from each edge router to the core, advertise the default route and redistribute into the IGP. Ensure the IGP cost to each BGP next hop is equal and you have ECMP for outbound routing.
    Inbound influence is usually via MED (not likely in this case given 3 ISPs), adjusting local-pref in the ISP via BGP EXT communities configured your end, or via AS-PATH prepending for longer prefixes from your /22. Prepending would be simplest, but your unlikely to get an exact inbound traffic split, however a relatively even distribution should be sufficient. 

  • Discussion on load-balance and load-sharing

    Hi, I found a article, which discuss the difference between load-balance and load-sharing. I think the explanation is pretty good, please see below. But I still have a question: how can we decide to choose one the both balance in the production environment ?  Thank you
    "In short, load balancing tries to distribute traffic evenly over multiple paths, whereas, load sharing intends to do it (for the lack of a better term) equally.  True load balancing is difficult to achieve.  For example, let's say there were two links (100 mbps and 300 mpbs) and a router needed to send out 600 mbps of traffic.  Load balancing would distribute the traffic evenly, sending 300 mbps on each link.  On the contrary, load sharing would divide the traffic equally based on the available resources, sending 200 mbps on the slower link and 400 mbps on the faster one. "

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    That's not how Cisco uses the terms, and generically they are often used almost interchangeably.
    Cisco uses load balancing as the catch all for how a single L3 device routes across multiple paths to the same destination.  Equal metrics or equal actual load distribution are not required.  Most often, load balancing will be discussed with ECMP, but unequal path loading balancing will include Cisco's proprietary IGPs, such as EIGRP.
    Cisco uses load sharing when using multiple paths when a single L3 devices doesn't normally route across multiple paths or multiple L3 devices are involved.  Cisco load sharing discussions usually revolve around BGP.
    Generically, I would say load balancing has more of a dynamic aspect to it, i.e. something is trying to actively balance traffic across multiple paths, while load sharing might mean multiple paths are utilized but not actively dynamically balanced.
    I'm unsure what's your question with a production environment.

  • Load-balancing vs Load-sharing (L2/L3)

    What is the difference in load balancing and load sharing. Can you generalize load-balancing to layer two? Or layer three protocols also do this, except BGP?
    FHRPs like VRRP, GLBP, and HSRP are essentially load sharing protocols (except GLBP though). Loop prevention mechanisms like MSTP, G.8032, and REP also do not do load balancing I guess. Instead they offer a way to distribute (share) traffic over multiple links unevenly. Why do people still call it load-balancing?
    While link aggregation may truly be considered load balancing. Where traffic can be balanced based on a few attributes ( src-dst/mac, ip, port).
    And what role does fast-switching/process-switching play in load balancing. I am aware that these are the very processes that ultimately do load-balancing, given enough equal cost paths. Does CEF really take load balancing to another level? It still does the same job, but by caching flow data (RIB) to the CEF table, doesn't it?
    Incase of IGP, load-balancing may be possible, but BGP just doesn't support it. Because it only selects one best route (?). Even with multipath, BGP advertises best path only; it does install multiple routes in routing table though. So IGP does the balancing?

    What is the difference in load balancing and load sharing. Can you generalize load-balancing to layer two? Or layer three protocols also do this, except BGP?
    FHRPs like VRRP, GLBP, and HSRP are essentially load sharing protocols (except GLBP though). Loop prevention mechanisms like MSTP, G.8032, and REP also do not do load balancing I guess. Instead they offer a way to distribute (share) traffic over multiple links unevenly. Why do people still call it load-balancing?
    While link aggregation may truly be considered load balancing. Where traffic can be balanced based on a few attributes ( src-dst/mac, ip, port).
    And what role does fast-switching/process-switching play in load balancing. I am aware that these are the very processes that ultimately do load-balancing, given enough equal cost paths. Does CEF really take load balancing to another level? It still does the same job, but by caching flow data (RIB) to the CEF table, doesn't it?
    Incase of IGP, load-balancing may be possible, but BGP just doesn't support it. Because it only selects one best route (?). Even with multipath, BGP advertises best path only; it does install multiple routes in routing table though. So IGP does the balancing?

  • Load balancing with use of router 881.

    Hello,
    I have two MPLS line and i want load balancing with the help of CISCO router 881. is it necessary that i require two router on both location.? if one location have firewall and one location have cisco router 881 then can i do a load balancing or i require two router each on both location ? What are the basic requirement that i need.
    Thanks,
    Kuntal

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    An 881 should be able to load share across multiple ports.  Many routing protocol support ECMP, including BGP, but you need "special" hidden/secret commands to enable.  EIGRP also supports unequal cost load sharing.
    If an 881 supports OER or PfR, those too will do unequal load sharing, dynamically.

Maybe you are looking for

  • Email signatures not displaying in received emails.

    I can't see the signatures in the emails which I received from other people (not my own signatures in emails I sent out). All my emails are viewed in HTML format. I have no problem when I send an emails with my signature. I still sees it when I recei

  • MacBook Pro Retina Fan Issues

    Hi, I bought a macBook Pro Retina just under a month ago, and have been experiencing some issues with the fan speeds. I can be just browsing the web or checking emails or playing music through iTunes, and the fans will spin up to full speed for a min

  • Log4j-style logging configuration

    Hi, from the AdminGuide for OIM 11.1.1.5 (http://docs.oracle.com/cd/E21764_01/doc.1111/e14308/log.htm#CEGEAGIB) I learned I can use the log4j style logging in my Java code. I tried, and I could successfully generate messages with the WARN level or mo

  • What're the steps to install mysap?

    Hello Everyone, Before, that you send me the guides of ERP and NW04s please understand what I am looking for. I have installed SOLMAN4.0 and sooner I will generate a new SOLMAN key for the installation of the new System(<b>Transaction /nsmsy</b>). e.

  • Increased digital noise

    I've never seen this happen in Aperture. All of sudden, this morning, when export images to Photoshop or to the Dodge and Burn plug-in and make corrections or enhancement, I see a very noticeable increase in digital noise in images after I save the e