09-24-2003 11:54 PM - edited 03-02-2019 10:34 AM
think we have the topology as figure:
`````````D------------|
`````````|`````````````|
```|-----|------|``````|
```|````````````|``````|
```|````````````|``````|
```A-----------B`````|
```|````````````|``````|
```|````````````|``````|
```|-----C-----|``````|
`````````|`````````````|
`````````|-------------|
AD BD CD use EBGP
AB use IBGP
AC BC use IGP
D advertise network C to A with MED 100 ,to B with MED 50.
from A's view,it would see three path to C.
one is EBGP to D with MED 100 & administrator distance 20,
one is IBGP to B with MED 50 & administrator distance 200,
one is IGP such as ospf to C with administrator distance 110.
right?
so which one would A choose to get to C???
why?
Solved! Go to Solution.
09-25-2003 11:21 AM
No, you're not stupid or confused. The admin distance is only compared between routes that are installed in the table, or attempted to be installed. So, think of it as seperate processes.... It's hard to draw here, since the formatting messes up, but I'll try....
(1) receive route->(2)best path->(3)install in routing table
So, at 1, all the routes from a particular protocol are received by each protocol. In 2, each protocol compares the paths it has in the local protocol table, such as the bgp table, and decides which path is best. In 3, the protocol attempts to install the route in the routing table. In this case, BGP doesn't attempt to install the eBGP route in the table, because it's not the best path in the local BGP table.
When it attempts to install the iBGP route, however, the OSPF route wins. The eBGP route doesn't matter, because BGP never attempts to install it.
:-)
Russ.W
09-25-2003 04:02 AM
The eBGP route, because the admin distance is lowest.
A:
!
interface FastEthernet0/0
ip address 208.0.6.10 255.255.255.0
!
interface FastEthernet0/1
ip address 208.0.0.10 255.255.255.0
!
interface Serial0/2
ip address 208.0.12.10 255.255.255.0
!
router ospf 100
log-adjacency-changes
network 208.0.6.0 0.0.0.255 area 0
!
router bgp 65000
neighbor 208.0.0.13 remote-as 65001
neighbor 208.0.12.11 remote-as 65000
B:
!
interface FastEthernet0/0
ip address 208.0.6.11 255.255.255.0
!
interface FastEthernet0/1
ip address 208.0.0.11 255.255.255.0
!
interface Serial0/3
ip address 208.0.12.11 255.255.255.0
!
router ospf 100
log-adjacency-changes
network 208.0.6.0 0.0.0.255 area 0
!
router bgp 65000
neighbor 208.0.0.13 remote-as 65001
neighbor 208.0.12.10 remote-as 65000
C:
!
interface FastEthernet0/0
ip address 208.0.6.12 255.255.255.0
!
interface FastEthernet0/1
ip address 208.0.0.12 255.255.255.0
!
interface Serial0/0
ip address 208.0.9.12 255.255.255.0
!
interface Serial0/2
ip address 208.0.14.12 255.255.255.0
!
router ospf 100
log-adjacency-changes
network 208.0.6.0 0.0.0.255 area 0
network 208.0.9.0 0.0.0.255 area 0
!
router bgp 65002
network 208.0.9.0
neighbor 208.0.14.13 remote-as 65001
D:
!
interface FastEthernet0/1
ip address 208.0.0.13 255.255.255.0
!
interface Serial0/3
ip address 208.0.14.13 255.255.255.0
!
router bgp 65001
neighbor 208.0.0.10 remote-as 65000
neighbor 208.0.0.11 remote-as 65000
neighbor 208.0.14.12 remote-as 65002
A:
2651A#sho ip route
....
C 208.0.12.0/24 is directly connected, Serial0/2
B 208.0.9.0/24 [20/0] via 208.0.0.13, 00:14:58
C 208.0.6.0/24 is directly connected, FastEthernet0/0
C 208.0.0.0/24 is directly connected, FastEthernet0/1
Russ.W
09-25-2003 05:36 AM
but I see the document of bgp ,it list the sequence of BGP path decision.the "med" is prior to the "EBGP path or IBGP path",accord to this rule,since A->B med is small than A->D med,it will choose the A->B path.
Do I make some misunderstand?
09-25-2003 06:03 AM
ebgp path/ibgp path is different than administrative distance, path refers to an order of as's to reach another as, distance is locally significant and is used to determine which routes are used to populate routing table. and I actually thought that the order was weight, local preference, origin,as-path, then med with med being last.
09-25-2003 06:11 AM
Aha! I thought you were focusing on the IGP vs eBGP route, not the MEDs. :-( I've reconfigured the lab to include the MEDs, and the iBGP route does win over the eBGP route. So, the iBGP route is preferred within BGP. The actual result is that the OSPF is installed in my lab, however, because I see a next hop mismatch, with OSPF winning in the routing table.
Russ.W
09-25-2003 11:09 AM
ok, so now I feel stupid and confused, you're saying that if there is an ibgp route and an ebgp route, that med's are looked at before administrative distance?
09-25-2003 11:21 AM
No, you're not stupid or confused. The admin distance is only compared between routes that are installed in the table, or attempted to be installed. So, think of it as seperate processes.... It's hard to draw here, since the formatting messes up, but I'll try....
(1) receive route->(2)best path->(3)install in routing table
So, at 1, all the routes from a particular protocol are received by each protocol. In 2, each protocol compares the paths it has in the local protocol table, such as the bgp table, and decides which path is best. In 3, the protocol attempts to install the route in the routing table. In this case, BGP doesn't attempt to install the eBGP route in the table, because it's not the best path in the local BGP table.
When it attempts to install the iBGP route, however, the OSPF route wins. The eBGP route doesn't matter, because BGP never attempts to install it.
:-)
Russ.W
09-25-2003 05:40 PM
yes!
I got it!
you explain it so clearly! :)
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