SEMESTER 1
NETWORK FUNDAMENTAL
3 Way Handshake (Termination Process)
NETWORK FUNDAMENTAL
Chapter 1
- Network Elements - Message : what is sent
- Device : tools like router, switch, etc.
- Medium : track/lane
- Rule : regulations on the track
- Header is an additional information on the packet which control communication on the track.
- Overhead is any combination of excess or indirect computation time, memory, bandwidth, or other resources that are required to attain a particular goal.
- LAN : a set of host in the same network.
- WAN : a set of LAN.
- Modem : convert analog signal to digital signal.
- CSU/DSU(Channel Service Unit / Data Service Unit) : convert digital signal to digital signal.
- Broadband : in one media carry many data or service.
Service | Protocol
www HTTP (Hypertext Transport Protocol)
email SMTP (Simple Mail Transport Protocol)
Instant Message XMPP (Extensible Messaging and Presence Protocol)
IP Telephony SIP (Session Initiation Protocol)
Network Architecture:
- Fault Tolerance (Redudancy) : Backup Track.
- Scalability : Planning in order to efficiency the network.
- QoS (Quality of Service) : Regulations which setting the priority of packets. Ex : priority of Voice, Data, or Video packets.
- Security : Safety which filtering the privileges.
Security Function
- Ensuring Confidentaly
- Integrity
- Availability
Chapter 2
- Multiplexing : sending process (settings) many different services on the same media.
- Segmentation is file division which made in order to ease the delivery of files, if there is a corrupted or broken file, then redelivery is done on the broken package only so it can save bandwidth.
Commonly, device divided into 2 types :
- End Device : device that sending data (originating data flow). example : PC
- Intermediary Device : device that connects between hosts. example : router, switch.
Protocol Function :
- Control data Format.
- Control running processes / data path.
- Control and solve error.
- Control when the path is on or off.
OSI Layers ( Open System Interconnection )
7. Application : control GUI
6. Presentation : control data format
5. Session : control communication session
4. Transport : control end to end communication / ensure the message deliver
3. Network : best path selection / logical addressing
2. Data Link : physical addressing / error checking
1. Physical : convert data into bit - bit into data
OSI | PDU (Protocol Data Unit)
7. Application Data
6. Presentation Data
5. Session Data
4. Transport Segment (Data + source port + dest port)
3. Network Packet (Segment + source IP + dest IP)
2. Data Link Frame (Packet + source MAC + dest MAC + FCS)
1. Physical bit (0101)
TCP/IP
4. Application : OSI 5.6.7
3. Transport : OSI 4
2. Internet : OSI 3
1. Network : OSI 1,2
Chapter 3
Network Models
- Client - Server : centralisation, more secure, easy to manage.
- Peer to Peer : less safety but more flexible and less cost. user can become an client or server. there is no centralisation point, everyone can access the data so it's less secure. we must run same service. example : torrent.
- Hybrid : mix between client - server and peer to peer.
- DNS (Domain Name System) : convert address domain to IP address. Port = 53. For check the DNS use nslookup.
- DNS Hierarchical
- Local DNS : there are 2 local DNS, at computer and at the network, if there is no address request on Local DNS, so DNS will searching on Top Level DNS
- Top Level DNS : if the the address already exist, so the address will be saved on cache on the Local DNS, so on the next searching, only use Local DNS.
- Root DNS : can be used to block a website. go to system32\driver\etc find host file and write 127.0.0.1 goo*le.com. so then the website cannot be access.
Ports
- HTTP = 80/8080/8008 (web)
- HTTPS = 443 (HTTP with encryption)
- SMTP = 25 (send email)
- POP = 110 (get email / email office)
- FTP = 20 (file transfer), 21 (establish connection)
- DHCP = 67 (server), 68 (client)
- SMB (Server Message Block) = 445 (file sharing for windows)
- TELNET = 23 (remote access)
- SSH = 22 (remote access with encryption)
DHCP Process
Advantages and disadvantages using DHCP
(+) Save configuration time settings
(-) less safety because the device which connected can get IP directly, so every user can access Daemon (can hear request from every user)
Application on Email
- MUA (Mail User Agent) : send message to server
- MTA (Mail Transfer Agent) : communication between server
- MDA (Mail Delivery Agent) : last post between server to destination
Server saved a file (example)
- Control connection : use port 21 (FTP) for establish connection
- Data connection : open/ file transfer port 21 for establish connection
- Get Data : Transfer file, DHCP server give free active IP to all host which request IP
SMB Protocol : Protocol at windows, used for data sharing, at linux named Samba.
File Sharing Function :
- Start and stop connection
- Communication between device at the network
- Control data sharing through network.
Chapter 4
Transport Layer : distinguish different communication with others.
Transport Layer Function :
- Communication between Application
- Dividing data
- At the destination, data will be arranged (reassembling)
- Identifying different application
TCP (Transmission Control Protocol) Characteristic :
- connection oriented
- 3-way handshake
- overhead
- reliable
- flow control mechanism
- 20 bytes header size
- sequence number for rearranging data
UDP(Unit Data Protocol) Characteristic :
- connectionless
- fast data delivery
- unreliable
- 8 bytes header size
Port Number Range | Port Group
0 - 1023 Well Known (contact) ports
1024 - 49151 Registered Ports
49152 - 65535 Private / Dynamic Ports
- Well Known : registered for service or important application
- Registered Port : for application and user process / local
- Private Port : for dynamically assign port
IANA -> Port Numbering
IETF -> Protocol = RFC(Request for Comment)
IEEE -> Electricity
3 Way Handshake (Synchronize Process)
3 Way Handshake (Termination Process)
- Windows Size : determine size of byte sent, before ACK being given (TCP mechanism). if sending process was fail, so on the next sending process, windows size will be reduced.
- Flow Control : control data process appropriate with windows size. flow control is TCP mechanism that prevent congestion / overwhelm.
Chapter 5
Routing : forward packet to destination based on destination IP address.
IP Characteristic :
- Connectionless : no three-way handshake process
- Best Effort (unreliable) : no overhead
- Media Independent : independent with other media.
IPv4 Header:
- IP Source Address
- IP Destination Address
- Time to Live : IP mechanism, if there is false configuration, the network will not be crowded, because there are hop jump limitation (Cisco = 254 , Microsoft = 128) prevent Layer 3 Looping.
- ToS (Type of Service) : Protocol which indicate the priority of a packet
- Protocol : indicate the data, TCP or UDP.
- Fragment Offset : Parameter that control segmentation/ reassembly packet at the layer 3 (13 bits)
- Hop : the number of layer 3 devices which passed to reach the destination.
Fragment Offset Flag divided into 2 :
- More Fragment (MF) : it means, if MF configured, the packet is not the last fragment.
- Don't Fragment (DF) : it means, if DF configured, fragmentation from the packet is not allowed.
IPv4 Characteristic :
- Consist of 3 binary numbers
- Separated every 8 bit
- Consist of network portion and host portion
Parameters on Router :
- Routing Table : place that save the database of destination IP address.
- Default Route : default destination address if the destination IP address is not exist in the routing table.
How a Router Forwart a packet
- When packet arrived at router, Layer 2 encapsulation droped, then IP destination will be checked to it's Routing table, so router will re-encapsulation layer 2, packet will be forward to the destination IP address (it is case when there are spesific route)
- If spesific route is exist, but default route also, the steps were same, but if spesific route is not exist, default route will be used. so spesific route is the first priority on checking.
- If default route and spesific route is not exist , the packet will be DROPPED.
-Broadcast Domain : Area which a broadcast packet will be forwarded. it need layer 3 devices. the way to sum the number of broadcast domain is calculate the number of branch router. one broadcast for per branch.
Chapter 6
The Way Delivery Process on IPv4
- Unicast (one to one)
- Multicast (one to many)
- Broadcast (one to all) : limited (in the network / local), directed (out of the network/ all)
- Unicast : Switch look the destination IP address and MAC, send directly into destination, it's does not sending to that doesn't need. (Destination IP Server)
- Broadcast : Running at Hub, if you want to send, the packet will sent into all host, but only the destination host that response this broadcast packet.
- Multicast : Packet will be sent to many host (group) (Destination IP Group)
Kind of IPv4 :
- Private : for local host, this kind of IP cannot be used for routing to Internet.
- Public : can be used for routing to Internet.
IPv4 Classification :
- Class A : 1.0.0.0 - 127.255.255.255 SM : 255.0.0.0
- Class B : 128.0.0.0 - 191.255.255.255 SM : 255.255.0.0
- Class C : 192.0.0.0 - 223.255.255.255 SM : 255.255.255.0
- Class D : 224.0.0.0 - 239.255.255.255 -> Multicast
- Class E : 240.0.0.0 - 255.255.255.255
IP Private (RFC 1918)
- 10.0.0.0 - 10.255.255.255
- 172.16.0.0 - 172.31.255.255
- 192.168.0.0 - 192.168.255.255
- AUTO IP / APIPA : Feature in NIC (Network Interface Card) / Ethernet, used for assign IP automatically, if there is no DHCP server.
- Loopback Address : IP that refer to it self, used for check the TCP/IP, is that running correctly?
- Subneting : Method for divide a network into smaller network, used for efficency IP addressing.
Chapter 7
Data Link Layer
- Node : End Device name at layer 2
- MTU (Maximum Transfer Unit) : maximum number of a frame (bytes) default 1500 bytes
- When Frame sent to router, LAN header will be removed and re-encapsulate become WAN header, thats why frame always change in router or layer 3 device.
- Frame will be change during passed the device, frame enlightens the work of network layer, because it work for adaptation in a network, so for only one network, it only use MAC address / Layer 2.
Sublayer at Data Link Layer :
- LLC (Logical Link Control) : link to network layer, functioning like a software and work for encapsulating data.
- MAC (Media Access Control) : link to physical layer, local addressing and media control, functioning like a hardware.
IEEE :
- 802.2 (LLC)
- 802.3 (Ethernet)
- 802.5 (Token Ring)
- 802.11 (Wireless LAN)
Media Sharing divided into :
- Shared Media :
- Controled / Deterministic : only one device can send data at one time, but no collision occur, overhead. example : Token Ring, FDI (2 token).
- Contention-Based / Non-deterministic : Every device can send data at the same time, so there is possibility for a collision. example : ethernet, wireless.
- Non-shared Media : no protocol, 2 device directly connected, no switch or router.
Method for Handle a collition :
- CSMA (Carrier Sense Multiple Access) / CD (Collision Detected) : commonly, this collision only occur at ethernet NIC. the process :
- listening before transmiting, if there no other host which want to sending data, host can sending the data.
- if collision occur, there is "Jam Signal" -> 1010...
- detected host will run "random backoff algorithm"
- host who finished first will return to step 1 (listening before transmiting)
- CSMA/CA (Collision Avoidance)
- RTS (Request to Send)
- CTS (Clear to Send)
- Collision Domain : Area which affected by collision, switch and layer 3 device (device full duplex) split the collision domain, but hub (half duplex) not.
- Wireless : work like hub (one collision domain)
- ARP (Address Resolution Protocol) : a protocol which functioning to find layer 2 address from layer 3 address (IP to MAC)
- if the network is the first time installed. Host will dont know the destination MAC address. so that the function of ARP is to asking the destination MAC address based on IP address.
- MAC address consist of 12 hexadecimal (48-bit).
- Switch learn MAC address from the host who want to sending packet at the first time.
- MAC address structure :
- Multicast address
Layer 3 : 224.0.0.0 - 224.255.255.255
Layer 2 : 01 : 00 : 5E : 0 : 0 : 0 - 01 : 00 : 5E : FF : FF : FF
- Two type of Topology :
- Physical : topology that look physically (Bus, Star, Mesh, Tree)
- Logical : topology based on the ways of working (virtual connection like point to point, multi -access, ring)
- Example of Network Topology :
- Point to Point : only one destination (non-shared media) only know full and half duplex.
- Multi Access : have many destination (need ARP)
- Ring Topology : passing frame to device one by one, different with multiaccess, multi access send to all device, but will be removed by device which not the destination address.
Chapter 8
Physical Layer
- Wave is a frame that have been converted into a signal.
- Basic Function of Physical Layer are Encoding, signaling, and media.
- Latency : time that needed from source to destination
- Delay : time that needed from source to destination to source
- Bit time : time that needed of a bit to be placed in a media
- Slot time : time that needed of a electronic signal to pass 2 node
- Interframe spacing : minimum time that needed for sending between frame (gap / pause delivery process between frame) = 96 bit time.
Structure UTP cable divided into 3 :
- Straight : connect device which is considered to device that have different function. example : PC - switch (AB - BA)
- Cross : connect device which is considered to device that have same function. example : PC - switch (AA - BB)
- Rollover : for configuration device via console port (A' - A)
- Learning : switch record source MAC address
- Flooding : if switch don't have destination MAC address in the MAC table, so switch will broadcast frame to all interface.
- Selective Forwarding : switch forward frame to it's destination based on MAC table. != broadcast !
- Filtering : broken frame will be discarded
- Aging : a time of a MAC address saved to MAC table, before refreshed.
- Signaling : convert frame into bit (encapsulation)
- Encoding : convert bit into frame (decapsulation)
Nowadays, Media divided into 3 :
- Cooper : vurnerable against EMI (Electromagnetic Interference), less cost. example : UTP, STP, Coaxial (antena TV cable, 1 lane)
- Wireless : vurnerable against RFI (Radio Frequency Interference) example : wifi (70m), wiMAX(70km), GSM, CDMA (10km)
- Fiber Optic : not affected by RFI and EMI, the most expensive infrastructure compared by cooper and wireless, can used as backbone path (main path).
Fiber Optic divided into 2 :
- Single Mode : use laser beam, more cost compared with multimode, yellow cable (patch card) , half duplex, can be used long-distance
- Multimode : use LED, less cost compared with single mode, orange cable, full duplex, medium range.
- to check fiber optic link, can be used OTDR (Optical Time Domain Reflektor)
Technology to to illustrate the speed of data transfer :
- Bandwidth : width of ribbon which illustrate maximum capacity of a media to carrying data.
- Throughput : many data that transfered in one time (calculate the data that pass with header and layer )
- Goodput : Throughput without overhead (transfer data speed at layer 7, calculate the data that pass without header and layer)
Structure UTP cable divided into 2 :
- T568A : PH - H - PO - B - PB - O - PC- C
- T568B : PO - O - PH - B - PB - H - PC - C
- UTP must be twisted for reduce the interference and crosstalk, that's problem occur when cable powered by voltage, so we must twisted the cable, in order to protect other cable beside.
- STP have "metal braiding" for reduce interference, metal braiding is a cover like alumunium to protect the cable inside.
4 aspects to put the media :
- Electrical Hazard
- Ensure cable installed correctly to connector
- Data limitation and cable power must appropriate with security code
- Installation must be checked against damage/failure
- Symetric switch : all port has same speed
- Asymetric switch : every port has different speed.
- Stackwise : connecting many switch into a single unit.
- Asymetric switch : every port has different speed.
- Stackwise : connecting many switch into a single unit.
- MDI (Media Independent Interface) : device to sending data / device which create data
- MDI-X (Media Independent Interface, Crossover) : device which forward data
- Auto MDI-X : a feature from device to automatically assign crossover / straight through
- Clock rate : determine bit per sekon
- Converter RJ-45 - DB9 used for connecting console port on router / switch with COM port on PC (for running configuration)
Chapter 9
IOS (Internetwork Operating System) : operationg system at the networking device.
Types of Memory :
- RAM / Random Access Memory : used for save the configuration temporary (running config), when device power-off, the configuration will be lost
- NV-RAM (Non - Volatile RAM) : used for save start-up config, when device power-off, the configuration still exist.
- Flash : for save the IOS
3 Method of Device Configuration :
- Console (direct configuration, connect device to computer) : when router still empty of configuration, router can be set up with rollover cable and DB9 Connector.
- Telnet or SSH : Long distance Virtual configuration, but must know IP address, so it need layer 3 service.
- Auxiliary (AUX Port) : not every device have AUX port, it needs to connect device to modem via dial-up connection. can be used without modem, but must at the same area with device, this AUX port like backup for console port.