Computer Networks
Computer Networks
Computer Networks
4) Transport Layer : Sets out which client and server programs are supposed to get
that data
-> Most famous protocol = TCP
-> Another protocol = UDP
Cables : connect different devices and allow the transfer of data through them
2 types :
1) Copper 2) Fiber
Most common form of copper twisted-pair cables used in networking are Cat5, Cat5e
and Cat6 cables
Cat6 is fastest in terms of data transfer but the maximum length because of it’s
winding is less comparatively
Fibre cables consists of small hair like cables of fibre which transfer data with
the pulses of light. They work more efficiently in regions where there are much
electromagnetic pulse. But the problem is they are very fragile and expensive
HUBS AND SWITCHES : the primary devices used to connect computers on a single
network, usually referred to as a LAN
HUB : A physical layer device that allows for connections from many computers at
once
Collision domain : A network segment where only one device can communicate at a
time
Switch determines the system/node to which the data needs to be transferred and
thus though it reduces the collision domain but it also reduces the overall
throughput
ROUTERS : device that knows how to forward data between independent networks
-> It’s a layer 3 device
-> Just like switch can inspect ethernet data, the router can determine the
internet data
Modulation : A way of varying the voltage of this charge moving across the cable
TWISTER PAIR CABLES : (copper) The twisted nature prevents the electromagnetic
interference and crosstalk from neighbouring wires
Duplex communication : The concept that information can flow in both directions
across the cable
RJ45 plugs
Network ports are generally directly attached to the devices that make up a
computer network
CSMA/CD : Used to determine when the communications channels are clear and when a
device is free to transmit data
-> If the least significant bit in the first octet of a destination address is set
to one, it means you’re dealing with a multicast frame
Data packet : An all-encompassing term that represents any single set of binary
data being sent across a network link
Data packets at the ethernet/data link level is called the ethernet frame. It’s a
highly structured collection of information presented in a specific order.
1 byte = SFD(Start Frame Delimiter) signals to a receiving device that the preamble
is over and that the actual frame contents will now follow
Ether type field : 16 bits long and used to describe the protocol of the contents
of the frame
VLAN Tag : 4bytes It indicated that the frame itself is a vlan frame. If a VLAN
header is present, the Ether Type field follows it.
Virtual Lan is a technique that lets you have multiple logical LANs operating on
the same physical equipment
-> Any frame that have a vlan tag is relayed specifically by a switch interface
that is specially configured for that tag.
Frame Check Sequence : A 4 byte number that represents a checksum value for the
entire frame. This checksum value is calculated by performing what’s known as
“cyclical redundancy check” against the frame.
CRC = An important concept for data integrity and is used all over computing, not
just network transmissions
Ethernet performs checks for data integrity, it doesn’t perform data recovery.
NETWORK LAYERS
(IP protocol)
Same Mac-address all the same but different IP address every time.
-> Static address are configured manually : in most cases, static IP addresses are
reserved for servers and network devices while dynamic IP addresses are reserved
for clients.
3) Service types : These 8 bits can be used to specify details about the quality of
service, or QoS, technologies. For eg : it helps the routers to decide which IP
datagrams are more important
4) Total length : 16 bits -> Indicated the total length of the IP datagram it’s
attached to
Note : The maximum size of a single datagram is the largest number you can
represent with 16 bits. If the size of the total amount of data that needs to be
sent is larger than what can fit in a single datagram, the IP layer needs to split
this data up into many individual packets. In this case the end/receiving node
knows that the packets are part of the same transmission.
7) TTL(TIME TO LIVE) : An 8-bit field that indicated how many router hops a
datagram can traverse before it’s thrown away.
-> It helps to break to infinite loops. For example the problems in the re-routing
configuration. Simply put if one router A thinks B is the next target and B thinks
A is the next target.
8) Protocol field : Another 8-bit field that contains data about what transport
layer protocol is being used. Common examples : TCP & UDP
-> since the TTL value changes at every router the checksum value too.
12) IP Options field : An optional field and is used to set special characteristics
for datagrams primarily used for testing purposes.
13) padding : A series of zeros used to ensure the header is the correct total size
Address class system : A way of defining how the global IP address space is split
up
-> Class D for multicasting and Class E address are used for testing purpose
It’s a protocol to find out the certain hardware address of a node with the IP
address.
ARP table : A list of IP addresses and the MAC addresses associated with them
SUBNETTING : The process of taking a large network and splitting it up into many
individual and smaller subnetworks, or subnets.
Subnet ID : calculated via subnet mask. Subnet mask is a 32 bit number that are
normally written out as four octets in decimal
* In subnet mask the places with 1 says the places which we can ignore to calculate
the host id. And the places 0 says the places that we need to consider to calculate
the host id.
The total number of hosts allowed is 2 less than the total number permitted because
0 is generally not used ( why?) and 255 is used for broadcasting purpose.
Demarcation point : To describe where one network or system ends and another one
begins.
In the old system we used network id , subnet id and the host id to deliver the
datagram to the required location but with CIDR the network id and the subnet id
are combined into one. ( slash notation also called CIDR notation)
-> before CIDR the network size were static but CIDR was able to provide the
dynamicity.

IP address belongs to network no the individual nodes of the network
Note : You can see the lecture to understand the routing mechanisms more. It’s
explained here pretty great.
1) Destination network : contains a row for each of the network that the router
knows about. Can be done using IP address and the subnet mask separately or the
CIDR notation
2) Next hop : next router’s address for the destination to be reached or state that
the destination is directly connected to the network
3) Total hops : uses to find out the best possible path available or that is gonna
available later on.
4) Interface : the router also has to know which of it’s interfaces it has to
forward data packets to .
Routing protocols fall into two main categories : Interior gateway protocols and
exterior gateway protocols
Interior gateway protocols are further split into 2 categories : Link state routing
protocols and distance-vector protocols
Autonomous System : A collection of networks that all fall under the control of a
single network operator.
DVP is older format of the routing protocol. It has a list of known networks and
the distance of the networks in terms of hops. The router using this protocol sends
this list to all the router it knows i.e directly connected .
Problem with this protocol : the routers don’t know much about the system other
than there immediate neighbours but these systems are very slow to adapt to any
changes that occur at the far side of the network
The state of the links of the interfaces of the router is send to every other
router of the system. This way each and every router knows about the state of each
of the router present in the autonomous system.
Requires for communication in between the routers that represents the edges of an
autonomous system.
IANA (Internet Assigned Numbers Authority) : A non-profit organisation that helps
manage things like IP address allocation
-> It’s also responsible for ASN i.e autonomous system number allocation
Transport layer has the ability to multiplex and demultiplex through ports.
Port = A 16-bit number that’s used to direct traffic to specific services running
on a networked computer
Port 80 : HTTP
10.0.0.1:80 - socket address
Port 21 : FTP
2) Source Port : A high numbered port chosen from a special section of ports known
as ephemeral ports.
3) Sequence number : A 32-bit number that’s used to keep track of where in sequence
of TCP segments this one is expected to be.
5) Data offset field : A 4-bit number that communicated how long the TCP header for
this segment is .
9) Urgent pointer field : Used in conjunction with one of the TCP control flags to
point out particular segments that might be more important than others.
10) Options field : sometimes used for more complicated flow control protocols.
6 control flags :
4) RST(RESET) : one of the sides in a TCP connection hasn’t been able to properly
recover from a series of missing or malformed segments
5) SYN(SYNCHRONIZE) : It’s used when first establishing a TCP connection and makes
sure the receiving end knows to examine the sequence number field
6) FIN(FINISH) : when this flag is set to one, it means that the transmitting
computer doesn’t have any more data to send and the connection can be closed
HANDSHAKE : A way for 2 devices to ensure that they’re speaking the same protocol
and will be able to understand each other
* You can send any request at any port but to get response there must be some
socket open at that particular port.
States :
1) LISTEN : A TCP socket is ready and listening for incoming connections. Seen in
there server side only
2) SYN_SENT : A synchronisation request has been sent, but the connection hasn’t
been established yet. Seen in the client side only
4) ESTABLISHED : The TCP connection is in working order and both sides are free to
send each other data. Both sides.
5) FIN_WAIT : A FIN has been sent, but the corresponding ACK from the other end
hasn’t been received yet.
6) CLOSE_WAIT : the connection has been closed at the TCP layer, but that the
application that opened the socket hasn’t released its hold on the socket yet
Transport layer protocols determine when to resend the discarder data packets.
Since TCP make 3 way handshakes for all the data packets. Hence it waits for the
ACK for each and every packet and thus data resending can be done.
UDP doesn’t care about the establishment of connection and hence reduces the
bottleneck
Firewalls :
A device that blocks traffic that meets certain criteria. It can work in different
layers. Generally operate on the transportation layer.
Firewalls are now a days are devised in the host level as well, thus it can allow
connection in a particular port and stop it whenever it feels so.
APPLICATION LAYER
* for web traffic the application layer protocol is called HTTP (hypertext
transmission protocol)
Session Layer : Facilitating the communication between actual applications and the
transport layer. It takes application layer data and hands it off to the
presentation layer.
Note : See this part in the video twice or thrice (how much you want coz it’s
good) and highly detailed to understand the working
NETWORKING SERVICES :
Intro to networking services
DOMAIN NAME : Domain name is the term we use for something that can be resolved by
DNS
-> IP address
-> SUBNET MASK
-> GATEWAY FOR A HOST
-> DNS server
TTL : A value, in seconds, that can be configured by the owner of a domain name for
how long a name server is allowed to cache an entry before it should discard it and
perform a full resolution again.
There were 13 total root name servers. Earlier it was distributed as per the global
geography but now it is distributed globally via ‘any cast’.

For DNS look up cache servers ask root servers, which is directs to TLD servers
and then the authoritative servers.
DNS AND UDP : DNS uses UDP for domain name lookups rather than TCP in the
transport layer.
If there isn’t any response during DNS LOOKUP with UDP , the server ask again.
If the data to provided for the lookup is too large using UDP datagram then the
server establishes a TCP connection for the DNS lookup.
* DNS round robin - for eg. some websites have a very large traffic press
www.mi.com, so in order to distribute the traffic over many servers many A-records
are maintained.
EG : www.microsoft.com and its four A-record
10.1.1.1
10.1.1.2
10.1.1.3
10.1.1.4
Whenever a Dns lookup is done for this site all the four ip’s are provided in the
configured order. In case the first one fails to connect then the rest are used to
make the connection
If the simultaneously another computer makes the request then the ordering changes.
Making the second one the first one i.e the configured order becomes :
10.1.1.2
10.1.1.3
10.1.1.4
10.1.1.1
This is the basic of how DNS round robin technique work for balancing the traffic
* A CNAME record is used to redirect traffic from one domain name to another.
-> Cname assures that both microsoft.com and www.microsoft.com resolves to the same
IP
Domains(2nd part of the domain name) : Used to demarcate where the control moves
From a TLD name server to an authoritative name server.
www - subdomain
FQDN ( FULLY QUALIFIED DOMAIN NAME) - when you combine subdomain, domain and TLD.
Registrar distributes the unused domain names by dealing with the ICANN
DNS can technically support up to 127 levels of domain in total for a single fully
qualified domain name.
DNS zones : allow for easier control over multiple levels of domain
ZONE FILES : simple configuration files that declare all resource records for a
particular zone. Contains the SOA
Start of Authority (SOA ) : Declares the zone and the name of the name server that
is authoritative for it.
NS records : indicate other name servers that might also be responsible for this
zone
Reverse lookup zone files : These let Dns resolvers ask for an IP and get the FQDN
associated with it returned. It contains PTR
OVERVIEW OF DHCP :
Every computer in a network must have these four important factors for it’s
identification
1) IP address
2) SUBNET MASK
3) GATEWAY
4) NAME SERVER (DNS server)
DHCP dynamic allocation : A range of IP addresses is set aside for client devices
and one of these IPs is issued to these devices when they request one.
Fixed allocation : Requires a manually specified list of MAC address and their
corresponding IPs.
DHCP in action :
DHCP discovery : The process by which a client configured to used DHCP attempts to
get network configuration information. It has four steps :
1) server discovery step :
-> DHCP server discovery message by client by broadcasting message from port 68
which is listened by port 67.
-> DHCP offer : broadcast of the servers address to the entire network.
IP masquerading
Port preservation : A technique where the source port chosen by a client is the
same port used by the router
*AFRIC
*ARIN
*APNIC
*LACNIC
*RIPE
Wikipedia IPv4 exhaustion*** -> It’s workaround is done by NAT and the Non-routable
address space
Virtual Private Networks (VPN) : A technology that allows for the extension of a
private or local network to hosts that might not be on that local network.
* In VPN the packets sent to the VPN server is sent with the packets in which the
payload contains an entire encrypted information of the datapackets need to be send
PROXY SERVICE : A server that acts on behalf of a client in order to access another
service
Simply put proxies are the intermediaries between client and the servers.
Modem = modulator/demodulator
Conversion of digital to analog and vice-versa and the transfer the data using
POTS( Plain old Telephone Service)
Baud rate : A measurement of how many bits can be passed across a phone line in a
second
@ what is broadband?
Any connectivity technology that isn’t dial-up connection
T-carrier technologies :
T1- 24 calls in single twisted copper pairs
T3- 28 T1
ADSL - ASYMMETRIC DSL - features different speeds for outbound and inbound
connections i.e faster download and slower upload speeds
Cable Broadband : The main difference is that cable is what generally knows as
“shared bandwidth technology”
Fiber connections :
ONT(Optical Network Terminator) : Converts data from protocols the fiber network
can understand, to those that more traditional, twister-pair copper networks can
understand.
Wide Area Network Technologies : Acts like a single network, but spans across
multiple physical locations
Frequency band : A certain section of the radio spectrum that’s been agreed upon to
be used for certain communications
802.11 protocols define the performance at the physical and the data link layers.
Wireless Access points : A device that bridges the wireless and wired portions of a
network.
Wireless LANS :

MESH NETWORKS :
Wireless channels : Individual, smaller sections of the overall frequency band used
by a wireless network
For 802.11b :
Wireless security :
WEP (Wired Equivalent Privacy) : An encryption technology that provides a very low
level of privacy. Uses 40 bits for encryption.
MAC filtering : You configure your access points to only allow for connection from
a specific set of MAC addresses belonging to devices you trust
Cellular Networking :
Verifying connectivity
Ping : Internet Control Message Protocol
PING : It lets u send a special type of ICMP message called an Echo Request.
If the destination is up and running and able to communicate on the network, it’ll
send back an ICMP Echo Reply message type.
Traceroute : A utility that lets you discover the path between two nodes, and gives
you information about each hop along the way
-> In linux and macOS the TR sends UDP packets to very high port numbers.
-> In windows(tracers) sent default ICMP echo request
PATHPING (WINDOWS) : runs for 50 seconds and then display the aggregate data
2) Test-Netconnection (windows)
-> An ISP almost always gives you access to a recursive name server as part of the
service it provides
Public DNS servers : Name servers specifically set up so that anyone can use them,
for free.
4.2.2.1 through 6
Most public DNS servers are available globally through any cast.
Hosts files : The original way that numbered network addresses were correlated
with words was through hosts files.
A flat file that contains, on each line, a network address followed by the
host name it can be referred to as.
-> almost every hosts file in existence will, in the very least, contain a line
that reads 127.0.01 localhost, most likely followed by ::1 localhost, where ::1 is
the loopback address for IPv6
* hosts files are a popular way for computer viruses to disrupt and redirect users’
traffic
Hardware virtualisation : A single physical machine, called a host could run many
individual virtual instances, called guests
Hypervisor : A piece of software that runs and manages virtual machines, while also
offering these guests a virtual operating platform that’s indistinguishable from
actual hardware

Private Cloud : Used by a single large corporation and generally physically hosted
on its own premises.
Hybrid Cloud : A term used to describe situation where companies might run things
like their most sensitive proprietary technologies on a private cloud, while
entrusting their less-sensitive servers to a public cloud.
IPv6 addressing : 128 bits - There are 2 rules when it comes to shortening an IPv6
address. The first is that you can remove any leading zeroes from a group. The
second is that any number of consecutive groups composed of just zeroes can be
replaced with two colons.
FE80:: -> link local unicast addresses = Allow for local network segment
communications and are configured based upon a Host’s MAC address
IPv6 headers :
1)version -4
2) class of traffic - 8
3) flow label - 20
4) payload length -16
5) Next header - unique concept - optional/additional headers -8
6) Hoplimit -8
7) source address - 128
8) destination address - 128
Note : If there exists any “next header”, then it exists between first header and
the data payload.
IPv6 tunnel broker : Companies that provide IPv6 tunnelling endpoints for you, so
you don’t have to introduce additional equipment to your network