Title: Week 3
1Week 3
2Learning Objectives
- Transport and Network layer with focus on TCP/IP
- Functions
- Protocols
- How TCP/IP works illustration
- Application exercises
- Transmission efficiency
- Subnet planning
3Comparing OSI and TCP/IP
4Focus on TCP/IP
- Most common protocol suite currently in use
- Flexible
- Multivendor (MS, IBM, Sun, Novell, Apple) support
- ? Standard in today's LANs, BBNs, MANs and
WANs - ? Commonly combined with Ethernet LANs and
Ethernet BBNs - Other protocol suites
- IPX/SPX Used on old Novell networks
- ?IPX and SPX respectively performs same
functions as IP and TCP - SNA Used on old IBM (and IBM compatible)
mainframes-based networks - ?Old version requires a gateway to link SNA
and non-SNA networks
5Mapping of common protocols
6Internetwork layersMajor functions and protocols
- Transport layer
- Segments and reassembles messages
- Establishes connection (OSI session layer) and
delivers messages - TCP Connection-oriented transmission (Reliable
delivery Flow control error detection) - UDP Connectionless transmission (Fast delivery
No handshake less overhead) - Network layer
- Addresses data packets IPv4 vs. IPv6
- Routes messages Dynamic routing protocols
include RIP, OSPF, ICMP, etc. - More on addressing and routing Slide 9 to the
end
7Transmission efficiency
- Packets include information bytes and overhead
bytes - Information bytes are user data
- Overhead bytes are control data added by each
layer (Figures p.67) - Overhead (or headers) affect transmission
efficiency See application exercise 1 - Transmission efficiency per packet
- Ratio of the number of information bytes / total
number of bytes per packet - See ex. p.70
- Throughput
- Total number of information bits received per
second, after taking into account the overhead
bits and the need to retransmit packets
containing errors
8Application exercise 1
- Question 33, 34 and 35 p. 101
- Assumption
- Conclusion
9Network layer functions
- Addressing Identifying hosts and networks to
deliver packets - Protocol
- Type of addresses
- Dynamic addressing
- Subnetting
- Address resolution
- Routing Determining the path from sender to
receiver - Static versus dynamic routing
- Routing algorithms and protocols
- Introduction to routers' operation
10Addressing in IP networks
- Application layer addresses Domain names
- ? Assigned by Internet authorities (public) or by
network administrator (private) - Network layer addresses IP addresses
- Two versions in use IPv4 (32-bit addresses) and
IPv6 (128-bit addresses) - IPv4 For human readers the dotted decimal
notation is used (4 bytes separated by dots) - Class A, Class B, Class C and other (Hierarchical
addressing scheme) - Public or private (NAT)
- Static or dynamic (public addressing)
- Data link layer addresses Physical addresses
from NIC - 48-bit addresses represented using hexadecimal
notation - Identify computers and devices, NOT subnets (Flat
addressing scheme) - Illustration TCP/IP networks (see next slide)
11Example of TCP/IP network
Here, routers connect subnets NOT computers
within subnets!
12Subnetting
- Process of dividing a network and its IP
addresses into segments (or subnets) - ? Computers from the same subnet have IP
addresses with same prefix (or network ID) -
- Benefits
- Smaller routing tables (include entries for
networks only) - The network ID portion of an IP address is used
for routing - Efficient use of address space
- Subnet mask
- Network IDs vary in length
- Subnet masks are 32-bit binary number used to
extract network address (IPv4) - Each computer on the IP network is given a subnet
mask
13Subnetting application
- How "Borrow" bits from the ltHost IDgt portion to
create ltSubnet IDgt portion - Rules
- At least 2 bits remain usable for the Host ID
(What is the max of bits one can borrow?) - The host bits cannot be all 1's or all 0's
- The subnet bits cannot be all 1's or all 0's
- Use subnet mask to extract the new (i.e. network
and subnetwork) network ID - Examples / Application exercises
- Using a Class B address with a subnet mask of
255.255.255.248, how many bits are being borrowed
from the host portion? Max of hosts? Max of
subnets? - Using a Class C address of 192.168.1.0 with a
subnet mask of 255.255.255.248, how many
subnetworks are available?
Network ID
Host ID
Network ID Subnet ID
Host ID
New network ID
(2n 2)
14Address resolution
- Process of translating addresses
- An application layer address into an IP address
(request to DNS) OR - An IP address into a MAC address (ARP request
broadcast in subnet) - Address resolution protocols
- ARP to get MAC address from IP address
- RARP used by a source that knows its MAC address
but not its IP address
15Routing
- Process of deciding which path a packet takes to
get to destination - More than one path is possible
- Computers and devices keep tables to make routing
decisions (Fig 3.14 p) - Types of routing
- Static routing Decisions are based on fixed
routing tables developed by network managers
?Used on simpler networks - Dynamic routing Decisions are based on
conditions and/or traffic information exchanged
between routing devices - Major algorithms used for dynamic routing
decisions - Distance Vector Uses the least number of hops
- Link State Uses several metrics (capacity, cost,
response, etc.) ? more popular - Many protocols can be used to implement such
algorithms (see next slide) - Exterior routing protocols Between networks
(Border Gateway Protocol or BGP) - Interior routing protocols Within a network
(called an autonomous system) - Routing Information Protocol (RIP) uses distance
vector algorithm - Open Shortest Path First (OSPF) uses the link
state algorithm
16Routing on the Internetusing BGP, OSPF and RIP
17TCP/IP Example
18Example of TCP/IP network
Here, routers connect subnets NOT computers
within subnets!
19Sending messages using TCP/IP
- Every computer must have 4 network layer
addressing information - The computers own IP address
- Its subnet mask
- The local DNS servers IP address
- The IP address of the router on its subnet so it
knows where to route messages going outside its
subnet - This information is obtained by the computer from
a configuration file or given to it by a DHCP
server - Servers also need to know their own application
layer addresses
20Forwarding algorithm
- At sender
- If destination network is the same as the host
network, then deliver locally (no router, no ARP)
- Otherwise send to the router (default gateway)
- At router
- If destination network is directly attached then
deliver locally (using ARP) - Otherwise look up destination network in routing
table to find next hop and send to next router.
21Routers operations
At each hop the data link layer frame is changed
but the packets above never change
22TCP/IP example
- Figure 3-18 shows a four LAN network connected
together with a backbone network - Building As subnet address is 128.192.98.x
- Building Bs subnet address is 128.192.95.x
- The backbones subnet address is 128.192.254.x
- The backbone has the DNS server
- The backbone also has the gateway router
connecting the network to the Internet. - Three possible cases of HTTP requests are
- 1. A Known Address, Same Subnet
- 2. A Known Address, Different Subnet
- 3. An Unknown Address
23Case 1a An HTTP request to a known address on
the same subnet
- A client (128.192.98.130) requests a Web page
from the Web server (www1.anyorg.com) on its
subnet - The client knows the servers network and data
link addresses - The clients application layer program (Web
browser) first passes the HTTP packet to the
transport layer - TCP places the HTTP packet into a TCP packet and
sends it to the network layer (no segmenting!) - IP places the TCP packet into an IP packet
- Adds the packets destination IP address,
128.192.98.53 - Determines the destination subnet (using its
subnet mask for the comparison) - Passes the IP packet to the data link layer
- The data link layer adds the servers Ethernet
address into its destination address field and
sends the Ethernet frame to the Web server
24Case 1b An HTTP response to a client on the
same subnet
- The Web server receives the Ethernet frame
- Performs error checking
- Sends back an ACK (covered later in chapter on
data link layer) - The incoming frame is then successively processed
by the data link, network, transport and
application layers until the HTTP request emerges
and is processed by the Web server - The Web server sends back an HTTP response which
includes the requested web page - The outgoing HTTP response is then processed,
with each layer adding its header until an
Ethernet frame is created and sent back to the
client - At the client, the incoming frame is processed by
each successive layer of the clients protocol
stack until the incoming HTTP response emerges at
the application layer and is processed by the
clients Web browser
25Case 2 Known address, different subnet
- Sending an HTTP request to a destination on a
different subnet (Same as Case 1) - The first difference occurs when IP determines
that the outgoing packets destination IP address
is on a different subnet - IP sends the outgoing frames the local subnets
gateway router which connects the subnet to the
backbone - The router receives the outgoing frame
- It removes the Ethernet header to examine the
packets destination IP address against its
routing table - See slide on router's operations
- Once a routing decision is made, the router
builds a new Ethernet frame - Sends it to the destination subnets router
- The destination subnets router receives the
frame - Looks at its destination IP address
- Places the IP packet in a new Ethernet frame
- Sends it to its destination Web server
26Case 3 Unknown address
- Your turn (application exercise!)
- Start with an HTTP request that is sent to an
unknown address
27Thank you