08-09-2017
in File-2 have VLAN-ID VLAN-NAME and ports belong to that VLAN
Example
VLAN-ID : 1 VLAN-NAME : "vlan-wifi" ports belong to that VLAN 1/1,1/7,1/8
1,"vlan-wifi",1/1,1/7,1/8
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file that's logically in the form of a multidimensional array with an unknown number of records in the file. The file looks like this:
name1
data1
name2
data2
name3
data3
...
nameN
dataN
How do I load this file into an array for processing, while... (2 Replies)
Discussion started by: leslie02
2 Replies
2. Shell Programming and Scripting
Hi,
iam having the file as follows:
ABCDEFGH|0987654321234567
ABCDEFGH|0987654321234523
ABCDEFGH|0987654321234556
ABCDEFGH|0987654321234545
POIUYTRE|1234567890890678
POIUYTRE|1209867757352567
POIUYTRE|5463879088797131
POIUYTRE|5468980091344456
pls provide me the split command
... (14 Replies)
Discussion started by: nivas
14 Replies
3. Shell Programming and Scripting
I want to compare some files.
say iam having 2 sets of files ,each is having some 10 files.
ie,
file1
1a.txt
1b.txt
1c.txt
...
file2
2a.txt
2b.txt
2c.txt
...
i need to read line by line of this files parralley..
ie.. i want to read file1 first line that is 1a.txt and file2... (2 Replies)
Discussion started by: nivas
2 Replies
4. Shell Programming and Scripting
Hi,
Iam having the files as follows:
file1
aa
aa
aa
aa
ab
ac
ad
ae
file2
aa
aa
ab
Outputfile: (20 Replies)
Discussion started by: nivas
20 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I want to concatenate the array cell values and form a string.. Is it possible?
for ex.
I have an array
word_array contains d u m b and after concatenating the string shld be 'dumb'
thanks (2 Replies)
Discussion started by: mathur
2 Replies
6. Programming
Hi,
I have the following variable declaration which looks like a 3d array or N matrixs KxK of floats
float (*table);
I have to pass to a function only the first table.
How can I do it??
Thanks (6 Replies)
Discussion started by: littleboyblu
6 Replies
7. Shell Programming and Scripting
i'm trying to use awk to count a listing similar to the following and get a report of the listing similar to the one below it.
y,pizza
n,pizza
y,pizza
y,pizza
n,tomato
n,tomato
y,cheese
y,cheese
n,cheese
report
----
pizza,3,1
tomato,0,2
cheese,2,1 (1 Reply)
Discussion started by: multimulti
1 Replies
8. Programming
My language is C++. I have a multidimensional vector that I would like to sort by a specific "cell" or "field" within the main vector. Does anyone have any information on how to do this? I have searched all over the internet and every reference manual I can find. So far I have found very little to... (2 Replies)
Discussion started by: sepoto
2 Replies
9. Shell Programming and Scripting
Hi Experts,
I'm a newbie.....multidimensional arrays in shell scripts is possible???
If so, can anyone guide me with an example.....and also can anyone tell me, how we can create a table like ouput format in shell script....the output should look like this one:
1 2 3 4 5 6
6 5 4 3... (4 Replies)
Discussion started by: kritibalu
4 Replies
10. UNIX for Dummies Questions & Answers
sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies
LEARN ABOUT MOJAVE
tc-vlan
VLAN manipulation action in tc(8) Linux VLAN manipulation action in tc(8)
NAME
vlan - vlan manipulation module
SYNOPSIS
tc ... action vlan { pop | PUSH | MODIFY } [ CONTROL ]
PUSH := push [ protocol VLANPROTO ] [ priority VLANPRIO ] id VLANID
MODIFY := modify [ protocol VLANPROTO ] [ priority VLANPRIO ] id VLANID
CONTROL := { reclassify | pipe | drop | continue | pass | goto chain CHAIN_INDEX }
DESCRIPTION
The vlan action allows to perform 802.1Q en- or decapsulation on a packet, reflected by the operation modes POP, PUSH and MODIFY. The POP
mode is simple, as no further information is required to just drop the outer-most VLAN encapsulation. The PUSH and MODIFY modes require at
least a VLANID and allow to optionally choose the VLANPROTO to use.
OPTIONS
pop Decapsulation mode, no further arguments allowed.
push Encapsulation mode. Requires at least id option.
modify Replace mode. Existing 802.1Q tag is replaced. Requires at least id option.
id VLANID
Specify the VLAN ID to encapsulate into. VLANID is an unsigned 16bit integer, the format is detected automatically (e.g. prefix
with '0x' for hexadecimal interpretation, etc.).
protocol VLANPROTO
Choose the VLAN protocol to use. At the time of writing, the kernel accepts only 802.1Q or 802.1ad.
priority VLANPRIO
Choose the VLAN priority to use. Decimal number in range of 0-7.
CONTROL
How to continue after executing this action.
reclassify
Restarts classification by jumping back to the first filter attached to this action's parent.
pipe Continue with the next action, this is the default.
drop Packet will be dropped without running further actions.
continue
Continue classification with next filter in line.
pass Return to calling qdisc for packet processing. This ends the classification process.
EXAMPLES
The following example encapsulates incoming ICMP packets on eth0 from 10.0.0.2 into VLAN ID 123:
#tc qdisc add dev eth0 handle ffff: ingress
#tc filter add dev eth0 parent ffff: pref 11 protocol ip
u32 match ip protocol 1 0xff flowid 1:1
u32 match ip src 10.0.0.2 flowid 1:1
action vlan push id 123
Here is an example of the pop function: Incoming VLAN packets on eth0 are decapsulated and the classification process then restarted for
the plain packet:
#tc qdisc add dev eth0 handle ffff: ingress
#tc filter add dev $ETH parent ffff: pref 1 protocol 802.1Q
u32 match u32 0 0 flowid 1:1
action vlan pop reclassify
SEE ALSO
tc(8)
iproute2 12 Jan 2015 VLAN manipulation action in tc(8)