Internet Key Exchange Protocol (IPSeC VPN)

230 views
Skip to first unread message

Shimaa Abdel Naby Abdel Hakim

unread,
May 30, 2017, 5:28:54 AM5/30/17
to ns-3-users
Hello everyone , I am in bad need to help me . I need to mode IKE protocol using ns3 . Acually I need to model IPSeC VPN . I have the c++ code for the basic operation of IkE but I dont know how to start . 

I attached a link to ike code .
please help me 

Tommaso Pecorella

unread,
Jun 28, 2017, 6:36:55 AM6/28/17
to ns-3-users
Hi,

my suggestion is to use DCE or ns-3 in emulation mode. You can also add a library to ns-3, if you have an IKE library.
Developing the whole IKE protocol in ns-3 is possible, but kinda hard.

T.

Shimaa Abdel Naby Abdel Hakim

unread,
Jun 28, 2017, 7:02:16 AM6/28/17
to ns-3-...@googlegroups.com
I don't know how to start actually, I have many open source for IKE but I don't know how to develop it using ns3. How can I use ns3 in emulation mode?

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/SimeED3h2no/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--
Shimaa Saif , PhD Candidate
MSIS (Mixed Signal Integrated Systems) Lab
515, E-10, ChungBuk National Univ.
School of Electronics Engineering
ChengJu-si, ChungCheongBuk-do, South Korea

Shimaa Abdel Naby Abdel Hakim

unread,
Jul 5, 2017, 8:20:04 AM7/5/17
to ns-3-users
I started by implement ISakmp protocol for key management, I design the header according to standard and now try to run this code but it has an error and I don't know why, please can you help me? 

*
 * network topology.cc

 *
 *  Created on: Jun 11, 2017
 *      Author: shimaa
 */
#include "ns3/log.h"
#include "ns3/assert.h"
#include "ns3/packet.h"
#include "ns3/node.h"
#include "ns3/object-vector.h"
#include "ns3/ipv4-route.h"
#include "udp-header.h"
#include "udp-socket-factory-impl.h"
#include "udp-socket-impl.h"
#include "isakmp_header.h"
#include "ns3/packet.h"
#include "ns3/header.h"
#include "ns3/ipv4-header.h"
#include "ns3/udp-header.h"

using namespace ns3;

void DefaultPrint (void)
{
  // We create a packet with 1000 bytes of zero payload
  // and add 3 headers to this packet.
  Ptr<Packet> p = Create<Packet> (1000);
  Ipv4Header ipv4;
  UdpHeader udp;
  IsakmpHeader header;
  ipv4.SetSource (Ipv4Address ("192.168.0.1"));
  ipv4.SetDestination (Ipv4Address ("192.168.0.2"));
  udp.SetSourcePort (500);
  udp.SetDestinationPort (500);
  udp.ForcePayloadSize(1000);
  header.SetInitiatorCookie(0x613ff3c5eebdb44);
  header.SetResponderCookie(0000000000000000);
  header.SetNextPayload(1);
  header.SetMjrversion(0x1);
  header.SetMinversion(0x0);
  header.SetExchangeType(2);
  header.SetFlag(0x00);
  header.SetMsgId(0x00000000);
  header.SetMsgLength(0x000000FF);
  p->AddHeader (udp);
  p->AddHeader (ipv4);
  p->AddHeader(header);

  std::cout << "full packet size=" << p->GetSize () << std::endl;
  // Here, invoke the default Print routine, directed to std out
  p->Print (std::cout);
  std::cout << std::endl;
return; }
Reply all
Reply to author
Forward
0 new messages