Networking

How to setup Cisco port mirroring to a VM

Posted by robd on December 06, 2017
Networking, vmware / No Comments

Today we needed to mirror a port on a Cisco switch in a country far far away meaning we couldn’t just wander down with a laptop.

So to get around this we decided to mirror the port to a VM that’s on site, here’s how we did it:

There’s two switches between the VM and the port we want to mirror so first we have to setup the port mirroring on every switch using RSPAN (Remote Switched Port Analyser) and a new vlan.

Add an RSPAN vlan to both the switch with the port to mirror, and to the switch that has the packet capture device on.

Then make sure that RSPAN vlan is trunked between the 2 switches and on the VMWARE interface.

Assuming the following;

You use vlan 999 for the RSPAN vlan.

The port you want to mirror is on switch 1 port g1/0/2.

You want to send the mirrored traffic to switch 2 port 1/0/23 (the port that connects to VMWARE).

You are going to use monitor session 1 on both switches. (this can be any session number between 1-66, and can be different on each switch).

On Switch 1 (mirror port 2 and punt out the traffic to 9999)

On Switch 2 (suck in all traffic from 9999 and punt it to port 23)

You can see that the monitoring is set up with;

Network Diagram:

Next, we need to do the VMware side of things:

 

Setup a new port group on a vswitch:

Although we chose vlan 9999 when its pushed to the new port it will not be tagged so choose all:

Next edit the port group and allow Promiscuous mode, this will allow traffic not destined for the VMs MACs (normal behaviour, any traffic not destined to a VM MAC will be dropped):

Add a NIC to your VM using the port group:

Don’t worry about a IP etc:

Fire up Wireshark:

Look at all these glorious packets:

 

 

Tags: , , , ,

HP SAN P4300 Performance

Posted by robd on April 04, 2014
Networking, SAN, Server / No Comments

We had some issues a while back where there was latency between a PC and SAN so I started to look at all the layers to try and find a problem, here’s my findings in case anyone finds it a interesting read.

To rule out the PC, I’ve tested the performance of the SAN and network throughput.

The performance of the SAN which is based in IOP’S (Input/Output Operations Per Second) and the current average total is 800 (found on the SAN info page).  To put this prospectus, a poor performance would be in the 2000’s.

The below graph only shows output from 17:28 but has been running all day meaning the average should be accurate:

SAN1

Looking at the performance of switches can be difficult, but we’ve started using HP Intelligent Management Centre which is great at collating stats. The switches reported low bandwidth, CPU, memory and I/O seemed normal:

Switch1

We know from experience the throughput on these switches is limited by infrastructure in our case 1GB fibre.

These are the theoretical Max Sequential (SEQ) write limits we could obtain from our connection to the SAN (in practice there is a  5%-20% overhead involved):

SAN2

I’ve managed to very roughly test this write limit from a client to the SAN SAS disks:

SAN3

A result of 81.12MB/s is very positive, considering we can realistically over ever achieve 125MB on our current setup.

What this meant in my opinion was the SAN and network were not to blame meaning it was either client or server….Long story short the AV on the server was causing our latency not the “network”.

Tags: , , , ,

HP Switch – Access control Lists

Posted by robd on April 04, 2014
Networking / 1 Comment

Hi All,

We’ve recently implemented a BYOD wireless SSID for end users to check facebook or what ever it is they do.  As we’re short on resources we had to use existing DC’s to doll out IP’s but we were obviously worried around users “hacking” into the system.  So first thing we did was create a VLAN and assigned it to the wireless then applied several access control lists (ACL’s) to the core switch limiting the access to only the DC’s, proxy, core switch, each other and firewall then blocked the rest:

Firstly check the subnet mask of the VLAN you want to apply the ACL too as the wildcard/subnet address in the ACL will change dependant of the subnet.

The below example will use a subnet mask of 255.255.255.0 (the bits in red are notes only – do not try and apply them)

Logon to a switch and go into config mode:

 

Finally test!

Ok so what if you have a network that has a subnet of 255.255.252.0, well the wildcard changes in the ACL or above we had 0.0.0.255 where as in a 255.255.252.0 subnet we’d need 0.0.3.255.

Example:

 

So what happens if you want to delete a ACL from a VLAN:

 

 

Tags: , , , , ,

IP Routes

Posted by robd on March 29, 2014
Networking / No Comments

Hi All,

Started at a new company recently and they’ve had a ongoing issues for ages where they could only access one of two switches in their server room if they were on the same subnet.

So Switch A was the problem switch and had a IP of 10.0.0.123,

Switch B they could access from anywhere and had a IP of 10.0.0.124.

My Computer had a IP of 192.168.111.1.

So initially I started thinking the issue was down to vlans as we have around 50 vlans and I kind of just presumed it would be a issue with cross vlan routing.  Well actually I was wrong.

Firstly I pinged both switches:

SwicthA – Can not ping.

SwitchB – Can ping.

Next Trace route (TraceRT from a win 7 PC)

SwitchA – Could not trace

SwitchB – two hop trace, Core switch then the switch.

Ok so what next…..Lets try the above from the switches (so after connecting to server on the same subnet I ran the tests):

Ping my PC:

SwicthA – could not ping,

SwitchB – could ping.

Trace route:

SwitchA – No route,

SwitchB – two hop route.

So after this I decided it must be a routing issue, as both switches could ping the core switch and both switches could trace route the core switch.  So lets have a butchers at the routing.

 

Hold the phone, there’s no sodding return route to the core switch (10.0.0.2)

So I added the route like so:

And bobs your uncle it worked!!

Tags: , , , ,

HP Swicth – Show everything to a TFTP Server

Posted by robd on March 27, 2014
Networking / No Comments

So How do I send the output of the “show tech all ” command to a TFTP server?

Easy.

Launch the TFTP server (i.e. TGTPD64 from HERE), and issue this command at the CLI of the switch:

Tags: , , ,

Force traffic through a Network interface

Posted by robd on November 06, 2012
Networking / No Comments

Occasionally you may want to force traffic through a specific network interface.

For example, you have a VPN and you don’t want Chrome or IE (really, you use IE?)  to use the VPN as its slow and certain web sites may be restricted (because you shouldn’t be looking at facebook all day!)!

So what you need to do is change the network interface for the VPN to have a HIGH metric in the Advanced properties of the Networking interface.

This will force all traffic through your other network connection BUT and this is a big BUT, do the below after you have connected to what ever it is you want to connect to via your VPN (does that make sense? if not let me know in the comments)!

Turn your machine on, connect to the internet and then connect to the VPN, connect to what ever it is you do on your VPN,

Then Go to Network connections

Properties of undesirable network interface (VPN in this case but could be a Ethernet connection if you want to use your wireless for internet rather than Ethernet)

Properties > Double Click Internet Protocol Version 4 > Advanced

Deselect Automatic Metric

and enter a high number like 500

Ok Out,

and open Chrome or IE or what ever and check the IP to see what interface your routing out off!

 

Done

Tags: , , , , ,

ESX Gateway Host entry

Posted by robd on August 08, 2012
ESX, vSphere / No Comments

Had an annoying error today while trying to add a ESX 4.1 host to DataCenter:

Call “datacenter.queryconnectioninfo” for object “DC or Cluster Name” on vCenter Server “vCenter” failed.

Firstly I thought my password may be wrong for the host, it wasn’t!

Then, maybe my new host is in maintenance mode, it wasn’t!

Finally, and really it should of been obvious to me:

I’d changed the IP address twice while building the box via the console and had forgotten to enter a new default gateway!

So jumped on vSphere for the new host,
clicked the Configuration tab,
clicked Networking,
clicked properties (the one next to Virtual Switch: vSwitch0),
click Service Console and edit,
click Continue modifying this connection..,
clicked IP settings and
Added a Service Console Default Gateway! OK’d out

And Bam, added the host to the Datacenter!!

Tags: , , ,

Copy Protected by Chetan's WP-Copyprotect.