

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


































A p p l i c a t i o n s H T T P F T P S M T P T C P U D P
I P
D a t a l i n k l a y e r p r o t o c o l s P h y s i c a l l a y e r p r o t o c o l s
z In the previous chapter, we discussed techniques to overcome some of the limitations of LAN, i.e., usage of bridges to extend LAN (packets can travel over geographically larger area/s) with better use(p g g p y g ) of bandwidth (learning bridges, spanning tree). But still we had:
z In this chapter, we examine some approaches to overcome these problems. This leads to the design of internetworking (internet): arbitrary collection of networks (or LANS) interconnected by routers and other devices. (not to be confused with I nternet.)
z We will discuss the main aspects and relevant protocols which make
EE 281, Internetworking
2
z We will discuss the main aspects and relevant protocols which make the building of the internet feasible and efficient.
z This chapter consists of two main parts:
EE 281, Internetworking
3
z A key player in the implementation of the internet is the routery p y p z Router is a network-layer device. Its job is to move data between different network segments by looking into packet headers & determine the best path for the packet to travel.
EE 281, Internetworking
4
EE 281, Internetworking
7
Front Fiew
Rear View
z Defined by Internet Engineering Task Force (IETF)
z Hourglass Architecture with four layers
Telnet HTTP DNS TFTP
TCP UDP “Here all goes
EE 281, Internetworking
8
…
IP
NET 1 NET 2 NETn
through me”
EE 281, Internetworking
9
Internet Protocol (IP)Internet Protocol (IP)
zz IP is the primary network protocol of TCP/IP suiteIP is the primary network protocol of TCP/IP suite z All applications depend on IP, and IP runs over all networks z IP is unreliable connectionless protocol responsible for source-to- destination delivery: best-offer-delivery (post office analogy) z In the IP layer
EE 281, Internetworking
10
0 15 16 31 4 bit 4 bit header 8 bit type of service^ 16 bit total length (bytes)
20 bytes
32 bit source IP address
8 bit TTL
4 bit version
yp (TOS) 16 bit total length (bytes)
Options (if present)
32 bit destination IP address
8 bit protocol 16 bit header checksum
16 bit identification (^) flags3 bit 13 bit fragment offset
length
EE 281, Internetworking
13
Options (if present)
z Version: IPv4, for now(other IPv6, larger, no need for fragmentation) z header length : in 32-bits words, range 5 words (20B) to max 60B z total length : total length of IP datagram
EE 281, Internetworking
14
z identification, flags , fragment offset : control the fragmentation/ reassembly process (reassembly is done at the host)== more next=== z header checksum : only IP header, ones complement sum
z Fragmentation is the process of dividing a datagram message intog p g g g smaller separate packets based on the MTU (Maximum Transmission Unit). MTU is a network dependent parameter. Its value is set by the datalink layer and passed to IP-layer. Example: 48B; 1,500B; and 4,464B are the MTUs of ATM, Ethernet, and FDDI networks respectively. z In IP network, Fragmentation is done at the router and reassembly (the reverse process) is done @ the host.
EE 281, Internetworking
15
[ y g f g g ] z In IP network, an identification number is assigned to all fragments of the same packet, indicated in the identification, flags , fragment offset fields
ExampleExample
Ident= x Offset= 0
Start of header 0 Rest of header 1400 data bytes
Question Host H1H1 sends a packet X with ident x and size 1400B to H8H through the network, shown below, the MTU in PPP segment networks are as indicated in the Figure. Illustrate the fragmentation process using a diagram. Assume header size is 20B.
Ident= x Offset= 512
Start of header 1 Rest of header
Ident= x Offset= 0
Start of header 1 Rest of header 512 data bytes
Answer: Note: DataSize= 532B-20B=512B Offset field: all fragments must be multiple of 8 Bytes-except last one (so how many fragments are allowed? Check out: 8192fragments/datagram) fragmentation only at router R2. Reassembly at H8.
H1 R1 R2 R3 H
EE 281, Internetworking
16
Rest of header 512 data bytes
Ident= x Offset= 1024
Start of header 0 Rest of header 376 data bytes
ETH IP (1400) FDDI IP (1400) PPP IP (512)
PPP IP (376)
PPP IP (512)
ETH IP (512)
ETH IP (376)
ETH IP (512)
MTU 532 MTU 532
7 bits 24 bits
Range of host addresses
There are five types, called classes, for IP addressing. All are 32-bits.
Class B
14 bits 16 bits
Class C
21 bits 8 bits
1.0.0.0 to 127.255.255.
128.0.0.0 to 191.255.255.
192.0.0.0 to 223 255 255 255
EE 281, Internetworking
19
Class D
28 bits
Class E
27 bits
223 .255.255.
224.0.0.0 to 239.255.255.
240.0.0.0 to 247.255.255.
Three BigThree Big--Bear ProblemBear Problem
z Based on these classes, the IP address allows us to have networks from the f llfollowing combinations of valid network and host addresses: i bi ti f lid t k d h t dd
class Possible networks
Possible Hosts
Total (x) Percent of All IP addresses A 126 16,777,214 2,113,928,964 50%
B 16,382 65,534 1,073,709,056 25%
Too few networks
Depleted
EE 281, Internetworking
20
z To determine the number of possible hosts, use the formula 2 n^ – 2,where n is the number of bits in host field. The subtraction of 2 is for special address (the local network id and broadcast address.)
C 2,097,150 254 532,676,608 12.5% Too few hosts
z The original classful address scheme had a number of problems
Problem 1.Problem 1. Too few network addresses for large networks Too few network addresses for large networks
Problem 2. Two-layer hierarchy is not appropriate for large networks with Class A and Class B addresses.
Problem 3: Inflexible. Assume a company requires 2,000 addresses
EE 281, Internetworking
21
To overcome the IPv4 addressing problems, several approaches were developed as summarized below
Subnetting (^) Supernetting
CIDR
IPv6 NAT and DHCP
EE 281, Internetworking
22
Next will discuss most of these approaches except the NAT (Network Address Translation) and DHCP (Dynamic Host Configuration Protocol)s are not part of our IP layer discussion ( but in later chapters)
Fixed-length Variable-length (VLSM)
z Recall, given a host IP address, one can determine the corresponding network idt k id bby looking at the MSB bits of its IP address l ki t th MSB bit f it IP dd
EE 281, Internetworking
25
as part of the extended network id.
z It is the job of subnet mask to extract (mask off) the network and host segments of the address
8 bits
Example 1: 8 bits are used to assign hosts
16 bits 8 bits
Class B Netid Subnetid Hostid
Subnet mask 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
8 bits
Decimal notation
16 bits 8 bits
Example 2: 6 bits are used to assign hosts
EE 281, Internetworking
26
255.255.255. 192
Class B
16 bits 10 bits
Netid Subnetid Hostid
6 bits
Subnet mask 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0
z the next 2 figures illustrate the effect of fixed-length subnetting ( that is all subnets have the same number bits for the subnet_id and host_id fields) on a network of IP network address 141.14.0. z Observe:
EE 281, Internetworking Network without subnetting^27
EE 281, Internetworking
Network with subnetting 28
Questions: Class B network on the Internet has a subnet mask of 255.255.240.0. What is the maximum number of hosts per subnet assume fixed subnetting? Answer: The lower 16 bits in B class are for subnet and host fieldsThe lower 16 bits in B class are for subnet and host fields. Since the most significant 4-bits are 1111: 240 = 2^7 + 2^6 + 2^5 + 2^4 so mask is binary: 1111 1111 1111 1111 1111 0000 0000 0000 So that leaves 12 bits for host or total of 2^12 host –2 = 4094 hosts
EE 281, Internetworking
31
z Given its IP address, a host can determine which class it belongs to and the boundary between host id and network idand the boundary between host_id and network_id (A, B, or C …using leading bits ) Æ That is with IP address one can determine the host network z Given the subnet mask , host can determine boundary between subnet_id and host_id Æ that is, with its own the IP address and subnet mask, a host can determine: (1) similar hosts in its own subnet (2) a host on a different subnet but on its own network
EE 281, Internetworking
32
(3) a host on a different network.
z Assume a host EE281 student was given the IP address 140.252.1.1_ g and the subnet mask 255.255.255.
EE 281, Internetworking
33
Answer
EE 281, Internetworking
34
z In VLS configuration, we can allow one subnet field of 2 bits:
EE 281, Internetworking
37
EE 281, Internetworking
38
(a) You have the following IP addresses: 171.68.3.3 and 171.68.2.3. If the subnet mask is 255.255.255.0, these addresses belong to the same subnetaddresses belong to the same subnet. a. True b. False
(b) Now you have the following IP addresses: 171.68.3.3 and 171.68.2.3. If the subnet mask is 255.255.0.0, these dd b l h b
EE 281, Internetworking
39
addresses belong to the same subnet. a. True b. False
Questions: The network designer in Example 1 is given class C network with 200.1.1 address and wants to form the two subnets for the departments: SA with 72 hosts and SB with 35 hosts Devise a possible arrangement of subnet mask to make this possibleDevise a possible arrangement of subnet mask to make this possible Answer: in class C the most lower 8 bits are for subnet and host fields. A possible arrangement: SA: set first bit to 0 (to identify the subnet SA), the remaining 7 bits are for hosts (2^7 -2) hosts (large enough to accommodate 72 hosts!) so the mask: 255.255.255.0/(7 bits for host address) ( notation: 0/) SB: 10/(6 bits for the host address) (notation 10/)
Note: z 01/ or 00/ are not possible masks for SB (why?)
EE 281, Internetworking
40
z 01/, or 00/ are not possible masks for SB (why?) “The essential requirement is that any distinct subnet numbers remain distinct when the longer one is truncated to the length of the shorter” z How about if SB is as big as SA: Use two or more smaller subnets for SB