Hits To Remember:
- Intranet - Communication within the same autonomous system
- Internet - Communication between different autonomous system
- Broadcast/Multicast: One to All and One to Many
- IPV4/IPV6: IANA (Internet Assigned Numbers Authority) manages the global pool of IPv4 addresses and allocates large blocks to Regional Internet Registries (RIRs), which then distribute them to ISPs and organizations.
- Public IP: A public IP address is a globally unique IP address assigned by an Internet Service Provider (ISP), and it is accessible over the internet.
8.8.8.8 (Google DNS) 142.250.190.14 (Google server) 52.95.110.1 (AWS server)- Private IP: A private IP address is an IPv4 address reserved for communication within a local area network (LAN). It is used exclusively for internal communication between devices.
Private IP Address Ranges (IPv4):
| Type | IP Range | CIDR Notation | Example IPs | Purpose |
|---|---|---|---|---|
| Class A | 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 10.0.0.1, 10.1.1.5 | Internal LAN use |
| Class B | 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 172.16.5.10, 172.20.1.1 | Internal LAN use |
| Class C | 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 192.168.1.1, 192.168.100.5 | Internal LAN use |
| Loopback | 127.0.0.0 – 127.255.255.255 | 127.0.0.0/8 | 127.0.0.1 | Device internal testing |
| Multicast | 224.0.0.0 – 239.255.255.255 | 224.0.0.0/4 | 224.0.0.1, 239.255.255.255 | Group communication (multicast) |
| APIPA | 169.254.0.1 – 169.254.255.254 | 169.254.0.0/16 | 169.254.0.1, 169.254.10.10 | Auto IP when DHCP fails (link-local) |
- Application Layer - This layer interacts directly with the user.
HTTP , https,ftp,smtp,dns,dhcp,RIP,BGP,tftp,telnet,ssh
- Switch/Router:
| Feature | Switch | Router |
|---|---|---|
| Function | Connects devices within a LAN | Connects different networks (e.g., LAN to WAN) |
| Layer of OSI Model | Layer 2 (Data Link Layer) Some at Layer 3 | Layer 3 (Network Layer) |
| Uses | MAC addresses | IP addresses |
| Data Forwarding | Within the same network | Between different networks |
| Device Communication | Device-to-device within the same network | Between different networks and internet |
| Main Role | Network expansion within LAN | Routing traffic to/from other networks |
| IP Address Assignment | No (unless Layer 3 switch) | Yes (via DHCP) |
| Security Features | Basic (VLAN, port security) | Advanced (NAT, firewall, ACL) |
| Internet Access | Cannot provide | Can provide |
| Common Use | Offices, LANs, data centers | Homes, offices, ISPs (to connect to internet) |
- TCP/UDP:
|
- ARP (ADDRESS RESOLUTION PROTOCOL) - To find destination MAC address using destination IP address, It correlates between layer 2 and layer 3. ( It is a Layer 2 protocol encapsulated in Ethernet 2 frame).- arp -a Types of arp : Reverse ARP, Proxy ARP and GRAP.
- RARP : Rarp is used to resolve ip address using mac address. Used before DHCP and RARP Server provides only IP address.
- Proxy ARP is a process, where the routers default gateway replies with its own MAC address on behalf of the
destination device when the source is trying to reach an IP in another subnet. It
allows devices on different subnets to communicate without reconfiguring their
subnet mask or gateway.
- GARP : Grap used to avoid ip conflicts, where the source and target ip will be same. It is used in high availability protocols like VRRP(Virtual Router Redundancy Protocol)
- How to Find MAC address:
In system - press Windows key + R, In command prompt - Run cmd = ipconfig/all
- VPN (Virtual Private Network) - Extension of private network over a public network. It doesn't necessarily imply on encryption, but it uses encryption.
- NAT (Network Address Translation), which translates private IPs to a public IP