Closed yejian-uestc closed 1 year 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:
Best regards
so if i want use more than 3AS,how should i configure the network?
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.
nodes1
gathers the routers of the simulated AS (AS1). nodes2
gathers the only router injecting eBGP routes inside the simulated AS (AS2).Lines 1 to 844 are the primitives used to build the network. I think you can keep most of these functions.
ParseEbgpTopology
as your eBGP topology is built differently. I guess that in your case, for each eBGP link, you will have a more or less complex eBGP routing policy.ParseIgpFile
. You will call this function for each AS of your simulation. In my case I only used it for AS1 as AS2 is only made of 1 router. At the end, you'll have one node container per AS, e.g. nodes1
, nodes2
and nodes3
namely for AS1, AS2, AS3.ParseIbgpFile
. This assumes you have one iBGP topology file per AS. If you want to iBGP2-like behavior, such files aren't required, just instantiate Ibgp2d for each node (as shown l1392).Best regards
Best regards
Where are the classes and functions that handle the routing information received from ibgp?
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
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
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.
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?
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
Sorry to have misunderstood you. I main what is the role of the filter?
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
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.