Page 1 of 1
Mac@ by Vlan
Posted: 11 Mar 2016 03:18
by Sara-7
hi everyone,
I'm looking for a command or script to show the amount of mac addresses on each Vlan
thanks for your help
Re: Mac@ by Vlan
Posted: 11 Mar 2016 14:36
by silvio
I have tested the following:
Code: Select all
Core> show mac-learning | grep "VLAN 2002" | cat | wc -l
25
Core> show mac-learning | grep "VLAN 3004" | cat | wc -l
12
in most cases it will be enough to use "2002" or " 2002" for the vlan 2002. Try it.
regards
Silvio
Re: Mac@ by Vlan
Posted: 15 Mar 2016 04:43
by Sara-7
Hi Silvio,
I used this command which can shows the amount of mac addresses in ONE vlan :
-> show mac-learning domain vlan vlan 10 summary
Mac Address Table Summary:
Domain Static Static-Multicast Bmac Dynamic
------------+------------+-------------------+------------+------------
VLAN 0 0 0 420
Total MAC Address In Use = 420
and this one to show the total number of Mac@ in all the Vlan :
-> show mac-learning domain vlan summary
Mac Address Table Summary:
Domain Static Static-Multicast Bmac Dynamic
------------+------------+-------------------+------------+------------
VLAN 0 0 0 3520
Total MAC Address In Use = 3520
But actually I'm looking for a command/script which can show me the number of MAC@ by Vlan, example :
FDB Statistics Tue Mar 8 02:31:05 2016
VLAN MAC Addresses Dynamic Static Dropped
==============================================================================
Red 9 1 0 0
Default 6 0 0 0
==============================================================================
thanks
Re: Mac@ by Vlan
Posted: 15 Mar 2016 07:11
by silvio
Hi,
I didn't know until now the option "domain vlan vlan"
This is realy a better way than the grep-option.
thanks
Silvio
Re: Mac@ by Vlan
Posted: 15 Mar 2016 08:58
by Sara-7
Hi,
Do you have any idea how to do a script to get the amount of Mac@ in each Vlan ?
example :
vlan 1 mac@=201
vlan 2 mac@= 125
..
..
Vlan N mac@=62
thanks
Re: Mac@ by Vlan
Posted: 15 Mar 2016 12:18
by silvio
Hi,
with one command for all your vlans?
This is possible - but I haven't done such a script until now (and no time to do it now

). You will find a way with linux commands and egrep and/or regex.... You can use also alias for complex commands or more than one command.
regards
Silvio
Re: Mac@ by Vlan
Posted: 16 Mar 2016 04:33
by Sara-7
oki thank you