Here we have only brief concepts as introduction of network.


Source: digitalthinkerhelp.com


Short notes of network

[LAN]A local area network (LAN) is a collection of devices connected together in one physical location, such as a building, office, or home.

[Ethernet switch] is a type of network hardware that is foundational to networking and the internet. It avoid collision problems. It is a hub + bridge. It has MAC table.

[MAC] is the physical address (Unique Layer 2 address given to every network interface on an Ethernet network). Commands: ifconfig or ipconfig.

[NIC] Network Interface Cards is a hardware in a computer that provides an Ethernet port. It has unique MAC address.

[Ethernet frame] is involved in the communication between two machines. It is source mac + mac destiny + payload

[Hub] device to connect ports but it is dumb. Send the frame to everyone. Open to collision

[Bridge] decide for who avoiding colision. It use MAC tables

[Unicast vs Multicast vs Broadcast] is the way of transmition of data.

[Router] guide and direct network data. It is connected to a switch on a trunk port. Trunk port is a network port on a switch that can carry traffic for multiple VLANs. I break up broadcast segments.

[Route Table] is a set of rules used to identify the direction to send the data packets over network.

[Subnet] is a sub-network of a network.

[Network gateway] is a device or node that connects disparate networks by translating communications from one protocol to another. Routers are default gateways for devices within their segments.

[VLAN] is a custom network which is created from one or more local area networks. It avoid many physical switches. Logical segmentation. Each LAN has a subnet. VLANs are inside to swiche. Use router to communicate among the VLANs.

[WAN] (wide-area network) is a collection of local-area networks (LANs) or other networks that communicate with one another. Connect router of different and distant network. Router use WAN interface and send message to neighbors or sent to internet (0.0.0.0/0 -> data centers).

[BGP] (Border Gateway Protocol) is a set of rules that determine the best network routes for data transmission on the internet.

[IPSEC VPN] provides a private and secure IP communication over a public network. Public IP using securely tunnel with secrets.

[Layer 2 VPN] emulates a physical sub-network in an IP or MPLS network, by creating private connections between two points. It extends Layer 2 network segments over geographic distance. It establish a secure VPN tunnel

[Redundancy] ensure the continuous operation. Multiple router. It should eliminate the SPOF (single point of failure). Strategy: Redundant Component, Redundant Path, Protocols as HSRP or VRRP, Dybamic Routing such as OSPF or BGP.

[DHCP]: Dynamic Host Protocol. When a machine issues a DHCP (Dynamic Host Configuration Protocol) request, it typically sends an Ethernet broadcast message on the local network. This broadcast is used to discover and contact a DHCP server within the network, requesting an IP address assignment and other network configuration information.

[DNS] Domain Name System (nslookup www.google.com -> DNS query to find the IP address)

[NAT] (Network Address Translation) has the idea that multiple devices access the Internet through a single public address. It is a networking technique that modifies network address information in data packets as they pass through a router or firewall, allowing multiple devices within a local network to share a single public IP address for communication with external networks like the internet. This process helps conserve public IP addresses and adds a layer of security by hiding internal network structures from external sources.

[NTP]: Network Time Protocol

[VLSM]: (Variable Length Subnet Masking) the primary puerpose if to allocate IP address more efficiently by allowing for different subnet sizes within the same network.


Layer [OSI vs TCP Model]


Source: Post published in Linkedin by LetsDefend

L5,6,7: Application (Session, Presentation) provide interface between the communication software and applications > communication protocol > browser > payload > protocol (http,dns, ftp, ntp, pop3, smtp, ssh, ldap, ssh)
L4: Transport host to host communication layer >define protocols > Error Recovery (check data, negociation) > Flow control > 3Ways handshake (sequence number, SYN, ACK) > Protocol (TCP, UDP, RSVP) > Device (Hosts, Firewalls) > Segment (header for data, use source and destination)
L3: Network Define the way for our data to communicate to devices across network (touted) > upload , IP address, networkd address > Routers and switches > Protocols (IP, ICMP - routed / OSPF, RIPv2 - routing are protocols between routers) > routing tables > Packet - data encapisuation header
L2: DataLink define rules when a device can send data, define format of the header > connect with Switch > interface mac > for where> Ethernet, Wifi, Fiber Channel... > VPN > Protocols (Ethernet, PPP, WAV, ARP) > Device - switches > Frame - encapsulates all data above it, use header. Sach L2 segment has a subnet (10.1.1.0/24). Router is a default gateway
L1: Physical
  • physical characteristics for transmitting data
  • phisical address
  • connect to a cable
  • NIC (Network Interface Cards - connect devices to LAN), Ethernet, Hub, repeater
  • sends bits of data

  • IP Adress

    Calculate the subnet (CIDR NOTATION) [1][2][3]

    10.1.1.0/24 > 10.1 is the subnet. 24 first bits are the network address (10.1.1 or 10.1.2) and the last one will be used for the IP address

    10.1.0.0/16 means 10.1 or 10.2 is the network. So, can use 10.1.255.255 as IPs

    Network Address: 10.1.1.0
    Default Gateway: 10.1.1.1
    Broadcast Address: 10.1.1.255
    Network Address: 172.16.0.0
    Mask: 255.255.0.0
    IP: 72.16.10.4
    Broadcast Address: 172.16.255.
    97.122.14.233/25
    11111111.11111111.11111111.10000000
    Network Address: 97.122.14.128/25
    Briadcast Address: 97.122.14.255
    (25)
    Octet 2: 128(1) 64 32 16 8 4 2 1
    only the position 128 but is part of the net. The other are host
    14.25.98.12/14
    11111111.11111100.00000000.00000000
    Network Address: 14.24.0.0/14
    Briadcast Address: 14.27.255.255
    (25)
    Octet 2: 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
    0 | 0 | 0 | 1 | 1 | 0 - - -> 16 + 8 = 24
    0 | 0 | 0 | 1 |1 |0 |1 | 1 -> 16 + 8 = 27
  • https://www.subnet-calculator.com/
  • https://www.calculator.net/ip-subnet-calculator.html
  • https://www.site24x7.com/tools/ipv4-subnetcalculator.html
  • https://www.tunnelsup.com/subnet-calculator/
  • https://www.solarwinds.com/free-tools/advanced-subnet-calculator
  • https://appuals.com/what-is-a-subnet-calculator-how-to-use-it/

  • References