WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] network-bridge script and the ip route list command

To: pete hilton <saruman@xxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] network-bridge script and the ip route list command
From: "Ulrich Windl" <ulrich.windl@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 08 Jan 2007 13:39:09 +0100
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 08 Jan 2007 04:39:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200612272354.47923.saruman@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: Universitaet Regensburg, Klinikum
Priority: normal
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On 27 Dec 2006 at 23:54, pete hilton 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.

You mean?:
vifnum=${vifnum:-$(ip route list | awk '/^default / { sub(/eth/,"",$NF); print $
NF }')}
vifnum=${vifnum:-0}


> 
> The ip command in my distribution gives the following:-
> 
> default via 192.168.1.1 dev eth0  metric 1 

Your command looks odd; I see:
# ip route list
192.168.0.0/24 dev bond1  proto kernel  scope link  src 192.168.0.61
132.199.0.0/16 dev bond0  proto kernel  scope link  src 132.199.176.78
127.0.0.0/8 dev lo  scope link

Ulrich


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>