UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2013-12-10 12:05 PM

Yafis
Member
Registered: 2013-12-05
Posts: 1

VLAN - Multiple peers and routing

I am implementing a VLAN where proxies join and leave the network.
Exchange of packets between two connected proxies :
1. Link state packets - describe the state, in terms of IP addresses and network performance, between two proxies.
2. Probe packets - sent to measure link performance
3. Data packets - send and receive the data

The proxy must handle following tasks :

1. Waiting for connecting proxies on the listening TCP port.
2. Connecting to the peer proxy given in the configuration file.
3. Maintaining and updating membership list of neighbours who are connected and receiving link state packets from them.
4. Builds a directed graph from the membership and link state lists.
5. Computes the shortest path and forwarding table to all the proxies.
6. Reading packets from the local interface(TAP device) and forwarding them to the correct remote proxy via TCP.
7. Reading packets from the TCP socket of a connected proxy and forwarding them to the local interface, or routing them to the correct peer proxy's  TCP socket.
8. Periodically:
    1. Checking for expired membership list and link state entries.
    2. Sending link state packets.
    3. Sending probe packets to measuring the link.
    4. Updating the routing graph.
Can you guys help me with the design? I need to implement some kind of routing protocol where all the proxies can be reachable directly or via some other proxy.

Offline

#2 2013-12-15 03:16 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,230

Re: VLAN - Multiple peers and routing

This sounds like a homework assignment. We'll gladly help you, but don't expect us to hold your hand or to do your homework for you. To get help it helps to ask specific questions. So with that out of the way...

When you say VLAN, I'll assume you mean some kind of custom virtual LAN thing, and not the Ethernet kind of VLAN (meaning you're not bridging multiple Ethernet VLANs via TCP/IP or anything like that, which was my first impression).

The obvious thing to do is to get the initial membership and link state list from the configured peer proxy.

Are you allowed to connect to other proxies directly, or only to proxies listed as peer proxies in the configuration file? If you are only allowed to connect to peer proxies it's fairly simple because you don't have to decide whom to connect to, only where to route packets to.

By the way, you probably have no choice in the matter, but doing this kind of bridging over TCP is not a good idea. Reliable and guaranteed delivery sounds great, but that's handled by TCP already. If you tunnel TCP through TCP you're asking for trouble. At least disable the Nagle algorithm by setting TCP_NODELAY.

With UDP you could just send the data directly to the proxy that needs it, without the hassle of maintaining connections to multiple proxies. (But that would defeat the point of the assignment I suppose.)

Offline

Board footer

Powered by FluxBB