2026-07-10 14:35
Status:
Tags: Coursera Bits and Bytes of Computer Networking Google IT Certificate - Technical Support & Fundamentals Learning Network Networking Internet Servers
BBCN - Module 2 - The Network Layer
==The Network Layer
-
The Network Layer:
- On LAN, nodes can communicate with each other via physical MAC addresses and switches / ports
- Mac addressing does not scale well, they are all random and not order so you cannot know where one is
- So it does not scale well over long distances
- The solution to this is the Network layer, and the Internet Protocol (IP)
-
IPv4 Addresses:
- These are 32 bit long numbers that are divided into 4 8 bit or one byte chunks
- Basically 0-255: 0-255:0-255:0-255
- This format is known as dotted decimal notation
- IP addresses are distributed to different companies with actual criteria, and so they are able to be tracked pretty much
- They have a good idea of where to go because of this
- For example 9. xxx. xxx. xxx is reserved for IBM, and so if data needs to be sent to an IBM server, then it is very easy to know what the IP address might be
- IP addresses belong to the networks not the devices attached to those networks, you devices IP can change, but it’s mac address cannot
- Many modern networks can be connected to a network and have an automatic IP address given to it, this is known as a dynamic IP address
- The opposite is one assigned manually like I did for my server, which is a Static IP address
-
IPv4 Datagram and Encapsulation:
-
The data packets at the ethernet layer have their own name, the packets at the network layer do too, a datagram
-
IP Datagram- a highly structured series of fields that are strictly defined, think of the ethernet frame, or refer to BBCN - Module 1 - Introduction To Networking
-
The main two portions of this datagram are the header and the payload
-
-
The Version first field is 4 bits, and indicates the type of Internet Protocol being used, with the most common being IPv4
-
The header length field is also 4 bits, which dictates the length of the entire header, it is almost always 20 bytes in length when dealing with IPv4
-
Service Type Field- these 8 bits can be used to specify details about quality of service, or QoS, technologies
-
Total Length Field- 16 bits in length and indicates the total length of the datagram it is attached to
-
Identification Field- a 16 bit number that is used to group messages together, this comes about with the maximum size being basically the highest number you can make with 2 bytes / 16 bits, that being therefore, if the data is greater than this, the IP layer slits the data into many individual packets. When this happens, this field is used in order to understand that the data being sent is not the whole data but a part of a larger set of data
-
Flags / Fragment Offset- Used to indicate if a datagram is allowed to be fragmented, or to indicate that the datagram has already been fragmented.
- Fragmentation- the process of taking a single IP datagram and splitting it up into several smaller datagrams
-
Time to Live (TTL) field- An 8-bit field that indicates how many router hops a datagram can traverse before it is thrown away, basically it’s lifespan. Every single time data reaches a router, it decrements this field by one, and if it is equal to zero, then the router knows it does not have to send this data out anymore
-
Protocol field- this is another 8 bit field that contains data about what transport layer protocol is being used, this being the TCP / UDP portion of the pipeline that is in the transport layer above the network layer
-
Header checksum field- A checksum of the contents of the entire IP datagram header, to see what a checksum is, or the cyclical redundancy protocols, refer to them in BBCN - Module 1 - Introduction To Networking
-
Source IP Address- this is the IP address of where the data is being sent from
-
Destination IP Address- the IP address of where the data is being sent too
Note: Since IP addresses are all 32 bit fields, both of these are 32 bits -
IP options field- an optional field that is used to set special characteristics for datagrams, primarily used for testing purposes
-
Padding- a set of zeros that is used to basically make sure that the header is the correct size
-
The entire contents of an IP datagram are encapsulated inside of the ‘payload’ portion of a frame in the Ethernet protocol, basically each step in the five layer protocol adds on more and more data in order to get the data where it needs to go:
-
-
-
IPv4 Classes:
-
IP addresses can be split into two sections: Network ID & Host ID
-
9.100. 100.100 is an IP address owned by the IBM network for example
-
In this example, the network id is the 9, while the Host ID is the rest of the entire IP address
-
The Address Class System- a way of defining how the global IP address space is split up
-
There are Three types of classes that determine the type of IP address you are dealing with
- Class A- addresses are the ones where only the first number in the IP address is taken up by the network ID, while the rest is the Host ID
- Class B- These are the ones where the first 2 numbers are the Network ID, and the rest are host ID, think like 128.0.x.x
- Class C- as the pattern follows, these have the first 3 values reserved for the network ID and the last one for the host ID, think 192.168.12.x
-
Each of these classes can store a very different amount of host devices based on their type, therefore each one is given a different type based on the need
-
-
You can tell what type of class and IP address belongs to based on it’s left most bit, it even just it’s given starter value in the IP address, so all values with a first number in between 0-127, are all of the Class A type of IP address
-
The Class D and E addresses are used for either testing (Class E) or for multi-casting (Class D), and therefore are not as important as the three classes that come before them
-
-
Address Resolution Protocol:
-
How do MAC addresses and IP addresses relate to each other in a given network?
-
Address resolution protocol (ARP)- a protocol used to discover the hardware address of a node with a certain IP address
-
Once an IP datagram has been formed, it needs to be put inside of an ethernet frame, and in order to do this, you have to encapsulate it
-
ARP table- a list of IP addresses and the MAC addresses associated with them that is stored inside of a router
-
The way that this list is made, is a computer on the network that wants to send a packet to a computer will send out it’s IP address, and if it is not in the ARP table, then a FF: FF: FF: FF broadcast message is sent out called a ARP broadcast, basically requesting the MAC address of the thing with that IP address
-
Whenever the computer with that IP address is found, it will then send back out an ARP Response with it’s MAC address so that way the data can be stored in the table for future use
-
==Subnetting
-
Subnetting:
-
Subnetting- the process of taking a large network and splitting it up into many individual and smaller subnetworks or subnets
-
Basically make the internet smaller so you can save up on some IP addresses
-
Something with cider also
-
Incorrect Subnetting setups are a common problem you might run into as an IT support specialist
-
-
This here basically shows the splitting up of a single main network into a bunch of smaller networks, this is done via those gateway routers which basically dictate the whole portion of that network, it looks like the goal is to go down and down from a class A network and onward maybe
-
The thing is that of course a single router of class A can have 16 million different devices connected to it, and therefore you basically need to split this value up in order to have a better understanding of where to go with the data
-
-
Subnet Masks:
-
Because you want to split things up even further than just a Host ID and Network ID, some of the bytes used in the Host ID are then delegated to something called the Subnet ID
-
At the internet level, core routers, or basically the ones that are not entirely the gate way ones, and instead the access point for gateway routers, only care for the Network ID, so that way they know which subnet to send the data to
-
Subnet mask- a 32 bit number that are normally written out as four octets in decimal
-
Think of 9.100.100.100, which consists of 4 octets of 8 bits, which in binary is 00001001.01100100. 01100100.01100100
-
A subnet mask is a binary number with two parts, the beginning part is the mask itself, which is a stream of ones, and then the last byte is all zeros, think 255.255.255.0 in terms of binary
-
The purpose of the mask is to tell the router the Subnet ID
-
-
Basically, this mask tells us that the only valid portion of the IP address is the last one as that is the only one that is storing the Host IP, while the first 1 is the network ID and the next 2 are probably the Subnet ID
-
Now think of the subnet mask 255.255. 255.224. This is 11111111.11111111. 11111111.11100000, which basically means that there are 5 bits of Host ID space on the actual main IP address, meaning there is only 32 available spaces on assignable IP addresses
-
A faster way of writing this would be 9.100.100.100/27 because that subnet mask represents 27 ones followed by 5 zeros
-
-
Basic Binary Math:
-
this is a handy way of knowing how many numbers can be stored in one byte or 8 bits of data
-
Computers follow the base 2 system of counting, unlike us humans who use a base 10 system
-
Whenever you want to represent a number, you use zeros and ones, counting up with the ones
-
If you ever run out of a zero to turn into a one, add in another column with a zero to present the new number you want to showcase
-
-
This is addition in binary, same would go for subtraction I guess
-
two of the most important operators (like addition) in computers are OR & AND
-
These compute whether a combination of two digits is considered to be either true (1) or false (0), so basic 1 OR 0 = 1 but 0 OR 0 = 1, unlike AND which would be 0 AND 0 = 1 but 1 AND 0 = 0
-
A subnet mask is a way for a computer to use AND operators to determine if an IP address exists on the same network, therefore the Host ID portion is also known, since it is anything that is left out
-
-
This would evaluate to 9.100. 100.0 actually, because the last one would be false, and therefore evaluate to a value that is not in fact true, like all the other values would be ones
-
-
CIDR:
-
Address classes were the first attempt at splitting up global IP addresses
-
Subnetting was then introduced when addressing classes were not the best
-
However, even traditional subnetting could not keep up
-
The Network ID is always 8 bits for Class A, 16 bits for Class B, and 24 bits for Class C
-
This means there might only be 127 class A networks in existence, but it means there are almost 2 million class C networks.
-
The issue also comes up where in a business 254 might be way too little for a given network, but 65534 is way too many
-
Therefore a bunch of businesses needed separate class C networks for their given space, sort of defeating the purpose of it all
-
This is where CIDR or Classless Inter-Domain Routing comes into play. It is more flexible when it comes to describing networks
-
It uses subnetting to demarcate networks, or setting it off basically
-
Demarcation point- to describe where one network or system ends and another one begins
-
So basically, instead of relying on the Network, Subnet, and Host ID to get information to a given space, the Network and Subnet ID values are combined into one
-
This is where the slash notation comes in, and it is sometimes just called CIDR notation
-
So think of 9.100. 100.100 with a subnet mask of 255.255.255.0, also sometimes written as 9.100.100.1000/24
-
When no longer caring about the class of this IP, all that we need is what the network mask tells us to determine the network ID
-
Which in this case would be 9.100.100.0
-
The host ID remains the same
-
This allows for more arbitrary network sizes, it allows for networks to be different sizes, you can basically change the size of the subnet mask in order to allocate more or less space for your needed IP addresses
-
-
==Routing
-
Basic Routing Concepts:
-
Router- a network device that forwards traffic depending on the destination address of that traffic
-
A router has at least 2 network interfaces, given it needs to be connected to 2 networks to do it’s job
The following is the steps of a basic routing process:
-
Basically, a network wants to receive a packet from a given destination right, the router has an interface on both the network sending and receiving the data. The data that the computer on the left is trying to send to 10.0. 0.100 (or just the given computer it wants to send it to) is not on it’s own local subnet, and therefore, using it’s mac address, sends the data over to the router. The router then does a look up to see if it has that IP address in any of the other networks it has access to in it’s IP addresses table basically, and if it does, then it strips away all of the data that was given via the ethernet protocol from the computer, and inspects the IP data gram header for the destination IP field, and check that the destination IP is in the range of the other network it is connected to, and sends it over to given IP address that the data was meant for. However, before doing this, it puts back in the data that it had from the previous ethernet protocol and the IP data, and adds it back over to the sent out data, only this time with a lower TTL number of course
-
This is all the same whenever there is 3 networks, however of course now the first receiving network needs to figure out to send the data over to the other router, or at least through another network connected to another router which is closer to the given data needed. This is done through a look up of it’s routing table, and therefore knows which way to send over the data in the network between different networks and gateway routers in order to send the data where it would need to go
-
-
Routing Tables:
- Destination Network- contains a row for each network that the router knows about, so basically each one that it would be able to reach from it’s current connections, basically just stored as a Network ID and a Subnet Mask
- Next Hop- this is the IP address of the next router that should receive data intended for the destination networking question, basically where to send the data if you want to go to that destination network
- Total hops- the number of hops needed between routers to get to a destination, this is what I imagine because the TTL value as well. It is also important to determine the shortest number of jumps to get to your destination
- Interface- the router has to know which one of it’s interfaces it should forward traffic to matching the network destination, this is basically the part that I assume helps the router whenever it gets data that it itself would need to pass along
- Many core routers have millions of these rows
-
Interior Gateway Protocol:
-
Routing Protocols- these are special protocols the routers use to speak to each other in order to share what information they might have as a means to update their routing tables
-
Interior Gateway Protocols are further split into two categories: Link state routing protocols and distance-vector protocols
-
Interior Gateway Protocols are used to share information within a single autonomous system
-
Autonomous System- a collection of networks that all fall under the control of a single network operator
-
Exterior Gateway protocols- used for the exchange of information between independent autonomous systems
-
Basically, if a bunch of networks are hooked up to one main point of operation, those inner networks share their data via the Interior Gateway protocols, but then those outside main points of operation then share the data with each other via the Exterior Gateway protocol
-
Distance Vector Protocols are an older standard, it takes it’s routing table and the data that it holds, and then sends it over to every single router around it, or every single router directly connected to it, they don’t really tell too much about the state of the entire system, only just the routers near each other. Due to this, a router might be slow to react to a change in a network that it is far away from, before finding out the quickest path
-
Link state protocols these take a better approach. Each router advertises the state of the link of each of it’s interfaces. These can be connections to other routers, or even direct networks. Basically, they tell all the other networks what they themselves can see, instead of just addressing the current state of their surroundings, allowing for quick optimization of better paths
-
-
Exterior Gateways, Autonomous Systems, and the IANA:
-
Exterior Gateway Protocols are used to communicate data between routers representing the edges of a autonomous system
-
Basically used to share information across different organizations, so image Verizon needing to share data with T-Mobile or something like that
-
These are very important to how the internet works today
-
Core internet routers know about autonomous systems, like given ISPs for example, and know how to route data between then and even their given gateways and what not
-
Internet Assigned Numbers Authority (IANA)- a non-profit organization that helps mange things like IP address allocation, they are also responsible for the Autonomous System Number allocation
-
Autonomous System Number Allocation (ASN)- numbers assigned to individual autonomous systems, also 32 bit numbers, but known as a single given number, because the number does not need to hold a different value for Network or Host IDs
-
-
Non-Routable Address Space:
- Given the growing state of our population, and the internet as a whole, the IPv4 standard does not hold enough IP addresses for every single person on the planet
- It also cannot account for data-centers holding thousands of computers for large corporations
- Request For Comments (RFC)- it is a long standing way for people who keep the internet running to have a way of communication to do so
- Non-Routable address space- They are rages of IPs set aside for use by anyone that cannot be routed to
- Basically, not every single computer on the internet, needs to be connected with every single other computer on the internet, these addresses allow for these devices to communicate with each other, but no gateway router will try to forward their traffic elsewhere
- Basically the main three of these are able to be used inside of inner networks, by anyone and everyone, and can basically help to share data between a sort of smaller network
- The three main IP addresses this relates to are 10.0.0.0/8, 172.16.0.0/12 192.168.0.0/16
==Glossary
Address class system: A system which defines how the global IP address space is split up
Address Resolution Protocol (ARP): A protocol used to discover the hardware address of a node with a certain IP address
ARP table: A list of IP addresses and the MAC addresses associated with them
ASN: Autonomous System Number is a number assigned to an individual autonomous system
Demarcate: To set the boundaries of something
Demarcation point: Where one network or system ends and another one begins
Destination network: The column in a routing table that contains a row for each network that the router knows about
DHCP: A technology that assigns an IP address automatically to a new device. It is an application layer protocol that automates the configuration process of hosts on a network
Dotted decimal notation: A format of using dots to separate numbers in a string, such as in an IP address
Dynamic IP address: An IP address assigned automatically to a new device through a technology known as Dynamic Host Configuration Protocol
Exterior gateway: Protocols that are used for the exchange of information between independent autonomous systems
Flag field: It is used to indicate if a datagram is allowed to be fragmented, or to indicate that the datagram has already been fragmented
Fragmentation: The process of taking a single IP datagram and splitting it up into several smaller datagrams
Fragmentation offset field: It contains values used by the receiving end to take all the parts of a fragmented packet and put them back together in the correct order
Header checksum field: A checksum of the contents of the entire IP datagram header
Header length field: A four bit field that declares how long the entire header is. It is almost always 20 bytes in length when dealing with IPv4
IANA: The Internet Assigned Numbers Authority, is a non-profit organization that helps manage things like IP address allocation
Identification field: It is a 16-bit number that’s used to group messages together
Interface: For a router, the port where a router connects to a network. A router gives and receives data through its interfaces. These are also used as part of the routing table
Interior gateway: Interior gateway protocols are used by routers to share information within a single autonomous system
IP datagram: A highly structured series of fields that are strictly defined
IP options field: An optional field and is used to set special characteristics for datagrams primarily used for testing purposes
Network Address Translation (NAT): A mitigation tool that lets organizations use one public IP address and many private IP addresses within the network
Next hop: The IP address of the next router that should receive data intended for the destination networking question or this could just state the network is directly connected and that there aren’t any additional hops needed. Defined as part of the routing table
Non-routable address space: They are ranges of IPs set aside for use by anyone that cannot be routed to
Padding field: A series of zeros used to ensure the header is the correct total size
Protocol field: A protocol field is an 8-bit field that contains data about what transport layer protocol is being used
Routing protocols: Special protocols the routers use to speak to each other in order to share what information they might have
Service type field: A eight bit field that can be used to specify details about quality of service or QoS technologies
Static IP address: An IP address that must be manually configured on a node
Subnet mask: 32-bit numbers that are normally written as four octets of decimal numbers
Subnetting: The process of taking a large network and splitting it up into many individual smaller sub networks or subnets
Time-To-Live field (TTL): An 8-bit field that indicates how many router hops a datagram can traverse before it’s thrown away
Total hops: The total number of devices data passes through to get from its source to its destination. Routers try to choose the shortest path, so fewest hops possible. The routing table is used to keep track of this
Total length field: A 16-bit field that indicates the total length of the IP datagram it’s attached to
References
Many network protocols are implemented based on specifications published by the Internet Engineering Task Force (IETF). We’ll cover this in more detail in a future lesson!
The most common distance vector protocols are RIP, or Routing Information Protocol (IETF RFC2453), and EIGRP, or Enhanced Interior Gateway Routing Protocol (Cisco documentation). The most common link state protocol is OSPF, or Open Shortest Path First (IETF RFC2328).
In terms of exterior gateway protocols, there is only one in use today. The entire Internet needs to agree on how to exchange this sort of information, so a single standard has emerged. This standard is known as BGP, or Border Gateway Protocol (IETF RFC 4271).
Over many decades, RFCs have come to belong to the IETF, or Internet Engineering Task Force, which is an open community charged with developing and maintaining the standards required for the Internet to continue to operate.
You can browse the impressively large collections of RFCs here.
By the way, RFCs have a long history of April Fool’s Day jokes. My personal favorites are RFC 1149 and RFC 3514, both of which might be funnier once we’ve tackled the next module.











