You are on page 1of 92

Chapter 5

Network and Transport Layer

Schedule: MW 1:30 PM – 2:45 PM, Tahoe Hall 1026


Instructor: Dr. Sadaf Ashtari
Outline
• Transport Layer Protocols
• Network Layer Protocols
• Transport Layer Functions
– Linking to the application layer
– Segmenting
– Session Management
• Network Layer Functions
– Addressing
– Routing
• TCP/IP Examples
• Implications for Management
Overview

 Today!



Network and Transport Layers
Internet Model
• Transport Layer
– Layer 4 in the Internet model Application
– Links application and network
layers
– Responsible for segmentation Transport
and reassembly
– Session management
– Responsible for end-to-end
Network
delivery of messages
• Network Layer Data Link
– Layer 3 in the Internet model
– Responsible for addressing and Physical
routing of messages
Sample Question
• What is TCP and describe the fields of a TCP
packet.
• Explain how linking occurs between the Transport
layer of the OSI model and the Applications layer.
• What happens to create a virtual circuit?
• Is a virtual circuit used in connection-oriented or
connectionless routing?
Sample Question
• Assume that you are in a network environment and
the following information specifies the conditions:
– HTTP Header:100 bytes
– TCP Segment: 20 bytes (no Options)
– IPv6 Packet: 40 bytes
– Ethernet Frame: 30 bytes (no optional VLAN tag)
– Error Rate: 10%
– MTU Size: 500 bytes
• If a web request is made for www.aa.org, what is
the transmission efficiency?
Sample Question
• Assume that you are in a network environment and the
following information specifies the conditions:
– HTTP Header: 100 bytes
– TCP Segment: 20 bytes (no Options)
– IPv6 Packet: 40 bytes
– Ethernet Frame: 30 bytes (no optional VLAN tag)
– Error Rate: 10%
– MTU Size: 500 bytes
• If the web response for www.aa.org is 1200 bytes, how many
Ethernet frames will be used for the response?
• What is the transmission efficiency for the entire response?
Sample Question
• Assume URL requested is
www.sales.microsoft.com. Also
assume the client computer and the
local name server do not have any
address information for
www.sales.microsoft.com. Show the
recursive (or iterative) DNS name
resolution process. Depict on the
diagram the following information:
– Show each request as a plain arrow
– Show each response as a dotted arrow
– Number each request in the order that
they are made
– In the space to the right, show the
information obtained
– Label the name servers to correspond to
the appropriate DNS hierarchy
Sample Question
• Assume that this network exists. Letters refer to nodes and numbers
refer to the distance between nodes. Complete a routing table for
Node F using a distance vector (or link state) dynamic routing
algorithm.
Protocols
• TCP/IP
– Originally developed as a single internetworking
protocol by Vint Cerf and Bob Kahn in 1974
– Later divided into the TCP and IP protocols
– Most common protocols of the Internet and in
LANs, WANs, and backbone networks
Transmission Control Protocol
• Reasonably efficient and error free transmission
– Performs error checking
– Transmits large files with end-to-end delivery assurance
– Compatible with a variety of data link layer protocols
• Links the application layer to the network layer
• Performs packetization and reassembly
– Breaking up a large message into smaller packets
– Numbering the packets, and
– Reassembling them at the destination end
• Ensures reliable delivery of packets
Transport Layer Protocols

• Transmission Control Protocol (TCP)


– Most common transport layer protocol
– PDU called a segment
– Used for reliable transmission of data
– 160 - 192 bits (20 -24 bytes) of overhead – 4 byte
optional
• Options field is not required
Source Destination Sequence ACK Header Flow Urgent
Unused Flags CRC-16 Options User Data
Port Port Number number Length Control Pointer
(6 bits) (6 bits) (16 bits) (32 bits) (varies)
(16 bits) (16 bits) (32 bits) (32 bits) (4 bits) (16 bits) (16 bits)

TCP Header: 192 bits (24 bytes)


Transport Layer Protocols
• User Datagram Protocol (UDP)
– Operates at the transport layer
– PDU called a segment
– Used in time-sensitive situations, for control messages, or
when reliability is handled by the application layer
– Commonly used for control messages that are usually
small, such as DNS, DHCP, RIP and SNMP => protocol
name.
– 32-64 bits (4-8 bytes) of overhead
• Source port is optional in IPv4 and IPv6, Checksum is optional in
IPv4
Source Destination Length Checksum
User Data
Port Port
(varies)
(16 bits) (16 bits) (16 bits) (16 bits)
Network Layer Protocols
• Internet Protocol (IP)
– IP version 4 (IPv4)
• Most common version of IP used
• 32-bit addresses (232 or ~4.29 billion possible)
• Exhaustion of address space
– IP version 6 (IPv6)
• 128-bit addresses (2128 or ~3.4 × 1038 possible)
• Slowly being adopted due to IPv4 exhaustion
Internet Protocol (IP)
• Responsible for packet addressing and routing
• Two versions in current in use
– IPv4:
• 192 bit (24 byte) header, uses 32 bit addresses.
– IPv6:
• Mainly developed to increase IP address space due to the huge
growth in Internet usage (128 bit addresses)
• Both versions have a variable length data field
– Max size depends on the data link layer protocol.
– Ethernet’s max message size is 1,492 bytes, so max size of TCP
message field:
• 1492 – 24 – 24 = 1444 bytes

TCP header IPv4 header


Network Protocols

• IPv4 Packet
– 160-192 bits (20-24 bytes) of overhead
– Options field rarely used

Version Header Type of Total IDs Flags Packet Time to Protocol CRC-16 Source Destination Options User
number length service length Offset Live / Address Address Data
Hop Limit
(4 bits) (4 bits) (8 bits) (16 bits) (16 bits) (3 bits) (13 bits) (8 bits) (8 bits) (16 bits) (32 bits) (32 bits) (32 bits) (varies)
Network Protocols
Optional
• IPv6 Packet Headers

– Fixed Header
– 320 bits (40 bytes) of overhead
Version Traffic Flow Payload Next Hop Source Destination
User
number Class / Label length Header Limit Address Address
Data
Priority
(varies)
(4 bits) (8 bits) (20 bits) (16 bits) (8 bits) (8 bits) (128 bits) (128 bits)

Optional Headers
• Hop-by hop options
• Destination options (with routing options)
• Routing
• Fragment
• Authentication
• Encapsulation Security Payload
• Destination options
• Mobility
Transport Layer Functions
1. Linking to the application layer
– TCP/UDP may serve multiple application layer protocols
– Ports used to identify application (2-byte numbers – 16 bites)
– Many source/destination ports follow standards
– Common port standards
• HTTP: TCP port 80 => web
• HTTPS: TCP port 443
• FTP: TCP ports 20 and 21
• SMTP: TCP port 25
• IMAP: TCP port 143
• POP3: TCP port 110 (more commonly TCP port 995 secure version)
• DNS: TCP or UDP port 53 (most commonly UDP)
Application Layer Services
Transport Layer Functions
2. Segmenting
– Breaking up large files into smaller segments
(and putting them back together)
– Segments may be passed individually to
application layer or after reassembly
– How large are the segments?
• Size depends on the network and data link layer protocols
• Maximum Segment Size (MSS) is negotiated during TCP handshake
• e.g., if the maximum size of the data in an Ethernet frame is 1,500
bytes and TCP and IP use 20 byte headers, the maximum segment size
is 1460 bytes
IPv4 header
Ethernet Frame
Data Size 1500 – 20 (optional)– 20 = 1460 bytes
TCP header
Transport Layer Functions
Sender PDU Receiver

Packet
Application

Transport Segment

Network Packet

Data
Frame
Link
Transport Layer Functions
3. Session management
– A session can be thought of as a conversation between two
computers or creating a virtual circuit
– Using a session to send data is also called connection-
oriented messaging (TCP)
– Sending messages without establishing a session is
connectionless messaging (UDP)
– TCP connections are opened using a three-way handshake
• SYN
• SYN-ACK
• ACK
– Sessions provide reliable end-to-end connections
Routing Implied by Transport Layer
• Connection Oriented (provided by TCP)
– Setting up a virtual circuit (a TCP connection)
• TCP asks IP to route all packets in a message by using the same path
(from source to destination)
• Packet deliveries are acknowledged
• Used by HTTP, SMTP, FTP
• Connectionless Routing (provided by UDP)
– Sending packets individually without a virtual circuit
– Each packet is sent independently of one another (routed
separately and can follow different routes and arrive at
different times)
• QoS Routing (provided by RTP)
– A special kind connection oriented routing with priorities
Transport Layer Functions
• Connectionless messaging
– Send a packet, hope for the best
– Used for single-packet transmissions
• Typically control messages: DHCP, RIP, SNMP
– UDP is connectionless
• Header is 8 bytes in 4 fields
• Lightweight, not ordered, unreliable
Transport Layer Functions
• Connection-oriented messaging
– Like a phone conversation, involving a “hello” and a
“goodbye”
– Setting up a virtual circuit (TCP connection)
– Steps:
1. Open connection (SYN)
2. Send data
3. Close connection (FIN)
– Used for data files or large transmissions
Setting up Virtual Connections
A B
Requests a virtual circuit (TCP SYN
connection) and negotiates
packet size with B SYN with MTU
Data 1
Data 2
Sends data packets one by one
(in order) using continuous ARQ ACK 2
(sliding window) Data 3

Data 4

FIN
Closes virtual circuit
Connection oriented (e.g., TCP)
• Ready to send
FIN
3 Data
2 1
SYN
Connection oriented (e.g., TCP)
• Sync Packet sent out to establish VC
FIN
3 Data
2 1

SYN
Connection oriented (e.g., TCP)
• Sync Packet Arrives at Destination
FIN
3 Data
2 1

SYN
Connection oriented (e.g., TCP)
• SYN Packet returns with MTU! Packetizing
FIN
3
occurs… 2
1

SYN
Connection oriented (e.g., TCP)
• Packets flow across same VC
FIN
3

1
Connection oriented (e.g., TCP)
• Packets Arrive at Destination (ACKs or NAKs
sent back)
FIN

3
2
1
Connection oriented (e.g., TCP)
• Packets Arrive at Destination (ACKs or NAKs
sent back)
FIN

3
2
1
Connection oriented (e.g., TCP)
• Finish Packet Sent

FIN

3
2
1
Connection oriented (e.g., TCP)
• Finish Packet arrives, and the VC erased!

FIN
Transport Layer Functions
• How is a connection really opened?
– Three-way handshake

Sender Receiver
SYN

SYN-ACK

ACK
Transport Layer Functions
• Connection-oriented messaging
– Also provides flow control by making use of
continuous ARQ (Chapter 4)
• Requires ACKs
• Sliding window size
– This is why data correction at data link layer not
necessary
– TCP is connection-oriented
• Heavyweight, ordered, reliable
QoS - Quality of Service
• QoS parameters
– Availability, Reliability, Timeliness
• Timeliness - timely delivery of packets
– Packets be delivered within a certain period of time (to produce a
smooth, continuous output
– Required by some applications, especially real time applications
(e.g., voice and video frames)
• e-mail doesn’t require this
• QoS routing
– Defines classes of service, each with a different priority:
• Real-time applications - highest
• A graphical file for a Web page - a lower priority
• E-mail - lowest (can wait a long time before delivery)
Protocols Supporting QoS
• Asynchronous Transfer Mode (ATM)
– A high-speed data link layer protocol RSVP RTSP
• TCP/IP protocol suite
– Resource Reservation Protocol RTP
(RSVP)
• Sets up virtual circuits for general UDP
purpose real-time applications
– Real-Time Streaming Protocol IP
(RTSP)
• Sets up virtual circuits for audio-video applications
– Real-Time Transport Protocol (RTP)
• Used after a virtual connection setup by RSVP or RTSP
• Adds a sequence number and a timestamp for helping applications to synchronize
delivery
• Uses UDP (because of its small header) as transport
Network Layer Functions
• Addressing
– Used to direct messages from source to
destination
– Addresses are assigned in various ways (e.g., by
system administrators, ICANN, hardware
vendors, etc.)
– Addresses exist at different layers
– Addresses may be translated (resolved) from one
layer to another (e.g., DNS, ARP)

Address Type Example Example Address


Application layer Uniform Resource Locator (URL) www.indiana.edu
Network layer IP address 129.79.78.193 (4 bytes)
Data link layer MAC address 1C-6F-65-F8-33-8A (6 bytes)
Assignment of Addresses
• Application Layer address (URL)
– For servers only (clients don’t need it)
– Assigned by network managers; placed in configuration files.
– Some servers may have several application layer addresses
• Network Layer Address (IP address)
– Assigned by network managers, or by programs such as DHCP;
placed in configuration files
– Every network on the Internet is assigned a range of possible IP
addresses for use on its network
• Data Link Layer Address (MAC address)
– Unique hardware addresses placed on network interface cards by
their manufacturers ( based on a standardized scheme)
• Servers have permanent addresses, clients usually do not
Addressing
• Data link layer addresses (e.g., MAC)
– Each address must be unique
– MAC addresses assigned by vendor
– Unique number given to each vendor by IEEE
– http://www.coffer.com/mac_find/

MAC Address
Vendor ID Device ID
(00-0C-00) (F5-03-5A)
Addressing
• Application layer addresses (e.g., csus.edu)
– Typically used for servers
– Public “domain name” addresses managed by
ICANN or authorized registrar
– Can also be assigned by network managers
– Some servers may have multiple application layer
addresses
Network Layer Functions
• Addressing
– IPv4 addresses are 32 bits
– Most common way to write is using dot-decimal
notation
• Easier for people to read and remember
• Breaks the address into four bytes and writes each byte
in decimal notation instead of binary
• Example: 129.79.78.193

10000001 01001111 01001110 11000001


Addressing
• Map of IPv4 address space growth
– http://www.youtube.com/watch?v=y8WqJum_Gfg

• Dynamic IPv4 map


– http://icicle.dylex.net/~ipmap/
Network Layer Functions
• Addressing
– A portion of an IP address represents the network
and the rest identifies the host
– Classful addressing
• Uses the first bits to determine number of hosts
• Discontinued, but nomenclature still used
– Classless Inter-Domain Routing (CIDR)
• Uses subnet masks to more flexibly divide address space
into subnets
– IP address: 129.79.78.193
– Subnet Mask: 255.255.255.0
Classfull Addressing
7 bits 24 bits
Class A 0 Net ID Host ID Subnet Mask: 255.0.0.0
0 -127 ~ 250 networks each with ~16.7 million devices

14 bits 16 bits
Class B 10 Net ID Host ID Subnet Mask: 255.255.0.0

128 -191 ~ 16,000 networks each with ~65,000 devices


21 bits 8 bits
Class C 110 Net ID Host ID Subnet Mask: 255.255.255.0

192 -223 ~ 2 million networks each with 254 devices

Class D 1110 2^28 = 268 Million addresses

Class E 1111 2^28 = 268 Million addresses


Addressing
• Subnets
– Typically, devices on each LAN have similar IP
addresses (e.g., Business, Law, Architecture, etc.)
– Example (made up numbers):
• 128.196.10.x assigned to Business (x is between 1 and 254)
• 128.196.11.x assigned to Law (x is between 1 and 254)
• Etc.
– Each LAN called a TCP/IP subnet
– What is the limitation here?
Addressing
Library
130.86.50.X

130.86.10.10
00-0C-00-F5-03-5A
CSUS
(Computer’s MAC)

Amador Hall
130.86.10.X

Tahoe Hall
130.86.11.X
Addressing
• Subnets
– Can be defined in different ways
• 128.196.10.x (256 combinations)
• 128.196.x.x (65,536 combinations)
• 128.x.x.x (16.8 million combinations)
– Defined by subnet mask
• Tells the computer what part of an Internet Protocol address to be
used to determine whether the destination is on the same subnet or
on a different subnet
• 255.255.255.0
• 255.255.0.0
• 255.0.0.0
– Subnetting is MUCH more complicated, and we will discuss it
a bit more after the midterm
Subnet Masks
• Used to make it easier to separate the subnet
part of the address from the host part.
• Example
– Subnet: 149.61.10.x
– Subnet mask: 255.255.255.000 or in binary
• 11111111.11111111.11111111.00000000
• Example
– Subnets: 149.61.10.1-128,
– Subnet mask 255.255.255.128 or, in binary:
• 11111111.11111111.11111111.10000000
Subnets: Example
Network Layer Functions
• Dynamic addressing
– Configuring each device manually is time consuming
– Assigning addresses permanently can be inefficient
when devices are not connected to network
– A server can supply IP addresses automatically
– Dynamic Host Configuration Protocol (DHCP)
• Most common protocol for dynamic addressing
• Device sends out broadcast message
• DHCP responds with IP settings
• Addresses are “leased” for a length of time
Network Layer Functions

• Address resolution
– Host (server) name resolution
• Translate host name to IP address
• e.g., www.indiana.edu → 129.79.78.193
• Domain Name Service (DNS)
– MAC address resolution
• Identify MAC address of the next device in the circuit
• Address Resolution Protocol (ARP)
Addressing
• Host (server) name resolution
– Domain Name -> IP
– How DNS works
• Local example
• Non-local example

• Iterative vs. recursive

• hosts file
• ipconfig /displaydns
Anatomy of a URL
Implied ‘dot’ to
Computer/Device Organization signify the DNS
sought Domain ‘Root’ Server

Computer1.sales.microsoft.com

Authoritative Name Top Level


Server : Domain
Always second ‘entry’
from left!
Domain Namespace
How DNS Works
• Desired URL in client’s address table:
– Use the corresponding IP address
– Each client maintains a server address table
• containing URLs used and corresponding IP addresses
• Desired URL not in client’s address table:
– Use DNS to resolve the address
– Sends a DNS request packet to its local DNS server
– URL in Local DNS server
• Responds by sending a DNS response packet back to the
client
How DNS Works (Cont.)
• URL NOT in Local DNS server
– Sends DNS request packet to the next highest
name server in the DNS hierarchy
– Usually the DNS server at the top level domain
(such as the DNS server for all .edu domains)
– URL NOT in the name server
• Sends DNS request packet ahead to name server at the
next lower level of the DNS hierarchy
Recursive DNS Resolution
• Request: www.microsoft.com
7 6

2
3

4
8 5
1 DNS Process Ends
Authoritative
Name Server

Actual Web Request 9


Web Response
10
Their Web server
Iterative DNS Resolution
• Request: www.microsoft.com
2

3
4
6
5
1
8 7
DNS Process Ends

Actual Web Request 9

10Web Response
Their Web server
Data Link Layer Addr. Resolution
• As a message moves across the Internet, it travels from
one network segment to another. On each of these
segments, it uses data link layer addresses to travel from
source to destination.
• When a data link layer destination address is not known,
the address resolution protocol (ARP) is used to find it.
• ARP works by broadcasting a message to all computers
on a local area network asking which computer has a
certain IP address. The host with that address then
responds to the ARP broadcast message, sending back
its data link layer address.
• The sender then stores this data link layer address in its
address table and sends its message to the destination
host.
ARP
ARP –
current
cache

PING –
Same LAN

ARP –
updated
cache
Network Layer Functions
• Routing
– Process of identifying what path to have a
packet take through a network from sender
to receiver Dest. Next

– Routing Tables B B

• Used to make routing decisions C B


• Shows which path to send packets on to reach a given destination D D
• Kept by computers making routing decisions E D

– Routers F D

• Special purpose devices used to handle routing decisions on the G B


Internet
• Maintain their own routing tables
Routing Example
Possible paths from A to G:
• ABCG
• ABEFCG
• ADEFCG
• ADEBCG

Routing Table for A


Dest. Next
B B
C B
D D
E D
F D
G B
Each node has its own routing table
Routing
• Router
– Special purpose device used to handle routing
decisions on networks (including the Internet)
– Maintain their own routing tables
Routing
• How many hop(stop) does it take to get to the
other side of the Internet?

• http://www.yougetsignal.com/tools/visual-
tracert/
– www.madagascar.gov.mg
– www.nepalgov.gov.np
– tracert -h 66 216.81.59.173
10.10.51.x 10.10.52.x
1
1
2
4 2
4 3
3
10.10.53.x

BN 10.10.250.x 1
2
INTERNET

2
Simplified Routing Table
1
Destination Interface
10.10.34.x 2
10.10.70.x 1
0.0.0.0 2
1

10.10.70.x
10.10.51.x 10.10.52.x
1
1
2
4 2
4 3
3
10.10.53.x

BN 10.10.250.x 1
2
INTERNET

2
Simplified Routing Table
Destination Interface 1
10.10.51.x 1 10.10.34.x 2
10.10.52.x 2
10.10.34.x 3
10.10.53.x 2 1
10.10.70.x
10.10.70.x 2
10.10.250.34 3
10.10.250.x 2
0.0.0.0 4
Routing
Routing
• Centralized Routing
– Routing decisions made by one computer
– Not common anymore
• Decentralized Routing
– Decisions made by each node independently of one
another
– Information needs to be exchanged to prepare routing
tables
– Used by the Internet
Routing
• Static
– Fixed routing tables
– Manually configured by network managers
– Local adjustments when computers added or
removed
• Dynamic
– Routing tables updated periodically
– Routers exchange information using protocols to
update tables
Dynamic Routing Algorithms
• Distance Vector
– Uses the least number of hops
to decide how to route a packet
– Used by Routing Information
Protocol (RIP)
• Link State
– Uses a variety of information
types to decide how to route a packet (more sophisticated)
• e.g., number of hops, congestion, speed of circuit, MTU
– Links state info exchanged periodically by each node to keep every
node in the network up to date
– Provides more reliable, up to date paths to destinations
– Used by Open Shortest Path First (OSPF)
Routing Protocols
• Used to exchange info among nodes for building and
maintaining routing tables
• Autonomous System (AS)
– A network operated by an organization (e.g., Indiana U.)
– Protocols classified based on autonomous systems
• Types of Routing Protocols
– Interior routing protocols (RIP, OSPF, EIGRP, ICMP)
• Operate within a network (autonomous system)
• Provide detailed info about each node and paths
– Exterior routing protocols (BGP)
• Operate between networks (autonomous systems)
Routing Protocols
• Routing Information Protocol (RIP)
– Dynamic distance vector protocol used for interior
routing
– Operation
• Network manager builds the routing table
• Routing tables broadcast periodically (e.g., every minute or
so)
• When new computers are added, router counts “hops” and
selects the shortest route
– Useful in smaller, less complex networks
Routing Protocols

• Open Shortest Path First (OSPF)


– Dynamic link state protocol used for interior
routing
– Most widely used interior routing protocol on
large enterprise networks
– More reliable paths
– Less burdensome to the network because only
updates sent
Routing Protocols
• Enhanced Interior Gateway Routing Protocol
(EIGRP)
– A dynamic link state protocol (developed by Cisco)
– Records transmission capacity, delay time, reliability and load for all paths
– Keeps the routing tables for its neighbors and uses this information in its
routing decisions as well
• Internet Control Message Protocol (ICMP)=>> used by ping
command
– Simplest and most basic
– An error reporting protocol (report routing errors to message
senders)
– Limited ability to update routing tables
Routing Protocols

• If each network uses a different protocol


internally, how are they able to communicate?
• Border Gateway Protocol (BGP)
– Dynamic distance vector protocol used for exterior
routing
– Far more complex than interior routing protocols
– Provide routing info only on selected routes (e.g.,
preferred or best route)
Autonomous System A (using OSPF)
OSPF
Designated Router Router 4
Router 1
Router 3 Router 5
Router 2
Border Router
Internet
BGP Autonomous System D Routing
Autonomous System B
(using RIP) BGP
BGP
using BGP,
Router 3
Router 1
Border
Router OSPF and
Router 2
Router 4 Autonomous System E RIP
BGP BGP
BGP
Autonomous System C
Autonomous System F (using OSPF)
Border Router
Router 4
Router 1 OSPF
Designated Router
Router 5
Router 2
Router 3
Multicasting
• Unicast - one computer to another computer
• Broadcast - one computer to all computers in the
network
• Multicast - one computer to a group of
computers (e.g., videoconference)
– Same data needs to reach multiple receivers and
avoid transmitting it once for each receiver
• Particularly useful if access link has bandwidth limitations
• Many implementations at different layers
• In IP multicast, hosts dynamically join and leave multicast
groups using Internet Group Management Protocol (IGMP)
TCP/IP Example

• Required network addressing information:


1. Device’s own IP address
2. Subnet mask
3. IP address of default gateway (most commonly
the router)
4. IP address of at least one DNS server
• Obtained from a configuration file or DHCP
TCP/IP Configuration Information
TCP/IP Network Example

TCP/IP Requirements?
• IP Address 128.192.98.130
• Subnet Mask 255.255.255.0
• Default Gateway 128.192.98.1
• DNS Server 128.192.254.4
Known Addresses, Same Subnet

• Suppose we have an HTTP request from Client in building A to Server in building B.


Known Address, Same Subnet
• Case:
– A Client (128.192.98.130) requests a Web page from a server
(www1.anyorg.com)
– Client knows the server’s IP and Ethernet addresses
• Operations (performed by the client)
– Prepare HTTP packet and send it to TCP
– Place HTTP packet into a TCP packet and sent it to IP
– Place TCP packet into an IP packet, add destination IP address,
128.192.98.53
– Use its subnet mask to see that the destination is on the same
subnet as itself
– Add server’s Ethernet address into its destination address field,
and send the frame to the Web server
TCP/IP Examples
1. A Client (128.192.98.130) requests a Web page from a
server (www1.anyorg.com)
– Client knows the server’s IP
2. A Client (128.192.98.130) requests a Web page from a
server (www2.anyorg.com) on a different subnet
– Client knows the server’s IP
3. A Client (128.192.98.130) requests a Web page from a
server (www1.anyorg.com)
– Client does not know server’s IP
TCP/IP Examples
1. Transmit from A => E
– A knows E’s IP Address
– All Ethernet addresses are known
2. Transmit from A => E
– A does not know E’s IP address
– All Ethernet addresses are known
3. Transmit from A => E
– A does know E’s IP address
– E’s Ethernet address is not known

PATH IP IP Ethernet Ethernet


Source Destination Source Destination
Known Address, Different Subnet
• Similar to Known Address, Same Subnet
• Differences
– Use subnet mask to determine that the destination is NOT on
the same subnet
– Send outgoing frames to the local subnet’s GW
– Local gateway operations
• Receive the frame and remove the Ethernet header
• Determine the next node (via Router Table)
• Make a new frame and send it to the destination GW
– Destination gateway operations
• Remove the header, determine the destination (by destination IP
address)
• Place the IP packet in a new Ethernet frame and send it to its final
destination.
Unknown Address
• Operations (by the host)
– Determine the destination IP address
• Send a UDP packet to the local DNS server
• Local DNS server knows the destination host’s IP address
– Sends a DNS response back to the sending host
• Local DNS server does not know the destination IP address
– Send a second UDP packet to the next highest DNS host, and so
on, until the destination host’s IP address is determined
– Follow steps in Known Address, Different Subnet
TCP/IP and Layers
• Host Computers
– Packets move through all layers
• Gateways, Routers
– Packet moves from Physical layer to Data Link Layer
through the network Layer
• At each stop along the way
– Ethernet packets is removed and a new one is created
for the next node
– IP and above packets never change in transit (created
by the original sender and destroyed by the final
receiver)

Copyright 2011 John Wiley & Sons, Inc


Implications for Management
• Organizations standardizing on TCP/IP
– Decreases costs of equipment and training
– Network providers are also moving towards
standardization
• Slow transition to IPv6

You might also like