cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10645
Views
0
Helpful
12
Replies

Redistribute connected -- Eigrp

mahesh18
Level 6
Level 6

Hi Everyone,

Need to confirm use of command redistribute connected  while using between 2 Routers which are Eigrp Neis

R1  is Running EIGRP  and OSPF.

It is nei to R3 which is also running EIGRP and OSPF.

I am using redistribute command under EIGRP only

R1 Config

router eigrp 100

redistribute connected

network 13.13.13.1 0.0.0.0

network 100.100.100.100 0.0.0.0

network 101.101.101.101 0.0.0.0

no auto-summary

2691Router# sh run int loopback 6

Building configuration...

Current configuration : 95 bytes

!

interface Loopback6

description Tunnel0 Source IP

ip address 10.0.0.1 255.255.255.255

end

    sh ip int brief

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            70.x.x.100    YES DHCP   up                    up

Serial0/0                  192.168.1.1     YES NVRAM  down                  down

FastEthernet0/1            192.168.5.3     YES NVRAM  up                    up

FastEthernet1/0            192.168.6.3     YES NVRAM  up                    up

Serial1/0                  192.168.2.1     YES NVRAM  down                  down

FastEthernet1/1            192.168.7.1     YES NVRAM  administratively down down

Serial1/1                  192.168.9.3     YES NVRAM  down                  down

NVI0                       unassigned      NO  unset  up                    up

Loopback2                  2.2.2.2         YES NVRAM  up                    up

Loopback3                  3.3.3.3         YES NVRAM  up                    up

Loopback4                  4.4.4.4         YES NVRAM  up                    up

Loopback6                  10.0.0.1        YES manual up                    up

Loopback7                  100.100.100.100 YES manual up                    up

Loopback8                  101.101.101.101 YES manual up                    up

Loopback33                 unassigned      YES TFTP   up                    up

Loopback133                unassigned      YES TFTP   up                    up

Tunnel0                    13.13.13.1      YES manual up                    up

2691Router#

R1 has Tunnel connection to R3

R3 config

              sh ip route eigrp

     2.0.0.0/24 is subnetted, 1 subnets

D EX    2.2.2.0 [170/297372416] via 13.13.13.1, 04:59:12, Tunnel0

     100.0.0.0/32 is subnetted, 1 subnets

D       100.100.100.100 [90/297372416] via 13.13.13.1, 4d19h, Tunnel0

     70.0.0.0/22 is subnetted, 1 subnets

D EX    70.0.0.0 [170/297246976] via 13.13.13.1, 04:59:12, Tunnel0

     3.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

D EX    3.3.3.0/24 [170/297372416] via 13.13.13.1, 04:59:12, Tunnel0

     101.0.0.0/32 is subnetted, 1 subnets

D       101.101.101.101 [90/297372416] via 13.13.13.1, 4d19h, Tunnel0

     4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D EX    4.4.4.0/24 [170/297372416] via 13.13.13.1, 04:59:12, Tunnel0

So  on R3 we see routes for Loopback 2,3,4  as External routes in  R3

Its also showing Fa0/0 Route as external.

My question is when we use redistribute connected under EIGRP ----

    then  does  it redistribute all loopback and fast ethernet  interface IP addresses of that router?

it will exclude the connected interfaces of R1 which are used by other routing protocols like ospf right?

In this case R1 interface IP 192.168.5.3 and 4.3 which are running ospf and redistribute connected does not redistribute these addresses to R3 as these routes are used by OSPF right ?

LAst thing to know is why redistribute connected on one router shows route as D  EX   on other Routers  even though they are from Same routing

protocol EIGRP ?????Does it because we do not use network command under EIGRP ?????????????

Thanks

MAhesh

6 Accepted Solutions

Accepted Solutions

Nagendra Kumar Nainar
Cisco Employee
Cisco Employee

Hi,

When routing protocol A is redistributed into routing protocol B, it is basically a 2 step process a sbelow,

1. Redistribute all prefixes from RIB (routing table) which are learnt from A.

2. Redistribute all connected interface which are enabled with A.

Skip step 2 if you have "redistributed connected" already enabled under routing protocol B.

In your case, when you have OSPF redistributed into EIGRP, it will redistribute all OSPF learnt route from routing table (step 1) and all interfaces whcih are enabled with OSPF (step2).

HTH,

Nagendra

View solution in original post

Hi,

Per your confi (provided in the query), you have redistributed connected under eigrp. So all connected interface will be redistributed into EIGRP.

-Nagendra

View solution in original post

Reza Sharifi
Hall of Fame
Hall of Fame

Hi Mahesh,

My question is when we use redistribute connected under EIGRP ----

    then  does  it redistribute all loopback and fast ethernet  interface IP addresses of that router?

As soon you use the redistribute connected all connected interfaces will get redistribute it

it will exclude the connected interfaces of R1 which are used by other routing protocols like ospf right?

correct

In  this case R1 interface IP 192.168.5.3 and 4.3 which are running ospf  and redistribute connected does not redistribute these addresses to R3  as these routes are used by EIGRP right ?

correct

LAst  thing to know is why redistribute connected on one router shows route  as D  EX   on other Routers  even though they are from Same routing

protocol EIGRP ?????Does it because we do not use network command under EIGRP ?????????????

Correct, is you use the network command the neighbor routers sees it as internal EIGRP (90) when you use redistribute connected the neighbor router sees it as external (170)

HTH

Reza

View solution in original post

Hi,

On R1, you have OSPF enabled on loopback interface (3.3.3.3/24 and 4.4.4.4/24). By default, the network type for loopback interface on OSPF will be loopback which will advertise it as /32 irrespective of the actual mask you have configured.

In this case, R3 is receiving 3.3.3.3/32 and 4.4.4.4/32 (the mask is not /24) via OSPF while it is receiving 3.3.3.0/24 and 4.4.4.0/24 via EIGRP from R1.

So it installs ospf learnt /32 and EIGRP learnt /24 in RIB.

If a prefix of exact mask match is received from different protocol, AD will be considered. But if the mask is different, it will be tretaed as different prefix and will install bth as in your case.

HTH,

Nagendra

View solution in original post

Hi Mahesh,

If you want to see only the EIGRP router do a

sh ip route eigrp

If you want to see only the OSPF router do a

sh ip route OSPF

When you do

sh ip route,

it will show everything.

HTH

Reza

View solution in original post

Hi,

Second thing need to confirm is that OSPF always advertise Loopback interface as /32 mask right?

Yes. That is the default behaviour. You can change it by configuring "ip ospf network point-to-point" under loopback interface. This will make OSPF to advertise with actual mask (as configured in loopback).

HTH,

Nagendra

View solution in original post

12 Replies 12

Nagendra Kumar Nainar
Cisco Employee
Cisco Employee

Hi,

When routing protocol A is redistributed into routing protocol B, it is basically a 2 step process a sbelow,

1. Redistribute all prefixes from RIB (routing table) which are learnt from A.

2. Redistribute all connected interface which are enabled with A.

Skip step 2 if you have "redistributed connected" already enabled under routing protocol B.

In your case, when you have OSPF redistributed into EIGRP, it will redistribute all OSPF learnt route from routing table (step 1) and all interfaces whcih are enabled with OSPF (step2).

HTH,

Nagendra

Hi Nagendra,

I am redistributing between EIGRP processes not between EIgrp and OSPF.

Thanks

Mahesh

Hi,

Per your confi (provided in the query), you have redistributed connected under eigrp. So all connected interface will be redistributed into EIGRP.

-Nagendra

Reza Sharifi
Hall of Fame
Hall of Fame

Hi Mahesh,

My question is when we use redistribute connected under EIGRP ----

    then  does  it redistribute all loopback and fast ethernet  interface IP addresses of that router?

As soon you use the redistribute connected all connected interfaces will get redistribute it

it will exclude the connected interfaces of R1 which are used by other routing protocols like ospf right?

correct

In  this case R1 interface IP 192.168.5.3 and 4.3 which are running ospf  and redistribute connected does not redistribute these addresses to R3  as these routes are used by EIGRP right ?

correct

LAst  thing to know is why redistribute connected on one router shows route  as D  EX   on other Routers  even though they are from Same routing

protocol EIGRP ?????Does it because we do not use network command under EIGRP ?????????????

Correct, is you use the network command the neighbor routers sees it as internal EIGRP (90) when you use redistribute connected the neighbor router sees it as external (170)

HTH

Reza

Hi REza,

Thanks for reply.

But R3 router shows same route learned by OSPF  and EIGRP  from R2 and R1.

Here is more info

I have R1 connected to R3 by GRE Tunnel.

R1 is running EIGRP and OSPF.

R3 is also running EIGRP and OSPF.

R1 has OSPF connection to R2.

R2 has OSPF connection to R3.

R1 Config

router eigrp 100

redistribute connected

network 13.13.13.1 0.0.0.0

network 100.100.100.100 0.0.0.0

network 101.101.101.101 0.0.0.0

no auto-summary

!

router ospf 1

router-id 4.4.4.4

log-adjacency-changes

redistribute static metric 300 subnets

passive-interface Serial0/0

passive-interface Serial1/1

network 3.3.3.3 0.0.0.0 area 0

network 4.4.4.4 0.0.0.0 area 0

network 10.0.0.1 0.0.0.0 area 0

When i do sh ip route

On R3 it shows

  sh ip route

Codes: 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

Gateway of last resort is 192.168.4.2 to network 0.0.0.0

     200.200.200.0/32 is subnetted, 1 subnets

C       200.200.200.200 is directly connected, Loopback1

     201.201.201.0/32 is subnetted, 1 subnets

C       201.201.201.201 is directly connected, Loopback2

     2.0.0.0/24 is subnetted, 1 subnets

D EX    2.2.2.0 [170/297372416] via 13.13.13.1, 07:45:42, Tunnel0

     100.0.0.0/32 is subnetted, 1 subnets

D       100.100.100.100 [90/297372416] via 13.13.13.1, 4d22h, Tunnel0

     70.0.0.0/22 is subnetted, 1 subnets

D EX    70.0.0.0 [170/297246976] via 13.13.13.1, 07:45:42, Tunnel0

     3.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

O       3.3.3.3/32 [110/3] via 192.168.4.2, 02:11:20, FastEthernet0/0

D EX    3.3.3.0/24 [170/297372416] via 13.13.13.1, 07:45:42, Tunnel0

O       3.4.4.4/32 [110/2] via 192.168.4.2, 02:11:20, FastEthernet0/0

O    192.168.30.0/24 [110/2] via 192.168.4.2, 02:11:20, FastEthernet0/0

     101.0.0.0/32 is subnetted, 1 subnets

D       101.101.101.101 [90/297372416] via 13.13.13.1, 4d22h, Tunnel0

     64.0.0.0/32 is subnetted, 1 subnets

O E2    64.59.135.150 [110/300] via 192.168.4.2, 02:11:20, FastEthernet0/0

     4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

O       4.4.4.4/32 [110/3] via 192.168.4.2, 02:11:20, FastEthernet0/0

D EX    4.4.4.0/24 [170/297372416] via 13.13.13.1, 07:45:42, Tunnel0

     20.0.0.0/32 is subnetted, 1 subnets

C       20.0.0.1 is directly connected, Loopback0

O    192.168.10.0/24 [110/2] via 192.168.4.2, 02:11:20, FastEthernet0/0

     172.31.0.0/24 is subnetted, 4 subnets

O E2    172.31.3.0 [110/300] via 192.168.4.2, 02:11:20, FastEthernet0/0

O E2    172.31.2.0 [110/300] via 192.168.4.2, 02:11:20, FastEthernet0/0

O E2    172.31.1.0 [110/300] via 192.168.4.2, 02:11:20, FastEthernet0/0

O E2    172.31.0.0 [110/300] via 192.168.4.2, 02:11:20, FastEthernet0/0

O    192.168.11.0/24 [110/4] via 192.168.4.2, 02:11:20, FastEthernet0/0

O    192.168.98.0/24 [110/3] via 192.168.4.2, 02:11:20, FastEthernet0/0

     192.168.4.0/31 is subnetted, 1 subnets

C       192.168.4.2 is directly connected, FastEthernet0/0

O    192.168.99.0/24 [110/2] via 192.168.4.2, 02:11:21, FastEthernet0/0

O    192.168.20.0/24 [110/2] via 192.168.4.2, 02:11:21, FastEthernet0/0

     192.168.5.0/31 is subnetted, 1 subnets

O       192.168.5.2 [110/2] via 192.168.4.2, 02:11:21, FastEthernet0/0

     10.0.0.0/32 is subnetted, 1 subnets

O       10.0.0.1 [110/3] via 192.168.4.2, 02:11:21, FastEthernet0/0

     192.168.6.0/31 is subnetted, 1 subnets

O       192.168.6.2 [110/3] via 192.168.4.2, 02:11:21, FastEthernet0/0

     13.0.0.0/24 is subnetted, 1 subnets

C       13.13.13.0 is directly connected, Tunnel0

O*E2 0.0.0.0/0 [110/1] via 192.168.4.2, 02:11:21, FastEthernet0/0

My questions are why sh ip route shows route 3.3.3.3,4.4.4.4   learned both from OSPF and EIGRP  .

As  per my understanding sh ip route should show best routes in the  destination table but here it shows same route from 2 different  protocols.

Thanks

MAhesh

Now when i do sh ip route on R3 it shows

Hi,

On R1, you have OSPF enabled on loopback interface (3.3.3.3/24 and 4.4.4.4/24). By default, the network type for loopback interface on OSPF will be loopback which will advertise it as /32 irrespective of the actual mask you have configured.

In this case, R3 is receiving 3.3.3.3/32 and 4.4.4.4/32 (the mask is not /24) via OSPF while it is receiving 3.3.3.0/24 and 4.4.4.0/24 via EIGRP from R1.

So it installs ospf learnt /32 and EIGRP learnt /24 in RIB.

If a prefix of exact mask match is received from different protocol, AD will be considered. But if the mask is different, it will be tretaed as different prefix and will install bth as in your case.

HTH,

Nagendra

Hi Mahesh,

O       3.3.3.3/32 [110/3] via 192.168.4.2, 02:11:20, FastEthernet0/0

D EX    3.3.3.0/24 [170/297372416] via 13.13.13.1, 07:45:42, Tunnel0

The routing table will show both EIGRP and OSPF

In this case 3.3.3.3 is learned via OSPF because you use the network command and also 3.3.3.3 is learned via EIGRP because you use the redistributed connected command under EIGRP, but the the active route in the routing table is the one with lower admin distance.  In this case it is OSPF (110).

HTH

Reza

Hi Mahesh,

If you want to see only the EIGRP router do a

sh ip route eigrp

If you want to see only the OSPF router do a

sh ip route OSPF

When you do

sh ip route,

it will show everything.

HTH

Reza

Hi Reza,

Thanks for reply back.

When you said  --

but the the active route in the routing table is the one with lower admin distance.  In this case it is OSPF (110)

so when we do sh ip route it shows both the routes learned by OSPF and EIGRP - In this case both routes are there

Because 3.3.3.3  has Mask of /24  while using EIGRP and 3.3.3.3 ha smask of /32 while OSPF this is as per Nagendra above posts.

Second thing need to confirm is that OSPF always advertise Loopback interface as /32 mask right?

Thanks

MAhesh

Hi,

Second thing need to confirm is that OSPF always advertise Loopback interface as /32 mask right?

Yes. That is the default behaviour. You can change it by configuring "ip ospf network point-to-point" under loopback interface. This will make OSPF to advertise with actual mask (as configured in loopback).

HTH,

Nagendra

Hi Nagendra,

Many thanks for great explanation.

Now all my queries are cleared.

Best regards

MAhesh

Hi Reza,

Many thanks again for helping me out.

Best Regards

MAhesh

Review Cisco Networking for a $25 gift card