Network Fundamentals(20m)
1. Network architecture, protocol stack and layering, OSI and TCP/IP model, Internet
architecture, TCP / IP protocols ,
2. IP addressing and subnet mask , Network addressing, Standard ports,
3. Application programming interface (API),
4. Windows Network Commands; netstat, ipconfig, ping, traceroute, telnet,
5. Network Models: client server Model concepts , Peer-to-peer model,
6. Internet/Network Connections Types
7. Iterative server , Concurrent server.
OSI , TCP/IP سرد أسماء ووظائف طبقات موديالت الشبكة، الغرض من نموذج الشبكة .1
TCP/IP سرد البروتوكوالت المشهورة لكل طبقة من طبقات موديل الشبكة .2
سرد أنواع عناوين الشبكة ومكوناتها .3
Client/Server , Peer-to-Peer التفريق بين عمل نموذجي .4
Iterative server , Concurrent server والتزامني، التفريق بين الخادم التعاقبي .5
استخدام أوامر نظام التشغيل المتعلقة بالشبكة .6
الفرق بين البرمجة التزامنية والالتزامنية .7
1-Network Models: OSI , TCP/IP
2
User and System
Programs
Kernel Support
Hardware
TCP/IP Network Protocols
البروتوكول عمل البروتوكول، اسم
IP Internet protocol عنونة اجهزة الشبة
TCP Transmission Control Protocolبروتوكول نقل البيانات
UDP User Datagram Protocolبروتوكول نقل البيانات
FTP(20/21) File Transfer Protocol .نقل الملفات
(TCP/IP)بعض بروتوكوالت الشبكة-B1
Telnet (23)
HTTP(80)
Terminal Protocol .الوصول لجهاز بعيد والعمل عليه
Hypertext Transfer Protocol نقل البيانات بين خادم الويب وبرنامج متصفح الويب
HTTPS(443)
SMTP (25) Simple Mail Transfer Protocol ارسال البريد االليكتروني بين المستخدم والخادم وبين الخادمات
POP(110) Post Office Protocol استقبال(استرجاع) البريد االليكتروني
IMAP(143) Internet Message Access Protocolاسترجاع الرسائل من خادم البريد
SNMP (161/162) Simple Network Management Protocol التحكم وادارة اجهزة الشبكة
ICMP internet Control Message Protocol لتبادل رسائل العمل ورسائل االخطاء بين اجهزة الشبكة
ARP Address Resolution Protocol
DNS Domain Name Server
DHCP Dynamic Host Control Protocol
4
Network Models
the OSI model is just a
conceptual model. It is
mainly used for
describing, discussing,
and understanding
individual network
functions.
هو مجردOSI نموذج
ويُستخدم.نموذج مفاهيمي
بشكل أساسي لوصف
ومناقشة وفهم وظائف
.الشبكة الفردية
5
Network Addresses ,Ports
صور مختلفة من العناوين المستخدمة
) 07:01:02:01:2C:4B( MAC Address: Physical Addresses مادي عنوان .1
)2001:0db8:0000:0000:0000:8a2e:0370:7334( )[Link]( Logical Addressesبرمجي عنوان .2
(80,10,125,443,23,20,21( Port Addresses منفذ عنوان .3
)[Link], forouzan@[Link]( Application-Specific Addresses)URL( تطبيق عنوان .4
IP V 4 Address Classes: : عنونة الحاسب-4
A:(0-127) D:(224-239) Multicasting PORT رقم المنفذ، IP العنوان المنطقي،MAC العنوان الفيزيائي-1
B:(128-191) E:(240-255) Public ,Private أنواع العناوين،NET,HOST مكونات العنوان-2
C:(192-223)
DHCP آلي، Static يدوي، ذاتي: طرق عنونة الحاسب-3
Network Address
Private IP Ranges
[Link]/24 ([Link] – [Link])
[Link]/16 ([Link] – [Link])
[Link]/8 ([Link] – [Link])
Special IP Ranges
[Link]/16 ([Link] – [Link])
[Link]/8 ([Link] – [Link])
Network Addresses ,Ports (Process/Service Address)
TCP UDP
FTP-20,21 DNS-53
Well-known Ports 0-1023 SSH -22 DHCP-67
Telnet-23 TFTP-69
Registered Ports 1024-49151 SMTP-25 SNMP-161
DNS-53
Private/Dynamic HTTP-80
49152-65565
Ports POP-110
NTP-123
IMAP-143
HTTPS-443
ARP
MS SQL-1433 MS SQL-1433
Internet Connections (TCP/IP)
• Address the machine on the network -By IP address
• Address the process -By the “port”-number
• The pair of IP-address + port – makes up a “socket-address”
Client socket address Server socket address
[Link]:3479 [Link]:80
Server
Client
Connection socket pair (port 80)
([Link]:3479, [Link]:80)
Client host address Server host address
[Link] [Link]
Note: 3479 is an Note: 80 is a well-known port
ephemeral port allocated associated with Web servers
by the kernel
Using Ports to Identify Services
Server host [Link]
Client host Service request for Web server
[Link]:80 (port 80)
(i.e., the Web server)
Client Kernel
Echo server
(port 7)
Service request for Web server
[Link]:7 (port 80)
(i.e., the echo server)
Client Kernel
Echo server
(port 7)
Windows Network Components
IPCONFIG ، ping [Link] تنفيذ االمر
netsh interface ipv4 set address "Connection_Name" static
Address Subnet_Mask
netsh interface ipv4 set address "local area connection" static
[Link] [Link]
Network Architecture: Client/Sever model
Note: clients and servers are processes running on hosts
(can be the same or different hosts).
Network Architecture: Client/Sever model
• Client asks (request) – server provides (response)
• Typically: single server - multiple clients
• The server does not need to know anything about the client
– even that it exists
• The client should always know something about the server
– at least where it is located
1. Client sends request
Client Server
process process Resource
4. Client 3. Server sends response 2. Server
handles handles
response request
Note: clients and servers are processes running on hosts
(can be the same or different hosts).
Network Architecture: Peer To Peer
1. Each and every node can do both request and respond for the services.
2. often created by collections of 12 or fewer machines. the nodes both consume and produce
resources.
3. The majority of contemporary operating systems, including Windows and Mac OS,come with
software to implement peer
4. It is challenging to give nodes in peer-to-peer networks proper security because they function
as both clients and servers.
Network Architecture: client/server vs Peer To Peer
Client-Server Network Peer-to-Peer Network
Clients and server are differentiated, Specific server and
Clients and server are not differentiated.
clients are present.
focuses on information sharing. Focuses on connectivity.
Centralized server is used to store the data. Each peer has its own data.
Each and every node can do both request and
Server respond the services which is request by Client.
respond for the services.
Are costlier than Peer-to-Peer Network. Are less costlier than Client-Server Network.
Are more stable than Peer-to-Peer Network. Are less stable if number of peer is increase.
used for both small and large net
Internet/Network Connections Types
TCP Connection UDP Connection
For TCP protocols For UDP protocols
Reliable delivery Unrelible delivery
Guaranteed correct ordering of packets No order guaranteed
Connection-oriented No notion of connection(UDP)
Bidirectional Not Bidirectional
•Establish a reliable byte-stream between two
•Just fire off messages towards destinations
hosts
•They may not get there
•Data always arrives
•They may arrive out of order
•Data arrives in order
TCP Stream Socket (SOCK_STREAM) UDP Datagram Socket (SOCK_DGRAM)
TCP Real Application UDP Real Application
TCP Real Application UDP Real Application
1-Text Messaging: Whatsapp,instegram 1-DNS
2-FTP: Filezilla 2-VOIP: Viber, WhatsApp voice call ,Wi-Fi calling
3-HTTP 3-Video Conference: Skype ,Google meet ,Zoom
4-SMTP: Yahoo Mail, Google Mail,outlook 4-On-Line Game: all on-line Games
Synchronous VS Asynchronous Programming
A synchronous and an asynchronous concepts are programming model.
Iterative server
An iterative server processes requests from clients in a serial manner; one connection is served and
responded to before the server accepts a new client connection.
The following list describes the iterative server socket process.
1-When a connection request arrives, it accepts the connection and receives the client data.
2-The iterative server processes the received data and does whatever has to be done to build a reply.
3-The server sends the data back to the client.
4-The iterative server closes the socket and waits for the next connection request from the network.
يعالج الخادم التكراري الطلبات الواردة من العمالء بطريقة تسلسلية ؛ يتم تقديم اتصال واحد واالستجابة له قبل أن يقبل الخادم اتصال
. تصف القائمة التالية عملية مأخذ توصيل الخادم التكرارية.عميل جديد
. فإنه يقبل االتصال ويتلقى بيانات العميل، عند وصول طلب اتصال-1
. يعالج الخادم التكراري البيانات المستلمة ويفعل كل ما يجب القيام به إلنشاء رد-2
. يرسل الخادم البيانات مرة أخرى إلى العميل-3
. يغلق الخادم التكراري المقبس وينتظر طلب االتصال التالي من الشبكة-4
Concurrent server
A concurrent server accepts a client connection, delegates the connection to a child process of some kind,
and immediately signals its availability to receive the next client connection.
The following list describes the concurrent server process.
[Link] a connection request arrives in the main process of a concurrent server, it schedules a child process
and forwards the connection to the child process.
[Link] child process takes the connection from the main process.
[Link] child process receives the client request, processes it, and returns a reply to the client.
[Link] connection is closed, and the child process terminates or signals to the main process that it is available
for a new connection.
ويفوض االتصال بعملية فرعية من نوع، يقبل الخادم المتزامن اتصال العميل
. ويشير على الفور إلى توفره الستقبال اتصال العميل التالي، ما
.تصف القائمة التالية عملية الخادم المتزامنة
فإنه يقوم، عندما يصل طلب االتصال في العملية الرئيسية لخادم متزامن-1
.بجدولة عملية فرعية ويعيد توجيه االتصال إلى العملية الفرعية
. تأخذ العملية الفرعية االتصال من العملية الرئيسية-2
. تستقبل العملية الفرعية طلب العميل وتعالجها وترجع الرد إلى العميل-3
وتنتهي العملية الفرعية أو تشير إلى العملية الرئيسية، تم إغالق االتصال-4
.بأنها متاحة التصال جديد
Windows Network Commands
Command /? Help for command
Ping HostName | Hos Address Send 4 bytes,[-n 10 –w 6000], for /L %i IN (1,1,254)
DO ping 192.168.1.%i -n 1
PingPath HostName/Hos Address It helps you to find the location of a packet loss
in a route
TraceRT HostName/Hos Address determines the route to a destination
Ipconfig /all Network settings(NIC,ip ,)
Netstat -an List all active network Connections
netsh wlan show networks Net shel commands
Nslookup Remote HostName Get ip address
Arp -a Show MAC Table of PC
Net Share , [Link] Show shared resources
Net Use show currently mapped drives and devices.
NET use e: \\sharedFolder Map network share to drive
[Link] عرض اتصاالت الشبكة
\\ip | name عنوانه/الوصول الى أي جهاز في الشبكة بداللة اسمه
netsh interface ipv4 set address تغيير عنوان كرت الشبكة
"Connection_Name" static Address
Subnet_Mask
netsh int ipv4 show interfaces عرض كروت الشبكة العاملة بالجهاز
netsh wlan show interfaces عرض بيانات الواقاي
netstat -na|findstr port عرض االتصاالت النشطة عبر منفذ محدد
netstat -ano | find ":12345" عرض االتصاالت النشطة عبر منفذ محدد
TASKKILL /F /PID pid انهاء تطبيق بداللة رقم العملية