Skip to contentSkip to conversation

Could you make vconfig less stupid?

DISCUSSION Stephen Hemminger 6 participants 15 messages Oct 6, 2008 – Oct 7, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

vconfig prints bogus message, then autoloads the vlan module. It is still living in 2.4 time warp.

# vconfig add dummy0 1
WARNING:  Could not open /proc/net/vlan/config.  Maybe you need to load the 8021q module, or maybe you are not using PROCFS??
Added VLAN with VID == 1 to IF -:dummy0:-

Other nuisance:

# vconfig --version
Expecting argc to be 3-5, inclusive.  Was: 2
...

1) users expect version
2) users don't expect argc related crap messages

#1 lore raw
Quoted 7 lines · Stephen Hemminger

vconfig prints bogus message, then autoloads the vlan module. It is still living in 2.4 time warp.

# vconfig add dummy0 1
WARNING:  Could not open /proc/net/vlan/config.  Maybe you need to load the 8021q module, or maybe you are not using PROCFS??
Added VLAN with VID == 1 to IF -:dummy0:-
Quoted 7 lines

Other nuisance:

# vconfig --version
Expecting argc to be 3-5, inclusive.  Was: 2
...

1) users expect version
2) users don't expect argc related crap messages

Actually I don't maintain vconfig and I don't think Ben does either. Its deprecated and iproute is what people should use, all the new features are not supported by vconfig.

#2 lore raw
Quoted 13 lines · Patrick McHardy
Quoted 12 lines · Stephen Hemminger

vconfig prints bogus message, then autoloads the vlan module. It is still living in 2.4 time warp.

# vconfig add dummy0 1
WARNING:  Could not open /proc/net/vlan/config.  Maybe you need to load the 8021q module, or maybe you are not using PROCFS??
Added VLAN with VID == 1 to IF -:dummy0:-

Other nuisance:

# vconfig --version
Expecting argc to be 3-5, inclusive.  Was: 2
...
Quoted 6 lines
Quoted 2 lines

1) users expect version
2) users don't expect argc related crap messages

Actually I don't maintain vconfig and I don't think Ben does either. Its deprecated and iproute is what people should use, all the new features are not supported by vconfig.

I can fix these things if anyone cares, but leaving it crufty might be a better way to encourage folks to use 'ip'.

Ben

Quoted 5 lines
Signature · 4 lines
-- 
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Ben Greear <[email protected]> Candela Technologies Inc  http://www.candelatech.com
#3 lore raw
Quoted 6 lines · Ben Greear
Quoted 4 lines · Patrick McHardy

Actually I don't maintain vconfig and I don't think Ben does either. Its deprecated and iproute is what people should use, all the new features are not supported by vconfig.

I can fix these things if anyone cares, but leaving it crufty might be a better way to encourage folks to use 'ip'.

I think it would make sense to add a note to the manpage or something like that. Maybe also a runtime warning in case its really (going to be) unmaintained.

#4 lore raw

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.

Quoted 9 lines · Patrick McHardy
Quoted 7 lines · Ben Greear
Quoted 3 lines · Patrick McHardy

Actually I don't maintain vconfig and I don't think Ben does either. Its deprecated and iproute is what people should use, all the new features are not supported by vconfig.

I can fix these things if anyone cares, but leaving it crufty might be a better way to encourage folks to use 'ip'.

Quoted 7 lines

I think it would make sense to add a note to the manpage or something like that. Maybe also a runtime warning in case its really (going to be) unmaintained.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

ip/iplink.c +4 -0
diff -Naur iproute2.backup/ip/iplink.c iproute2/ip/iplink.c
@@ -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);
 }
 
#5 lore raw
Quoted 8 lines · Denys Fedoryshchenko

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 :)

#7 lore raw
In reply to Milan Kocian
Quoted 9 lines · Milan Kocian

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

Quoted 8 lines
    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>

#8 lore raw
Quoted 17 lines · Denys Fedoryshchenko
Quoted 16 lines · Milan Kocian

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
Quoted 6 lines
Quoted 1 line

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 :)

#9 lore raw
Quoted 25 lines · Patrick McHardy
Quoted 17 lines · Denys Fedoryshchenko
Quoted 16 lines · Milan Kocian

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
Quoted 6 lines
Quoted 1 line

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>

Quoted 7 lines

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,

Signature · 1 line
Milan Kocian
#10 lore raw
Quoted 1 line · Milan Kocian

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.

#6 lore raw
In reply to Denys Fedoryshchenko
Quoted 6 lines · Denys Fedoryshchenko

diff -Naur iproute2.backup/ip/iplink.c iproute2/ip/iplink.c

ip/iplink.c line 63

Quoted 10 lines
ip/iplink.c +4 -0
@@ -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,

Signature · 1 line
Milan Kocian
#12 lore raw
In reply to Patrick McHardy
Quoted 4 lines · Patrick McHardy
Quoted 1 line
Quoted 1 line
# 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

#13 lore raw
Quoted 7 lines · Martin Josefsson
Quoted 4 lines · Patrick McHardy
Quoted 1 line
Quoted 1 line
# 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.

Quoted 8 lines

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.

#14 lore raw
In reply to Martin Josefsson
Quoted 7 lines · Martin Josefsson
Quoted 4 lines · Patrick McHardy
Quoted 1 line
Quoted 1 line
# 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.

Quoted 8 lines

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.

#11 lore raw
In reply to Milan Kocian
Quoted 34 lines · On Tue, 7 Oct 2008 15:28:02 +0200 Milan Kocian <[email protected]> wrote:
Quoted 25 lines · Patrick McHardy
Quoted 17 lines · Denys Fedoryshchenko
Quoted 16 lines · Milan Kocian

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
Quoted 6 lines
Quoted 1 line

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>

Quoted 7 lines

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 :)

Quoted 10 lines

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,

Signature · 1 line
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.