Bilgi Üniversitesi
CMPE 212-Week 2
Networking
Instructor: Ercan Canlıer - IBM
Modules
01 Introduction 02 The OSI Model
03 TCP/IP 04 IP Addresses
05 Troubleshooting 06 Real Life Use Case
Introduction
Behind the scenes?
Introduction
Why do we have networking?
User Server
Introduction
Network Topology
AP(Access Point) Firewall
Router
Switch Router
Introduction
Network types by size
1. Personal Area Network (PAN)
2. Local Area Network (LAN)
3. Wireless Local Area Network (WLAN)
4. Metropolitan Area Network (MAN)
5. Wide Area Network (WAN)
Introduction
Personal Area Network (PAN)
* Small network used for personally to share data between one device to another.
Introduction
Local Area Network (LAN)
* Network in a small geographical area such as room, office or building.
Introduction
Wireless Local Area Network (WLAN)
* LAN network that is fully based on wireless connection.
Introduction
Metropolitan Area Network (MAN)
* Network that connects computing resources in a city.
Introduction
Wide Area Network (WAN)
* Network that extends over a large geographical distance such as network between two countries or
multiple cities.
Introduction
Network Architectures
01 Peer-to-Peer (De-centralized)
02 Client-Server Architecture( Centralized)
Introduction
Peer-to-Peer Architecture
a. All devices are on the network are peers.
b. All devices are either client or server.
c. There is no centralized control.
Introduction
Client-Server Architecture
a. Servers provide resources whereas clients request the resources.
b. Servers are the centralized control over the process.
c. More difficult as it requires security and access controls.
Introduction
Networking rules!
Devices in a network must use the same procedures or the rules
01 for sending and receiving data.
Devices in a network must be able to determine the source and the destination, IP,
02 MAC addresses. (Must known metadatas)
Introduction
Protocols?
Protocols are the rules to change data between devices to have an efficient communication!
Introduction
Protocol categories?
01 Physical protocols define wiring, connections and signals.
02 Logical protocols define how data is sent and received between.
Computer networks rely on different protocols in order to work properly.
OSI Model
The OSI Model
The OSI Model is an conceptual
framework called
Open Systems Interconnection explains
us how data moves in network.
OSI Model
Networking is complex but?
The OSI Model
makes it easier
to understand!
OSI Model
OSI Model Layers
Layer 7 Application
Layer 6 Presentation
Layer 5 Session
Layer 4 Transport
Layer 3 Network
Layer 2 Data Link
Layer 1 Physical
OSI Model
How to remember OSI model?
Away Application
Pizza Presentation
Sausage Session
Throw Transport
Not Network
Do Data Link
Please Physical
OSI Model
Flow of the data
Transmit Application Receive
Presentation
Session
Transport
Network
Data Link
Physical
OSI Model
Names for the data for each layer
Data Application
Data Presentation
Data Session
Data Segment Transport Layers
Packet Network
Frame Data Link
Bit Physical
OSI Model
How two computers communicate?
Application Application
Presentation Presentation
Session Session
Transport Transport
Network Network
Data Link Data Link
Physical Physical
OSI Model
L7-Application layer and protocols
• Application Layer is the top most layer and it deals with the end user by interacting
with it.
• DNS (Domain Name System)
• DHCP (Dynamic Host Configuration Protocol)
• SNTP (Simple Network Time Protocol)
• Telnet
• FTP(File Transfer Protocol)
OSI Model
L6-Presentation layer and protocols
• Presentation layer is responsible for the presentation and formatting of the data
between network resources .
• HTTP(Hyper Text Transfer Protocol)
• SSH (Secure Shell)
• SNMP (Simple Network Management Protocol)
• SMTP(Simple Mail Transfer Protocol)
OSI Model
L5-Session layer and protocols
• Session Layer provides services for establishing, managing, and terminating sessions or
connections between applications. It facilitate communication and coordination
between different applications or processes running on different network devices
• RPC (Remote Procedure Call)
• SCP (Session Control Protocol)
OSI Model
L4-Transport layer and protocols
• Transport Layer provides reliable and efficient end-to-end delivery of data between
hosts or endpoints on a network.
• TCP(Transmission Control Protocol)
• UDP (User Data Protocol)
OSI Model
L3-Network layer and protocols
• Network layer is so called routing layer. Provides IP addressing and routing services.
• IPv4, IPv6, ICMP
OSI Model
L2-Data link layer and protocols
• Ensures that messages are delivered to the right device on a LAN using hardware
devices.
• MAC(Media Access Control) Address.
• Data link layer is responsible for packaging the data into frames for the next layer
(Physical Layer) and translates messages from the Network layer into bits for the nexst
layer (Physical Layer).
• ARP(Address Resolution Protocol)
OSI Model
L1-Physical layer and protocols
• Responsible for the network hardware and physical topology.
• Sending and receiving bits.(1 and 0)
• Ethernet IEEE 802.3 Standard
OSI Model
Encapsulation and De-encapsulation
Application Data
Presentation Data
Session Data
Transport Segment Data
Network Packet Segment Data
Frame Frame
Data Link Header
Packet Segment Data
Trailer
Physical
TCP/IP
Once again, OSI is not implemented!
• OSI is conceptual, TCP/IP is implemented!
TCP/IP
TCP/IP
• TCP -> Transmission Control Protocol
• IP -> Internet Protocol
TCP/IP
TCP/IP vs. OSI
Application
Application Presentation
Session
Transport Transport
Internet Network
Data Link
Network Interface
Physical
TCP/IP
TCP/IP Protocols
HTTP(S), DNS, TLS/SSL,
Application
SSH, POP3,NTP, Telnet
Transport TCP, UDP
Internet IPAddressing,ICMP,ARP
Network Interface Ethernet
TCP/IP
Address Resolution Protocol (ARP)
ARP(Address Resolution Protocol ) resolves IP addresses to MAC addresses.
A MAC address (media access control address) is a 12-digit hexadecimal number assigned to each
device connected to the network. Primarily specified as a unique identifier during device
manufacturing.
TCP/IP
Internet Control Message Protocol (ICMP)
ICMP is called as error reporting protocol. Used to generate error messages when the network fails.
ping, traceroute is used common for troubleshooting.
TCP/IP
IP Address?
An IP(Internet Protocol) address is a numerical label or a series of numbers that identifies any
device on a network.
TCP/IP
Ports and Sockets
Ports are used as logical constructs that bind a port number to a protocol
Ports: service.
Sockets: Sockets are a combination of IP address and port.
192.168.1.3:8080
IP Addresses
IP address representation(dotted decimal)
192 . 168 . 1 . 1
11000000.10101000.00000001.00000001
8 bits=1 octed 8 bits=1 byte 8 bits 8 bits
32 bits
IP Addresses
IPv4 addresses broken down to two parts
Network Address: Identifies each network uniquely.
Example: Street Name
Identifies each machine on a network.
Host Address:
Example: House number
IP Address= Network Address + Host Address
IP Addresses
IPv4 Address Classes
Class A Network Host Host Host
Class B Network Network Host Host
Class C Network Network Network Host
IP Addresses
IPv4 Address Class IP Ranges
Class A 1.0.0.0 - 126.255.255.255
Class B 128.0.0.0 - 191.255.255.255
Class C 192.0.0.0 - 223.255.255.255
IP Addresses
IPv4 Address Class Structure
IP Addresses
Default Subnet Masks
A subnet mask tells us which part of the IP address identifies the network and which part of the IP
address identifies the host.
Class A 255.0.0.0
Class B 255.255.0.0
Class C 255.255.255.0
IP Addresses
Default subnet mask binary format
A subnet mask tells us which part of the IP address identifies the network and which part of the IP
address identifies the host.
Class A 255.0.0.0 11111111.00000000.00000000.00000000
Class B 255.255.0.0 11111111.11111111.00000000.00000000
Class C 255.255.255.0 11111111.11111111.11111111.00000000
Troubleshooting
Principles
1 Don’t assume whether or not it is, verify so you will be sure!
Don’t jump into the conclusion, instead be sure about the problem and name
2 it!
3 Get your tools with you, know your tools.
Don’t make multiple changes and try, instead make a change and verify so you will know the
4 problem easier so as the solution. Basically, dont push all the buttons!
5 Always backup your changes so you can rollback!
6 Document! Make your own digital libary.
Troubleshooting
Common problems while troubleshooting
1 Connection cannot be established.
2 Connection is unexpectedly broken.
3 Throughput issues like bandwidth and delays and packet loss.
Troubleshooting
Establishing a connection
Client
Server
TCP 3-way handshake
Troubleshooting
TCP 3 way handshake step 1
SYN
I want to talk to you
Client
Server
SYN (SYNCHRONIZED) PACKET
Troubleshooting
TCP 3 way handshake step 2
SYN
SYN/ACK
Client
I got your request Server
and i also want to talk to you
SYN (SYNCHRONIZED)/ACKNOWLEDGE PACKET
Troubleshooting
TCP 3 way handshake step 3
SYN
SYN/ACK
Client ACK
Server
ACKNOWLEDGE PACKET
Troubleshooting
Connection is established if only?
SYN
SYN/ACK
Client ACK
Server
Connection is established if only the server has a service on that port!
Troubleshooting
Connection is not established!
SYN
RST
Client
I got your request Server
but i don’t want to talk!
RST/RESET PACKAGE
Troubleshooting
Server tells that there is nothing for you!
SYN
RST
Client
Server
There is not any service on that port!
Troubleshooting
curl as a utility tool
curl is used in command lines or scripts to transfer data.
Troubleshooting
Wireshark network analyzer
Real Life Use Case
A complex architecture, indeed!
Questions and Answer...
Thank You