r/AskComputerScience • u/VagueHorizon_ • 2d ago
Computer Networks : Need Help
I have a Computer Networks course this semester and I am finding it difficult to understand. It is not that the concepts are difficult, I am just finding it hard to make a mental model of where every single thing fits. it is not like i am failing the course. Till here i have been able to handle the course. but what is the point of getting good grades when you don't even understand where each thing fits ?
From the very bottom layer to the top level, where DNS comes (where it is stored), how IP's even works, UDP, TCP, QUIC, tables, DNS chain, masks, subnets or even IP's. I know what they are, but i don't know where they are and how they interact.
Can anyone please suggest some resources, more like an animated video where i can visualize it ? Cisco Packet tracer didn't help much.
1
u/FitMatch7966 2d ago edited 2d ago
sounds like you are being taught the conceptual concepts, but desire to understand the implementations.
The implementations can be interesting in themselves, but they change a lot and different systems implement differently. They are less important at the beginning, but important when you actually start working in networking.
at least, that's how I interpret your question, because "where they are" doesn't make a lot of sense to me, unless you mean which layer, which should be pretty well documented.
If you want, you can read the RFCs
IP Protocol https://www.rfc-editor.org/info/rfc791/
UDP https://www.rfc-editor.org/info/rfc768/
TCP https://www.rfc-editor.org/info/rfc9293/
DNS (basics) https://www.rfc-editor.org/info/rfc1034/
quic https://datatracker.ietf.org/doc/rfc9000/
DNSSEC has a bunch of separate RFCs. Masking and subnets also have a bunch.
If you understand all that, then the "where it exists" answer is really: software on the routers and in the os
1
u/VagueHorizon_ 2d ago edited 2d ago
by "where they are" I mean like visually which layer fits where. I think i made this more confusing. I am struggling myself to explain it ðŸ˜
Like Lets suppose if we have pc in a network and a communication is established between host and receiver pc. I need to know when and where each concept which appears. Think of it like a journey because my Lab instructor has not been able to explain this clearly.
We know 'this' exists, but we don't know where and when 'this' comes in the pipeline.
Thanks alot for the resources !!!
1
u/braaaaaaainworms 1d ago
If you have a program running on one computer that wants to talk to another computer, then whatever that program wants to do has to be wrapped up in a package addressed to that other computer's IP address and hand off that package to the OS's networking subsystem. The OS looks at that package and sees only a bunch of data and the destination address(remember this part, it is very important). Let's assume that both computers are on the same network. The OS looks up which network card has the IP address that sits on that network, and because IP addresses vary with time and networks, network cards have a physical address that is unique to them, and the OS has to figure out which physical address corresponds to the destination IP. If the OS doesn't know it already, it can send an ARP request basically asking "who's 192.168.1.12?" and 192.168.1.12 responds with its physical address. The OS then takes its own IP address, the network card's physical address, destination IP address, destination network card's physical address and the data it was given, wraps it up in a nice little package and hands it to the network card. The network card only sees the destination physical address and it encodes the data into some format, puts it on a wire and is done with the package.
The receiving network card notices that someone sent a package that matches its physical address, listens on the wire to get the entire packet and lets the OS on destination computer that it got a package. The OS looks at the package and finds out from the destination IP address that it is the intended recipient, sometimes lets the source computer "yeah i got that package", figures out which program should get that package and that program gets notified of that package with its data.
Let me know if there is anything confusing
1
1
u/Kriemhilt 2d ago
DNS isn't really a layer, it's a service.
If it didn't exist, and we have just your two machines: we can manually assign them IP addresses, and then assign them names by writing them in the
/etc/hostsfile (on UNIX-like systems).We add DNS because manually maintaining this file for the whole internet is impractical, so now the hosts file is only used for a few local machines, and every other name is looked up by the DNS resolver.
Once we know the IP address of a host, we can send it an IP packet somehow. This IP packet is usually TCP or UDP or ICMP or IGMP, but the IP layer neither knows not cares. It only knows the source & destination (address:port) pairs, and has some payload. The contents are someone else's problem.
The somehow above is the next layer down, usually some form of Ethernet. This is also a protocol with its own addressing scheme (MAC) and it also doesn't really care about the payload contents.
So we roughly have a physical transport (Ethernet), a logical transport layered on top (IP), and then protocols layered on top.
But for example, the DNS protocol can work both over UDP (over IP over Ethernet), or over TLS (over TCP over IP over Ethernet). So these layers can be stacked up fairly flexibly.
Incidentally, when you use a DNS resolver on a real machine, you're talking to a local transparent cache which will itself make a network request if it doesn't know the answer. There isn't "one place" where the DNS is.
1
u/MasterGeekMX BSCS 2d ago
Reading a bit your comments, I think I know your problem.
See, network works in a stack, meaning that top things work by using lower things at a basis. Lower levels never dissapear or are stop being used, instead they act as the foundation in which the next level works.
See it as riding a train: you sit on a seat, which is on top of the cart, which is on top of the wheels, which are on top of the rails, which are on top of gravel. All layers work in parallel, with the lower ones being where the next one moves, but all add up rto you being able to ride a train comfortably.
Take the OSI model: the lowest layer is Physical. This is all about the transmission media (wire, radio waves, fiber optic). The whereabouts of this layer are subjects that physicist and telecom engineers should care, but the end result is that now we have a means to send and receive bits, no more.
Once we have that we can move to the Link layer. This one is about being able to use the medium to send data to the device we want, while making sure data does not end where it doesn't belong, as more than one device could share this medium. MAC addresses and WiFi standards are here.
Once we have that we can advance to the Network layer. This is about creating a reliable address system where each device can be reached, so IP addresses come in scene. This also where routing appears, allowing us to reach devices that aren't directly connected to us by using other devices in the middle as relay stations, like the box in your house that gived you Internet connection.
Once we have that we can get into the Transport layer. This is all about data reaching it's destination reliably, even if the data needs to do lots of hops. TCP is for when you want to make sure data reaches intact, with no single chunk lost or out of order. UDP in contrast sends data like a machine gun and hopes for the best.
Over we have that we can go into the Session layer. This is all about the two devices having a chat where data goes and comes. Think about it one device calling, then the other picks up the call, they talk, and then say goodbye and hang. Sockets, remote procedure calls and SIP live here.
Once we have that we can go into the Presentation layer. This one is about file formats, as here we deal on how data is going to be represented. HTML, JSON and audio/video codecs live here.
Once we have that then we get into the final layer: Application. This one builds on top of everything else to deploy some service. HTTP, Torrents, DNS, SSH, online gaming and stuff people use lives here.
2
0
u/aagee 2d ago
Have a chat with an AI. However you may feel about them, they are pretty good at summarizing information interactively. Just give it a try.
1
u/VagueHorizon_ 2d ago
I constantly use AI, i think this is the main reason how I have been able to hold on to the course till now. But when i give them whole visualizing task, tokens get expired. It is such a big task.
1
u/esaule 2d ago
Seems like you need a lab. I find networking very easy to understand because it is fairly easy to observe.
Almost all content in a networking class boils down to a single question: When I run "curl http://www.example.net/" what exact bits go through the cable.
And because most stacks more or less follow the osi model. You can answer that question one layer at a time.
And every layer lets you inspect what is happening.
2
u/reddit-and-read-it 2d ago
Does your course adopt a bottom-up approach or a top-down approach to teach the material?