1

This is my test topology:

enter image description here

this is my Routers' detail configuration:

<R1>display current-configuration 
#
sysname R1
#
router id 1.1.1.1
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
 local-user admin service-type http
#
firewall zone Local
 priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
 link-protocol ppp
#
interface Serial0/0/1
 link-protocol ppp
#
interface Serial0/0/2
 link-protocol ppp
#
interface Serial0/0/3
 link-protocol ppp
#
interface GigabitEthernet0/0/0
 ip address 10.1.12.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
#
interface LoopBack1
 ip address 100.1.1.1 255.255.255.255
#
interface LoopBack2
 ip address 100.1.2.1 255.255.255.255
#
bgp 100
 peer 10.1.12.2 as-number 200
 #
 ipv4-family unicast
  undo synchronization
  network 1.1.1.1 255.255.255.255
  network 100.1.1.1 255.255.255.255
  network 100.1.2.1 255.255.255.255
  peer 10.1.12.2 enable
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
<R2>dis current-configuration 
#
sysname R2
#
router id 2.2.2.2
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
 local-user admin service-type http
#
firewall zone Local
 priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
 link-protocol ppp
#
interface Serial0/0/1
 link-protocol ppp
#
interface Serial0/0/2
 link-protocol ppp
#
interface Serial0/0/3
 link-protocol ppp
#
interface GigabitEthernet0/0/0
 ip address 10.1.12.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 10.1.23.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255
#
bgp 200
 peer 3.3.3.3 as-number 200
 peer 3.3.3.3 connect-interface LoopBack0
 peer 4.4.4.4 as-number 200
 peer 4.4.4.4 connect-interface LoopBack0
 peer 10.1.12.1 as-number 100
 #
 ipv4-family unicast
  undo synchronization
  network 2.2.2.2 255.255.255.255
  peer 3.3.3.3 enable
  peer 3.3.3.3 next-hop-local
  peer 4.4.4.4 enable
  peer 4.4.4.4 next-hop-local
  peer 10.1.12.1 enable
#
ospf 1
 area 0.0.0.1
  network 2.2.2.2 0.0.0.0
  network 10.1.23.0 0.0.0.255
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
<R3>dis current-configuration 
#
sysname R3
#
router id 3.3.3.3
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
 local-user admin service-type http
#
firewall zone Local
 priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
 link-protocol ppp
#
interface Serial0/0/1
 link-protocol ppp
#
interface Serial0/0/2
 link-protocol ppp
#
interface Serial0/0/3
 link-protocol ppp
#
interface GigabitEthernet0/0/0
 ip address 10.1.34.3 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 10.1.23.3 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255
#
bgp 200
 peer 2.2.2.2 as-number 200
 peer 2.2.2.2 connect-interface LoopBack0
 peer 4.4.4.4 as-number 200
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 3.3.3.3 255.255.255.255
  peer 2.2.2.2 enable
  peer 4.4.4.4 enable
#
ospf 1
 area 0.0.0.1
  network 3.3.3.3 0.0.0.0
  network 10.1.23.0 0.0.0.255
  network 10.1.34.0 0.0.0.255
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
<R4>dis current-configuration 
#
sysname R4
#
router id 4.4.4.4
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
 local-user admin service-type http
#
firewall zone Local
 priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
 link-protocol ppp
#
interface Serial0/0/1
 link-protocol ppp
#
interface Serial0/0/2
 link-protocol ppp
#
interface Serial0/0/3
 link-protocol ppp
#
interface GigabitEthernet0/0/0
 ip address 10.1.34.4 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.255
#
bgp 200
 peer 2.2.2.2 as-number 200
 peer 2.2.2.2 connect-interface LoopBack0
 peer 3.3.3.3 as-number 200
 peer 3.3.3.3 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 4.4.4.4 255.255.255.255
  peer 2.2.2.2 enable
  peer 3.3.3.3 enable
#
ospf 1
 area 0.0.0.1
  network 4.4.4.4 0.0.0.0
  network 10.1.34.0 0.0.0.255
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return

The issue is:

In my option, all the loopback's network will be valid(*), why it like this?

<R1>dis bgp routing-table 

 BGP Local router ID is 1.1.1.1 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 4
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   1.1.1.1/32         0.0.0.0         0                     0      i
 *>   2.2.2.2/32         10.1.12.2       0                     0      200i
 *>   100.1.1.1/32       0.0.0.0         0                     0      i
 *>   100.1.2.1/32       0.0.0.0         0                     0      i
<R2>dis bgp routing-table 

 BGP Local router ID is 2.2.2.2 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 6
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   1.1.1.1/32         10.1.12.1       0                     0      100i
 *>   2.2.2.2/32         0.0.0.0         0                     0      i
   i  3.3.3.3/32         3.3.3.3         0          100        0      i
   i  4.4.4.4/32         4.4.4.4         0          100        0      i
 *>   100.1.1.1/32       10.1.12.1       0                     0      100i
 *>   100.1.2.1/32       10.1.12.1       0                     0      100i
<R3>dis bgp routing-table 

 BGP Local router ID is 3.3.3.3 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 6
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>i  1.1.1.1/32         2.2.2.2         0          100        0      100i
   i  2.2.2.2/32         2.2.2.2         0          100        0      i
 *>   3.3.3.3/32         0.0.0.0         0                     0      i
   i  4.4.4.4/32         4.4.4.4         0          100        0      i
 *>i  100.1.1.1/32       2.2.2.2         0          100        0      100i
 *>i  100.1.2.1/32       2.2.2.2         0          100        0      100i
<R4>dis bgp routing-table 

 BGP Local router ID is 4.4.4.4 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 6
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>i  1.1.1.1/32         2.2.2.2         0          100        0      100i
   i  2.2.2.2/32         2.2.2.2         0          100        0      i
   i  3.3.3.3/32         3.3.3.3         0          100        0      i
 *>   4.4.4.4/32         0.0.0.0         0                     0      i
 *>i  100.1.1.1/32       2.2.2.2         0          100        0      100i
 *>i  100.1.2.1/32       2.2.2.2         0          100        0      100i

EDIT-01

I have several questions:

  1. when I in iBGP router R3 announce network 3.3.3.3 32, whether means the R3-iBGP learned the 3.3.3.3/32?

  2. if R1 want to access the 10.1.34.4/24, so I need to announce 10.1.34.0/24 in R2 rather than in R4 or R3, right?

  3. I still have a doubt, when I in R3 or R4 network 10.1.34.0 24, in R1 it's a valid route, but why not 3.3.3.3/32 nor 4.4.4.4/32? I think the networks have no difference in the AS.

4
  • Please edit the question to include the router configurations.
    – Ron Maupin
    Commented Mar 24, 2021 at 12:44
  • 1
    We really need the full configurations. We need to be able to relate the rest of the configurations to the routing configuration.
    – Ron Maupin
    Commented Mar 24, 2021 at 14:00
  • @RonMaupin Thanks your patience. I have updated my post.
    – 244boy
    Commented Mar 25, 2021 at 3:47
  • Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
    – Ron Maupin
    Commented Dec 23, 2021 at 17:17

2 Answers 2

2

Your additional questions:

when I in iBGP router R3 announce network 3.3.3.3 32, whether means the R3-iBGP learned the 3.3.3.3/32?

You are announcing 3.3.3.3, so yes it's in the BGP table.

if R1 want to access the 10.1.34.4/24, so I need to announce 10.1.34.0/24 in R2 rather than in R4 or R3, right?

No. Normally, you would advertise the network from all connected routers (R3 and R4). But in this case, R4 depends on R3 to talk to R2, so not much point for R4 to advertise. R2 will advertise the route to R1 because R1 is an eBGP peer.

A better solution is to make R3 a route reflector.

4
  • announcing 10.1.34.4/24 in R3 or R4 have no differences, right? and please explain my addition 3th question.
    – 244boy
    Commented Mar 25, 2021 at 16:53
  • I've updated the answer.
    – Ron Trunk
    Commented Mar 25, 2021 at 17:18
  • when R3 learned the3.3.3.3/32 it do not send to a BGP router, right?
    – 244boy
    Commented Mar 26, 2021 at 3:46
  • You have 3.3.3.3 in the network statement, so yes, R3 sources the announcement.
    – Ron Trunk
    Commented Mar 26, 2021 at 11:49
1

Do you know about the iBGP rule? A route learned from iBGP cannot be passed via iBGP to another router in the same AS. That is to prevent routing loops, and why you should use an IGP inside an AS. Routes learned via eBGP can be passed via iBGP with no problem, but routes learned via iBGP cannot.

For example R3 learning about the R4 loopback via iBGP cannot tell R2 about that loopback via iBGP, and vice versa.

There are mitigations such as route reflectors and confederations to get around the rule without causing a possible loop. You could configure R3 as a route reflector. In reality, you would use an IGP inside your AS for your internal routing, and iBGP to tell the routers about the eBGP-learned routes.

1
  • thanks your answer, I have two points want to verify my understanding, please see my edit.
    – 244boy
    Commented Mar 25, 2021 at 16:39

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.