12-14-2018 12:34 AM
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.
Solved! Go to Solution.
12-14-2018 01:23 AM
Hi, try to add this static route:
ip route A.A.A.0 255.255.255.0 Null0
In this way all the subnet/24 will be announced but test is before to use this config in standby.
Regards.
12-14-2018 01:23 AM
Hi, try to add this static route:
ip route A.A.A.0 255.255.255.0 Null0
In this way all the subnet/24 will be announced but test is before to use this config in standby.
Regards.
12-14-2018 02:12 AM - edited 12-14-2018 02:20 AM
Hello
@man3mar3n wrote:
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
Hello
when you say bgp fails I am assuming you mean the lan subnet fails to be advertised?
The reason for this your changing the lan interface ip address to a /29 subnet but your not advertising that in your prefix-list or via bgp network command.
Try adding this before you changing the lan interface ip address.
router bgp xxx
network 192.168.1.0 mask 255.255.255.248
exit
ip prefix-list PL-ISP seq 15 permit A.A.A.0/29
On a side note as your filtering outbound route advertisements, There really isn't any need for the redistribute static or connected commands
Also due route-refresh in bgp you dont need to use soft-reconfiguration either.
router bgp xx
no redistribute connected
no redistribute static
no neighbor C.C.C.133 soft-reconfiguration inbound
12-14-2018 08:02 AM
I believe that we need some clarification from the original poster. My understanding of the original post is that they have a complete class C network and that they want to subdivide (subnet) it so that various of their customers can use parts of it. If my understanding is correct then advertising the complete /24 to the ISP (which I assume is the BGP neighbor) is appropriate. If my understanding is not correct then please clarify what is the situation.
Advertising a /29 to an ISP generally does not work since many ISP will not advertise anything smaller than a /24.
If my understanding is correct then the BGP to the ISP is ok and we need to look at how they communicate with and route to their customers who are using parts of this network.
HTH
Rick
12-14-2018 08:35 AM
Hi Rick,
You are right. I cannot advertise anything smaller than /24.
So I advertise the complete /24 segment. My actual segment is /22.
However, I have a few customer that will be using this range and I need to subnet it with different gateway.
I am stuck because it does not allow me to subnet it.
I also have a /48 subnet of IPv6 and thinking to advertise part of it /50.
Please advice.
12-14-2018 08:56 AM
Hi,
As Daniele indicated, you need to configure a static route (to null0) for the /24 you want to advertise or better the /22 that you own and have a matching network statement under the BGP configuration. You will then be able to subnet this as you will internally.
Regards,
12-14-2018 09:18 AM
Hi,
The same approach does not seems to be working for ipv6.
For IPv4, i have /22 but choose to advertise /24 only. It allows the subnetting.
When I do a route to null0, it allows for further breaking of the segment to /29 or /28.
However, for IPv6, I have a /48 segment and I choose to advertise only /50.
The same approach doesn't seems to be working.
router bgp myas-NUM
bgp router-id rid.3
bgp log-neighbor-changes
neighbor B:B:B::29 remote-as RMAS-NUM
neighbor B:B:B::29 description --- eBGP Uplink ---
address-family ipv6
network A:A:A:C000::/50
neighbor B:B:B::29 activate
neighbor B:B:B::29 next-hop-self
neighbor B:B:B::29 remove-private-as
neighbor B:B:B::29 prefix-list PL-ISP out
exit-address-family
ipv6 route ::/0 B:B:B::29
ipv6 prefix-list PL-ISP seq 10 permit A:A:A:C000::/50 le 64
Please help.
Thanks
12-14-2018 09:26 AM
The advertisement looks normal but it is not working
sh bgp ipv6 uni nei B:B:B::29 ad
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
*> A:A:A:C000::/50
:: 0 32768 i
Total number of prefixes 1
12-14-2018 11:24 AM
Please define "not working". Is it not being installed in the RIB of the bgp neighbor router? Do you see it in BGP?
Regards,
12-14-2018 09:28 AM
I do not see the ipv6 static route to null0 for the specific /50. Did you configure it. Bear in mind that the rule for the network statement is that it need a matching route in the RIB to be effective.
Regards,
12-14-2018 09:37 AM
Hi
even with the route to null0, the bgp not working
router bgp myas-NUM
bgp router-id rid.3
bgp log-neighbor-changes
neighbor B:B:B::29 remote-as RMAS-NUM
neighbor B:B:B::29 description --- eBGP Uplink ---
address-family ipv6
network A:A:A:C000::/50
neighbor B:B:B::29 activate
neighbor B:B:B::29 next-hop-self
neighbor B:B:B::29 remove-private-as
neighbor B:B:B::29 prefix-list PL-ISP out
exit-address-family
ipv6 route ::/0 B:B:B::29
ipv6 route A:A:A:c000::/50 Null0
ipv6 prefix-list PL-ISP seq 10 permit A:A:A:C000::/50 le 64
I have the interface IP as follows
interface GigabitEthernet0/1
ipv6 address A:A:A:C000::1/64 (even A:A:A:C000::1/50 not working)
ipv6 enable
12-14-2018 09:53 AM
Am I correct in understanding that your issue with the IPv4 addresses is resolved and that you can do what you need to do with these addresses and that your remaining issue is with the IPv6 addresses?
HTH
Rick
12-14-2018 04:54 PM
Hi,
I could change the Interface IP to A.A.A.1/29 after I put in the route to null0.
The BGP works and I could ping the Interface from Internet.
I need to subnet it further for our customer use.
I will do this tonight.
However, the same config applied to IPv6 does not work though it advertisement look correct.
12-14-2018 10:54 AM
What do you mean by "it is not working"? From the following output, it certainly looks like the /50 is being advertised.
sh bgp ipv6 uni nei B:B:B::29 ad
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
*> A:A:A:C000::/50
:: 0 32768 i
Total number of prefixes 1
Regards,
12-14-2018 05:21 PM
Hi,
Even though the advertisement looks right, I don't see the advertised subnet when I query it from BGP Lookup table.
I also could not ping the interface from Internet and a PC connected to this segment has no Internet access.
interface GigabitEthernet0/0
description WAN Interface
ip address B.B.B.134 255.255.255.252
duplex auto
speed auto
ipv6 address BB:BB:BB::2A/126
ipv6 enable
interface GigabitEthernet0/1
description LAN Interface
ip address A.A.A.1 255.255.255.248
duplex auto
speed auto
ipv6 address AA:AA:AA:C000::1/64
ipv6 enable
router bgp MY-AS-NUM
bgp router-id RID.3
bgp log-neighbor-changes
neighbor BB:BB:BB::29 remote-as REM-AS-NUM
neighbor BB:BB:BB::29 description --- IPv6 eBGP Uplink ---
neighbor B.B.B.133 remote-as REM-AS-NUM
neighbor B.B.B.133 description --- IPv4 eBGP Uplink ---
address-family ipv4
no synchronization
bgp dampening
network A.A.A.0 mask 255.255.255.0 ( I advertised /24 from /22 i have)
neighbor BB:BB:BB::29 activate
neighbor B.B.B.133 activate
neighbor B.B.B.133 next-hop-self
neighbor B.B.B.133 remove-private-as
neighbor B.B.B.133 prefix-list PL-ISP out
no auto-summary
exit-address-family
address-family ipv6
network AA:AA:AA:C000::/50 ( I advertised /50 from /48 i have)
neighbor BB:BB:BB::29 activate
neighbor BB:BB:BB::29 next-hop-self
neighbor BB:BB:BB::29 remove-private-as
neighbor BB:BB:BB::29 prefix-list PL-ISP-V6 out
exit-address-family
ip forward-protocol nd
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0
ip route A.A.A.0 255.255.255.0 Null0 (without this - I loss internet access for my LAN)
ip route A.A.A.8 255.255.255.248 A.A.A.2 (I segment it for customer A - not sure if this works)
ip route A.A.A.16 255.255.255.240 A.A.A.2 (I segment it for customer B - not sure if this works)
ip prefix-list PL-ISP seq 18 permit A.A.A.0/24
ipv6 route AA:AA:AA:C000::/50 Null0
ipv6 route ::/0 BB:BB:BB::29
ipv6 prefix-list PL-ISP-V6 seq 10 permit AA:AA:AA:C000::/50 le 64
Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide