[Xorp-users] Help, BGP seems do not work.
wubaochuan
wubaochuan at seu.edu.cn
Tue Aug 24 05:36:28 PDT 2010
Dear everyone,
I installed XORP on fedora12, and I have turned off firewall of
fedora12. Now I have struggled with BGP for several days, but still I
don't solve the problem(It seems that BGP do not work), and I do not
know what is wrong. I hope someone can tell me where is the problem.
Thank you in advance.
Figure 1 is the topology:
RA: router A. eth0 with IP address 10.0.1.2
eth1 with IP address 10.0.2.1
RB: router B. eth0 with IP address 10.0.2.2
eth1 with IP address 10.0.3.1
RA and RB are in the same AS with AS number 23456.
RC: router C. eth0 with IP address 10.0.3.2
eth1 with IP address 10.0.4.1
RD: router D. eth0 with IP address 10.0.4.2
eth1 with IP address 10.0.5.2
RA and RB are in the same AS with AS number 23457.
host1 and host2 are hosts, their IP addresses are 10.0.1.1 and
10.0.5.1 respectively.
Inside each AS, OSPF is configured. And between RB and RC, BGP is
configured.
But now, host1 and host2 can not reach each other.
10.0.2.1 10.0.2.2 10.0.3.1 10.0.3.2 10.0.4.1
10.0.4.2
_________ _________
_________ _________
| | | |
| | eth0| |
| RA |eth1 | RB |eth1 eth0| RC
|________| RD |
| |_______| |__________|
|eth1 | |
| | eth0 | |
| | | |
| | | |
| | | |
|_________| |_________|
|_________| |_________|
| 10.0.1.2
10.0.5.2|
| eth0
|eth1
|
|
|
|
|
|
_____|___ 10.0.1.1
10.0.5.1 | eth0
| | eth0
____|___
| host1 |
| |
| |
| host2 |
| |
| |
| |
| |
|_________|
| |
|_________|
figure 1: My topology. sorry for poor drawing.
configure file of RA:
interfaces {
interface eth0 {
vif eth0 {
address 10.0.1.2 {
prefix-length: 24
}
}
}
interface eth1 {
vif eth1 {
address 10.0.2.1 {
prefix-length: 24
}
}
}
}
fea {
unicast-forwarding4 {
disable: false
}
}
protocols {
ospf4 {
router-id: 10.0.2.1
area 0.0.0.0 {
interface eth1 {
vif eth1 {
address 10.0.2.1 {
}
}
}
}
area 0.0.0.0 {
interface eth0 {
vif eth0 {
address 10.0.1.2 {
}
}
}
}
}
}
============================================================================
configure file of RB:
interfaces {
interface eth0 {
vif eth0 {
address 10.0.2.2 {
prefix-length: 24
}
}
}
interface eth1 {
vif eth1 {
address 10.0.3.1 {
prefix-length: 24
}
}
}
}
fea {
unicast-forwarding4 {
disable: false
}
}
policy{
policy-statement connectedroute{
term connectedexport{
from{
protocol:"connected"
}
}
}
policy-statement ospf2bgp{
term ospf2bgp{
from{
protocol:"ospf4"
}
}
}
policy-statement bgp2ospf{
term ospf2bgp{
from{
protocol:"bgp"
}
}
}
}
protocols {
ospf4 {
router-id: 10.0.2.2
export:"connectedroute"
export:"bgp2ospf"
area 0.0.0.0 {
interface eth0 {
vif eth0 {
address 10.0.2.2 {
}
}
}
}
}
bgp {
bgp-id: 10.0.2.2
local-as: 23456
export:"connectedroute"
export:"ospf2bgp"
peer 10.0.3.2 {
local-ip: 10.0.3.1
as: 23457
next-hop: 10.0.3.1
}
}
}
===============================================================================
configure file of RC:
interfaces {
interface eth0 {
vif eth0 {
address 10.0.3.2 {
prefix-length: 24
}
}
}
interface eth1 {
vif eth1 {
address 10.0.4.1 {
prefix-length: 24
}
}
}
interface eth2 {
vif eth2 {
address 10.0.6.1 {
prefix-length: 24
}
}
}
}
fea {
unicast-forwarding4 {
disable: false /*enable ipv4 forwarding*/
}
}
policy{
policy-statement connectedroute{
term connectedexport{
from{
protocol:"connected"
}
}
}
policy-statement ospf2bgp{
term ospf2bgp{
from{
protocol:"ospf4"
}
}
}
policy-statement bgp2ospf{
term ospf2bgp{
from{
protocol:"bgp"
}
}
}
}
protocols {
ospf4 {
router-id: 10.0.4.1
export:"connectedroute"
export:"bgp2ospf"
area 0.0.0.0 {
interface eth1 {
vif eth1 {
address 10.0.4.1 {
}
}
}
}
area 0.0.0.0 {
interface eth2 {
vif eth2 {
address 10.0.6.1 {
}
}
}
}
}
bgp {
bgp-id: 10.0.3.2
local-as: 23457
/*export: "export-connected"*/
export:"connectedroute"
export:"ospf2bgp"
peer 10.0.3.1 {
local-ip: 10.0.3.2
as: 23456
next-hop: 10.0.3.2
}
}
}
==================================================================
configure file of RD:
interfaces {
interface eth0 {
vif eth0 {
address 10.0.4.2 {
prefix-length: 24
}
}
}
interface eth1 {
vif eth1 {
address 10.0.5.2 {
prefix-length: 24
}
}
}
}
fea {
unicast-forwarding4 {
disable: false
}
}
protocols {
ospf4 {
router-id: 10.0.4.2
area 0.0.0.0 {
interface eth0 {
vif eth0 {
address 10.0.4.2 {
}
}
}
}
area 0.0.0.0 {
interface eth1 {
vif eth1 {
address 10.0.5.2 {
}
}
}
}
}
}
=================================================================
Yours
Chuan
More information about the Xorp-users
mailing list