TCP |
Transmission Control Protocol |
It is a communications standard that enables application programs and devices to exchange messages over a network. It is used to send packets across the internet. Router => Go from A to B. TCP => What the data package is for, port number, chuncks of data, handling errors (e.g. browsing the web port 80, email port 25).
|
Router |
x |
Give IP addresses for any connected device. Devices in the same network has the same network bits: is it the same network? Are we close? When network is too far from router, it needs help => default gateway . Network Address Translation (NAT) => router is the only public address. Therefore, all devices (private IP) will be connected to it and the router itself will translate and connect all devices to the internet. Routers constitute logical or physical borders between the subnets, and manage traffic between them. They also separate different networks. The router has an interface for each network it connects to. Router, a.k.a. access point. |
Routing Table |
Destination: 0.0.0.0/0 (all possible destinations) |
the destination in a route specifies where outbound packets are intended to go, and the next hop indicates the next router or gateway to which these packets should be forwarded in order to reach their destination network. Routing tables use these route entries to determine how to forward packets efficiently across networks. Go from A (destination) to B (next-hop). Route data to some next-hop, a.k.a. go to the next router.
|
IP |
class A - B - C = how many octects for network and hosts home network = class C, less hosts per network class D - E = reserved for multicast experiments, people can't use it
|
An address fulfills the functions of identifying the host and locating it on the network in destination routing. An IP address is divided into two logical parts, the network prefix and the host identifier. All hosts on a subnet have the same network prefix. This addressing structure permits the selective routing of IP packets across multiple networks via special gateway computers, called routers, to a destination host if the network prefixes of origination and destination hosts differ, or sent directly to a target host on the local network if they are the same.
|
network switches |
x |
Just as the switch connects multiple devices on a single network, the router connects multiple networks together. The router has an interface for each network it connects to. |
local IP address |
ipconfig getifaddr en0 ifconfig
|
Using the terminal command line, reveal your local IP address. |
IP address size |
128 - 64 - 32 - 16 - 8 - 4 - 2 - 1 => convert from binary to decimal 11000000.10101000.00000001.00010101 = 192.168.1.21
|
4 bytes = 32 bits, each octet 8 bits, size of an IP address. Lowest level of storage in a computer.
|
Subnetting |
11111111.11111111.11111111.11000000 |
Change the subnet mask to suit your needs => esignating some high-order bits from the host part as part of the network prefix and adjusting the subnet mask appropriately. This divides a network into smaller subnets.
|
Subnet mask |
bitwise AND operation |
It tells how big the network is. 255 = the corresponding octet is frozen, it won't change. Convert 255 into binary, will turn every bit on 255.255.255.0 = 11111111.11111111.11111111.00000000 . The octets made by 1s are the network bits, they won't change. The zeros are the host bits. It also tells how many hosts there are in the network. The numbers are contiguous, always a row of 1s and 0s.
|
Formula to discover how many hosts |
$2^n - 2$ where n is the number of zeros, two to the power of host bits. Then, subtract 2.
|
8 zeros, give me 256 possible hosts, from wich I must subtract 2 (subnet ID/address and the broadcast address. first and last IP address in the network... all-zeros versus all-ones). Total 254 usable IP addresses. If I need more hosts than that, I must steal from network bits... |
Break one network into smaller networks |
256 - 128 - 64 - 32 - 16 - 8 - 4 - 2 => discover how many bits do you need for creating networks. e.g. 4 networks demand 2 bits |
When you need more network, you need more bits (still them from host bits). E.g. how many host bits do you need for creating four networks? |
CIDR notation |
192.168. 1.0/22 |
This means that the first 22 bits of the IP address are reserved for network routing. It counts the number of bits in the prefix and appends that number to the address after a slash (/) character separator. E.g. IPv4 network 192.0.2.0 with the subnet mask 255.255.255.0 is written as 192.0.2.0/24 . IPv6 follows this standard too. |
Increment |
11111111.11111111.11111111.11000000 64 is the increment
|
Last network bit we have. We use it to determin the size of a network and its range. Each one of the networks below will have the subnet mask 255.255.255.192/26
|
Traffic |
x |
When the routing prefixes of the source address and the destination address differ. A router serves as a logical or physical boundary between the subnets.
|
Broadcast |
|
Last IP address from the network. E.g. network => 192.168.1.0 broadcast => 192.168.1.255 router => 192.168.1.1 (connect with public IP addresses outside of the network) |
Internet |
x |
Interconnected network. Set of rules about how networks communicate to eachother. |
Domain Name System (DNS) |
Yellow pages of the web |
DNS correlates IP address to human readable words. Mapping, translating IPs. |