Re: IP redirect with OSPF IGP

From: Ben (bmunyao@gmail.com)
Date: Wed Jul 25 2007 - 15:49:52 ART


Bit,
Hmmm... You are right, newer ios versions seem to always set the forwarding
address, regardless of how ospf was configured for the interface. I had
IOS12.0 on the routers I used to test this feature.

Thanks Bit

Ben.

On 7/25/07, Bit Gossip <bit.gossip@chello.nl> wrote:
>
> Hi Ben,
> this is really very interesting: I have re-labbed it and I have same
> result.
> I think at this point that there is a difference in behaviour between IOS
> versions. On R1, which is the one that matters here, I am running:
> c2600-advipservicesk9-mz.124-12.bin.
> The behaviour seems to be inline with:
>
> http://cisco.com/en/US/partner/tech/tk365/technologies_tech_note09186a008009405a.shtml
> Thanks,
> Bit
>
>
> r2#show ip route
> <...>
> 10.0.0.0/24 is subnetted, 2 subnets
> O E2 10.1.3.0 [110/20] via 10.1.1.3, 06:25:42, FastEthernet0/0
> C 10.1.1.0 is directly connected, FastEthernet0/0
> r2#show ip route 10.1.3.0
> Routing entry for 10.1.3.0/24
> Known via "ospf 1", distance 110, metric 20, type extern 2, forward
> metric
> 1
> Last update from 10.1.1.3 on FastEthernet0/0, 06:25:55 ago
> Routing Descriptor Blocks:
> * 10.1.1.3, from 10.1.1.1, 06:25:55 ago, via FastEthernet0/0
> Route metric is 20, traffic share count is 1
>
> Here are the configs:
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R1
>
> interface FastEthernet0/0
> ip address 10.1.1.1 255.255.255.0
> speed 100
> full-duplex
> !
> router ospf 1
> log-adjacency-changes
> redistribute rip subnets
> network 10.1.1.1 0.0.0.0 area 0
> !
> router rip
> version 2
> network 10.0.0.0
> no auto-summary
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R2
>
> interface FastEthernet0/0
> ip address 10.1.1.2 255.255.255.0
> duplex full
> !
> router ospf 1
> log-adjacency-changes
> network 0.0.0.0 255.255.255.255 area 0
> !
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R3
>
> interface Loopback0
> ip address 10.1.3.3 255.255.255.0
> !
> interface FastEthernet1/0
> ip address 10.1.1.3 255.255.255.0
> duplex full
> !
> router rip
> version 2
> network 10.0.0.0
> no auto-summary
> !
>
> ----- Original Message -----
> From: "Ben" <bmunyao@gmail.com>
> To: "Bit Gossip" <bit.gossip@chello.nl>
> Cc: "Cisco certification" <ccielab@groupstudy.com>
> Sent: Wednesday, July 25, 2007 10:56 AM
> Subject: Re: IP redirect with OSPF IGP
>
>
> > Hi Bit
> > Thank you for responding.
> > I had not tried it before, but after your post, I did and here is what I
> > got.
> >
> > When I used "net 10.1.1.1 0.0.0.0 area 0" on R1, R2 forwards to the
> external
> > network 192.168.2.0 via R1, as shown below.
> >
> > R1#sh run
> > Building configuration...
> > ...
> > !
> > interface FastEthernet0/0
> > ip address 10.1.1.1 255.255.255.0
> > speed auto
> > half-duplex
> > !
> > ...
> > !
> > router ospf 1
> > router-id 1.1.1.1
> > log-adjacency-changes
> > redistribute rip subnets
> > network 10.1.1.1 0.0.0.0 area 0
> > !
> > router rip
> > version 2
> > network 10.0.0.0
> > no auto-summary
> > !
> > ip classless
> > !
> > ...
> >
> >
> > R1#sh ip route
> >
> > Gateway of last resort is not set
> >
> > 10.0.0.0/24 is subnetted, 1 subnets
> > C 10.1.1.0 is directly connected, FastEthernet0/0
> > R 192.168.2.0/24 [120/1] via 10.1.1.3, 00:00:03, FastEthernet0/0
> > 150.4.0.0/16 is variably subnetted, 3 subnets, 2 masks
> >
> > R1#
> >
> > R2#
> > R2#sh run
> >
> > ...
> > !
> > interface Ethernet0
> > ip address 10.1.1.2 255.255.255.0
> > no ip directed-broadcast
> > !
> > ...
> > !
> > router ospf 1
> > router-id 2.2.2.2
> > network 10.1.1.2 0.0.0.0 area 0
> > !
> > ip classless
> > !
> >
> > R2#
> > R2#sh ip route
> > !
> > ...
> > Gateway of last resort is not set
> >
> > 10.0.0.0/24 is subnetted, 1 subnets
> > C 10.1.1.0 is directly connected, Ethernet0
> > O E2 192.168.2.0/24 [110/20] via 10.1.1.1, 00:12:27, Ethernet0
> > 150.4.0.0/16 is variably subnetted, 2 subnets, 2 masks
> >
> > R2#
> >
> > R2#sh ip route 192.168.2.0
> > Routing entry for 192.168.2.0/24
> > Known via "ospf 1", distance 110, metric 20, type extern 2, forward
> metric
> > 10
> > Redistributing via ospf 1
> > Last update from 10.1.1.1 on Ethernet0, 00:14:00 ago
> > Routing Descriptor Blocks:
> > * 10.1.1.1, from 1.1.1.1, 00:14:00 ago, via Ethernet0
> > Route metric is 20, traffic share count is 1
> >
> > R2#
> >
> >
> > R3#
> > R3#sh run
> >
> > ...
> > !
> > interface Loopback10
> > ip address 192.168.2.1 255.255.255.0
> > !
> > ...
> > !
> > interface Ethernet0
> > ip address 10.1.1.3 255.255.255.0
> > !
> > ...
> > !
> > router rip
> > version 2
> > network 10.0.0.0
> > network 192.168.2.0
> > no auto-summary
> > !
> >
> > I then changed the network statement on R1 to include the whole subnet,
> and
> > indeed the next hop on R2 changed as indicated below.
> >
> > R1#conf t
> > Enter configuration commands, one per line. End with CNTL/Z.
> > R1(config)#router ospf 1
> > R1(config-router)#no network 10.1.1.1 0.0.0.0 area 0
> > R1(config-router)#net
> > 00:25:29: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0 from
> > FULL to DOWN, Neighbor Down: Interface down or detached
> > R1(config-router)#net 10.1.1.0 0.0.0.255 area 0
> > R1(config-router)#^Z
> > R1#
> > 00:25:45: %SYS-5-CONFIG_I: Configured from console by cisco on console
> > R1#
> > 00:25:53: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0 from
> > LOADING to FULL, Loading Done
> >
> >
> > R2#
> > R2#sh ip route
> >
> > ...
> > Gateway of last resort is not set
> >
> > 10.0.0.0/24 is subnetted, 1 subnets
> > C 10.1.1.0 is directly connected, Ethernet0
> > O E2 192.168.2.0/24 [110/20] via 10.1.1.3, 00:05:25, Ethernet0
> > R2#
> > R2#
> > R2#sh ip route 192.168.2.0
> > Routing entry for 192.168.2.0/24
> > Known via "ospf 1", distance 110, metric 20, type extern 2, forward
> metric
> > 10
> > Redistributing via ospf 1
> > Last update from 10.1.1.3 on Ethernet0, 00:06:08 ago
> > Routing Descriptor Blocks:
> > * 10.1.1.3, from 1.1.1.1, 00:06:08 ago, via Ethernet0
> > Route metric is 20, traffic share count is 1
> >
> > R2#
> >
> > Remember R3 is not running ospf.
> >
> > Ben
> >
> > PS: The source I got this information from was NMC.
> >
> >
> >
> >
> > On 7/24/07, Bit Gossip <bit.gossip@chello.nl> wrote:
> > >
> > > I have labbed your setup and in both cases I have R2 sending directly
> to
> > > R3
> > > because R1 set R3 as forward-address in its update to R2.
> > > So no intervention of ICMP in any case.
> > >
> > > r2#show ip ospf database external
> > >
> > > OSPF Router with ID (10.10.4.2) (Process ID 1)
> > >
> > > Type-5 AS External Link States
> > >
> > > Routing Bit Set on this LSA
> > > LS age: 57
> > > Options: (No TOS-capability, DC)
> > > LS Type: AS External Link
> > > Link State ID: 10.1.3.0 (External Network Number )
> > > Advertising Router: 10.1.1.1
> > > LS Seq Number: 80000001
> > > Checksum: 0x7AFB
> > > Length: 36
> > > Network Mask: /24
> > > Metric Type: 2 (Larger than any link state path)
> > > TOS: 0
> > > Metric: 20
> > > Forward Address: 10.1.1.3
> > > External Route Tag: 0
> > >
> > > The only way I can think to force R1 not to set the forward address is
> to
> > > change the OSPF network type to P2P or P2M on R1 and R2
> > >
> > > r2#show ip route ospf
> > > 10.0.0.0/24 is subnetted, 2 subnets
> > > O E2 10.1.3.0 [110/20] via 10.1.1.1, 00:00:13, FastEthernet0/0
> > >
> > > r2#show ip ospf database external
> > >
> > > OSPF Router with ID (10.10.4.2) (Process ID 1)
> > >
> > > Type-5 AS External Link States
> > >
> > > Routing Bit Set on this LSA
> > > LS age: 54
> > > Options: (No TOS-capability, DC)
> > > LS Type: AS External Link
> > > Link State ID: 10.1.3.0 (External Network Number )
> > > Advertising Router: 10.1.1.1
> > > LS Seq Number: 80000002
> > > Checksum: 0xC6BD
> > > Length: 36
> > > Network Mask: /24
> > > Metric Type: 2 (Larger than any link state path)
> > > TOS: 0
> > > Metric: 20
> > > Forward Address: 0.0.0.0
> > > External Route Tag: 0
> > >
> > > In this case indeed ICMP comes into play
> > >
> > > r2#ping 10.1.3.3
> > >
> > > Type escape sequence to abort.
> > > Sending 5, 100-byte ICMP Echos to 10.1.3.3, timeout is 2 seconds:
> > > !!!!!
> > > Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
> > > r2#
> > > *Jul 24 14:33:38.271: ICMP: redirect rcvd from 10.1.1.1- for 10.1.3.3
> use
> > > gw
> > > 10.1.1.3
> > > *Jul 24 14:33:38.275: ICMP: echo reply rcvd, src 10.1.3.3, dst
> 10.1.1.2
> > >
> > > ----- Original Message -----
> > > From: "Ben" <bmunyao@gmail.com>
> > > To: "Cisco certification" <ccielab@groupstudy.com>
> > > Sent: Saturday, July 21, 2007 3:16 PM
> > > Subject: IP redirect with OSPF IGP
> > >
> > >
> > > > Hi
> > > >
> > > > Sometime back, I came across this interesting piece of information
> on
> > > the
> > > > use of OSPF on a multiaccess segment (Ethernet):
> > > >
> > > > R2
> > > > |
> > > > | 10.1.1.0/24
> > > > ---------------------------------------------
> > > > | |
> > > > | |
> > > > R1 R3
> > > > |
> > > > --------------
> > > > 10.1.3.0/24
> > > >
> > > > R1,R2 running OSPF, R1,R3 running RIP. if you use "net 10.1.1.1
> 0.0.0.0
> > > > area
> > > > 0" to enable ospf on R1, then R2 will forward traffic for
> 10.1.3.0/24
> to
> > > > R1,
> > > > R1 will send an icmp redirect to R2, informing it that R3 is
> metrically
> > > > closer to the destination.
> > > >
> > > > What I didn't know was that if instead you use "net 10.1.1.0
> 0.0.0.255
> > > > area
> > > > 0" on R1, R2 will no longer send traffic to 10.1.3.0 via R1, and
> will
> > > > instead learn dynamically the metrically closer next-hop of 10.1.1.3
> > > > through
> > > > OSPF, thus saving one hop.
> > > >
> > > > Does anyone have variations of this scenario I could try out, to
> test
> > > this
> > > > concept.
> > > >
> > > > TIA
> > > > Ben
> > > >
> > > >
> _______________________________________________________________________
> > > > Subscription information may be found at:
> > > > http://www.groupstudy.com/list/CCIELab.html
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Sat Aug 18 2007 - 08:17:42 ART