Networking Notes 2 - Addressing

Network Notes 2

IPv4

Each IPv4 have 4 byte, 5 classes

Class - 2-level hierarchy of IP address(Netid+Hostid)

  • A: Byte1 Netid; Byte2,3,4 Hostid
  • B: Byte1,2 Netid; Byte 3,4 Hostid
  • C: Byte1,2,3 Netid; Byte 4 Hostid
  • D: The address range of IP Multicast, is 224.0.0.0 ~ 239.255.255.255.
  • E: The address range of ?,240.0.0.0~255.255.255.255

I should only focus on ABC here.

The 2-level hierarchy of IP addresses is not sufficient for organizations

Subnetting

We usually want to division of a network into smaller networks(subnet).

We have 3 level of IDs of hierarchy

  • NetID
  • SubnetID
  • HostID

In a subnet, Device can phtsically reach each other without intervening router.

Masking

Masking is the process of extracting the network address from an IP address

  • Default Mask: used by routers outside
  • Subnet MaskL used by route inside

Mask

  • 32 bits long
  • NetID = 1
  • HostID = 0

IP address Essentially a binary number
Example:
11111111 00000000 00000000 00000000 = 255.0.0.0

Masking is AND operation of the IP address

The 11111111 is the netID and the 0s is HostID.

NetIDs are managed by Regional Internet Registries

  • APNIC (Asia)
  • ARIN (American)
  • LACNIC (Latin American)
  • RIPE NCC (Europe)
    HostIDs are managed by the network administrator(owner of the NetID)

CIDR - Classless InterDomain Routing

The length of the network prefix in IP addresses is kept arbitrary.

Networking Notes 1 - Overview of protocol and OSI model

Networking Notes 1

Protocol

Protocol is a set of urle and formats that govern the communication between communicating peers.

We can treated as providing a service.

Key Elements of a Protocol

  • Syntax
    • Data formats
    • Signal levels
  • Semantics
    • Control information
    • Error handling
  • Timing
    • Speed matching
    • Sequencing

Protocol Layering

Task of communication broken up into modules
Each module is performed at different level/layer

Protocol architecture

Also called the protocal stack.
A function could use multiple modules.

Network Architecture

A set of layers and protocols

OSI Seven-Layer Model

  1. Physical
  2. Link
  3. Network
  4. Transport
  5. Session
  6. Presentation
  7. Application

1-3 is Network support group
4 is Transport group
5-7 is User support group

common Protocol of each layer

Application Layer

  • SMTP
  • FTP
  • TFTP
  • DNS
    Transport Layer
  • SCTP
  • TCP
  • UDP
    Network Layer
  • ICMP
  • IPv4
    Data Link & Physical
  • Inderlying Lan or Wan technology