pete hilton
2006-Dec-28 07:54 UTC
[Xen-users] network-bridge script and the ip route list command
Hi there, I have got xen 3.0.3 (built from source download from xensource) running on my linux box (Slackware 11 distribution). When the network-bridge script runs, it first of all issues "ip route list" and then parses the "default" line to pick up the last word. The ip command in my distribution gives the following:- default via 192.168.1.1 dev eth0 metric 1 which naturally results in a vifnum of 1 instead of 0. Is this a bug in the script or is my "ip" command different from the norm? cheers pete ps The man page contains:- ip was written by Alexey N. Kuznetsov and added in Linux 2.2. -- pete hilton saruman@ruvolo-hilton.org IsaBella --- ICE Explorer #1070 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jerry Amundson
2006-Dec-29 19:42 UTC
Re: [Xen-users] network-bridge script and the ip route list command
On 12/28/06, pete hilton <saruman@ruvolo-hilton.org> wrote:> Hi there, > I have got xen 3.0.3 (built from source download from > xensource) running on my linux box (Slackware 11 distribution). > > When the network-bridge script runs, it first of all issues "ip route list" > and then parses the "default" line to pick up the last word. > > The ip command in my distribution gives the following:- > > default via 192.168.1.1 dev eth0 metric 1 > > which naturally results in a vifnum of 1 instead of 0. > > Is this a bug in the script or is my "ip" command different from the norm?Your "ip" command is different, at least from my Redhat and Fedora distros... default via 192.168.1.1 dev eth0 Though I would think no distro should implement a metric on a default route, you could file a xen bug on the script to use the word after "dev", not the last one... jerry _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Christopher G. Stach II
2006-Dec-29 19:52 UTC
Re: [Xen-users] network-bridge script and the ip route list command
Jerry Amundson wrote:> On 12/28/06, pete hilton <saruman@ruvolo-hilton.org> wrote: >> Hi there, >> I have got xen 3.0.3 (built from source download from >> xensource) running on my linux box (Slackware 11 distribution). >> >> When the network-bridge script runs, it first of all issues "ip route >> list" >> and then parses the "default" line to pick up the last word. >> >> The ip command in my distribution gives the following:- >> >> default via 192.168.1.1 dev eth0 metric 1 >> >> which naturally results in a vifnum of 1 instead of 0. >> >> Is this a bug in the script or is my "ip" command different from the >> norm? > > Your "ip" command is different, at least from my Redhat and Fedora > distros... > default via 192.168.1.1 dev eth0 > > Though I would think no distro should implement a metric on a default > route, you could file a xen bug on the script to use the word after > "dev", not the last one... > > jerry > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-usersIf you have two default routes with one over a higher cost path, why wouldn''t you want a higher metric? -- Christopher G. Stach II _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jerry Amundson
2006-Dec-29 20:50 UTC
Re: [Xen-users] network-bridge script and the ip route list command
On 12/29/06, Christopher G. Stach II <cgs@ldsys.net> wrote:> If you have two default routes with one over a higher cost path, why > wouldn''t you want a higher metric?Because the metric is defined as a measurement of hops, not cost. Metric The "distance" to the target (usually counted in hops). It is not used by recent kernels, but may be needed by routing dae- mons. By definition then, a metric on a default route (or routes) is not definable - there is no concrete target, only "all other targets". That said, however, advanced routing techniques (rules, tables, etc.) could be in place which would give additional output from "ip route list" after the device. Hence the suggestion to file a bug anyway. jerry _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Christopher G. Stach II
2006-Dec-29 23:44 UTC
Re: [Xen-users] network-bridge script and the ip route list command
Jerry Amundson wrote:> On 12/29/06, Christopher G. Stach II <cgs@ldsys.net> wrote: >> If you have two default routes with one over a higher cost path, why >> wouldn''t you want a higher metric? > > Because the metric is defined as a measurement of hops, not cost. > Metric The "distance" to the target (usually counted in hops). It is > not used by recent kernels, but may be needed by routing > dae- > mons. > By definition then, a metric on a default route (or routes) is not > definable - there is no concrete target, only "all other targets". > > That said, however, advanced routing techniques (rules, tables, etc.) > could be in place which would give additional output from "ip route > list" after the device. Hence the suggestion to file a bug anyway.Hop count is a path cost. You can certainly have more than one default route. If you have one with a higher cost, it won''t be used if the lower cost route is available. Why would metrics not be used for routing in the kernel? That would more or less castrate Linux as a an IP router. What changeset did this happen in? -- Christopher G. Stach II _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jerry Amundson
2006-Dec-30 18:12 UTC
Re: [Xen-users] network-bridge script and the ip route list command
On 12/29/06, Christopher G. Stach II <cgs@ldsys.net> wrote:> Hop count is a path cost.No, not really. 10 high speed hops, versus 1 over 56K modem. Hmm?> You can certainly have more than one default route. If you have one > with a higher cost, it won''t be used if the lower cost route is available.Well, maybe. There''s more the one variable to that decision.> Why would metrics not be used for routing in the kernel? That would > more or less castrate Linux as a an IP router. What changeset did this > happen in?"Metric" plays a minor part in advanced routing. Google''ing can provide more on it ... jerry _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users