cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3261
Views
30
Helpful
18
Replies

How to subnet BGP advertised IP

man3mar3n
Level 1
Level 1

Hi,

 

I have the below config which the peering works with the ISP. However, I need to subnet the IP to be distributed to all my customers like A.A.A.0/29 OR A.A.A.8/29.

 

If I change the Gi0/1 IP address to A.A.A.1 255.255.255.248, the bgp fails.

 

How can I subnet the IPs. I have a full class C IP (A.A.A.0/24) to distribute.

 

interface GigabitEthernet0/0
 description WAN Interface
 ip address C.C.C.134 255.255.255.252
 duplex auto
 speed auto

interface GigabitEthernet0/1
 description LAN Interface
 ip address A.A.A.1 255.255.255.0
 duplex auto
 speed auto

router bgp MYAS-NUM
 bgp router-id X.3
 bgp log-neighbor-changes
 neighbor C.C.C.133 remote-as BBBBB
 neighbor C.C.C.133 description --- eBGP Uplink ---
 !
 address-family ipv4
  no synchronization
  bgp dampening
  network A.A.A.0 mask 255.255.255.0
  redistribute connected
  redistribute static
  neighbor C.C.C.133 activate
  neighbor C.C.C.133 next-hop-self
  neighbor C.C.C.133 remove-private-as
  neighbor C.C.C.133 soft-reconfiguration inbound
  neighbor C.C.C.133 prefix-list PL-ISP out
  no auto-summary
 exit-address-family
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0

!
ip prefix-list PL-ISP seq 12 permit A.A.A.0/24
ip prefix-list PL-ISP seq 20 deny 0.0.0.0/0 le 32

 

Please help.

 

Thanks.

 

 

 

 

 

18 Replies 18

There seem to be 3 or 4 issues raised in this post. So lets take them one at a time.

1) The configuration to advertise A.A.A.0/24 to your BGP neighbor looks right. But you tell us that

"I don't see the advertised subnet when I query it from BGP Lookup table."

My first question about this is what lookup table are you using.

My second question about this is to check on your BGP neighbor. You can use the show ip bop neighbor command to make sure that the neighbor is established. You can use the show ip bop neighbor advertised-route to check that you are advertising the route to the neighbor.

2) You tell us that 

"I also could not ping the interface from Internet"

That is concerning. Can you confirm that the interface is up and available using the show ip interface brief command? Can you ping the neighbor? If you use the command show arp do you see a mac address for the neighbor?

3) You tell us that

"a PC connected to this segment has no Internet access"

If the result of 2 is that there is a problem accessing the neighbor then we know why a PC has no Internet access. If the result of 2 is that the neighbor is working then we need to look at another possible cause of the PC issue. You have not shown us that you are configuring address translation. Can you show us what you have configured for address translation?

4) You have 2 static routes configured for subnets for customers with a notation not sure that this works. The syntax for the static routes appears to be correct. So the questions about this are what is the device at A.A.A.2? Does this device have layer 3 forwarding logic to those customers and does this device have IP connectivity to these customers? And do these customers have routing configured with this device as their gateway?

 

HTH

 

Rick

HTH

Rick

Hi Rick,

 

I just tested the ipv4 config. It works as I needed.

 

Only issue is with IPv6. Even though I follow the same config method with IPv4.

Hi Rick,

 

Sorry for the confusion. The issues raised are for IPv6. IPv4 is working.

 

1) The configuration to advertise A.A.A.0/24 to your BGP neighbor looks right. But you tell us that

"I don't see the advertised subnet when I query it from BGP Lookup table."

My first question about this is what lookup table are you using.

My second question about this is to check on your BGP neighbor. You can use the show ip bop neighbor command to make sure that the neighbor is established. You can use the show ip bop neighbor advertised-route to check that you are advertising the route to the neighbor.

 

This issue is IPv6. I used the BGP Lookup table for my AS number via this website https://www.dan.me.uk/bgplookup.

My subnets are advertised correctly

Router#sh bgp ipv6 uni nei CC:CC:CC::29 advertised-routes
BGP table version is 9, local router ID is RID.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
*> AA:AA::AA:C000::/50
                    ::                       0         32768 i

Total number of prefixes 1

--------------------------------------------------------------------------------------------

Router#sh bgp all
For address family: IPv4 Unicast

BGP table version is 30, local router ID is RID.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
r> 0.0.0.0          B.B.B.133          1             0 10204 i
*> A.A.A.0/24       0.0.0.0            0               32768 i

For address family: IPv6 Unicast

BGP table version is 9, local router ID is RID.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
*> ::/0             BB:BB:BB::29
                                             1             0 10204 i
*> AA:AA:AA:C000::/50
                    ::                       0               32768 i

For address family: IPv4 Multicast

 

------------------------------------------------------------------------------------

2) You tell us that 

"I also could not ping the interface from Internet"

That is concerning. Can you confirm that the interface is up and available using the show ip interface brief command? Can you ping the neighbor? If you use the command show arp do you see a mac address for the neighbor?

 

This is also for IPv6. Though the advertisement look right. I don't have Internet access.

I can ping the neighbor. Only ping to my IP has problems when I change the segment to /50. When it is /48, it works!.

 

--------------------------------------------------------------------------------------

3) You tell us that

"a PC connected to this segment has no Internet access"

If the result of 2 is that there is a problem accessing the neighbor then we know why a PC has no Internet access. If the result of 2 is that the neighbor is working then we need to look at another possible cause of the PC issue. You have not shown us that you are configuring address translation. Can you show us what you have configured for address translation?

 

This is also IPv6, same issue with issue above.

 

------------------------------------------------------------------------------

4) You have 2 static routes configured for subnets for customers with a notation not sure that this works. The syntax for the static routes appears to be correct. So the questions about this are what is the device at A.A.A.2? Does this device have layer 3 forwarding logic to those customers and does this device have IP connectivity to these customers? And do these customers have routing configured with this device as their gateway?

 

A.A.A.2 is Cisco 3750 layer 3 switch. Below are the config. This config works for ipv4 so far. IPv6 bcos of issues with router config.

 

ip routing
interface GigabitEthernet1/0/1 (Router connects here)
 no switchport
 ip address A.A.A.2 255.255.255.248
!
interface GigabitEthernet1/0/2    (Customer connects here)
 no switchport
 ip address A.A.A.17 255.255.255.240

!

ip route 0.0.0.0 0.0.0.0 A.A.A.2

 

 

Thanks in advance for your guidance.

 

 

 

 

 

 

 

 

 

 

 

Thanks for the clarification that the issues now are only with IPv6. I believe that there is a significant clue to the issue in this statement:

Only ping to my IP has problems when I change the segment to /50. When it is /48, it works!.

 

That suggests that the issue may relate to the size of the advertised subnet. I believe that you will find confirmation in this RFC that subnets of /50 are too small to advertise in IPv6

https://tools.ietf.org/html/rfc7454#section-6.1.3

 

HTH

 

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card