Network concepts

From Wiki-UX.info
Jump to: navigation, search

OSI Model

The OSI (Open System Interconnecion) model is a seven layer data model used to describe the different elements that conform a network.

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

Application layer

  • Used for applications specifically written to run over the network.
  • Allows access to network services that supports applications.
  • Directly represents the services that directly support user applications.
  • Handles network access, flow control and error recovery.
  • Example apps are file transfer, e-mail, NetBIOS-based applications.

Presentation

  • Translates from application to network format and vice-versa.
  • All different formats from all sources are mode into a common uniform format that the rest of the OSI model can understand
  • Responsible for protocol conversion, character conversion, data encryption / decryption, expanding graphics commands, data compression.
  • Sets standards for different system to provide seamless communication from multiple protocol stacks.
  • Not always implemented in a network protocol.

Session

  • Establishes, maintains and ends sessions across the network.
  • Responsible for name recognition (identification) so only the designated parties can participate in the session.
  • Provides synchronization services by planning check points in the data stream.

Transport

  • Additional connections below the session layer.
  • Manages the flow control of data between parties across the network.
  • Divides streams of data into chunks or packets; the transport layer of the receiving computer reassembles the message from packets.
  • A train is a good analohy => the data is divided into identical units (wagons).
  • Provides error-checking to guarantee error-free data delivery, with on losses or duplications.
  • Provides acknowledgment of successful transmissions; requests retransmissions if some packets don't arrive error-free.
  • Provides flow control and error-handling.

Network

  • Translate logical network address and names to their physical address.
  • Is responsible for addressing; determining routes for sending, managing network problems.
  • If the router can't send data frame as large as the source computer sends, the network layer compensates by breaking the data into smaller units. At the receiving end, the network layer reassembles the data.

Data Link

  • Turns packets into raw bits and at the receiving end turns bits into packets.
  • Handles data frame between the Network and Physical layers.
  • The receiving end packages raw data from the physical layer into data fames for delivery to the network layer.
  • Responsible for error-free transfer of frames to other computers via the Physical layer.
  • This layers defines the methods used to transmit and receive data on the network. It consist of the wiring, the devices use to connect the NIC to the wiring, the signaling involved to transmit / receive data and the ability to detect signaling errors on the network media.

Physical

  • Transmit raw bit over physical

TCP/IP Model

  1. Application
  2. Transport
  3. Internet
  4. Network Interface

Media Access Control (MAC) Address

  • Every LAN card has a unique 48-bit MAC address.
  • Every frame of data contains a source and destination MAC.
  • Host accept frames destined for their MAC address.
  • Hosts ignore frames destined for other MAC addresses.


Example:

Ox 0060B0 7EF226

Internet Protocol (IP) Address

  • Every host on an IP network has a unique, 32-bit IP address.
  • IP Addresses make it possible to logically group nodes into IP networks.
  • Network bits within the IP determine which network the host is on.
  • Host bits within the IP distinguish each host from all other hosts on the networks.
  • Host with identical network bits are said to be on the same IP network.


Example:

128.1.1.1 128.1.1.2

IP Network Classes

  • The IP network/host bit boundary varies from the network to network.
  • Network with more host bits may have more hosts.
  • Network with fewer bits may have fewer hosts.
Network Type Network bits Host bits Host Addresses/Net
/8 8 24 2^24=16777216
/16 16 16 2^16=65536
/24 24 8 2^8=256
Class Net bits Host bits # of Nets Hosts/Net Range
8 24 127 2^24=16777216 1-127
16 16 16383 2^16=65536 128-191
24 8 2097151 2^8=256 192-223
# ioscan -fnkC lan
Class     I  H/W Path     Driver S/W State   H/W Type     Description
======================================================================
lan       0  0/1/2/0      iether   CLAIMED     INTERFACE    HP AB352-60001 PCI/PCI-X 1000Base-T Dual-port Core
lan       1  0/1/2/1      iether   CLAIMED     INTERFACE    HP AB352-60001 PCI/PCI-X 1000Base-T Dual-port Core
lan       2  0/4/1/0/6/0  igelan   CLAIMED     INTERFACE    HP A9784-60002 PCI/PCI-X 1000Base-T FC/GigE Combo Adapter

# lanscan
Hardware Station        Crd Hdw   Net-Interface  NM  MAC       HP-DLPI DLPI
Path     Address        In# State NamePPA        ID  Type      Support Mjr#
0/1/2/0  0x00156004A2FA 0   UP    lan0 snap0     1   ETHER     Yes     119
0/1/2/1  0x00156004A2FB 1   UP    lan1 snap1     2   ETHER     Yes     119
0/4/1/0/6/0 0x0016353E5012 2   UP    lan2 snap2     3   ETHER     Yes     119

# netstat -in
Name      Mtu  Network         Address         Ipkts              Ierrs Opkts              Oerrs Coll
lan0      1500 16.90.48.0      16.90.48.75     176597             0     13880              0     0
lo0      32808 127.0.0.0       127.0.0.1       48916              0     48916              0     0

The IP Network Address

  • Every host must know which network it is connected to.
  • Formulate the network address by setting all IP host bits to "0"

The IP Broadcast Address

  • Packets sent to the network broadcast address are received by ALL host on the network.
  • Formulates the brodcast address by setting all host bits to "1".

The IP Loopback Address

The loopback IP address, 127.0.0.1, is a special address that always references your local host.


Example:

# ping 127.0.0.1

Obtaining an IP address

Reserved ip address:

  • 10.###.###.###
  • 172,16-31.###.###
  • 192.168.###.###

Public IP Entities

  • International Committe for Assigned Names and Nummbers (ICANN)
    • arin.net American Registry for Internet Number
    • apnic.net Asia Pacific
    • ripe.net RIPE Network Coordination Centre (Europe)

Converting IP Addresses to MAC

  • This is handle by the ARP Cache
  • Each entry has a 5 minute timeframe in the ARP cache. This values may be change using the "ndd" command.

Populating the ARP Cache

  • If the entry is not saved on the ARP cache, a broadcast request is sent the found the correct entry. The host with the correct IP answer to the host. The entry is save on the ARP Cache.

Sockets

References