[Xorp-users] xorp with click and RIP

Pavlin Radoslavov pavlin at icir.org
Thu Dec 6 18:01:55 PST 2007


Robert Joseph Suk <rsuk at ucsc.edu> wrote:

> Thanks for your reply, Pavlin.
> I'm not exactly sure the best way to get the 
> xorp_fea_click_config_generator to unconditionally return 
> my static config, but I replaced the config_generator 
> script with my config file, inside a printf("") and it 
> seems to work.  I also made sure to rename my 
> LinearIPlookup from "rt" to "_xorp_rt4" so xorp could 
> handle it.  The router still receives updates from 

Yes, this hack should do it.

> neighboring routers and updates the RIB, but now xorp 
> throws an error:
> 
> [ 2007/12/06 17:28:07  ERROR xorp_fea:1612 FEA +71 
> fti_transaction.cc operation_result ] FTI transaction 
> commit failed on AddE
> ntry4: net = 10.0.0.0/24 nexthop = 10.0.2.22 ifname = xl0 
> vifname = xl0 metric = 2 admin_distance = 120 xorp_route = 
> true is_d
> eleted = false is_unresolved = false is_connected_route = 
> false
> [ 2007/12/06 17:28:07  ERROR xorp_fea:1612 FEA +301 
> fticonfig_entry_set_click.cc add_entry ] Cannot find 
> outgoing port number
> for the Click forwarding table element to add entry net = 
> 10.0.1.0/24 nexthop = 10.0.2.22 ifname = xl0 vifname = xl0 
> metric =
> 1 admin_distance = 120 xorp_route = true is_deleted = 
> false is_unresolved = false is_connected_route = false

There seems to be some error with adding the routes to Click.
Could you update to the latest XORP from CVS.
The update might not fix the problem, but will make it easier to
debug it:

http://www.xorp.org/cvs.html

Please send me your latest XORP configuration as well as your
hacked xorp_fea_click_config_generator.
Also, please tell me the Click version you are using.

Thanks,
Pavlin

> 
> and click still won't function.
> When I run "click myconfig.click", pings across the router 
> work fine, while pinging the router directly generates 
> Duplicate replies (one from the kernel, and one from 
> click).
> As a debug, in my click config I added a Tee to the output 
> of xl0 and copied all click-generated responses out to The 
> other interface, xl1. Now when I ping the router, I can 
> see the extra traffic on a TCPdump of xl1.  When I run 
> xorp with my config and ping the router, I only get one 
> response, and nothing on xl1, leading me to believe that 
> either my click config isn't running, or it just isnt 
> getting any traffic.
> 
> 
> On Thu, 06 Dec 2007 12:39:47 -0800
>   Pavlin Radoslavov <pavlin at icir.org> wrote:
> >>   I'm trying to set up a xorp/click configuration which 
> >> runs RIP. I have RIP working with xorp, but when I 
> >>enable 
> >> the user click forwarding path, I get strange behavior. 
> >>If 
> >> I 'duplicate-routes-to-kernel' everything works fine. 
> >> However, when I don't duplicate routes-to-kernel, the 
> >> routes still show up in xorpsh (show route table ipv4 
> >> unicast rip/final), but if I ping any of those 
> >>addresses, 
> >> I get 'no route to host'. Xorp also cannot send RIP 
> >> updates, getting the send_from_multicast_if failed.
> > 
> >First the (hopefully) easy part:
> > As you know already, FreeBSD requires to have a matching 
> >route
> > (e.g., 0.0.0.0/0) in the unicast forwarding table in the 
> >kernel to
> > be able to originate multicast packets. If you use XORP 
> >to configure
> > the 0.0.0.0/0 static route, and if 
> >"duplicate-routes-to-kernel" is
> > disabled, this route won't reach the kernel.
> > Hence, to get around this problem you should add 
> >0.0.0.0/0 to the
> > kernel by hand before starting XORP.
> > 
> >> The reason I want to turn 'duplicate-routes-to-kernel' 
> >> off, is so that I can check that the click forwarding 
> >>path 
> >> is working.
> >> 
> >> I already added a static route 0.0.0.0/0 to an attached 
> >> interface, and put "multicast_host="YES"" in my rc.conf.
> >> I'm running BSD6.2, and my xorp config is below. The 
> >>click 
> >> config I'm running is simply the one generated by 
> >> 'make-ip-conf.pl' which is a basic IP router
> >> Any ideas why xorp sees the routes in xorpsh but can't 
> >>use 
> >> them?
> > 
> > If you are to use your own static config with 
> >make-ip-conf.pl, it
> > will be safer if you also modify the sample
> > "/usr/local/fea/xorp_fea_click_config_generator" 
> >generator to
> > unconditionally return that configuration. FYI, the 
> >config generator
> > is automatically called by XORP whenenever something in 
> >the
> > interface configuration changes, so on startup it might 
> >actually be
> > overwriting your own static config.
> > 
> > Once you eliminate the config generation factor, then 
> >you need to
> > investigate whether userland Click itself is working as
> > expected. For that purpose I'd recommend to start 
> >userland Click by
> > hand (without XORP), and then manually configure it with 
> >your static
> > config (including the routes that should be generated by 
> >RIP).
> > Then do the ping test to see whether userland Click on 
> >its own is
> > fine.
> > One thing to have in mind is that the ping packets 
> >originated on the
> > router running Click might not actually be processed by 
> >Click: such
> > packets will lookup the unicast forwarding table in the 
> >kernel, and
> > therefore fail. Hence, you might want to run ping on a 
> >machine
> > directly connected to the router running Click.
> > 
> > Hopefully the above tests will narrow the problem.
> > 
> > Regards,
> > Pavlin
> > 
> > P.S. In your config you don't need the plumbing/mfea4 
> >and mfea6
> > sections.
> > 
> > 
> >> 
> >> interfaces{
> >>          restore-original-config-on-shutdown: false
> >>          interface xl0 {
> >>                  description: "from 10.0.2"
> >>                  disable: false
> >>                  vif xl0 {
> >>                          disable: false
> >>                          address 10.0.2.33 {
> >>                                  prefix-length: 24
> >>                                  broadcast: 10.0.2.255
> >>                                  disable: false
> >>                          }
> >>                  }
> >>          }
> >>          interface xl1 {
> >>                  description: "to 10.0.3"
> >>                  disable: false
> >>                  vif xl1 {
> >>                          disable: false
> >>                          address 10.0.3.33 {
> >>                                  prefix-length: 24
> >>                                  broadcast: 10.0.3.255
> >>                                  disable: false
> >>                          }
> >>                  }
> >>          }
> >> } /* </interfaces> */
> >> 
> >> fea{
> >>          unicast-forwarding4 {
> >>                  disable: true
> >>          }
> >> 
> >>          unicast-forwarding6 {
> >>                  disable: true
> >>          }
> >> 
> >>          click {
> >>                  disable: false  /*run autogenerated 
> >> config from /conf/make-ip-conf.pl*/
> >>                  duplicate-routes-to-kernel: true
> >> 
> >>                  kernel-click{
> >>                          disable: true
> >>                  }
> >> 
> >>                  user-click{
> >>                          disable: false
> >>                          command-file: 
> >> "/usr/local/bin/click"
> >>                          command-extra-arguments: "-R"
> >>                          command-execute-on-startup: 
> >>true
> >>                          startup-config-file: 
> >> "/usr/local/xorp/iprouter_auto.click"
> >>                          user-click-config-generator-file: 
> >> "/usr/local/fea/xorp_fea_click_config_generator"
> >>                  }
> >>          }
> >> } /* </fea> */
> >> plumbing{
> >>          mfea4 {
> >>                  disable: true
> >>          }
> >>          mfea6{
> >>                  disable: true
> >>          }
> >> }
> >> policy {
> >>          /*Describe connected routes for 
> >>redistribution*/
> >>          policy-statement connected {
> >>                  term export {
> >>                          from {
> >>                                  protocol: "connected"
> >>                          }
> >>                  }
> >>          }
> >> }
> >> 
> >> protocols {
> >>          static{
> >>                  route 0.0.0.0/0{
> >>                          next-hop: 10.0.2.22
> >>                          metric: 1
> >>                  }
> >>          }
> >>          rip {
> >>                  export: "connected"
> >> 
> >>                  /*run on both interfaces*/
> >>                  interface xl0 {
> >>                          vif xl0 {
> >>                                  address 10.0.2.33 {
> >>                                          disable: false
> >>                                  }
> >>                          }
> >>                  }
> >>                  interface xl1 {
> >>                          vif xl1 {
> >>                                  address 10.0.3.33 {
> >>                                          disable: false
> >>                                  }
> >>                          }
> >>                  }
> >>          } /* </rip> */
> >> } /* </protocols>*/
> >> 
> >> 
> >> 
> >> -Robbie
> >> 
> >> _______________________________________________
> >> Xorp-users mailing list
> >> Xorp-users at xorp.org
> >> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
> 
> -Robbie
> 
> _______________________________________________
> Xorp-users mailing list
> Xorp-users at xorp.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users



More information about the Xorp-users mailing list