Archive

Archive for the ‘Networking’ Category

How to use VLC Media player to stream multicast video

March 22nd, 2016 Comments off

When testing networks and routing, it is sometimes useful to be able to send a number of multicast streams across the network. VLC media player can do this, but getting it working is not as trivial as I expected. Here’s how to do it:

  1. In the Media menu, choose “Stream”
  2. In the Open Media dialog file tab, click “add” and choose the file you want to stream  and click “Open”
  3. At the bottom, click the “Stream” button
  4. This opens the “Stream Output” dialog showing the source file you have chosen. Click Next to set destination.
  5. In “Destinations”, choose “RTP /MPEG Transport Stream” and click the “Add” button
  6. In the “Address” box, enter the required multicast address (eg 239.255.0.1) and set the port (or leave default at 5004)
  7. In transcoding options, choose the appropriate settings for your video and PC’s codecs. I chose “Video H.264 + MP3 (MP4)”. I had to set the options by clicking the options (screwdriver and spanner) button immediately to the right of the dropdown. In encapsulation, I chose MPEG-TS. In video codec, I set the bitrate to 4000kb/s
  8. Once the options are set, click “Save”. Then click Next for “Option Setup” and select “Stream all elementary streams” then click stream.

To view the stream, open another instance of VLC media player (try it on the same PC before trying it over the network)

  1. Choose Media/Open Network Stream
  2. In address, enter rtp://@239.255.0.1:5004 – choose the correct address and port you entered when setting up the stream. Don’t forget to enter the “@” symbol after “rtp://” and before the multicast ip address!
  3. Click “Play”

If you want to stream multiple videos, remember to choose an different multicast address and/or port

Categories: Networking

Packet capture with Nexus 1000V

January 20th, 2015 Comments off

Today I thought I’d take a look at creating a SPAN session on the 1000v to monitor traffic. I found it really easy to do! SPAN is one of those things that takes you longer to read and understand than to actually configure. I find that true with a lot of Cisco products: Fabric Path, OTV, LISP, etc.

SPAN is “Switched Port Analyzer”. Its basically port monitoring. You capture the traffic going from one port and then mirror it on another. This is one of the benefits you get out of the box for the 1000v that enables the network administrator not to have this big black box of VMs.

First I need to see which vethernet is assigned to which VM. This command can help you do that

n1kspan-2

Then create a monitor session with the following commands

And confirm the monitor session with the command

n1kspan-2

In this case, we have an error. The state is “Down”. That is because VMTEST1 and VMTEST2 are in 2 difference VM Hosts. After moving them to the same host, the state will change to up

Intra-VLAN multicast traffic on Nexus 7000

November 11th, 2014 Comments off

I have couples of 3750 and Nexus 5K connected to 2 Nexus 7010. The N7Ks run in VPC mode. I have a Multicast source and multiple multicast receivers, they are on the same VLAN. This VLAN is only a Layer 2 VLAN.

The issue is, only the receivers that are on the same access switch with the source receive the traffic. If the receivers are on difference access switch, they don’t see the IGMP Join Group packet.

A bit of digging around, I found out the reason, is that the other switches does not have an mrouter port and does not know about the source.

There are 3 solutions to fix the issue:
1. Turn on an SVI interface and enable PIM
2. Turn on IGMP SNOOPING QUERIER
3. Turn off IGMP snooping on ALL switches.

Let’s focus on solution #2. Since I don’t need to route the multicast traffic outside of the VLAN, this is the best solution:

To do this on the Nexus 7000 you need to do the following:

Where x.x.x.x is an un-used IP address
And you need to run these command on both VPC switches

For more information, have a look at this article

Categories: Data Center, Networking

Use routers to create packets with specific source IP address

August 21st, 2014 Comments off

I have setup many VPN connections. There is 1 problem that I deal with a lot is the traffic from the other side of the VPN. Usually I have to wait for the other companies to send their traffic through the VPN. It sometime hard to tell where the problem is.

I found a way to use a router to send out packets , pretending it’s the other side of the VPN leg

To do this, first I need to replace the VPN appliance with the router and create a loopback interface

Where 172.69.24.12 is the source of the packets

Then run the following commands

Where 172.16.111.50 443 is the destination address and port on my network.

Now I can test and confirm my own VPN leg without waiting for other parties.

Categories: Networking

Packet capture from Cisco ASA

August 18th, 2014 Comments off

One of my favorite troubleshooting tools on the Cisco ASA firewall is doing a packet capture. An incoming packet will hit the capture before any ACL or NAT or other processing. An outgoing packet will hit a capture last before being put on the wire.

To start the capture, use this command

Example

To view the capture from CLI

To download the pcap file

Or from your browser

To clear the capture

And finally, to remove the capture

Happy sniffing!

Categories: Networking

Cisco Nexus 1000v: VEM needs an VMK interface to connect to VSM

June 26th, 2014 Comments off

A VMK (VM Kernel) interface is a virtual interface that ESXi itself uses to connect to the outside world. When we first setup an ESXi, VMK0 is setup to be the management interface.

When you install Nexus 1000v, the VEM modules need a way to communicate to the VSM modules, and we need a VMK interface on the ESXi hosts to do this.

If you choose to use the management VMK interface (normally VMK0) for layer 3 control, that VMK will need to be moved over to the Nexus 1000V, where it will sit ‘behind’ the VEM or else VSM will not ‘see’ the VEM (i.e. it won’t appear in the output of ‘sh mod’) until the VMK interface is moved to the VEM.

esxi-vem1

For myself I prefer to have VMK0 interface “out of band”. I leave VMK0 with vSwitch0 and create a new VMK1 interface for the VEM communication

esxi-vem2

If you choose this option, you may need to configure static routes on the ESXi host if the two VMK interfaces are in different VLANs – for example, a default gateway would be configured via VMK0, while a more specific static route would be configured via VMK1 towards the VSM IP address.

Cisco IOS: How to disable/restart SNMP ENGINE process

May 30th, 2014 Comments off

It has happened quite often to me that many time due to various reasons, I received these errors in Syslog
1 log

Then the switch would slowly start to drop packets, 1 VLAN at a time until it completely crashes. The only fix is to pull the power cords of all of the switches in the stack. Sometime that’s not an option. I found a way to slow down the crashing process by disabling the SNMP ENGINE process.

First, this command would show you the status of the process

2 SNMP ENGINE

The commands to stop and restart SNMP ENGINE are

3 stop

Now that SNMP ENGINE has been restarted, it will give you some more time to schedule a proper hardware restart for the switch.

Categories: Networking
l>