How do computer frames work?

460 views

The frame gets the destination/source MAC address, the router uses the packet’s IP address, but the router sends the frame? I don’t get that. Does the router read the packet inside the frame? So it knows the IP address it’s going to send the frame to?

In: Technology

4 Answers

Anonymous 0 Comments

The term “frame” can be used of various different types of data frames on a computer network. It is even possible to have data frames inside other data frames. You may think of it as envelopes. Each envelope might have its own address and be stuffed inside other envelopes or get another sticker attached to it. For example an office mail room might put a post it note with the office number on every incoming pice of mail to help the mail delivery, or a neat invitation envelope might be embeded in a more sturdy envelope that fits an address and postage and can handle the mail sorting machines without damage. In practice in a computer network this is done by adding a header to each frame before the actual data and then depending on the type of frame there is a tail after the data with additional information.

So a computer network will usually involve ethernet frames which use MAC addresses for local delivery. This is designed to work without any configuration and be easy for switches to handle. For wifi a seperate protocol is used which technically is not ethernet and includes features such as encryption and authentication but the wifi frames are easy to convert to and from ethernet frames. The data in the ethernet frames are usually IP frames, either IPv4 or IPv6 as determined by one of the fields of the ethernet frame. IP frames are similar in fuctionality to ethernet frames but does have a lot of additional features making it much better at routing packets in a huge network. The IP frame usually contains a TCP or UDP frame, again this is specified in one of the IP header fields. These too have different functionality. By using several different protocols with different functionality inside each other you are able to mix and match different protocols to get different features.

Anonymous 0 Comments

Yup. The mac address is mostly for the sender and receiver to identify each other, and is needed for doing things like NAT which is what allows 20 computers in a house to share one up address.

But the ip address is what important for routing, so routers have to be able to read and interpret ip headers. They also do a small bit of math to calculate the frame check, but it’s simple math that doesn’t use much more processing power than just receiving data on one port and transmitting it in another.

Most routers are also capable of limited interpretation of the ip packets data as well, at least identifying things like port number or http requests for quality of service and filtering.

Anonymous 0 Comments

What we have is networks inside networks. Ethernet packets are called frames; IP packets are called packets.

Usually we have an IP network made up of Ethernet networks. So your computer puts an IP packet inside an Ethernet packet. The IP packet is addressed to the other computer, but the Ethernet packet is addressed to the router. The router received it, opens the Ethernet packet because it’s addressed to it, looks at the IP packet, puts the IP packet in a new Ethernet (or other) packet for the next part of the journey and sends it onwards.

Anonymous 0 Comments

A frame is made up of layers like an onion in accordance with the OSI model’s layers. Each network device peels the layers back until it gets to the stuff it is concerned with. Each device’s network interface hardware/firmware handles Layer 1, which is stuff required to communicate over whatever medium, such as transmission begin/end markers, message length, error correction data. Switches are Layer 2 devices, they read up to the the MAC addresses to forward to their correct port. Routers are Layer 3 devices, they peel back to L3 (the IP address) to be able to route between their network interfaces. They repack the message with a new L2 layer that has the router’s MAC address as sender and the next hop device in the chain as recipient. Firewalls and other inspection systems can look into higher layer stuff to decide what to do with the packets.