# TCP/IP model आणि OSI सोबत तुलना

Source: https://ravindrabagale.com/mr/cyber/part-01/ch03-osi-model-tcp-ip-model-tcp-vs-udp-and-the-3-way/3-3-the-tcp-ip-model-and-osi-comparison.html
Language: mr (Marathi with English technical terms)

OSI आपल्याला layers च्या भाषेत विचार करायला शिकवतो. Internet च्या प्रत्यक्ष protocols साठी TCP/IP model वापरतो. दोन्हींचं mapping समजलं की troubleshooting आणि security controls निवडणं सोपं होतं.

        OSI Model                    TCP/IP Model
  +---------------------+      +----------------------+
  | 7 Application       |      |                      |
  | 6 Presentation      | ---> |  Application         |  HTTP, DNS, SSH, TLS
  | 5 Session           |      |                      |
  +---------------------+      +----------------------+
  | 4 Transport         | ---> |  Transport           |  TCP, UDP
  +---------------------+      +----------------------+
  | 3 Network           | ---> |  Internet            |  IP, ICMP, ARP
  +---------------------+      +----------------------+
  | 2 Data Link         | ---> |  Network Access      |  Ethernet, Wi-Fi
  | 1 Physical          |      |  (Link)              |
  +---------------------+      +----------------------+

TCP/IP च्या चार-layer model मध्ये OSI चे 5–7 layers Application मध्ये येतात; Layer 4 हा Transport, Layer 3 हा Internet आणि Layers 1–2 हे Network Access/Link मध्ये येतात. ARP चं स्थान वेगवेगळ्या संदर्भांमध्ये वेगळं दाखवलं जातं; तो local link वर IP-to-MAC resolution करतो हे लक्षात ठेवा.

 | Point
 | OSI model
 | TCP/IP model

 | Layers
 | 7
 | 4 (or 5)

 | विकास
 | ISO (reference/theoretical)
 | US DoD / DARPA (practical)

 | दृष्टिकोन
 | आधी model, नंतर protocols
 | आधी protocols, नंतर model

 | Session & presentation
 | स्वतंत्र layers
 | Application मध्ये एकत्र

 | Usage
 | शिकणं आणि troubleshooting ची भाषा
 | प्रत्यक्ष internet protocols

 | Transport layer
 | Connection-oriented and connectionless
 | TCP (connection) and UDP (connectionless)

 | AWS services चं layers सोबत mapping:
 | 
 | 

OSI मध्ये सात layers आणि स्वतंत्र Session/Presentation layers आहेत. TCP/IP मध्ये ते Application मध्ये एकत्र येतात. OSI हा ISO चा reference model; TCP/IP चा विकास DoD/DARPA च्या networking कामातून झाला. OSI शिकवताना model वर भर असतो, तर TCP/IP प्रत्यक्ष protocol suite भोवती समजावतात. दोन्हीत connection-oriented आणि connectionless transport concepts आहेत.

AWS services कुठे बसतात?

 | Layer
 | AWS example

 | L7
 | Application Load Balancer (URL/host नुसार routing), CloudFront, AWS WAF, Route 53 (DNS)

 | L4
 | Network Load Balancer; Security Groups (protocol + port + IP तपासतात)

 | L3
 | VPC, subnets, route tables, Internet/NAT gateways, Network ACLs

 | L1–L2
 | AWS-managed infrastructure (data centres, Nitro hardware); logical ENIs

L7: Application Load Balancer URL/host नुसार routing करतो. CloudFront, AWS WAF आणि Route 53 DNS यांचा application-level संदर्भ आहे.

L4/L3: Network Load Balancer transport traffic हाताळतो. Security groups protocol, port आणि IP वर filtering करतात.

L3: VPC, subnets, route tables आणि gateways networking/routing शी संबंधित. Network ACLs IP आणि ports/protocols वर rules लावू शकतात.

L1–L2: Physical data centres, network hardware आणि cloud network infrastructure AWS manage करतो; customer ENI configuration सारखे logical भाग वापरतो.

Security group आणि WAF दोन्ही का?

Security group L3/L4 वर तपासतो. Allowed HTTPS connection च्या आत SQL injection आहे का, ते तो पाहत नाही. WAF L7 request तपासू शकतो; मात्र त्यासाठी योग्य rules आणि configuration हवी. म्हणून security groups, WAF आणि secure application code यांची कामं वेगवेगळी आहेत आणि ती एकमेकांना पूरक आहेत.

Practice

हे दोन्ही models मध्ये कुठे येतात ते लिहा: HTTPS, TLS, TCP, IP, ICMP ping, ARP, Ethernet switch, Wi-Fi, DNS, SSH, Nginx, security group, Network ACL आणि AWS WAF. एका service ची अनेक layers वर भूमिका असेल तर तीही लिहा.

रवींद्र बागले यांची tip

TCP/IP चे 4 की 5 layers यावर अडकू नका. काही textbooks Link आणि Physical वेगळे करतात. तुम्ही कोणतं model वापरताय आणि OSI शी mapping काय आहे ते स्पष्ट सांगा. Security group request च्या आतला SQL injection payload वाचत नाही, हे विशेष लक्षात ठेवा.
