Network Note

OSI Model

OSI_model

Protocols

Data Transfer

http

File Transfer

ftp

Email

email

Authentication

auth

Network Service

dhcp

Domain Name System(DNS)

dns

1
2
3
$ nslookup google.com # check google's ip
$ nslookup
> facebook.com
1
2
$ nslookup
> server 8.8.8.8 # config dns server

Network Time Protocol(NTP)

ntp

Network Management

ssh_telnet

ssh: encryted; telnet: clear text

ssh used encrypt ftp

snmp

Walk the tree: server collect information(statistics, log) from client

Trap: client send SNMP trap to server

Remote Desktop Protocol(RDP)

rdp

Audio/Visual Protocol

h323

sip

session initiation protocol: voice over ip communication

TCP and UDP

TCP: transmission control protocol

UDP: user datagram protocol

TCP

reliable, verifiable(sequence numbers / acknowledge numbers), notion of session

The 3-way handshake

3way

  1. SYN: send syn msg, wait for reply from server(change state to SYN-RECEIVED)
  2. SYN-ACK: send msg to client
  3. ACK: client respond to server

then session establish between client and server by layer 4 protocol

client or server can ask for missing / additional information from each other

then use layer 7 protocol

The 4-way Disconnect

4way

  1. FIN: server to client
  2. FIN-ACK: client to server
  3. FIN: client to server
  4. FIN-ACK

shutdown the session

RST: tcp reset, server to client, to shutdown quickly

UDP

no 3-way handshake, no reliable communication, no sequence numbers / acknowledge numbers

very efficient for small data transfer (e.x. DNS)

udp

Port numbers(Transport layer addressing)

port

Source port and Destination port

src_dstnt

Application layer portocol dependency

protocol_dependency_1

protocol_dependency_2

IP Addressing

  • unicast: class A, B, C(public internet), one device to one device

  • multicast: class D(enterprise org’s live video streamming), one device to many devices

  • experimental: class E

class A

class_a

class B

class_b

class C

class_c

class D

class_d

Address types

address_types

Private ip address

127.0.0.1: loopback address, localhost

private_ip