[Xorp-users] Route Redist between RIP and OSPF - working?

David Davidson david at commroom.net
Thu Apr 12 21:49:29 PDT 2012


Hey Folks,

Yes, same here. Thank you Steve for identifying this and helping to find 
a solution.

Thank you folks for all your hard work and troubleshooting this. And 
thanks to Igor for the patches and thanks to Ben also.

The attachment works as shown. I removed the OSPF interface (notice the 
commented lines) and it still works the way I would expect, after 
applying the patches. Thank you again!

David


On 04/10/2012 02:36 PM, swdickey at rockwellcollins.com wrote:
> This fixes my issue.
>
> Thanks Igor and to the others who helped with this.
>
> Steve
>
>
> *Igor Maravic' <igorm at etf.rs>*
>
> 04/10/2012 08:57 AM
> Please respond to
> igorm at etf.rs
>
>
> 	
> To
> 	xorp-users at xorp.org, xorp-users at icir.org, xorp-hackers at icir.org
> cc
> 	swdickey at rockwellcollins.com, david at commroom.net
> Subject
> 	Route Redist between RIP and OSPF - working?
>
>
>
> 	
>
>
>
>
>
> Hi all,
> I think that I found solution to this problem :)
>
> I started looking where Steve stopped
> (PolicyRedistTable<A>::replace_policytags function).
> It was just the tip of the iceberg.
>
> Problem was that protocol's existing EXPORT_SOURCE match policies
> weren't refreshed when new export filter is created.
> In this case problem was with exporting to "connected" protocol.
>
> New protocol always has accurate policy tags for route lookup. It
> always searches routes that has no tag, or
> older protocol tags or it's tags. If it finds them it prepends it's tag.
> Older protocols are searching routes that has no tags, or have older
> tags. If it finds such a route it prepends it's tag.
>
> EXPORT_SOURCEMATCH policies are executed in order that depends on 
> protocol name.
> If newer protocol has lower letter (for example ospf's policies are
> executed before rip's, because "o" precedes "r"),
> new protocol prepends new tags, that are unrecognizable to older
> protocol, to routes that it has found.
> Because older protocol is unaware of new tags, it concludes that
> routes are deleted and it deletes them.
> This is not what we are expecting.
>
> If older protocol is executed first, it prepends it's tag to routes
> that it has found. Because old tag is recognizable by
> newer protocol new tags are also prepended to routes. This case works
> as expected.
>
> Solution - refresh tags for all protocol's EXPORT_SOURCEMATCH routes
> when new export filter is created.
>
> I'm sending patch to xorp-hackers list.
>
> I tested it for simple solutions, so it does need more testing :)
>
> It would be nice if someone would post more complicated policies to
> test this issue.
>
> BR
> Igor
>
>
>
>
> _______________________________________________
> Xorp-users mailing list
> Xorp-users at xorp.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20120412/bf756033/attachment.html 
-------------- next part --------------
##########################
#xorp1
##########################
configure exclusive
set rtrmgr config-directory /etc/xorp
set protocols ospf4 router-id 192.168.30.1
set protocols ospf4 area 0.0.0.0 interface eth0 vif eth0 address 192.168.30.1 disable false
set protocols ospf4 area 0.0.0.0 interface eth1 vif eth1 address 172.16.1.1 disable false
set interfaces interface eth0 vif eth0 address 192.168.30.1 prefix-length 24
set interfaces interface eth1 vif eth1 address 172.16.1.1 prefix-length 24
set fea unicast-forwarding4 disable false
commit
exit configuration-mode



##########################
#xorp2
##########################
configure exclusive
set rtrmgr config-directory /etc/xorp
set protocols ospf4 router-id 192.168.30.2
set protocols ospf4 area 0.0.0.0 interface eth0 vif eth0 address 192.168.30.2 disable false

#set protocols ospf4 area 0.0.0.0 interface eth1 vif eth1 address 192.168.40.1 disable false
#set protocols ospf4 area 0.0.0.0 interface eth1 vif eth1 address 192.168.40.1 passive

set protocols rip interface eth1 vif eth1 address 192.168.40.1 disable false
set interfaces interface eth0 vif eth0 address 192.168.30.2 prefix-length 24
set interfaces interface eth1 vif eth1 address 192.168.40.1 prefix-length 24
set policy policy-statement OSPF-to-RIP term 10 from protocol ospf4
set policy policy-statement OSPF-to-RIP term 20 from protocol connected
set policy policy-statement OSPF-to-RIP then accept
set policy policy-statement RIP-to-OSPF term 10 from protocol rip
set policy policy-statement RIP-to-OSPF term 20 from protocol connected
set policy policy-statement RIP-to-OSPF then accept
set protocols ospf4 export RIP-to-OSPF
set protocols rip export OSPF-to-RIP
set fea unicast-forwarding4 disable false
commit
exit configuration-mode



##########################
#xorp3
##########################
configure exclusive
set rtrmgr config-directory /etc/xorp
set protocols rip interface eth1 vif eth1 address 192.168.40.2 disable false
set protocols rip interface eth0 vif eth0 address 10.0.0.1 disable false
set interfaces interface eth1 vif eth1 address 192.168.40.2 prefix-length 24
set interfaces interface eth0 vif eth0 address 10.0.0.1 prefix-length 24
set fea unicast-forwarding4 disable false
set policy policy-statement CON-to-RIP term 10 from protocol connected
set policy policy-statement CON-to-RIP term 10 then accept
set protocols rip export CON-to-RIP
commit
exit configuration-mode


##########################
#xorp4
##########################
configure exclusive
set rtrmgr config-directory /etc/xorp
set protocols rip interface eth0 vif eth0 address 10.0.0.2 disable false
set interfaces interface eth0 vif eth0 address 10.0.0.2 prefix-length 24
set fea unicast-forwarding4 disable false
commit
exit configuration-mode


##########################
#xorp5
##########################
configure exclusive
set rtrmgr config-directory /etc/xorp
set protocols ospf4 router-id 172.16.1.2
set protocols ospf4 area 0.0.0.0 interface eth0 vif eth0 address 172.16.1.2 disable false
set interfaces interface eth0 vif eth0 address 172.16.1.2 prefix-length 24
set fea unicast-forwarding4 disable false
commit
exit configuration-mode







More information about the Xorp-users mailing list