ibgp2 / ibgp2

iBGP2: a scalable iBGP redistribution mechanism (requires ns3)
10 stars 0 forks source link

some problems #1

Closed yejian-uestc closed 1 year ago

yejian-uestc commented 5 years ago

I have encountered a problem when I organize network. The nework comprises 3 AS. AS1 connects AS2 and AS2 connects AS3 by BGP.
In the "prefix" file, I set like this: eBgpRouterInAS1 eBgpRouterInAS2 prefixOfAs1 eBgpRouterInAS2 eBgpRouterInAS1 prefixOfAs2 eBgpRouterInAS3 eBgpRouterInAS2 prefixOfAs3 eBgpRouterInAS2 eBgpRouterInAS3 prefixOfAs2 Success! But when I set like this: eBgpRouterInAS1 eBgpRouterInAS2 prefixOfAs1 eBgpRouterInAS2 eBgpRouterInAS1 prefixOfAs2 eBgpRouterInAS2 eBgpRouterInAS3 prefixOfAs2 eBgpRouterInAS3 eBgpRouterInAS2 prefixOfAs3 Failed! The routers in AS1 have routing information of AS3, but the routers in AS3 have no routing information of AS1. So, what's the diffirence of the two simulation. Can you explain to me, thanks.

ibgp2 commented 5 years ago

Hello,

I never tried with more than 2 AS. So far I always assumed that a single router (that I'll call it the external router in the later) announces eBGP routes to an AS (made of the remaining routers). So I do not guarantee that this code work with another setup.

So far, I install:

So, once you run ns3 simulations, you can get configurations files and some route snapshots. Check in particular if BGP filters are compliant with your goals.

If needed, you could also:

  1. Get those configurations files from
  2. Replicate your network topology in a custom netkit lab http://wiki.netkit.org/index.php/Labs_Official (just like ns3 dce, netkit as based on quagga).
  3. See what happens and eventually adapt dynamically the configuration. If you observe the same behavior, this is probably a BGP configuration error.

Best regards

dunge123 commented 5 years ago

so if i want use more than 3AS,how should i configure the network?

ibgp2 commented 5 years ago

Yes.

See dce-ibgpv2-simu.cc: you have to adapt the way you build the topology (l1202 to l1400).

The main difference in the manner you build the network. Currently there are two AS. AS1 is the simulated AS. AS2 is made of one router announcing eBGP routes to AS1. The simulation is then ruled by the following inputs

I advise you to copy dce-ibgpv2-simu.cc in another file that you'll modify. Now, let's delve in the code.

Lines 1 to 844 are the primitives used to build the network. I think you can keep most of these functions.

Best regards

Best regards

mohanjiao commented 5 years ago

Where are the classes and functions that handle the routing information received from ibgp?

ibgp2 commented 5 years ago

Hi mohanjiao,

Please open a new thread with an explicit title next time, since it is another problem. BGP routing information are gathered by issuing appropriate command throughtelnet (see telnet-wrapper.cc) and by parsing the resulting output (see quagga-vty-helper.cc).

Best regards

mohanjiao commented 5 years ago

Thinks. There is a same problem. There are three AS

AS1: node 0,1

AS2: node 2,3

AS3:node 4,5

Routing information of AS1 in node 3's routing table

But this update information is not in the BGP packet sent by node3 to node4

ibgp2 commented 5 years ago

I guess you router 4 is not well configured. Without the configuration of node 3 and 4 it's hard to tell more. Check eventual BGP filters. Check if IP involved in the BGP session are correct. Maybe you could train with netkit and then try to replicate it in the code.

Remember that in my case there were only eBGP -> iBGP and iBGP -> iBGP redistribution, and that I installed some filters along eBGP filters. If you use iBGP2, some filters are installed along iBGP sessions too. Check if your eBGP filters are correct.

mohanjiao commented 5 years ago

I can run normally after commenting out the code of the filter section. Thank you.

By the way, what is the function of the filter?

ibgp2 commented 5 years ago

By the way, what is the function of the filter?

If you are talking about filters installed by iBGP2, this is Ibgp2d::UpdateBgpConfiguration. If you are talking about eBGP filters, this is done in ParseEbgpFile, by calling AddPrefixList.

Best regards

mohanjiao commented 5 years ago

Sorry to have misunderstood you. I main what is the role of the filter?

ibgp2 commented 4 years ago

Sorry for late answer. In iBGP2 (see the infocom paper) filters are here to redistribute iBGP route according to the iBGP2 filtering rule. A router u forwards a route related to an egress point s to a iBGP peer iff u belongs to a shortest path from v to s. Hence, you guarantee a fm-optimal diffusion.

Best regards