1

So I'm working on my own routing protocol based on a alternative to IP, called ILNP, and I'm having trouble understanding how a router differentiates control packets and data packets for OLSR.

The IP header contains a 'next_header' field, which can inform the router that this packet is for example, an ICMP packet.

But for routing protocols such as OLSR, what would this field be set to so that the router understands how to parse it?

Currently I'm just using the ICMP code, but obviously this wouldn't work in reality as it could conflict with real ICMP type and code values.

I feel like the fact that I can't find an answer for this suggests I'm thinking about this wrong, and so asking the wrong question. So please, any advice!

3

The IP header has a protocol field that indicates the type of payload.

The payload can be a transport-layer protocol like TCP or UDP, or a protocol riding directly on top of IP like OSPF.

Protocols using TCP or UDP usually use a port number to identify their type (like UDP port 520 for RIP).

OLSR uses UDP as transport-layer protocol with default port 698 - check RFC 3626 Clause 3.1.

A router with routing protocol support needs to have a full IP stack (it's usually managed anyway). It listens to those UDP ports or IP protocols that it understands and processes incoming datagrams. Depending on the protocol and its options, the datagrams are addressed to the router's IP address and MAC, a dedicated multicast address or sometimes simply broadcast.

2

Routing protocols do not care about such things. Routing protocols are used by routers to exchange routing information, but they do not route packets, which is done by the router using a routing table. Routing protocol are one way in which routing tables are populated.

A packet with a destination address on a router will will be routed to the control plane of the router. Packets are routed by the destination network address, and if the destination is the router itself, the packet will be sent to the router software.

  • In for example, an ad hoc network however, using something like AODV, is this still the case? Since every node becomes a router, surely it needs some way to differentiate between data packets to forward and control packets to interpret and possibly forward? – Jordan Mackie Mar 11 at 20:09
  • As I explained, control packets for a router are sent to the destination address of the router. Routing protocols do not route packets. A router uses its routing table to route packets. Routing protocols are one way to populate a routing table because they allow routers to exchange routing information. The other two ways are directly connected networks are automatically placed in a routing table, and statically configured routes are manually placed in a routing table. – Ron Maupin Mar 11 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.