Networking Forums

Networking Forums > Computer Networking > Linux Networking > VLAN sockets

Reply
 
 
Norbert Vegh
Guest
Posts: n/a

 
      05-19-2004, 10:04 AM
Does anybody know how to use VLAN sockets in Linux?
Years ago I developed a traffic generator/analyzer tool. Now I would
like to furhter develop it so that I can generate traffic on command
line specified VLANs. Any hint how to do that? I could not found any
useful document or man page about that.
Thanks,
Norbert
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      05-19-2004, 01:21 PM
Norbert Vegh <(E-Mail Removed)> wrote:
> Does anybody know how to use VLAN sockets in Linux?
> Years ago I developed a traffic generator/analyzer tool. Now I would
> like to furhter develop it so that I can generate traffic on command
> line specified VLANs. Any hint how to do that? I could not found any
> useful document or man page about that.


I would start from

http://www.candelatech.com/~greear/vlan.html

and then look at the source for vconfig. You'll probably find that all
you need to do is to bind() to the appropriate network address when
you want to send packets. That's assuming the the routing table won't
pick the correct interface itself.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
Norbert Vegh
Guest
Posts: n/a

 
      05-26-2004, 03:23 PM
Thanks, for the answer. I have already looked into vconfig. However, what I
need is a kind of raw/packet socket where I can explicitly specify the VLAN
header. For me it is not enough to create static VLAN interfaces via vconfig
and send traffic through them.

I also found that the ingress/egress mapping does not do IP prec -> p-bits
mapping and vica-versa. That would really make sense. And also, I cannot turn
of the set_flag parameter, it does not accept 0.

Cameron Kerr <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Norbert Vegh <(E-Mail Removed)> wrote:
> > Does anybody know how to use VLAN sockets in Linux?
> > Years ago I developed a traffic generator/analyzer tool. Now I would
> > like to furhter develop it so that I can generate traffic on command
> > line specified VLANs. Any hint how to do that? I could not found any
> > useful document or man page about that.

>
> I would start from
>
> http://www.candelatech.com/~greear/vlan.html
>
> and then look at the source for vconfig. You'll probably find that all
> you need to do is to bind() to the appropriate network address when
> you want to send packets. That's assuming the the routing table won't
> pick the correct interface itself.

 
Reply With Quote
 
Cameron Kerr
Guest
Posts: n/a

 
      05-26-2004, 09:02 PM
Norbert Vegh <(E-Mail Removed)> wrote:
> Thanks, for the answer. I have already looked into vconfig. However, what I
> need is a kind of raw/packet socket where I can explicitly specify the VLAN
> header. For me it is not enough to create static VLAN interfaces via vconfig
> and send traffic through them.


With raw sockets, you must specify what is carried in the packet. This
is done by writing to the buffer which is the packet.

Have a look at libnet. This is a library that allows you to build
arbitrary packets for raw sockets.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLAN - Security risk or not: 1 Port in 2 VLAN's arno Windows Networking 6 11-28-2006 10:57 PM
RAW TCP/IP sockets George Valkov Windows Networking 1 09-22-2006 02:49 AM
To vlan or not to vlan, that's the question Xous - Jose R. Negreira Linux Networking 10 04-20-2005 04:00 PM
sockets Sam Linux Networking 2 07-07-2004 08:54 AM
UDP sockets Sven Jacobs Linux Networking 0 05-10-2004 06:06 AM



1 2 3 4 5 6 7 8 9 10 11