SlideShare a Scribd company logo
1 of 14
Fundamental Networking
Concepts
By
Sriram Subramanian
@reachsrirams
www.innervoice.in
Agenda
• Concepts
– Subnet Mask
– Default Gateway
– DNS Server
• Context – a typical home network
• Assumptions
– Familiarity with DHCP fundamentals
– Familiarity with OSI stack for networking.
2
www.innervoice.in
A typical home network
3
ISP’s Network Internet
google.com Web
ServerDNS Server
Gateway
DSL or
Cable
RJ-45PortsforLAN
DHCP
Server
www.innervoice.in
Understanding Network Configuration
4
• As you can see the common information is
– Subnet Mask
– Default Gateway (Windows), Router (IPad) and Default Route
(Ubuntu)
– DNS Servers (Windows), DNS (IPad) and Primary DNS (Ubuntu)
www.innervoice.in
OSI Stack View of our Network
5
ISP’s Network Internet
google.com Web
ServerDNS Server
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
APPLICATION
PRESENTATION
SESSION
Home Computer
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
Home Router
Wired/Wireless
connection
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
APPLICATION
PRESENTATION
SESSION
Google Web Server
Internet Internet
DNS Server
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
APPLICATION
PRESENTATION
SESSION
Gateway
RJ-45PortsforLAN
DHCP
Server
DSL or
Cable
www.innervoice.in
The first step…
• What happens when you type
www.google.com on you browser?
• Application Layer: Browser will create a HTTP get request
• Network Layer: Needs to create an Network layer packet
(IP Packet) to be sent to www.google.com.
• But Network Layer needs IP Address not
URL.
• This is where DNS Server comes into picture
6
www.innervoice.in 7
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
APPLICATION
PRESENTATION
SESSION
Home Computer
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
Home Router
ISP’s
Network Internet
The browser sends a request to local
DNS Client application to convert the
URL of google.com to an IP address.
DNS Server
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
APPLICATION
PRESENTATION
SESSION
Communicating with DNS Server
An IP Packet is constructed containing:
• Source IP: Home Computer
• Destination IP: DNS Server
The DNS Server IP is part of network
configuration (DHCP response)
The IP Packet or the L3 Packet is then
wrapped into an L2 Frame and sent on the
wire to the DNS Server.
The DNS Server then responds back with
the IP Address of google.com
www.innervoice.in
L3 to L2 Conversion
• Layer 3 or L3 uses IP Address of a device
• Layer 2 or L2 uses Physical Address of a device
– For Ethernet the physical address is the MAC address of the Network
Port.
• An L2 frame = Entire L3 packet + Some L2 information. The most
important are:
– source MAC address
– destination MAC address
• In our example,
– the source MAC address = Home computer MAC address
– But how can we find the destination MAC address?
8
www.innervoice.in
Destination MAC Address Flow
9
Apply ‘subnet mask’ on
destination IP Address (DNS
Server)
Is the resulting IP in
the same sub-
network as the
source IP Address?
Assume Destination
IP = Default
Gateway IP
Yes
No
Use ARP Tables to
lookup MAC address
for the Destination
IP
Construct L2
Frame with
Destination MAC
In our example, the IP address of the DNS Server
is outside the home computer's sub-network.
Hence Destination MAC address = MAC address
of the ‘Default Gateway’.
www.innervoice.in
The role of Default Gateway (Router)
• Default gateway is used for 'routing' network packets between one more
LANs or between a LAN and a WAN.
10
Examine the incoming L2
Frame
Does the destination
MAC address contain
my MAC address?
Drop the packet
Yes
No
Extract the L3 Packet
from the L2 Frame
Forward/Route the L3
Packet based on
Destination IP Address
Note: while forwarding L3 Packets:
Source IP = Home Computer IP
Destination IP = DNS Server IP
www.innervoice.in
What happens to incoming L3 packet?
11
Examine the incoming L3
Packet (destined for Home
Computer)
Can I reach the
destination IP on my
LAN?
Drop the packet
Yes
No
Convert an L3 Packet
to an L2 Frame
Forward the L2 Frame
based on Destination
MAC Address
Note: while forwarding L2 Frames:
Source IP = DNS Server IP
Destination IP = Home Computer IP
Source MAC = Default Gateway MAC
Destination MAC = Home Computer MAC
www.innervoice.in 12
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
APPLICATION
PRESENTATION
SESSION
Home Computer
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
Home Router
ISP’s
Network Internet
The browser sends a request to local
DNS Client application to convert the
URL of google.com to an IP address.
DNS Server
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
APPLICATION
PRESENTATION
SESSION
Communicating with DNS Server
An IP Packet is constructed containing:
• Source IP: Local Computer
• Destination IP: DNS Server
The DNS Server IP is part of network
configuration (DHCP response)
After IP to MAC lookup the L2 packet will contain
the following address information:
Source IP = Home Computer IP
Destination IP = DNS server IP
Source MAC = Home Computer MAC
Destination MAC = Default Gateway MAC
The L2 Packet received by the Home Router since
its MAC address was in the destination address.
The L3 packet inside this L2 frame tells the
‘Gateway’ or ‘Router’ to forward the packet to
the DNS Server.
The DNS Server then responds back with
the IP Address of google.com
www.innervoice.in
And it starts all over again
• At this stage the home computer has the IP address of
www.google.com
• Next the L3 frame meant for www.google.com is
constructed.
• Once again the whole process of L3 to L2 frame
conversion and IP-to-MAC lookup will take place.
• And just like DNS server responded to a DNS request, the
Google Web Server will respond to a HTTP Get request.
13
www.innervoice.in
Summary
• DNS Server is used to convert a URL to an IP
address
• Subnet Mask is used for determining whether IP
to MAC lookup should be done or not.
• Default Gateway is the entity that routes
packets from LAN to WAN (ISP/Internet) and
vice-versa
14

More Related Content

What's hot

Uccn1003 -may10_-_lect02a_-_intro_to_networking_commands_software
Uccn1003  -may10_-_lect02a_-_intro_to_networking_commands_softwareUccn1003  -may10_-_lect02a_-_intro_to_networking_commands_software
Uccn1003 -may10_-_lect02a_-_intro_to_networking_commands_software
Shu Shin
 
Networking Chapter 11
Networking Chapter 11Networking Chapter 11
Networking Chapter 11
mlrbrown
 
Uccn1003 -may10_-_lect01a_-_intro_to_network_applications_services
Uccn1003  -may10_-_lect01a_-_intro_to_network_applications_servicesUccn1003  -may10_-_lect01a_-_intro_to_network_applications_services
Uccn1003 -may10_-_lect01a_-_intro_to_network_applications_services
Shu Shin
 
Cisco Router Basic Configuration
Cisco Router Basic ConfigurationCisco Router Basic Configuration
Cisco Router Basic Configuration
Prof. Erwin Globio
 
Uccn1003 -may10_-_lect03a_-_lan_design_issues
Uccn1003  -may10_-_lect03a_-_lan_design_issuesUccn1003  -may10_-_lect03a_-_lan_design_issues
Uccn1003 -may10_-_lect03a_-_lan_design_issues
Shu Shin
 

What's hot (20)

Uccn1003 -may10_-_lect02a_-_intro_to_networking_commands_software
Uccn1003  -may10_-_lect02a_-_intro_to_networking_commands_softwareUccn1003  -may10_-_lect02a_-_intro_to_networking_commands_software
Uccn1003 -may10_-_lect02a_-_intro_to_networking_commands_software
 
Nat presentation
Nat presentationNat presentation
Nat presentation
 
network address translate
network address translate network address translate
network address translate
 
Router configuration
Router configurationRouter configuration
Router configuration
 
Unit05
Unit05Unit05
Unit05
 
Nat
NatNat
Nat
 
Static NAT
Static NATStatic NAT
Static NAT
 
Presentation on router
Presentation on routerPresentation on router
Presentation on router
 
What is Network Address Translation (NAT)
What is Network Address Translation (NAT)What is Network Address Translation (NAT)
What is Network Address Translation (NAT)
 
Networking Chapter 11
Networking Chapter 11Networking Chapter 11
Networking Chapter 11
 
IP Routing Tutorial
IP Routing TutorialIP Routing Tutorial
IP Routing Tutorial
 
Nat
NatNat
Nat
 
Ip address
Ip addressIp address
Ip address
 
Uccn1003 -may10_-_lect01a_-_intro_to_network_applications_services
Uccn1003  -may10_-_lect01a_-_intro_to_network_applications_servicesUccn1003  -may10_-_lect01a_-_intro_to_network_applications_services
Uccn1003 -may10_-_lect01a_-_intro_to_network_applications_services
 
NAT (network address translation) & PAT (port address translation)
NAT (network address translation) & PAT (port address translation)NAT (network address translation) & PAT (port address translation)
NAT (network address translation) & PAT (port address translation)
 
Network address translation
Network address translationNetwork address translation
Network address translation
 
Router and types
Router and types Router and types
Router and types
 
Link i pv4
Link i pv4Link i pv4
Link i pv4
 
Cisco Router Basic Configuration
Cisco Router Basic ConfigurationCisco Router Basic Configuration
Cisco Router Basic Configuration
 
Uccn1003 -may10_-_lect03a_-_lan_design_issues
Uccn1003  -may10_-_lect03a_-_lan_design_issuesUccn1003  -may10_-_lect03a_-_lan_design_issues
Uccn1003 -may10_-_lect03a_-_lan_design_issues
 

Viewers also liked

Gateway Networking
Gateway NetworkingGateway Networking
Gateway Networking
Usman Maaz
 
IP adress and routing(networking)
IP adress and routing(networking)IP adress and routing(networking)
IP adress and routing(networking)
welcometofacebook
 
Bridges and gateways 52
Bridges and gateways 52Bridges and gateways 52
Bridges and gateways 52
myrajendra
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
Rajan Pandey
 
Network protocols
Network protocolsNetwork protocols
Network protocols
Hemnath R.
 

Viewers also liked (15)

Gateway Networking
Gateway NetworkingGateway Networking
Gateway Networking
 
Smtp protocol
Smtp protocolSmtp protocol
Smtp protocol
 
Protocolo SMTP (Simple Mail Transfer Protocol)
Protocolo  SMTP (Simple Mail Transfer Protocol)Protocolo  SMTP (Simple Mail Transfer Protocol)
Protocolo SMTP (Simple Mail Transfer Protocol)
 
Gateways ppt
Gateways pptGateways ppt
Gateways ppt
 
IP adress and routing(networking)
IP adress and routing(networking)IP adress and routing(networking)
IP adress and routing(networking)
 
Protocolos- SMTP, POP3 e IMAP4
Protocolos- SMTP, POP3 e IMAP4Protocolos- SMTP, POP3 e IMAP4
Protocolos- SMTP, POP3 e IMAP4
 
Simple mail transfer protocol
Simple mail transfer protocolSimple mail transfer protocol
Simple mail transfer protocol
 
Bridges and gateways 52
Bridges and gateways 52Bridges and gateways 52
Bridges and gateways 52
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
Smtp
SmtpSmtp
Smtp
 
Smtp, pop3, imapv 4
Smtp, pop3, imapv 4Smtp, pop3, imapv 4
Smtp, pop3, imapv 4
 
Ip address
Ip addressIp address
Ip address
 
Network protocols
Network protocolsNetwork protocols
Network protocols
 
Internet protocol (ip) ppt
Internet protocol (ip) pptInternet protocol (ip) ppt
Internet protocol (ip) ppt
 

Similar to Fundamental networking concepts

Bh fed-03-kaminsky
Bh fed-03-kaminskyBh fed-03-kaminsky
Bh fed-03-kaminsky
Dan Kaminsky
 
CCNA Network Services
CCNA Network ServicesCCNA Network Services
CCNA Network Services
Dsunte Wilson
 
Simplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 TeachersSimplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 Teachers
webhostingguy
 
Installation Of An Iso Image Dvd
Installation Of An Iso Image DvdInstallation Of An Iso Image Dvd
Installation Of An Iso Image Dvd
Susan Cox
 

Similar to Fundamental networking concepts (20)

DHCP DNS P1 DHCP & Wireless Communication Methods Unicasting.pptx
DHCP DNS P1 DHCP & Wireless Communication Methods Unicasting.pptxDHCP DNS P1 DHCP & Wireless Communication Methods Unicasting.pptx
DHCP DNS P1 DHCP & Wireless Communication Methods Unicasting.pptx
 
Traffic Data Analysis using Wireshark.pptx
Traffic Data Analysis using Wireshark.pptxTraffic Data Analysis using Wireshark.pptx
Traffic Data Analysis using Wireshark.pptx
 
Building Linux IPv6 DNS Server (Draft Copy)
Building Linux IPv6 DNS Server (Draft Copy)Building Linux IPv6 DNS Server (Draft Copy)
Building Linux IPv6 DNS Server (Draft Copy)
 
Apnic-Training-IPv6_workshop
Apnic-Training-IPv6_workshopApnic-Training-IPv6_workshop
Apnic-Training-IPv6_workshop
 
DHCP,ARP in networks
DHCP,ARP in networksDHCP,ARP in networks
DHCP,ARP in networks
 
Lecture 23 DHCP and NAT.pptx
Lecture 23 DHCP and NAT.pptxLecture 23 DHCP and NAT.pptx
Lecture 23 DHCP and NAT.pptx
 
Bh fed-03-kaminsky
Bh fed-03-kaminskyBh fed-03-kaminsky
Bh fed-03-kaminsky
 
ffuyu yguyguyg.pptx
ffuyu yguyguyg.pptxffuyu yguyguyg.pptx
ffuyu yguyguyg.pptx
 
CCNA Network Services
CCNA Network ServicesCCNA Network Services
CCNA Network Services
 
06 coms 525 tcpip - dhcp and dns
06   coms 525 tcpip - dhcp and dns06   coms 525 tcpip - dhcp and dns
06 coms 525 tcpip - dhcp and dns
 
Ad-Hoc Networking in Linux with Avahi
Ad-Hoc Networking in Linux with AvahiAd-Hoc Networking in Linux with Avahi
Ad-Hoc Networking in Linux with Avahi
 
Simplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 TeachersSimplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 Teachers
 
Introduction to Networking Commands & Software
Introduction to  Networking Commands & SoftwareIntroduction to  Networking Commands & Software
Introduction to Networking Commands & Software
 
PACE-IT: DHCP in the Network - N10 006
PACE-IT: DHCP in the Network - N10 006 PACE-IT: DHCP in the Network - N10 006
PACE-IT: DHCP in the Network - N10 006
 
Learning series fundamentals of Networking and Medical Imaging
Learning series fundamentals of Networking and Medical ImagingLearning series fundamentals of Networking and Medical Imaging
Learning series fundamentals of Networking and Medical Imaging
 
Design of a campus network
Design of a campus networkDesign of a campus network
Design of a campus network
 
DNS_CN_CN_____________________-_____.ppt
DNS_CN_CN_____________________-_____.pptDNS_CN_CN_____________________-_____.ppt
DNS_CN_CN_____________________-_____.ppt
 
Network Testing ques
Network Testing quesNetwork Testing ques
Network Testing ques
 
Installation Of An Iso Image Dvd
Installation Of An Iso Image DvdInstallation Of An Iso Image Dvd
Installation Of An Iso Image Dvd
 
Building a Linux IPv6 DNS Server Project review PPT v3.0 First review
Building a Linux IPv6 DNS Server Project review PPT v3.0 First reviewBuilding a Linux IPv6 DNS Server Project review PPT v3.0 First review
Building a Linux IPv6 DNS Server Project review PPT v3.0 First review
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Fundamental networking concepts

  • 2. www.innervoice.in Agenda • Concepts – Subnet Mask – Default Gateway – DNS Server • Context – a typical home network • Assumptions – Familiarity with DHCP fundamentals – Familiarity with OSI stack for networking. 2
  • 3. www.innervoice.in A typical home network 3 ISP’s Network Internet google.com Web ServerDNS Server Gateway DSL or Cable RJ-45PortsforLAN DHCP Server
  • 4. www.innervoice.in Understanding Network Configuration 4 • As you can see the common information is – Subnet Mask – Default Gateway (Windows), Router (IPad) and Default Route (Ubuntu) – DNS Servers (Windows), DNS (IPad) and Primary DNS (Ubuntu)
  • 5. www.innervoice.in OSI Stack View of our Network 5 ISP’s Network Internet google.com Web ServerDNS Server PHYSICAL DATA LINK NETWORK TRANSPORT APPLICATION PRESENTATION SESSION Home Computer PHYSICAL DATA LINK NETWORK TRANSPORT Home Router Wired/Wireless connection PHYSICAL DATA LINK NETWORK TRANSPORT APPLICATION PRESENTATION SESSION Google Web Server Internet Internet DNS Server PHYSICAL DATA LINK NETWORK TRANSPORT APPLICATION PRESENTATION SESSION Gateway RJ-45PortsforLAN DHCP Server DSL or Cable
  • 6. www.innervoice.in The first step… • What happens when you type www.google.com on you browser? • Application Layer: Browser will create a HTTP get request • Network Layer: Needs to create an Network layer packet (IP Packet) to be sent to www.google.com. • But Network Layer needs IP Address not URL. • This is where DNS Server comes into picture 6
  • 7. www.innervoice.in 7 PHYSICAL DATA LINK NETWORK TRANSPORT APPLICATION PRESENTATION SESSION Home Computer PHYSICAL DATA LINK NETWORK TRANSPORT Home Router ISP’s Network Internet The browser sends a request to local DNS Client application to convert the URL of google.com to an IP address. DNS Server PHYSICAL DATA LINK NETWORK TRANSPORT APPLICATION PRESENTATION SESSION Communicating with DNS Server An IP Packet is constructed containing: • Source IP: Home Computer • Destination IP: DNS Server The DNS Server IP is part of network configuration (DHCP response) The IP Packet or the L3 Packet is then wrapped into an L2 Frame and sent on the wire to the DNS Server. The DNS Server then responds back with the IP Address of google.com
  • 8. www.innervoice.in L3 to L2 Conversion • Layer 3 or L3 uses IP Address of a device • Layer 2 or L2 uses Physical Address of a device – For Ethernet the physical address is the MAC address of the Network Port. • An L2 frame = Entire L3 packet + Some L2 information. The most important are: – source MAC address – destination MAC address • In our example, – the source MAC address = Home computer MAC address – But how can we find the destination MAC address? 8
  • 9. www.innervoice.in Destination MAC Address Flow 9 Apply ‘subnet mask’ on destination IP Address (DNS Server) Is the resulting IP in the same sub- network as the source IP Address? Assume Destination IP = Default Gateway IP Yes No Use ARP Tables to lookup MAC address for the Destination IP Construct L2 Frame with Destination MAC In our example, the IP address of the DNS Server is outside the home computer's sub-network. Hence Destination MAC address = MAC address of the ‘Default Gateway’.
  • 10. www.innervoice.in The role of Default Gateway (Router) • Default gateway is used for 'routing' network packets between one more LANs or between a LAN and a WAN. 10 Examine the incoming L2 Frame Does the destination MAC address contain my MAC address? Drop the packet Yes No Extract the L3 Packet from the L2 Frame Forward/Route the L3 Packet based on Destination IP Address Note: while forwarding L3 Packets: Source IP = Home Computer IP Destination IP = DNS Server IP
  • 11. www.innervoice.in What happens to incoming L3 packet? 11 Examine the incoming L3 Packet (destined for Home Computer) Can I reach the destination IP on my LAN? Drop the packet Yes No Convert an L3 Packet to an L2 Frame Forward the L2 Frame based on Destination MAC Address Note: while forwarding L2 Frames: Source IP = DNS Server IP Destination IP = Home Computer IP Source MAC = Default Gateway MAC Destination MAC = Home Computer MAC
  • 12. www.innervoice.in 12 PHYSICAL DATA LINK NETWORK TRANSPORT APPLICATION PRESENTATION SESSION Home Computer PHYSICAL DATA LINK NETWORK TRANSPORT Home Router ISP’s Network Internet The browser sends a request to local DNS Client application to convert the URL of google.com to an IP address. DNS Server PHYSICAL DATA LINK NETWORK TRANSPORT APPLICATION PRESENTATION SESSION Communicating with DNS Server An IP Packet is constructed containing: • Source IP: Local Computer • Destination IP: DNS Server The DNS Server IP is part of network configuration (DHCP response) After IP to MAC lookup the L2 packet will contain the following address information: Source IP = Home Computer IP Destination IP = DNS server IP Source MAC = Home Computer MAC Destination MAC = Default Gateway MAC The L2 Packet received by the Home Router since its MAC address was in the destination address. The L3 packet inside this L2 frame tells the ‘Gateway’ or ‘Router’ to forward the packet to the DNS Server. The DNS Server then responds back with the IP Address of google.com
  • 13. www.innervoice.in And it starts all over again • At this stage the home computer has the IP address of www.google.com • Next the L3 frame meant for www.google.com is constructed. • Once again the whole process of L3 to L2 frame conversion and IP-to-MAC lookup will take place. • And just like DNS server responded to a DNS request, the Google Web Server will respond to a HTTP Get request. 13
  • 14. www.innervoice.in Summary • DNS Server is used to convert a URL to an IP address • Subnet Mask is used for determining whether IP to MAC lookup should be done or not. • Default Gateway is the entity that routes packets from LAN to WAN (ISP/Internet) and vice-versa 14