Message ID | 200810071520.56610.denys@visp.net.lb |
---|---|
State | Not Applicable, archived |
Headers | show |
Denys Fedoryshchenko wrote: > Probably to make people use iproute2, it is good to inform them, that iproute2 > can do that job. > > For example i didn't knew that ip can make vlan's and etc. > And even embedded help doesn't help almost. > > Something like attached trivial patch, at least will give idea, what to do. > > man page i can edit too, but i guess it is better someone with good english > will do that. Thats probably not me, but I'll try anyways :) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Oct 07, 2008 at 03:20:56PM +0300, Denys Fedoryshchenko wrote: > > diff -Naur iproute2.backup/ip/iplink.c iproute2/ip/iplink.c > --- iproute2.backup/ip/iplink.c 2008-10-05 15:41:59.000000000 +0000 > +++ iproute2/ip/iplink.c 2008-10-07 12:14:28.000000000 +0000 > @@ -54,6 +54,10 @@ > fprintf(stderr, " mtu MTU }\n"); > fprintf(stderr, " netns PID }\n"); > fprintf(stderr, " ip link show [ DEVICE ]\n"); > + fprintf(stderr, " ip link add link PARENTDEV type { vlan | veth } { ... | help }\n"); > + fprintf(stderr, " ip link add link PARENTDEV NEWDEVICE type macvlan { ... | help }\n"); > + fprintf(stderr, " ip link change link PARENTDEV type { vlan | veth } { ... | help}\n"); > + fprintf(stderr, " ip link del dev DEVICE\n"); > exit(-1); > } > hello, btw. How can I see vlan id on device ? After: # ip l a l eth0 type vlan id 100 # ip a I see: 64: vlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN link/ether 00:16:d3:3e:4e:b9 brd ff:ff:ff:ff:ff:ff No vlan id in interface name ? # ip -V ip utility, iproute2-ss080725 regards,
On Tuesday 07 October 2008, Milan Kocian wrote: > hello, > > btw. How can I see vlan id on device ? > After: > # ip l a l eth0 type vlan id 100 > # ip a > I see: > > 64: vlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN > link/ether 00:16:d3:3e:4e:b9 brd ff:ff:ff:ff:ff:ff > > No vlan id in interface name ? > > # ip -V > ip utility, iproute2-ss080725 > > regards, Use flag -d rich ip # ./ip -d l show dev vlan0 31: vlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN link/ether 00:1e:8c:89:78:af brd ff:ff:ff:ff:ff:ff vlan id 100 <REORDER_HDR> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Denys Fedoryshchenko wrote: > On Tuesday 07 October 2008, Milan Kocian wrote: >> hello, >> >> btw. How can I see vlan id on device ? >> After: >> # ip l a l eth0 type vlan id 100 >> # ip a >> I see: >> >> 64: vlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN >> link/ether 00:16:d3:3e:4e:b9 brd ff:ff:ff:ff:ff:ff >> >> No vlan id in interface name ? >> >> # ip -V >> ip utility, iproute2-ss080725 >> >> regards, > Use flag -d > rich ip # ./ip -d l show dev vlan0 > 31: vlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN > link/ether 00:1e:8c:89:78:af brd ff:ff:ff:ff:ff:ff > vlan id 100 <REORDER_HDR> It would be better to have -d as a default, I was afraid of breaking scripts of people sedding and awking around with the iproute output. Stephen should make this call, I'm not sure what guarantees he wants to provide. I just remembered one of my previous jobs where a large number of scripts had to be changed because iproute started using lower case letters in some spots, and I had to do it :) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 7 Oct 2008, Patrick McHardy wrote: >>> # ip l a l eth0 type vlan id 100 > It would be better to have -d as a default, I was afraid of breaking > scripts of people sedding and awking around with the iproute output. It would also be good to have a help text describing 'ip l a' as 'ip l h' doesn't mention it at all in at least iproute2-ss080725 which seems to be the latest release. Until there's an easy accessible help text I'll stick to vconfig :) I know the iproute help texts aren't always that easy to read but at least they beat getting: # ip l a RTNETLINK answers: Operation not supported :) /Martin -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Oct 07, 2008 at 02:56:03PM +0200, Patrick McHardy wrote: > Denys Fedoryshchenko wrote: >> On Tuesday 07 October 2008, Milan Kocian wrote: >>> hello, >>> >>> btw. How can I see vlan id on device ? >>> After: >>> # ip l a l eth0 type vlan id 100 >>> # ip a >>> I see: >>> >>> 64: vlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN >>> link/ether 00:16:d3:3e:4e:b9 brd ff:ff:ff:ff:ff:ff >>> >>> No vlan id in interface name ? >>> >>> # ip -V >>> ip utility, iproute2-ss080725 >>> >>> regards, >> Use flag -d >> rich ip # ./ip -d l show dev vlan0 >> 31: vlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN >> link/ether 00:1e:8c:89:78:af brd ff:ff:ff:ff:ff:ff >> vlan id 100 <REORDER_HDR> > > It would be better to have -d as a default, I was afraid of breaking > scripts of people sedding and awking around with the iproute output. > > Stephen should make this call, I'm not sure what guarantees he wants > to provide. I just remembered one of my previous jobs where a large > number of scripts had to be changed because iproute started using > lower case letters in some spots, and I had to do it :) Thanks for quick answer. Yes, -d will be fine. It is a pity that vlan id will not be in interface name. It was comfortable to have vlan id in interface name. Any reason for changing naming schema ? regards,
Milan Kocian wrote: > It is a pity that vlan id will not be in interface name. It was > comfortable to have vlan id in interface name. > Any reason for changing naming schema ? What has changed is that the kernel doesn't support the naming policies for the netlink interface. I don't see any need for that, you can simply do: ip add link eth0 name eth0.1000 type vlan id 1000 or choose whatever different scheme you like. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Martin Josefsson wrote: > On Tue, 7 Oct 2008, Patrick McHardy wrote: > >>>> # ip l a l eth0 type vlan id 100 > >> It would be better to have -d as a default, I was afraid of breaking >> scripts of people sedding and awking around with the iproute output. > > It would also be good to have a help text describing 'ip l a' as > 'ip l h' doesn't mention it at all in at least iproute2-ss080725 which > seems to be the latest release. > > Until there's an easy accessible help text I'll stick to vconfig :) > I know the iproute help texts aren't always that easy to read but at > least they beat getting: > > # ip l a > RTNETLINK answers: Operation not supported Thats probably correct, the rtnl_link interface has only been present for a few versions in the kernel. But I agree and I'll send a patch with improved help texts and a manpage when I find some spare time. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Martin Josefsson wrote: > On Tue, 7 Oct 2008, Patrick McHardy wrote: > >>>> # ip l a l eth0 type vlan id 100 > >> It would be better to have -d as a default, I was afraid of breaking >> scripts of people sedding and awking around with the iproute output. > > It would also be good to have a help text describing 'ip l a' as > 'ip l h' doesn't mention it at all in at least iproute2-ss080725 which > seems to be the latest release. > > Until there's an easy accessible help text I'll stick to vconfig :) > I know the iproute help texts aren't always that easy to read but at > least they beat getting: > > # ip l a > RTNETLINK answers: Operation not supported Actually it seems something broke probing in the kernel, let me look into it. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 7 Oct 2008 15:28:02 +0200 Milan Kocian <milon@wq.cz> wrote: > On Tue, Oct 07, 2008 at 02:56:03PM +0200, Patrick McHardy wrote: > > Denys Fedoryshchenko wrote: > >> On Tuesday 07 October 2008, Milan Kocian wrote: > >>> hello, > >>> > >>> btw. How can I see vlan id on device ? > >>> After: > >>> # ip l a l eth0 type vlan id 100 > >>> # ip a > >>> I see: > >>> > >>> 64: vlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN > >>> link/ether 00:16:d3:3e:4e:b9 brd ff:ff:ff:ff:ff:ff > >>> > >>> No vlan id in interface name ? > >>> > >>> # ip -V > >>> ip utility, iproute2-ss080725 > >>> > >>> regards, > >> Use flag -d > >> rich ip # ./ip -d l show dev vlan0 > >> 31: vlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN > >> link/ether 00:1e:8c:89:78:af brd ff:ff:ff:ff:ff:ff > >> vlan id 100 <REORDER_HDR> > > > > It would be better to have -d as a default, I was afraid of breaking > > scripts of people sedding and awking around with the iproute output. > > > > Stephen should make this call, I'm not sure what guarantees he wants > > to provide. I just remembered one of my previous jobs where a large > > number of scripts had to be changed because iproute started using > > lower case letters in some spots, and I had to do it :) > > Thanks for quick answer. > Yes, -d will be fine. > It is a pity that vlan id will not be in interface name. It was > comfortable to have vlan id in interface name. > Any reason for changing naming schema ? > > regards, > > -- > Milan Kocian It should always show type information (ie vlan etc). Scripts that can't take extra lines might break even with -d since they might have been using that already. As long as new information appears after old, it should be okay. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff -Naur iproute2.backup/ip/iplink.c iproute2/ip/iplink.c --- iproute2.backup/ip/iplink.c 2008-10-05 15:41:59.000000000 +0000 +++ iproute2/ip/iplink.c 2008-10-07 12:14:28.000000000 +0000 @@ -54,6 +54,10 @@ fprintf(stderr, " mtu MTU }\n"); fprintf(stderr, " netns PID }\n"); fprintf(stderr, " ip link show [ DEVICE ]\n"); + fprintf(stderr, " ip link add link PARENTDEV type { vlan | veth } { ... | help }\n"); + fprintf(stderr, " ip link add link PARENTDEV NEWDEVICE type macvlan { ... | help }\n"); + fprintf(stderr, " ip link change link PARENTDEV type { vlan | veth } { ... | help}\n"); + fprintf(stderr, " ip link del dev DEVICE\n"); exit(-1); }