05-03-2022 01:06 AM - edited 05-03-2022 01:31 AM
Hello,
I am trying to do a basic thing but it's not working.
I would like to adverstived only IP address that is included in my LAN subnet. 198.168.10.1
Example :
interface GigabitEthernet0/0/0.10
encapsulation dot1Q 10
ip address 198.168.10.1 255.255.255.0
!
My test configuration :
ip route 198.168.10.1 255.255.255.255 null0 tag20
!
router bgp 64XXX
address-family ipv4
network 198.168.10.1 mask 255.255.255.255
!
OR
route-map STATIC permit 10
match tag 20
!
router bgp 64XXX
address-family ipv4
redistribute static route-map STATIC
!
Nothing is working !
Note : if i shut interface GigabitEthernet0/0/0.10, my /32 is advertised :
(Beacause AD Connected=0 and STATIC=1, I think )
Router#sh ip bgp nei 10.1.1.1 advertised-routes
*> 198.168.10.1/32 0.0.0.0 0 32768 i
Do you know if it's possible to advertised only IP included in connected interface ?
Solved! Go to Solution.
05-04-2022 07:42 AM
Hello Jon
The question is why does the L entry in the route table for 192.168.10.1 not allow a matching "network 192.168.10.1 mask 255.255.255.255" to be advertised out.
Whereas when the interface is shut down then the static route to null0 is used and the prefix is advertised.
Isn't it something like this:
Local- shows an interfaces host address when it is active
Connected - shows an interfaces network address of the L when it is active
Lasty the static route to null is not really attached to any physically interface , but a logical one so it can be entered into the rib
05-04-2022 10:46 AM
I am still not clear why the original poster wants to advertise the interface IP addresses but not advertise the subnet. And I wonder if we understood the objective if we might find a better solution. But for now the question is how to advertise the interface IP address but not the subnet. I believe that there are two solutions that achieve that (at least sort of).
1) Have R1 configure a static route with null 0 for the IP address of R2 and advertise it. Have R2 configure a static route with null 0 for the IP address of R1 and advertise it. That way the DC learns the interface IP addresses but not the subnet. The path from DC to R1 would not be the optimum path (that is the "sort of" in the solution that it would go through R2 to get to R1). But I think it does achieve the objective.
2) Have R1 and R2 do a redistribute connected (with appropriate filter of the advertisement so it is only the desired interface that is advertised).
05-03-2022 01:22 AM
Hello,
when you shut the subinterface, 198.168.10.2/32 is advertised ? What does that IP address belong to ?
Post a diagram of your topology, as well as the full configurations (sh run) of all devices involved.
05-03-2022 02:06 AM
Hello,
There is an error in initial post, IP send is 198.168.10.1.
Topology is basic, i am trying to do this in lab.
Routers R1,R2 WAN are in Nominal/Backup.
I just want advertise only /32.
Because if /24 is advertised to WAN, ALL IP can be reachable throught LAN.
Maybe others solutions are possible, but i just want to know if it's possible ?
05-03-2022 01:37 AM
Hello
@jean1 wrote:
Hello,
I am trying to do a basic thing but it's not working.
I would like to adverstived only IP address that is included in my LAN subnet. 198.168.10.1
The network command should be applicable -
router bgp xx
network 192.168.10.0 (no mask is required as its a classful subnet)
05-03-2022 02:08 AM
Hi Paul,
I just try in lab, but it's not working. only 198.168.10.0/24 is advertised.
05-03-2022 03:48 AM
Hello,
your drawing suggests some sort of LAN redundancy (HSRP/VRRP/GLBP) ?
As stated, when we have the full configs we can get a better picture and come up with an answer...
05-03-2022 02:11 AM
Hello,
post the full running configurations (sh run) of all 4 routers so we can lab this up...
05-03-2022 03:37 AM
Hello
@jean1 wrote:
I just try in lab, but it's not working. only 198.168.10.0/24 is advertised.
That is correct you only have 192.168.10/24 to advertise, are you saying you do NOT wish to advertise .250 if so that wont be applicable as rtr1 &2 lan interfaces are directly connected as such 192.168.10./24 subnet will be advertised
05-03-2022 04:26 AM
config your Null0
no shut the sub interface
do
show ip route 192.168.10.1 255.255.252.255 longer-prefixes
check which one will appear null0 or sub interface ??
05-03-2022 05:01 AM - edited 05-03-2022 05:02 AM
Hello MHM,
Configuration :
ip route 192.168.10.1 255.255.255.255 Null0
!
Router# sh ip route 192.168.10.1 255.255.255.255 longer-prefixes
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0/0.10
Router# sh ip route static
not present.
route is not detect as static but as local
Router# sh ip route connected | i 192.168.10
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0/0.10
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0/0.10
05-03-2022 05:43 AM
Hello,
are you doing this on 'real' routers, or are you working in a simulator ? Since you are using dot1q subinterfaces for the link coming from R3, what is R3...a layer 3 switch ? As stated before, seeing the full configs (sh run) of all devices would enable us to lab this up and give you an answer in probably 15 minutes...rather than the many hours you have already spent on this.
05-03-2022 05:59 AM
hello Georg,
This is not a simulator, I am testing this configuration on reals Cisco devices. Topology is just an example.
Lab is not hard, there is no specific configuration.
Just 2 routeurs with an ebgp peer and one LAN Connected. Try to annonce an IP /32 included in this LAN. For me is not possible.
This is the question.
05-03-2022 09:42 AM
There are several things I would comment on.
- In general your approach of a static route for a /32 with null 0 as the next hop should result in an entry in the routing table.
- However, as has been pointed out, the AD of a connected interface is more attractive than the AD of a static route. So in this particular case the static route for /32 is not present in the routing table.
- This explains why the attempt to redistribute static is not working. I would think that redistribute connected might succeed in advertising the address.
- I would expect that using the network statement in BGP for the /32 should work. Can you confirm that you configured BGP with the network statement but the route was not advertised?
If that is the case then please post the output of these commands
show ip route show run | section router show ip bgp sum show ip bgp neighbor show ip bgp neighbor 10.1.1.1 advertised-routes
05-03-2022 10:18 AM
Rick
That's the bit I am unsure of.
There is a directly connected route in the routing table for 192.168.10.1, it is the L route that IOS puts in there but it seems that is not included when BGP checks the IP routing table for a matching route.
Any ideas ?
Jon
05-03-2022 12:00 PM
Jon
I have never tried this approach but would expect that the network statement should work. But OP says it does not. I hoped that maybe it was a simulator thing, but apparently this is real equipment. It might be interesting to know what model router and what version of code is running.
If the OP has a support contract it might be interesting to know what TAC would say about this.
I would like to see the output of the commands that I requested, just to verify some things.
I wonder if debug for bgp might shed some light on this.
I would think that redistribute connected in bgp (perhaps filtered by a prefix list or route map) should advertise the /32.
I am not clear why the OP wants to advertise the router interface address to the DC but not the LAN subnet. But the question asked was if this is possible, and that is what we should focus on.
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