[Xorp-users] eBGP & iBGP routes redistribution
Stevan Grbić 05/0486
gs050486d at student.etf.rs
Wed Oct 13 10:52:36 PDT 2010
Hi,
I believe and I'm sure that there are plenty of examples about this
topic as well as questions,
but still I haven't found it work properly (without any alerts).
Following post, has explanation about the situation, but it's left
without a response.
http://mailman.icsi.berkeley.edu/pipermail/xorp-users/2006-July/001350.html
I shall try to explain the situation as more accurate as possible.
Topology of the testing network is:
net12
(R1)---------(R2)------------(R5)----------(R6)
net13 | | | |
| AS1 | net24 | AS2 |
(R3)---------(R4) (R7)----------(R8)
net34
AS border routers R2 and R5, are expected to communicate in between by
BGP, while rest of the routers use ospf4 as well as R2 and R5 on two
interfaces inside AS. ASBRs (AS Border Routers ie. R2 and R5) should
distribute iBGP routes, learned by ospf4, to other peer and vice versa,
without advertising local AS routes to iBGP peers. To be more
precisely, R2 and R5 should "extract" routes captured from bgp peer,
and distribute
inside it's AS. While advertising (all) ospf4 routes from its AS using
bgp to other (bgp) peer.
(Only net25 interfaces bgp is assigned to.) The rest of its are
configured to ospf4.
After all how should look like configuration for ASBRs and ASRs (AS
Routers) to provide pinging peers from one AS to another (e.g. R8 to R1
or R4 to R6 etc.)
Here is configuration for R5:
interfaces {
interface em0 {
disable: false
vif em0 {
disable: false
address 8.8.8.3 {
prefix-length: 24
disable: false
broadcast: 8.8.8.255
}
}
}
interface em1 {
disable: false
vif em1 {
disable: false
address 1.1.1.2 {
prefix-length: 24
disable: false
broadcast: 1.1.1.255
}
}
}
interface em2 {
disable: false
vif em2 {
disable: false
address 192.168.0.2 {
prefix-length: 24
disable: false
broadcast: 19.168.0.255
}
}
}
}
policy {
policy-statement connected {
term export {
from {
protocol: "connected"
}
}
}
policy-statement ospf-to-bgp {
term ospf2bgp {
from {
protocol: "ospf4"
}
to {
neighbour: 1.1.1.3
}
then {
accept
}
}
}
}
policy-statement bgp-to-ospf {
term bgp2ospf {
from {
protocol: "bgp"
}
then {
accept
}
}
}
}
protocols {
ospf4 {
router-id: 11.0.0.0
import: "bgp-to-ospf"
area 0.0.0.0 {
interface em0 {
link-type: "broadcast"
vif em0 {
address 8.8.8.3 {
hello-interval: 10
}
}
}
interface em1 {
link-type: "broadcast"
vif em1 {
address 192.168.0.2 {
hello-interval: 10
}
}
}
}
}
bgp {
bgp-id: 1.1.1.2
export: "ospf-to-bgp,connected"
import: "bgp-to-ospf"
local-as: 65001
peer 1.1.1.3 {
local-ip: 1.1.1.2
as: 65002
next-hop: 1.1.1.2
}
}
}
and configuration for ASR R1:
interfaces {
interface em0 {
disable: false
vif em0 {
disable: false
address 2.2.2.3 {
prefix-length: 24
disable: false
broadcast: 2.2.2.255
}
}
}
interface em1 {
disable: false
vif em1 {
disable: false
address 3.3.3.2 {
prefix-length: 24
disable: false
broadcast: 3.3.3.255
}
}
}
}
policy {
policy-statement ospf {
term export {
from {
protocol: "connected"
}
}
term ospf2bgp {
from {
protocol: "ospf4"
}
}
}
}
protocols {
ospf4 {
router-id: 22.0.0.0
export: "ospf" /* in some tests I was able to make it work
without this tag ie. exporting routes in AS via ospf4
area 0.0.0.0 {
interface em0 {
link-type: "broadcast"
vif em0 {
address 2.2.2.3 {
hello-interval: 10
}
}
}
interface em1 {
link-type: "broadcast"
vif em1 {
address 3.3.3.2 {
hello-interval: 10
}
}
}
}
}
}
I strongly believe that this could be helpful for other users.
Any help would be greatly appreciated.
Thanks
Stevan
More information about the Xorp-users
mailing list