Network Simulation
Link layer models in Network simulation ns3:
- Mesh
- Use Flame protocol for broadband ad-hoc networking for emergency services.
- Use 802.11 s but not legancy802.11 stations supported yet.
- Wifi (802.11)
- Supports both ad hoc and infrastructure mode.
- EDCA QoS support but not HCCA.
- point-to-point links (PPP links).
- Bridge:1D Learning Bridge.
- Csma (Ethernet links).
- Tap-bridge, emu: testbed integration.
- Wimax (802.16).
- use 802.16-2004 std to define four scheduling services.
Sample code for network simulation:
This is the code for how to receive a packet in network during simulation in ns3.
void Beacon::Receive(Ptr socket) {
Ptr packet;
Address from;
while (packet = socket->RecvFrom(from)) {
Ipv4Address ipv4From =
InetSocketAddress::ConvertFrom(from).GetIpv4();
NS_LOG_INFO(“Received packet, ” << packet->GetSize() <<
” bytes from ” << ipv4From);