torsdag den 8. august 2013

HP Comware port mirroring

Port mirroring is used for IPS or for wireshark sniffing.

Simply local port mirroring from one port to another
Here we take all the traffic from gig 2/0/45 and mirror it to gig 1/0/2
## CLI
# Mirroring
mirroring-group 1 local
mirroring-group 1 mirroring-port g2/0/45 both
mirroring-group 1 monitor-port g1/0/2
#Remove access vlan
int gig 1/0/2

  undo port access vlan

Advanced mirroring with filters
Here we want to sniff from 4 BAGG interfaces (LAG) consisting of 8x 10G interfaces.
We are only interested on to hosts, but we do not know on what interface the traffic will flow and 80G traffic will not be possible on our 1G wirehskark client machine.
We use filters to get only the traffic we want.
Wireshark on Gig 2/0/3
Interfaces to mirror from BAGG13-BAG16
XGE1/0/13-14, XGE3/0/13 -14, XGE1/0/15-16, XGE3/0/15-16

Clients: 172.1.120.221<=>172.1.120.217
(And heartbeat addresses just to make sure)

# CLI
acl number 3000 name mirrorVC
rule 0 permit ip source 172.1.126.109 0
rule 1 permit ip source 172.1.126.107 0
rule 2 permit ip source 172.1.120.221 0
rule 3 permit ip source 172.1.120.217 0
traffic classifier mirrorVC-class operator and
if-match acl name mirrorVC
#
traffic behavior mirrorVC-behavior
mirror-to interface GigabitEthernet2/0/3
#
qos policy mirrorVC-policy
classifier mirrorVC-class behavior mirrorVC-behavior
#
interface ten 1/0/13
qos apply policy mirrorVC-policy inbound
qos apply policy mirrorVC-policy outbound
interface ten 1/0/14
qos apply policy mirrorVC-policy inbound
qos apply policy mirrorVC-policy outbound
interface ten 3/0/13
qos apply policy mirrorVC-policy inbound
qos apply policy mirrorVC-policy outbound
interface ten 3/0/14
qos apply policy mirrorVC-policy inbound
qos apply policy mirrorVC-policy outbound
interface ten 1/0/15
qos apply policy mirrorVC-policy inbound
qos apply policy mirrorVC-policy outbound
interface ten 1/0/16
qos apply policy mirrorVC-policy inbound
qos apply policy mirrorVC-policy outbound
interface ten 3/0/15
qos apply policy mirrorVC-policy inbound
qos apply policy mirrorVC-policy outbound
interface ten 3/0/16
qos apply policy mirrorVC-policy inbound
qos apply policy mirrorVC-policy outbound

Microsoft Excel and unique column values (unique constraint)

How do you make sure your column values are unique when you enter a new value into a column.
Like the unique constraint for sql databases.

Excel 2010
Choose your column, Data > Data Validation > Data Validation > Custom.
For Column A use this formula:
=COUNTIF($A:$A;A1)<2

Hope you find this tip useful.