Bits and Bytes of Computer Networking Week 2 2
Bits and Bytes of Computer Networking Week 2 2
Week 2
IP ADDRESSES
*IP addresses are 32bits or 4 octets long, values can range from 0-255
On modern networks, an IP address will be automatically assigned to a net device through a technology
known as dynamic host configuration protocol. IPs given in this way are known as dynamic IPs, the
opposite of this is a static IP, which must be configured on a node.
*in most cases static IPs are reserved or servers and network devices and dynamic IPs are reserved for
clients but there are exceptions.
IP Datagram: A highly structured series of fields, which are strictly defined. The maximum size of a single
datagram is the largest number that can be represented by 16 bits or 65,535. If the total data that needs
to be sent is larger than this number the IP layer splits this data into many individual packets.
The first four bits (0-4) dictate which type of internet protocol is being used. The most common being
IPv4.
The next four bits field (4-8) declares how long the header is in its entirety (usually 20 bytes in IPv4.)
The next eight bits (8-16) are the service type field (these 8 bits can be used to specify details about
Quality of service or QOS technologies. This allows routers to make decisions about which IP datagrams
may be more important than others.
Afterwards follows a 16 bit (16-31) field known as the total length field which indicates the total length
of the IP datagram it’s attached to.
The segment from (0-16) is known as an identification field; this is a 16 bit number used to group
messages together.
The segment from (16-19) is known as the flag field; the flag field is used to indicate if the datagram is
allowed to be fragmented or if already has been fragmented.
Fragmentation: the process of taking a single IP datagram and splitting it up into several smaller
datagrams.
The segment (0-8) is the TTL field; an 8 bit field that indicates how many router hops a datagram can
traverse before its thrown away.
The segment (8-16) is the protocol field; and 8 bit field that contains data about what transport layer
protocol is being used (usually UDP or TCP).
The segment (16-31) is the header checksum field which runs a checksum of the contents of the entire
IP Datagram header.
*IP options field: an optional field and is used to set special characteristics for datagrams primarily used
for testing purposes.
Padding field; due to IP options field being of variable length and appearance the padding field is a series
of zeros to ensure the header is the correct total size.
IP address classes
IP addresses are split in two sections; network IDs and Host IDs
Address class system: A way of defining how the global IP address space is split up. There are 3 primary
classes A, B, and C.
Class A addresses are those where the first octet is used for the network ID and the last three are used
for the host ID.
Class B Addresses use the first two octets for the Network ID and the last 2 octets for the host ID.
Class C Addresses use the first three octets for the Network ID and the last octet for the Host ID.
Each address class represents a network of vastly different size.
If the first bit of an IP address is 0 it belongs to a class A network, if the first bits are 1,0 it belongs to a
class B network, if the first bits are 110 it belongs to a class C network
ARP is a protocol used to discover the hardware address of a node with a certain IP address.
ARP table is a list of IP addresses and the MAC addresses associated with them.
*ARP table entries generally expire after a short amount of time to ensure changes in the network are
accounted for.
Subnetting
Subnetting is the process of taking a large network and splitting it up into many individual and smaller
sub networks or subnets.
*incorrect subnetting setups are a common problem you might run into*
Just like IP addresses Subnet masks are 32bit numbers that are normally written out as four octets in
decimal.
Routing
A router is a network device that forwards traffic depending on the destination address of that traffic.
Routing tables have four collumns destination network, next hop, total hops, and interface.
Routing protocols are used to communicate between routers in order to share info between each other,
these protocols fall into two categories Interior and exterior gateway protocols.
Interior gateway protocols: used by routers to share information within a single system.
An autonomous system Is a collection of networks that fall under a single network operator.
*the two main types of interior gateway protocols are link state routing protocols and distance-vector
protocols.
Distance vector protocols use a list of every known network to the router and the amount of hops until
the destination to determine the best path but has little info on the state of other routers.
Link state routing protocols stay in communication with their neighbors by communicating with other
routers to update routing tables.
Exterior gateway protocols are used to communicate data between two routers in different autonomous
systems.
Internet assigned numbers authority (IANA): a non profit organization that helps manage things like IP
address allocation and Autonomous System number allocation.