Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
In ethernet frame is included the port number by the sender?
I mean let`s say for ssh connection -ssh user@host-every ethernet frame contain number 22 as port information?
or http://host:8080 ->contain 8080 in the frame?
Sender port does not have to match destination port. The destinations are well known so that clients know how to make a connection. The sender port is included so the server knows where to send the reply. Note that ports are not in the ethernet header, they are part of the higher-level TCP/IP protocol.
It's called encapsulation. An application (say a browser) creates a packet with a header. The protocol which decides what goes in the header would be something like http.
This packet then becomes the body of a tcp packet with a new tcp header that would carry the sending and receiving ports.
The tcp packet then becomes the body of an ip packet with a new ip header containing the sending and receiving ip addresses.
Finally the ip packet becomes the body of an ethernet packet with a new ethernet header containing the sending and receiving machine addresses. There will be a lot of unwrapping and rewrapping of this last envelope on the way to the final destination.
When the ethernet packet reaches its final destination, all the headers are taken off one by one to reveal the original http packet, which the browser can understand and respond to.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.