LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-12-2012, 02:45 PM   #1
Avan1729
LQ Newbie
 
Registered: Jan 2012
Location: India
Distribution: Red Hat
Posts: 2

Rep: Reputation: Disabled
PCAP file creation with Shell script


I would want to create ARP,STP,OSPF,RIP, BGP and similar packets with a shell script , Please give me some inputs on how to create it ?
 
Old 01-12-2012, 02:50 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi Avan1729,

What you mean by you want to create ARP,STP,OSPF,RIP, BGP and similar packets with a shell script? Could you please elaborate.

Do you have a sample/draft script already in place? If yes, please share with us.
 
Old 01-13-2012, 01:38 AM   #3
Avan1729
LQ Newbie
 
Registered: Jan 2012
Location: India
Distribution: Red Hat
Posts: 2

Original Poster
Rep: Reputation: Disabled
Smile

Hi T3RM1NVT0R ,

I am working on a script with which I can simulate traffic in an office network . I have a PCAP file which is a capture on a Router Port , I intend to make changes in the IP address and MAC address of this PCAP file and add new kinds of packets like route update packets and Keepalives for routing protocols , UDP packets for VOIP traffic . Populate MAC and ARP entries for addresses which do not exist in my network (Lab network).The reason being I am using a smaller set up in my lab as compared to the office network and I am trying to simulate certain failure scenarios in my lab network .

I do not have a sample draft or script , I am still looking for Idea's to begin with this project . I know that I can do this PERL but unfortunately I am not familiar with PERL .

Let me know if further details are needed .

Thanks
Avan
 
Old 01-13-2012, 11:25 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Avan1729 View Post
Hi T3RM1NVT0R ,
I am working on a script with which I can simulate traffic in an office network . I have a PCAP file which is a capture on a Router Port , I intend to make changes in the IP address and MAC address of this PCAP file and add new kinds of packets like route update packets and Keepalives for routing protocols , UDP packets for VOIP traffic . Populate MAC and ARP entries for addresses which do not exist in my network (Lab network).The reason being I am using a smaller set up in my lab as compared to the office network and I am trying to simulate certain failure scenarios in my lab network .

I do not have a sample draft or script , I am still looking for Idea's to begin with this project . I know that I can do this PERL but unfortunately I am not familiar with PERL .
I'm a bit confused. You say this is for a lab environment, which to me would indicate you're learning/experimenting. Wouldn't also learning Perl to accomplish your task be a good thing???

Last edited by TB0ne; 01-13-2012 at 01:55 PM.
 
Old 01-13-2012, 02:36 PM   #5
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

I am finding it bit difficult to understand the objective. Let me break it down and see if I am getting it correct.

Quote:
I am working on a script with which I can simulate traffic in an office network . I have a PCAP file which is a capture on a Router Port
So you have got a packet trace file (PCAP file) which was a result of the trace that has been ran on one of the interface on your office router. Is this correct?

Quote:
I intend to make changes in the IP address and MAC address of this PCAP file and add new kinds of packets like route update packets and Keepalives for routing protocols , UDP packets for VOIP traffic
You want to edit this packet capture file so that it can reflect the MAC address and IP address that are in use in your lab environment. Is this correct?

The point I am not getting how you will going to use this PCAP file to experiment around. I mean it is just a trace and you can refer it to setup your environment. How you will use this to test your lab environment (which resemble a little with your office environment)?

Basically I am trying to understand your objective behind doing all this. What outcome your are expecting and what raw material you already have.

You said that you know that this can be done in perl. Did you read any link which explains this can be done in perl?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script for Linux Parallels Container Creation linuxrndblog Linux - Server 2 12-16-2011 02:15 AM
Need help writing Unix Shell script to pass file name,path,creation date ! windjashi Programming 4 10-08-2009 12:59 AM
How to program shell script to automate mass user account creation? EsAsher Linux - General 2 06-30-2007 08:41 AM
Help needed on Mass user creation using shell script EsAsher Linux - General 3 06-29-2007 11:26 PM
File Creation: bash shell stapletone Linux - Newbie 2 09-24-2006 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration