Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Feature - Allow Increment/Decrement/Fixed modes on vlan fields #84

Closed
GoogleCodeExporter opened this issue Jul 2, 2015 · 9 comments
Closed

Comments

@GoogleCodeExporter
Copy link

Allow Increment/Decrement/Fixed modes on vlan fields

I have a need where I am incrementing MAC address, and IP Address for a bunch 
of clients but I may need them in different vlans  snd/or slans for every 
MAC/IP combination.   


What steps will reproduce the problem?
1. Go to Slan/Vlan 

What is the expected output? What do you see instead?

I need ability to have a mode pulldown next to vlan/slan which contains 
Increment/Decrement/Fixed like the MAC and IP fields on other panels 


What version and revision of the product are you using (available in the
About dialog)? On what operating system?

Windows (0.5.1)
Fedora (0.5.1)



Original issue reported on code.google.com by ftobias...@gmail.com on 16 Nov 2012 at 1:12

Attachments:

@GoogleCodeExporter
Copy link
Author

For now, till this feature becomes available, you can use userscript protocol 
in place of VLAN/SVLAN.

See http://code.google.com/p/ostinato/wiki/UserScriptHOWTO

Original comment by pstav...@gmail.com on 16 Nov 2012 at 4:34

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Hi,

I worked on a userscript but still not able to increment the vlan id. Is there 
any function to do that?
pfv[3] is the variable hold the vlan id.

below is the script.

protocol.protocolFrameSize = function() { return 4; }
protocol.protocolId = function() { return 0x8100; }
protocol.protocolFrameValueVariable=true;
protocol.protocolFrameVariableCount=100;
protocol.protocolId = function(id)
{ return 200;
}

protocol.protocolFrameValue = function(index)
{
    var pfv = new Array(4);


    pfv.protocolFrameValueVariable=true;
    pfv.protocolFrameVariableCount=100;
    pfv.protocolFramePayloadVariableCount++;
    pfv[0] = 0x81;
    pfv[1]=0x00;
    pfv[3]=201;
    pfv[3].protocolFrameValueVariable=true;
    pfv[3].protocolFrameVariableCount=100
    pfv[3].protocolFramePayloadVariableCount++;
                    pfv[3]++;

return pfv;

}


Original comment by kam.t...@gmail.com on 1 Apr 2015 at 5:24

@GoogleCodeExporter
Copy link
Author

@kam: Try the following (note: I haven't tested it)

protocol.protocolFrameSize = function() { return 4; }
protocol.protocolId = function(type) { return 0x8100; }
protocol.protocolFrameValueVariable=true;
protocol.protocolFrameVariableCount=100;

protocol.protocolFrameValue = function(index)
{
    var pfv = new Array(4);

    pfv[0] = 0x81;
    pfv[1] = 0x00;
    pfv[2] = 0x00;
    pfv[3] = 201+index;

        return pfv;
}

Original comment by pstav...@gmail.com on 2 Apr 2015 at 3:54

@GoogleCodeExporter
Copy link
Author

Thanks a lot
It works great!!!

Original comment by kam.t...@gmail.com on 3 Apr 2015 at 5:56

@GoogleCodeExporter
Copy link
Author

A generic variable fields feature has been implemented - you can now vary any 
field of any protocol. See 
http://code.google.com/p/ostinato/wiki/UserGuide#Variable_Fields for details.

Please try this feature and let me know if it meets your requirement.

Original comment by pstav...@gmail.com on 1 Jun 2015 at 4:31

@GoogleCodeExporter
Copy link
Author

Original comment by pstav...@gmail.com on 1 Jun 2015 at 4:38

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

I find the feature difficult to configure as mac addresses are 6 bytes long
(broken up into oui and device id), and ip addresses allows me to increment
but I have no control over subnet or subnet mask so that I can either
increment the subnet or the host.

Basically i think we need a masking mechanism for which we allow  the
incrementing or decremeting to work

For example: (increment subnet)

Vlan   Dst MAC             Src Mac                  Dst Ip         Src Ip
101    00:00:00:01:00     00:00:00:00:00:01    10.1.1.254  10.1.1.1
102    00:00:00:01:00     00:00:00:00:00:02    10.1.2.254  10.1.2.1
103    00:00:00:01:00     00:00:00:00:00:03    10.1.3.254  10.1.3.1

For example: (increment host)

Vlan   Dst MAC             Src Mac                  Dst Ip         Src Ip
101    00:00:00:01:00     00:00:00:00:00:01    10.1.1.254  10.1.1.1
102    00:00:00:01:00     00:00:00:00:00:02    10.1.1.254  10.1.1.2
103    00:00:00:01:00     00:00:00:00:00:03    10.1.1.254  10.1.1.3

How would this be implemented with current implementation? Not intuitive.
the fields are not counters.

Don't I need a starting mac with increment/decrement?

Don't I need subnet, subnet mask with option to increment/decrement subnet
or host?

Original comment by ftobias...@gmail.com on 1 Jun 2015 at 9:12

@GoogleCodeExporter
Copy link
Author

I got it to work,  but not intuitive.

Original comment by ftobias...@gmail.com on 1 Jun 2015 at 9:36

@GoogleCodeExporter
Copy link
Author

@ftobias: Thank you for testing the feature and providing feedback. It would be 
helpful if you could elaborate on what specificaly you found non-intuitive, and 
any suggestions you may have on how it could be made more intuitive (in terms 
of the GUI or user guide documentation). Also it might be helpful if you could 
provide details on how you got it to work for people who may face the same 
issue(s).

Original comment by pstav...@gmail.com on 2 Jun 2015 at 12:58

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant