BGP Help

rakemrakem Member Posts: 800
Hey guys... im just getting into BGP for the first time... i have set up the following lab in dynamips:

bgp.jpg

Im having issues with getting connectivity between the two AS'. Here is the config from routers 2, 3 and 4

R2
interface Serial1/0
ip address 192.168.1.2 255.255.255.252
serial restart-delay 0
!
interface Serial1/1
ip address 100.1.1.1 255.255.255.252
serial restart-delay 0
!
router ospf 10
log-adjacency-changes
network 100.1.1.0 0.0.0.3 area 0
network 192.168.1.0 0.0.0.3 area 0
!
router bgp 65100
no synchronization
bgp log-neighbor-changes
neighbor 100.1.1.2 remote-as 65300
no auto-summary



R3
interface Serial1/0
ip address 100.1.1.2 255.255.255.252
serial restart-delay 0
!
interface Serial1/1
ip address 200.1.1.1 255.255.255.252
serial restart-delay 0
!
router bgp 65300
no synchronization
bgp log-neighbor-changes
neighbor 100.1.1.1 remote-as 65100
neighbor 200.1.1.2 remote-as 65200
no auto-summary


R4
interface Serial1/0
ip address 200.1.1.2 255.255.255.252
serial restart-delay 0
!
interface Serial1/1
ip address 192.168.20.1 255.255.255.252
serial restart-delay 0

router ospf 20
log-adjacency-changes
network 192.168.20.0 0.0.0.3 area 0
network 200.1.1.0 0.0.0.3 area 0
!
router bgp 65200
no synchronization
bgp log-neighbor-changes
neighbor 200.1.1.1 remote-as 65300
no auto-summary


the routing table on R3 only has its directly connected routes... im obviously missing something here, as mentioned this is the first time i have looked at BGP.... any pointers from you learned people would be great!

until then i will do some research.
CCIE# 38186
showroute.net

Comments

  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    You don't have any BGP network statements, so BGP has nothing to advertise.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • georgemcgeorgemc Member Posts: 429
    How about BGP network statements to tell BGP what to advertise?

    George

    EDIT: lol, Mike beat me to it...
    WGU BS: Business - Information Technology Management
    Start Date: 01 October 2012
    QFT1,PFIT in progress.
    TRANSFERRED/COMPLETED: AGC1,BBC1,LAE1,QBT1,LUT1,QLC1,QMC1,QLT1,IWC1,INC1,INT1,BVC1,CLC1,MGC1, CWV1 BNC1, LIT1,LWC1,QAT1,WFV1,EST1,EGC1,EGT1,IWT1,MKC1,MKT1,RWT1,FNT1,FNC1, BDC1,TPV1 REQUIRED:
  • rakemrakem Member Posts: 800
    right... that would make sense. hahah.. So im guessing its like other routing protocols where you just advertise your directly connected networks?
    CCIE# 38186
    showroute.net
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    rakem wrote:
    right... that would make sense. hahah.. So im guessing its like other routing protocols where you just advertise your directly connected networks?

    You guess wrong, you advertise either directly connected networks or networks learned via the igp,the main thing to watch is that the next-hop address of the address learned via an igp is reachable,otherwise bgp wont advertise it.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    Nope. Other routing protocols use the network statement to determine the interfaces that participate in the routing process.

    In BGP the network statement defines the networks that will be advertised. You can also redistribute into BGP or summarize to get BGP to advertise routes.

    Keep reading.... BGP is lots of fun! icon_lol.gif
    georgemc wrote:
    EDIT: lol, Mike beat me to it...
    Well I know how you feel, Ed beat me to the "valid next hop" .... just because you tell BGP to advertise something doesn't mean it will listen to you icon_lol.gif At least synchronization is now disabled by default on the more recent IOS versions.... which makes it even easier to mess things up with BGP if you're not careful.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • rakemrakem Member Posts: 800
    right thanks for that guys... so i did some more reading and the cisco press self study books says:

    "This command (the network command) does not identify the interfaces on which to run BGP; it states the networks that are available within the AS"

    So here is my new configs: i also had to do a bunch of redistribution to get the routing tables on 1 and 5 to have full connectivity. Let me know what you guys think:

    (note R1 has network 11.0.0.0 connected and R5 has 15.0.0.0)

    R2
    router ospf 10
    log-adjacency-changes
    redistribute bgp 65100 metric 600 subnets
    network 100.1.1.0 0.0.0.3 area 0
    network 192.168.1.0 0.0.0.3 area 0
    !
    router bgp 65100
    synchronization
    bgp log-neighbor-changes
    network 11.1.0.0 mask 255.255.0.0
    network 100.1.1.0 mask 255.255.255.252
    network 192.168.1.0 mask 255.255.255.252
    redistribute ospf 10 metric 300
    neighbor 100.1.1.2 remote-as 65300
    no auto-summary

    R3
    router bgp 65300
    synchronization
    bgp log-neighbor-changes
    network 100.1.1.0 mask 255.255.255.252
    network 200.1.1.0 mask 255.255.255.252
    neighbor 100.1.1.1 remote-as 65100
    neighbor 200.1.1.2 remote-as 65200
    no auto-summary

    R4
    router ospf 20
    log-adjacency-changes
    redistribute bgp 65200 metric 600 subnets
    network 192.168.20.0 0.0.0.3 area 0
    network 200.1.1.0 0.0.0.3 area 0
    !
    router bgp 65200
    synchronization
    bgp log-neighbor-changes
    network 15.1.0.0 mask 255.255.0.0
    network 192.168.20.0 mask 255.255.255.252
    network 200.1.1.0 mask 255.255.255.252
    redistribute ospf 20 metric 300
    neighbor 200.1.1.1 remote-as 65300
    no auto-summary
    !

    As a result of this config R1 has this routing table:
    Gateway of last resort is not set

    100.0.0.0/30 is subnetted, 1 subnets
    O 100.1.1.0 [110/128] via 192.168.1.2, 00:40:23, Serial1/0
    200.1.1.0/30 is subnetted, 1 subnets
    O E2 200.1.1.0 [110/600] via 192.168.1.2, 00:40:23, Serial1/0
    192.168.20.0/30 is subnetted, 1 subnets
    O E2 192.168.20.0 [110/600] via 192.168.1.2, 00:40:23, Serial1/0
    11.0.0.0/24 is subnetted, 2 subnets
    C 11.1.2.0 is directly connected, Loopback2
    C 11.1.1.0 is directly connected, Loopback1
    192.168.1.0/30 is subnetted, 1 subnets
    C 192.168.1.0 is directly connected, Serial1/0
    15.0.0.0/32 is subnetted, 2 subnets
    O E2 15.1.2.1 [110/600] via 192.168.1.2, 00:14:18, Serial1/0
    O E2 15.1.1.1 [110/600] via 192.168.1.2, 00:14:27, Serial1/0
    R1#

    R5 has this:
    Gateway of last resort is not set

    100.0.0.0/30 is subnetted, 1 subnets
    O E2 100.1.1.0 [110/600] via 192.168.20.1, 00:21:21, Serial1/0
    200.1.1.0/30 is subnetted, 1 subnets
    O 200.1.1.0 [110/128] via 192.168.20.1, 00:21:21, Serial1/0
    192.168.20.0/30 is subnetted, 1 subnets
    C 192.168.20.0 is directly connected, Serial1/0
    11.0.0.0/32 is subnetted, 2 subnets
    O E2 11.1.2.1 [110/600] via 192.168.20.1, 00:01:28, Serial1/0
    O E2 11.1.1.1 [110/600] via 192.168.20.1, 00:01:28, Serial1/0
    192.168.1.0/30 is subnetted, 1 subnets
    O E2 192.168.1.0 [110/600] via 192.168.20.1, 00:21:21, Serial1/0
    15.0.0.0/24 is subnetted, 2 subnets
    C 15.1.2.0 is directly connected, Loopback2
    C 15.1.1.0 is directly connected, Loopback1
    R5#

    so they have full connectivity between them... I could have done this with static routes too a suppose. So does this look ok? have I used the network command correctly in BGP?

    cheers.
    CCIE# 38186
    showroute.net
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    Save the redistribution for later..... a lot later.

    With Synchronization enabled, the networks in the BGP network statement must also be learned by an IGP before they will be advertised.... but the first check BGP does is the "next-hop reachable check."

    Keep reading and try to keep your labs as simple as possible to start :D
    :mike: Cisco Certifications -- Collect the Entire Set!
  • rakemrakem Member Posts: 800
    mikej412 wrote:
    Save the redistribution for later..... a lot later.

    With Synchronization enabled, the networks in the BGP network statement must also be learned by an IGP before they will be advertised..

    so in AS65300 where there is no IGP running what would be the best way to set that up?

    and should i be able to this this network design working correctly without redistribution? I only needed it to get the 11.0.0.0 to show up int R5 routing table and for 15.0.0.0 to show up in R1 table..

    I suppose a default route on the end routers would be better than redistribution.
    CCIE# 38186
    showroute.net
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    If you dont have an IGP running in AS65300 you dont have any routes to advertise into bgp so you dont need to do anything.Redistribution is a big no no in bgp, 99% of the time you wont even consider using it.
    In your config under bgp you have "network 15.1.0.0 mask 255.255.0.0" and " network 11.1.0.0 mask 255.255.0.0" . If you do a "sh ip route" do you have routes 15.1.0.0/16 and 11.1.0.0/16, if you dont have an exact match bgp will not advertise the routes,you must be careful on mask length.
    From your questions its apparent that you are configuring bgp without understanding how it works, i suggest you do as mike suggested earlier and start reading multiple sources and have a goal of what you want to accomplish when it comes to labbing it up.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
Sign In or Register to comment.