LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-19-2015, 03:10 PM   #1
Euticus
LQ Newbie
 
Registered: Aug 2015
Posts: 7

Rep: Reputation: Disabled
Unhappy How to do very low-level Ethernet communication


Here's the setup:
I have two computers connected to each other by Ethernet with a crossover cable. They are the only two computers on this simple network.

I want to send data from A to B with the smallest latency possible.

I was looking at UDP. Then I realized that I don't really need a source or destination ip address, since there is only one source and one destination possible. Is it possible to send a UDP packet without an IP header, etc? Is there a library that supports this sort of communication? I am relatively new at networking, so please overlook any incorrect use of technical terms.
 
Old 08-19-2015, 05:58 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,027

Rep: Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632
Hello and welcome to LQ.

UDP is connectionless so it is not a great choice for accuracy.


There have been all sorts of network models over the years. I have a graphic of all the major ones but currently the tcp/ip model is most used. Since you said UDP then you are kind of stuck with tcp/ip. While it doesn't really need an ip in a very technical way, you can fool it a bit with static arp.

I doubt you would get much latency on a cross over or patch cable between systems.

The way you speed up packets is to reduce how the system and switches handle packets. Things like wirespeed switches, maybe looking at how checksum is managed, fifo issues and such.

You might look at other protocols maybe?
 
Old 08-19-2015, 07:18 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,863

Rep: Reputation: 1152Reputation: 1152Reputation: 1152Reputation: 1152Reputation: 1152Reputation: 1152Reputation: 1152Reputation: 1152Reputation: 1152
If data integrity is important (and I can't think why it wouldn't be), then using one of the established protocols is sensible. Assuming Gigabit connectivity, I can't imagine that any low-level protocol you could create would be as reliable and fast. The OSI model is a proven well-established model. You should research the layers and established data transfer protocols before re-inventing the wheel.

Anyway You might be interested in these discussions based on similar thoughts
http://stackoverflow.com/questions/6...ly-mac-address
http://security.stackexchange.com/qu...by-mac-address
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux low-level graphics in C tutorial now includes X11 (direct communication) prushik Programming 5 10-24-2014 02:19 PM
Is there any more low-level lang then C/C++? Mr. Alex Programming 20 09-07-2010 03:51 PM
low level format juanb Linux - General 1 02-08-2006 03:16 AM
low level languages devit Programming 2 05-07-2004 11:16 AM
Low level formatting.... Santorres Linux - General 1 02-02-2004 07:50 AM

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

All times are GMT -5. The time now is 02:10 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