1

My topo is as follows, enter image description here

following is my configuration, although bgp command network is without mask, it could advertise classful address 10.0.0.0

R1#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback0
L        1.1.1.1/32 is directly connected, Loopback0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/24 is directly connected, Ethernet1/0
L        10.0.0.254/32 is directly connected, Ethernet1/0
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.12.0/24 is directly connected, Ethernet0/0
L        192.168.12.1/32 is directly connected, Ethernet0/0
R1#
R1#show running-config | section bgp
router bgp 100
 bgp log-neighbor-changes
 network 10.0.0.0
 neighbor 192.168.12.2 remote-as 200
R1#

but when I put show ip bgp, there was nothing

R1#show ip bgp
R1#

From my perspective, there should be one bgp route about 10.0.0.0, but why there is nothing? any idea?

Thanks a lot in advance.

The followings are what I configured on both routers, any other configuration are by default.

R1:

interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface Ethernet0/0
 ip address 192.168.12.1 255.255.255.0
 duplex auto
!
interface Ethernet0/1
 no ip address
 shutdown
 duplex auto
!
interface Ethernet0/2
 no ip address
 shutdown
 duplex auto
!
interface Ethernet0/3
 no ip address
 shutdown
 duplex auto
!
interface Ethernet1/0
 ip address 10.0.0.254 255.255.255.0
 duplex auto
!
router bgp 100
 bgp log-neighbor-changes
 network 10.0.0.0
 neighbor 192.168.12.2 remote-as 200
!

R2:

interface Loopback0
 ip address 2.2.2.2 255.255.255.0
!
interface Ethernet0/0
 ip address 192.168.12.2 255.255.255.0
 duplex auto
!
router bgp 200
 bgp log-neighbor-changes
 neighbor 192.168.12.1 remote-as 100
!
9
  • Please include all the router configurations for both routers, and include and show commands for BGP neighbors.
    – Ron Maupin
    Dec 12, 2023 at 15:26
  • And specifically the router platform in use (Nexus, ASR, Catalyst, etc.) Dec 12, 2023 at 15:28
  • @RonMaupin here is R2's configuration''' R2#sh running-config | section bgp router bgp 200 bgp log-neighbor-changes neighbor 192.168.12.1 remote-as 100 R2# '''
    – Ben
    Dec 12, 2023 at 15:33
  • @FrameHowitzer I used virtual simulator, not real cisco router, but it's just basic bgp configuration
    – Ben
    Dec 12, 2023 at 15:36
  • Do a show running-config in each router, copy the results, and paste them into the question using the pref-formatted Text option.
    – Ron Maupin
    Dec 12, 2023 at 15:37

1 Answer 1

2

Your problem looks like you do not have 10.0.0.0/8 in your routing table, so BGP will not advertise it. BGP only advertises and exact match in the routing table.

Unlike IGP, where the network statement are only to tell which interfaces to use, and the networks are taken from the interfaces, BGP advertises networks, but the network must already exist in the routing table. You only have 10.0.0.0/24 in the routing table, but that does not match the 10.0.0.0/8 network you are tying to advertise, so it will not be advertised.

2
  • it was my misunderstanding, many thanks
    – Ben
    Dec 12, 2023 at 16:59
  • You can also use the configuration under the BGP section 'redistribute connected' to have BGP redistribute route information for connected networks (and/or 'redistribute static' for static route information) but it is not preferred over the network statement because it can result in less control over the routes in the BGP table. Another approach is to use a route-map and prefix-list design to limit the routes added to BGP. Ultimately, if you use network statements, they need to match the networks you have in use. Dec 12, 2023 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.