cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
630
Views
1
Helpful
8
Replies

Programmable Switch and Managing Traffic

HassanAbdullah
Level 1
Level 1

I'm working on a project in which I need to do something like, I'll monitor and collect traffic passing through a switch, then classify it based upon port number, packet size and maybe IP range too. Then I want to display this on a web page. The web page will show real time traffic passing through a switch and classified. Now, if I want to drop certain type of packets, I'll just click on the block button on the web page and I'll command the switch to block the packets with particular port number, packet size and IP range.

I want to know, if it's possible. And if it is possible how can I do so?? What should I use,  GNS3 Mininet or something else. I'll appreciate as many suggestions as I Can. 

8 Replies 8

Hi @HassanAbdullah 

 I believe it would be possible but you need to think in switches mode 9300 or 9200 or switch model with API. And this requires a physical device as GNS3 only run older switches model.

I believe this video can give you a start  point

https://www.youtube.com/watch?v=AJhnt-sIfK0

Here in the community there are people discussing about cisco devices and programability

https://community.cisco.com/t5/cisco-software/ct-p/j-cisco-software

 

 

So we can't have a virtual implementation of the problem?

 

Easy like GNS3 no. The switch that will give you that level of programability run IOS-XE which is not emulated so far.

You can try to do this with older switches running IOS on the GNS3 but I dont believe it would be possible to have the level of control you are aiming to get.

 

How much control am I expecting to get if I use an older switch?? Like what part of the project can be implemented, can the website part be done without actually blocking part?? Or just the blocking part can implemented in a better way without including the website part?

 

Sure you can. The website part does not depend on the switch.  Although the switch does have web interface. 

 Your challenge I believe would be to figure out how to interact with the switch.  Switch allows for telnet/ssh interaction.  So,  when you click a button on your web site are.you going to translate this clikck to a ssh command?

 You can use Python for that. Netmiko is a good Python library to interact with cisco devices.

So, if I have understood this correctly, I need to use a cisco switch with IOS on GNS3. Then I'll be able to project the traffic on the website. And the switch is programmable, so I have to convert the click of a button on the website into ssh command inorder to block a certain type of traffic. 

This is one possibility.

You need a web interface,  a connection to the switch using some interactive language like python and execute the commamd on the switch.

Leo Laohoo
Hall of Fame
Hall of Fame

A switch cannot do deep packet inspection.  

The description falls exclusively into a beefy firewall appliance (subject to the size of the WAN/LAN traffic).

Review Cisco Networking for a $25 gift card