cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
584
Views
0
Helpful
8
Replies

Help about BGP

csco11579831
Level 1
Level 1

hello,

can you plz tell me how i can adv just somes network,

see plz attachement,

Best regards,

1 Accepted Solution

Accepted Solutions

Again, in my previous post, I stated that you can advertise anything your router knows about. If it's in the routing table, you can choose to advertise or not. It doesn't matter whether you have a default static route or not. If it's in your table, then you can choose to advertise it. I'm not asking the "same information." See below:

"Customer"

R1#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.13.0.0/24 is subnetted, 1 subnets

C       172.13.0.0 is directly connected, FastEthernet0/0

     172.16.0.0/24 is subnetted, 4 subnets

B       172.16.12.0 [20/0] via 172.13.0.3, 00:01:07

B       172.16.8.0 [20/0] via 172.13.0.3, 00:01:07

B       172.16.10.0 [20/0] via 172.13.0.3, 00:01:07

B       172.16.123.0 [20/0] via 172.13.0.3, 00:01:07

     150.100.0.0/24 is subnetted, 1 subnets

C       150.100.200.0 is directly connected, Loopback1

YOUR Router:

ip route 0.0.0.0 0.0.0.0 172.13.0.1

ip route 172.16.8.0 255.255.255.0 3.3.3.5

ip route 172.16.10.0 255.255.255.0 3.3.3.5

ip route 172.16.12.0 255.255.255.0 3.3.3.5

ip route 172.16.123.0 255.255.255.0 3.3.3.5

R3(config-if)#do sh ip access-list 10

Standard IP access list 10

    10 permit 172.16.8.0, wildcard bits 0.0.0.255 (2 matches)

    20 permit 172.16.10.0, wildcard bits 0.0.0.255 (2 matches)

    30 permit 172.16.12.0, wildcard bits 0.0.0.255 (2 matches)

    40 permit 172.16.123.0, wildcard bits 0.0.0.255 (2 matches)

R3(config-if)#do sh run | s route-map

redistribute static route-map Static

route-map Static permit 10

match ip address 10

R3(config-if)#do sh run | s router bgp

router bgp 3

no synchronization

bgp log-neighbor-changes

redistribute static route-map Static

neighbor 172.13.0.1 remote-as 1

no auto-summary

R3(config-if)#do sh ip bgp rege ^$

BGP table version is 11, local router ID is 3.3.3.3

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path

*> 172.16.8.0/24    3.3.3.5                  0         32768 ?

*> 172.16.10.0/24   3.3.3.5                  0         32768 ?

*> 172.16.12.0/24   3.3.3.5                  0         32768 ?

*> 172.16.123.0/24  3.3.3.5                  0         32768 ?

R3(config-if)#

So, again, your route-map looks fine. If you want further help, please post the following:

show ip route static

sh ip bgp summar

sh ip bgp rege ^$

sh run | s route-map

Your default route will not affect advertising other static routes out regardless of those routes being covered by the default.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

View solution in original post

8 Replies 8

John Blakley
VIP Alumni
VIP Alumni

Hi,

If you have those routes directly connected on the router, you can just advertise what you want with the network command and not include the subnets you don't want advertised. If you're learning those routes from somewhere else, BGP will automatically advertise them out if you don't have a distribute list or route-map controlling their advertisement.

It looks like your route-map will work fine to me...

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

hi,with this config,my table routing :

   Network          Next Hop            Metric LocPrf Weight Path

*> 0.0.0.0           X.X.X.X            0             0 64520 i

*> 192.168.10.0     X.X.X.X            0             0 64520 i

despite the route-map with which acl allowing just some networks, I can ping all the network list (including They Will not to be annonced)

Are those 172. routes in your routing table? Can you post "show ip route"?

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

R2#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is 192.168.87.10 to network 0.0.0.0

     10.0.0.0/24 is subnetted, 1 subnets

S       10.10.10.0 [1/0] via 192.168.87.10

     11.0.0.0/24 is subnetted, 1 subnets

S       11.11.11.0 [1/0] via 192.168.87.10

     12.0.0.0/24 is subnetted, 1 subnets

S       12.12.12.0 [1/0] via 192.168.87.10

     172.16.0.0/16 is subnetted, 1 subnets

S       172.16.31.0 [1/0] via 192.168.87.10

     172.18.0.0/16 is subnetted, 1 subnets

S       172.18.103.0 [1/0] via 192.168.87.10

     172.19.0.0/16 is subnetted, 1 subnets

S       172.19.238.0 [1/0] via 192.168.87.10

S       192.168.64.0/24 [1/0] via 192.168.87.10

     10.0.0.0/24 is subnetted, 1 subnets

C       10.118.129.0 is directly connected, FastEthernet0/1

C    192.168.87.0/24 is directly connected, FastEthernet0/0

S*   0.0.0.0/0 [1/0] via 192.168.87.10

When you applied the route-map, did you clear your bgp sessions? Try "clear ip bgp * soft" and see if that helps. After doing that, please post "show ip bgp regex ^$"

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

I do not know why you are asking the same information,

my request is simple, I have a default static route, I just want to publish some network although obviously that are part of the overall route ip route 0.0.0.0 0.0.0.0 XXXX

Sincerely,

Again, in my previous post, I stated that you can advertise anything your router knows about. If it's in the routing table, you can choose to advertise or not. It doesn't matter whether you have a default static route or not. If it's in your table, then you can choose to advertise it. I'm not asking the "same information." See below:

"Customer"

R1#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.13.0.0/24 is subnetted, 1 subnets

C       172.13.0.0 is directly connected, FastEthernet0/0

     172.16.0.0/24 is subnetted, 4 subnets

B       172.16.12.0 [20/0] via 172.13.0.3, 00:01:07

B       172.16.8.0 [20/0] via 172.13.0.3, 00:01:07

B       172.16.10.0 [20/0] via 172.13.0.3, 00:01:07

B       172.16.123.0 [20/0] via 172.13.0.3, 00:01:07

     150.100.0.0/24 is subnetted, 1 subnets

C       150.100.200.0 is directly connected, Loopback1

YOUR Router:

ip route 0.0.0.0 0.0.0.0 172.13.0.1

ip route 172.16.8.0 255.255.255.0 3.3.3.5

ip route 172.16.10.0 255.255.255.0 3.3.3.5

ip route 172.16.12.0 255.255.255.0 3.3.3.5

ip route 172.16.123.0 255.255.255.0 3.3.3.5

R3(config-if)#do sh ip access-list 10

Standard IP access list 10

    10 permit 172.16.8.0, wildcard bits 0.0.0.255 (2 matches)

    20 permit 172.16.10.0, wildcard bits 0.0.0.255 (2 matches)

    30 permit 172.16.12.0, wildcard bits 0.0.0.255 (2 matches)

    40 permit 172.16.123.0, wildcard bits 0.0.0.255 (2 matches)

R3(config-if)#do sh run | s route-map

redistribute static route-map Static

route-map Static permit 10

match ip address 10

R3(config-if)#do sh run | s router bgp

router bgp 3

no synchronization

bgp log-neighbor-changes

redistribute static route-map Static

neighbor 172.13.0.1 remote-as 1

no auto-summary

R3(config-if)#do sh ip bgp rege ^$

BGP table version is 11, local router ID is 3.3.3.3

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path

*> 172.16.8.0/24    3.3.3.5                  0         32768 ?

*> 172.16.10.0/24   3.3.3.5                  0         32768 ?

*> 172.16.12.0/24   3.3.3.5                  0         32768 ?

*> 172.16.123.0/24  3.3.3.5                  0         32768 ?

R3(config-if)#

So, again, your route-map looks fine. If you want further help, please post the following:

show ip route static

sh ip bgp summar

sh ip bgp rege ^$

sh run | s route-map

Your default route will not affect advertising other static routes out regardless of those routes being covered by the default.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

Hi,

Conclusion: I am a lab in this direction, and I can confirm what you said, in fact, I thought the router will understand when I

declare (to enable network ACL) of a network in an ACL XXXX and it is released from the default route, but this is wrong because it is impératievment to declare as ip route XXXX [mask] [destination]

Thank you !

Review Cisco Networking products for a $25 gift card