0% found this document useful (0 votes)
104 views108 pages

Chương 6

The document discusses the network layer and routing algorithms. It describes the role of routers in wide area networks and the services they provide to the transport layer. It discusses connectionless and connection-oriented implementations and compares virtual-circuit and datagram subnets. It also describes routing algorithms like Dijkstra's algorithm and the distance vector routing protocol.

Uploaded by

đạt thế
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views108 pages

Chương 6

The document discusses the network layer and routing algorithms. It describes the role of routers in wide area networks and the services they provide to the transport layer. It discusses connectionless and connection-oriented implementations and compares virtual-circuit and datagram subnets. It also describes routing algorithms like Dijkstra's algorithm and the distance vector routing protocol.

Uploaded by

đạt thế
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 108

Chapter 6

Network Layer
Tran Thanh Dien, PhD
College of Information and communication Technology
Can Tho University

Can Tho, August 30, 2022


Objectives

• Role of routers in wide area networks


• Services provided to the transport layer
• Routers
• Routing algorithms
• Internet protocol suite
Limitations of data link layer

• Just moving frames from one end of a wire to the other


• Have a limitation of number of hosts per a network segment
• Difficult in interconnecting many heterogeneous networks
Roles of network layer

• Provide a host-to-host transmission in a WAN consisting of many


heterogeneous LANs
• Moving a packet from one host to another host via many intermediate links
• Find appropriate routes for packets to avoid congestion
Network Layer Design Issues

• Store-and-Forward Packet Switching


• Services Provided to the Transport Layer
• Implementation of Connectionless Service
• Implementation of Connection-Oriented Service
• Comparison of Virtual-Circuit and Datagram Subnets
Network Layer Design Issues
Store-and-Forward Packet Switching

The environment of the network layer protocols


Network Layer Design Issues
Services Provided to the Transport Layer

• Services need to be carefully designed with the following goals in mind


o The services should be independent of the router technology.
o The transport layer should be shielded from the number, type, and topology of the
routers present
o The network addresses made available to the transport layer should use a uniform
numbering plan, even across LANs and WANs.
• Two services provided to the transport layer
o Connectionless service
o Connection-oriented service
Network Layer Design Issues
Implementation of Connectionless Service

• Packets frequently called datagrams and network called a datagram network


• No need to establish a path from the source router to the destination router before
sending packets
• Data segmented in to packets that are independently sent in the network through
different paths to the same destination
Network Layer Design Issues
Implementation of Connectionless Service

Routing within a
diagram subnet
Network Layer Design Issues
Implementation of Connection-Oriented Service

• A path from the source router all the way to the destination router established
before any data packets can be sent
• This connection called a virtual circuit, and the network called a virtual-circuit
network
• When a connection established, a route from the source to the destination chosen
as part of the connection setup and stored in tables inside the routers.
• Established route is used for all traffic flowing over the connection
• When the connection is released, the virtual circuit is terminated.
• Each packet carries an identifier telling which virtual circuit it belongs to
Network Layer Design Issues
Implementation of Connection-Oriented Service
Network Layer Design Issues
Implementation of Connection-Oriented Service

Routing within a
virtual-circuit subnet
Network Layer Design Issues
Comparison of Virtual-Circuit and Datagram Subnets
Routing Algorithms
Routing Algorithms

• A part of the network layer software responsible for deciding which output
line an incoming packet should be forwarded
• In datagram network: routing made for every data packet since the best route
may have changed since last time
• In virtual circuits network: routing decisions are made only when a new
virtual circuit established
• Two process in inside a router
 Handling each incoming packet: look up the outgoing line in the routing
tables – forwarding process
 Filling in and updating the routing tables
Routing Algorithms
Routing

• Objective: Choosing an appropriate route (a chain of router) through an


internetwork from sender host to destination host

• Need to model the network as a graph


 Nodes: Routers, switches or sub networks
 Edges: network links
 Costs on each edge: Cost for transmitting
data via the edge

• Cost of a route is the sum of edges costs on the route


• If there is no route between two nodes, the cost of route is infinite
Routing Algorithms
General objective

• Finding a route quickly and exactly


• Being able to adapt to the change of network topology
• Being able to adapt to the change of network traffic
• Being able to avoid network congestion
• Low cost in computing
Routing Algorithms
Types

• Centralized routing: There is a NIC (Network Information Center) responsible for


calculating and updating routing table for all routers in the network
• Distributed routing: Each router has to calculate and update its routing table
 Routers need to exchange routing information
• Static routing: A router can't update its routing table when network topology is
changed
 Usually network administrator will create and update routing table manually
• Dynamic routing: Routing table will be updated automatically by the router when
there is a network topology change
Routing Algorithms
Finding shortest path with Dijkstra algorithm

• Objective: Finding shortest paths from one source node to all other destination
nodes in a network
• Being an optimized algorithm – centralized routing algorithm
• Call
 S: Source node (predefined)
 N: Set of nodes which shortest path (from S) found
 Di: Cost of a shortest path from node S to node i
 lij: Cost of edge connecting node i and node j; ∞ if no edge between i and j
 Pi: Parent node of node i
Routing Algorithms
Finding shortest path with Dijkstra algorithm

• Step 1: Initial step


N={S}; Ds=0;
iS: Di=lsi , Pi=S
• Step 2 Finding a neighborhood nodes
o Find node i  N: Di= min (Dj) với j  N
o Add node i into the set N
o If N contains all node of the graph then stop the algorithm. Otherwise do step 3
• Step 3: Recalculating cost of shortest paths
 For each node j  N, recalculate Dj= min{ Dj, Di+ lij} ; Pj=i;
 Return to step 2
Routing Algorithms
Finding shortest path with Dijkstra algorithm
Routing Algorithms
Finding shortest path with Fulkerson algorithms

• Objective: Finding shortest paths from all nodes to a destination node


• Being an optimized algorithm – distributed routing algorithm
• Call
 d: Destination node (predefined)
 Di: Cost of a shortest path from node i to node d
 Ci: Child node of node i
Routing Algorithms
Finding shortest path with Fulkerson algorithms

• Step 1: initial step


– Dd = 0;
– For every id: assign Di= ; Ci= -1;
• Step 2: Update cost of shortest from i to d
 Di= min{ lij+ Dj} với ji => Ci = j;
 Repeat step 2 until no Di changed
Routing Algorithms
Finding shortest path with Fulkerson algorithms
Routing Algorithms
Distance Vector

• Each router maintains a routing table containing one entry for each router in the
network.
 Entry [destination, Next hop, Cost]
• Cost is distance – hops
• Each router is supposed to know costs of links connecting to its neighborhood
• Cost of a broken/down link is infinite
• A router exchange its routing table with neighborhood periodically
• A router will update its routing table with new shorter routes learned from routing
tables of its neighborhood
Routing Algorithms
Distance Vector

Initially, each node will assigns 1 for cost of the link to a neighborhood, and 
for links to other router

Distance to nodes
B A B C D E F G
C A 0 1 1  1 1 
A
D B 1 0 1    
C 1 1 0 1   
E
D   1 0   1
F G E 1    0  
F 1     0 1
G    1  1 0
Routing Algorithms
Distance Vector

Distance to nodes Each router sends its


A B C D E F G routing table to its
A 0 1 1  1 1  neighbor
B 1 0 1    
C 1 1 0 1   
D   1 0   1
Dest Cost Next hop
Dest Cost Next hop E 1    0  
B 1 B
B 1 B F 1     0 1
C 1 C
C 1 C G    1  1 0
D 2 C
D  -
E 1 E
E 1 E
F 1 F
F 1 F
G 2 F
G  -
A’s routing table
Routing Algorithms
Distance Vector

Routing tables after routers get enough information

Distance to nodes
A B C D E F G
B
A 0 1 1 2 1 1 2
C
A B 1 0 1 2 2 2 3
D

C 1 1 0 1 2 2 2
E
D 2 2 1 0 3 2 1
F G
E 1 2 2 3 0 2 3
F 1 2 2 2 2 0 1
G 2 3 2 1 3 1 0
Routing Algorithms
Distance Vector

• When a router send its routing table to all its neighborhoods ?


 Periodically, for example: every 30 seconds
 When its routing table is modified
• How to know a neighborhood is alive ?
 Send a hello message periodically
 Receive routing table sent by neighborhood
• What a router do when one of its a link is down ?
 Set the cost of route containing the link to infinite and send its routing table to all
its neighborhoods
 Problem of convergence
Routing Algorithms
Link State Routing

Each router must do the following:


1. Discover its neighbors, learn their network address.
2. Measure the delay or cost to each of its neighbors.
3. Construct a packet telling all it has just learned.
4. Send this packet to all other routers.
5. Compute the shortest path to every other router.
Routing Algorithms
Link State Routing

Reliable flooding protocol to send link state to all Routers


Routing Algorithms
Link State Routing

Building Link State Packets (LSP)


Routing Algorithms
Hierarchical routing

• As networks grow in size


 Router’s routing tables grow proportionally
 Router’s memory consumed ever-increasing tables
 CPU time needed to scan routing tables and more bandwidth needed to send
status reports about them
=> Routing will have to be done hierarchically
• When hierarchical routing is used
 the routers divided into domains
 Each router knows how to route within its own domain but knows nothing
about the internal structure of other domains
Routing Algorithms
Hierarchical routing

Inter-AS routing
between A and B
C.b
(BGP)
B.a

A.a
Host
b A.c c h2
a a
C b
a B
d
Host c
h1 A b Intra-AS routing
within AS B (OSPF/RIP)
Intra-AS routing
within AS A (OSPF/RIP)
Routing Algorithms
Hierarchical routing
Internetworking & Internet Protocol Suite
Internetworking

• An internetwork: a collection of
individual networks, connected by
intermediate networking devices,
that functions as a single large
network
• Component networks are
inhomogeneous: different in
hardware, software and protocols
• Objective: to allow a user in a
network to communicate with other
users in the other networks
Internetworking

• At physical layer:
 Individual networks interconnected by using Repeaters or HUBs.
 Repeaters or HUBs simply transmit raw bits from one network segment to others
network segments
• At data link layer:
 Switches or Bridges used.
 They analyze the frame’s MAC address and forward it to the other network segment.
 Reformat the frame
• At network layer: Routers used.
• At transport layer and application layer: Gateways used
Internetworking

• Two routers interconnected by a point-to-


point link
• Host S wants to send a packet to host D
• S creates a frame containing the packet and
sends the frame onto LAN1
• When the frame arrives at router R1, the router will
 Unpack the frame, retrieve the packet, find the destination address of the
frame, search in its routing table for the route to the destination
 Decide to forward the packet to port connecting to R2;
 Create a frame containing the packet and send the frame to router R2
Internet Protocol Suite
History

• Developed in the years of the '70s of the 20th century in a project of Defense
Advanced Research Projects Agency (DARPA)
• DARPA project led to the development of protocols for internetworking
• In september1969: the first packet-switched network was placed in UCLA and was
supervised by Kleinrock.
• In Dec of 1969: ARPAs network expanded to include three different nodes
throughout the United States: The Stanford analysis Institute (SRI), The University
of California city, and thus the University of Utah
• 1971 : Fifteen sites connected to the young ARPANET
• In December 1974, RFC 675 – Specification of Internet Transmission Control
Program, term internet used as a shorthand for internetworking
Internet Protocol Suite
History

• In 1982, the Internet Protocol Suite (TCP/IP) was standardized, which permitted
worldwide proliferation of interconnected networks.
• In 1986, TCP/IP network access expanded again when the National Science
Foundation Network (NSFNET) provided access to supercomputer sites in the
United States from research and education organizations, first at 56 kbit/s and later
at 1.5 Mbit/s and 45 Mbit/s.
• In 1990, The ARPANET was decommissioned
• By 1995, The Internet was fully commercialized in the U.S.
• In 1997, Vietnam was connected to Internet
Internet Protocol Suite
History
Internet Protocol Suite
TCP/IP

The heart of Internet; A set of communication protocols


• Layer 3: Internet Protocol
• Layer 4: TCP (Transmission
Control Procotol); UDP (User
Datagram Protocol)
• Layer 7: SMTP, FTP, TELNET,
HTTP,…
Internet Protocol Suite
IP

• A protocol at the Network layer


• Define the addressing scheme and packet exchange methods in an internetwork
• Specified in RFC 791 (Request For Comments)
• Two main functions
 Providing a connectionless communication to exchange datagram packets
between hosts in an internetwork
 Breaking up packets into fragments and recombining the fragments back into
original packet to support data link layer with different sizes of frames
Internet Protocol Suite
IPV4 packet format
Internet Protocol Suite
IPV4 address

• A 32-bit number that uniquely identifies a network interface on a machine.


• An IPv4 address typically written in decimal digits, formatted as four 8-bit fields
separated by periods.
• Each 8-bit field represents a byte of the IPv4 address.
• Example:
10101100.00010010.11001000.00000010
172 . 18 . 200 . 2
• An IP address consist of 2 parts:
 Network ID and Host ID
Internet Protocol Suite
IPV4 address
Internet Protocol Suite
Special IPV4 address

• Network Address: an IP address where all bits in host identifier part are 0, used to
identify a network
 Example: 10.0.0.0; 172.18.0.0 ; 192.1.1.0
• Broadcast address: an IP address where all bits in host identifier part are 1, used
to refer to all host in a network; not assigned to a host
 Example: 10.255.255.255, 172.18.255.255, 192.1.1.255
Internet Protocol Suite
Special IPV4 address

• Loopback Network: 127.0.0.0 used locally in each host.


 Each host assigned the loopback IP address 127.0.0.1: used to check IP protocol
• Private Network Addresses: for LANs not directly connected to Internet
 Network of class A: 10.0.0.0
 Networks of class B: 172.16.0.0 → 172.32.0.0
 Networks of class C: 192.168.0.0 → 192.168.254.0
Internet Protocol Suite
Special IPV4 address

• Netmask: An IP address where all bits in network identifier part are 1 and, all bits in
host identifier part are 0.
 Used to determine Network ID from an IP address
Network ID = IP & Netmask
 Three standard netmasks
o For networks of class A: 255.0.0.0
o For networks of class B: 255.255.0.0
o For networks of class C: 255.255.255.0
 Example:
Netmaks = 255.255.0.0 and IP address 191.2.2.41
=> Network ID = 191.2.2.41 & 255.255.0.0 = 191.2.0.0
Internet Protocol Suite
Subnetting

• A solution allowing the block of addresses to be split into several parts:


 for internal use as multiple networks (subnets)
 while still acting like a single network to the outside world.
• Benefits
 Simplify administration: subnets managed as independents network and more
efficient
 Be able to change the internal structure of the network without affecting the external
network.
o An organization continue to use the IP addresses allocated without requesting
new address block
Internet Protocol Suite
Subnetting

• Benefits
 Strengthening the security of the system: Subnetting allow an organization to design
his network as an internetwork of subnets while outside networks still see it is a
single network
 Isolating the traffic flow on the network: With the help of the routers, network traffic
can be kept to the lowest level
Internet Protocol Suite
Subnetting

Internet

172.18.0.0/255.255.0.0

SWITCH SWITCH
SWITCH

PC1 PC2 PC3 PC4 PC1 PC2 PC3 PC4 PC1 PC2 PC3 PC4

LAN 54
Internet Protocol Suite
Subnetting

Internet

172.18.0.0/255.255.0.0

SWITCH SWITCH
SWITCH

172.18.1.0/255.255.255.0 172.18.2.0/255.255.255.0 172.18.3.0/255.255.255.0

PC 1 PC 2 PC 3 PC 4 PC 1 PC 2 PC 3 PC 4 PC 1 PC 2 PC 3 PC 4

LAN 1 LAN 2 LAN 3


Internet Protocol Suite
Subnetting

• Network Identifier of original network address remains unchanged


• Host Identifier of original network address is divided into two parts:
 Subnet Identifier
 Host Identifier

Network Id Host Id

Subnet Id
Internet Protocol Suite
Subnetting: Subnetmask

• Subnetmask is an IP address where all bits in network identifier part and all bits in
subnet identifier part are 1, and all bits in host identifier are 0
Subnetwork Address = IP & Subnet mask

Network Id Host Id
11111111 11111111 11111

Subnet Id

• Number of bits of subnet id determines the number of subnets


• Example: 4 bits in subnet id → 24=16 subnets
Internet Protocol Suite
Subnetting: Example

Given a network address of class C: 192.168.1.0 / 255.255.255.0.


 Using 2 bits for subnet identifier part
 Subnetmask is 255.255.255.192
 List of subnetwork addresses
IP address Represented in Represented in binary
decimal
Original network 192.168.1.0 1100 0000 1010 1000 0000 0001 0000 0000
Subnet 1 192.168.1.0 1100 0000 1010 1000 0000 0001 0000 0000
Subnet2 192.168.1.64 1100 0000 1010 1000 0010 0001 0100 0000
Subnet3 192.168.1.128 1100 0000 1010 1000 0000 0001 1000 0000
Subnet4 192.168.1.192 1100 0000 1010 1000 0000 0001 1100 0000
Internet Protocol Suite
Steps in subnetting

• Determine the required number of subnets, e.g N


• Represent the number (N+1) in binary.
 The number of bits used to represent (N+1) is also the number of bits reserved
for Subnet identifier part.
• For example, N=6 → N+1=7 ~ 111 (B) → Need 3 bits for Subnet identifier part
• Create subnetmask
• List all subnetwork addresses corresponding to the subnetmask
• Choose N addresses from the above list to assign to N subnetworks
Internet Protocol Suite
Steps in subnetting
Internet Protocol Suite
Steps in subnetting
Internet Protocol Suite
Subnetting: Homeworks

Bài 1: Cho địa chỉ mạng 192.168.1.0. Hãy phân mạng này thành 10 mạng con để gán cho 10
phòng máy tính. Định địa chỉ cho 10 máy tính của phòng 1 và phò ng 2
Bài 2: Cho địa chỉ mạng 172.16.0.0 được chia mạng con với subnetmask=255.255.255.0.
Gán mỗi phòng 1 mạng con. Hãy định địa chỉ cho 10 máy tính ở phòng 1 và 2
Lưu ý: Trình bày kết quả theo dạng
– Phân bố mạng con
+ Phòng 1: Địa chỉ mạng con/subnetmask
.…
+ Phòng 10: Địa chỉ mạng con/subnetmask
– Phòng 1:
+ Máy 1: IP
+ Máy 2: IP
+ Máy 3: IP …
+ Máy 10: IP
Internet Protocol Suite
Subnetting: Homeworks

Bài 3: Mạng máy tính của một tổ chức có sơ đồ như hình bên dưới. Hãy xác định số lượng
mạng con tối thiểu của mạng này. Giả sử tổ chức này sử dụng một địa chỉ mạng IP
180.10.0.0. Hãy giúp xác định:
a) Mặt nạ mạng con
b) Gán địa chỉ mạng cho các mạng con
c) Gán địa chỉ IP cho các Interface của
router
d) Gán 10 địa chỉ IP cho phòng máy
tính Art và Physics
Internet Protocol Suite
Classless Inter-Domain Routing method (CIDR)

• Developed to resolve the lack of IP addresses


• No need to classify the networks into class A, B, or C
• Network identify part: the first 13→ 27 bits
• An IP address consists of two parts
 32 bits of a traditional IP address
 Number of bits used for network identify
 Example: 206.13.01.48/25
Internet Protocol Suite
Classless Inter-Domain Routing method (CIDR)
Internet Protocol Suite
Routing in IP protocol
Internet Protocol Suite
ARP - Address Resolution Protocol
Internet Protocol Suite
ARP - Address Resolution Protocol
Internet Protocol Suite
RARP – Reverse Address Resolution Protocol

• Mapping MAC addresses to IP addresses


• Used in systems supporting diskless workstations
• Diskless workstations need to get IP addresses to communicate with the server
• The server maintains a table mapping MAC addresses to IP addresses
• On receiving an RARP request, the server searches in mapping table for the IP
address correspond to the MAC address in RARP request and return the
address to the workstation
Internet Protocol Suite
Internet Control Message Protocol (ICMP)

• Messages of ICMP are transmitted in IP packets


• Used to transmit error messages or control information
Internet Protocol Suite
Internet Control Message Protocol (ICMP)
Internet Protocol Suite
Internet Control Message Protocol (ICMP)
Internet Protocol Suite
Internet Control Message Protocol (ICMP)
Internet Protocol Suite
Subnetting Cheat Chart

Which subnet is host 192.168.1.1/26 in?


• /26 isn’t the standard mask for Class C IP
addresses; /24 is.
• To get to 26 from 24 you need to add 2.
• Tick two places across the top row to see that
the subnets go up in increments of 64

• You are allowed to start with subnet 0, and the last subnet will be whatever /26 is.
 To work that out, tick two down the Subnets column
Internet Protocol Suite
Subnetting Cheat Chart

Which subnet is host 192.168.1.1/26 in?


192.168.1.0 <= Host 192.168.1.1 is in this subnet
192.168.1.64
192.168.1.128
192.168.1.192

Which subnet is host 192.168.1.100/26 in?


192.168.1.0
192.168.1.64 <= Host 192.168.1.1 is in this subnet
192.168.1.128
192.168.1.192
Internet Protocol Suite
Subnetting Cheat Chart

Which subnet is host 192.168.1.100/27 in?


• To get to 27 from 24 you need to add 3
• Tick three places across the top row
 The subnets go up in increments of 32
 Start at zero and end at 224.
192.168.1.0
192.168.1.32
192.168.1.64
192.168.1.96 <= Host 192.168.1.100 is in this subnet
192.168.1.128
192.168.1.160
192.168.1.192
192.168.1.224
Internet Protocol Suite
Subnetting Cheat Chart

Which subnet is host 192.168.1.210/28 in?


• To get to 28 from 24 you need to add 4
• Tick four places across the top row
 Subnets go up in increments of 16
 Start at zero and end at 240
• Apply jumping whenever you have a 192.168.1.0
small increment and a high IP address 192.168.1.16 <=Apply a jump here to 160.
 Find a number you can use to jump, 192.168.1.160 <=Resume the 16 increment count.
but stay in the increment count 192.168.1.176
192.168.1.192
192.168.1.208 <=Host 192.168.1.210 is in this
subnet.
192.168.1.224
Internet Protocol Suite
Subnetting Cheat Chart

Which subnet is host 200.100.100.250/29 in?


• To get to 29 from 24 you need to add 5
• Tick five places across the top row
 Subnets go up in increments of 8
 Start at zero and end at 248

200.100.100.0
200.100.100.8 <=Jump to 80.
200.100.100.80 <=Jump to 160.
200.100.100.160 <=Add another 80.
200.100.100.240 <=Back to adding 8 increments.
200.100.100.248 <=Host 200.100.100.250 is here.
Internet Protocol Suite
Subnetting Cheat Chart

Exercises:
1. 220.20.10.199/27 in? What is the broadcast address?
2. Which subnet is host 199.99.10.87/28 in? What is the broadcast address?
3. Which subnet is host 200.99.30.171/29 in? What is the first host, last host, and broadcast
address?
4. Which subnet is host 172.16.100.100/17 in?
5. Which subnet is host 172.16.200.100/17 in?
6. Which subnet is host 128.160.22.111/18 in?
7. Which subnet is host 130.160.222.1/18 in?
8. Which subnet is host 140.60.212.12/19 in?
9. Which subnet is host 160.160.160.160/20 in?
Internet Protocol Suite
Subnetting Cheat Chart

Exercises:
10. Which subnet is host 190.1.150.110/21 in? What is the first host, last host, and broadcast
address?
11. Which subnet is host 191.100.15.1/22 in?
12. Which subnet is host 128.100.19.11/23 in?
13. Which subnet is host 136.10.40.111/24 in?
14. Which subnet is host 186.30.30.41/25 in?
15. Which subnet is host 150.130.20.121/26 in?
16. Which subnet is host 131.60.50.1/27 in?
17. Which subnet is host 142.160.40.35/28 in?
18. Which subnet is host 128.10.10.54/29 in?
Internet Protocol Suite
Subnetting Cheat Chart

Exercises:
19. Which subnet is host 10.10.10.54/9 in? What is the first host, last host, and broadcast
address?
20. Which subnet is host 20.100.11.11/10 in?
21. Which subnet is host 40.50.101.121/12 in?
22. Which subnet is host 120.150.1.2/14 in?
23. Which subnet is host 10.10.14.25/16 in?
24. Which subnet is host 10.23.4.2/18 in?
25. Which subnet is host 14.40.140.85/22 in?
26. Which subnet is host 90.10.22.17/29 in?
27. Which subnet is host 100.100.210.46/28 in?
Internet Protocol Suite
Subnetting Cheat Chart

Exercises:
27. Which subnet mask applied to 192.168.1.0 will generate two subnets and 126 hosts-per-subnet?
28. Which subnet mask applied to 192.168.1.0 will generate four subnets and 62 hosts-per-subnet?
29. Which subnet mask applied to 200.18.2.0 will generate eight subnets and 30 hosts-per-subnet?
30. Which subnet mask applied to 221.1.22.0 will generate 16 subnets and 14 hosts-per-subnet?
31. Which subnet mask applied to 198.10.122.0 will generate 30 subnets and 6 hosts-per-subnet?
32. Which subnet mask applied to 210.100.12.0 will generate two hosts-per-subnet?
33. Which subnet mask applied to 172.16.0.0 will generate four subnets? How many hosts-per-
subnet will this leave you?
34. Which subnet mask applied to 172.20.0.0 will generate 32 subnets? How many hosts-per-
sub-net will this leave you?
Internet Protocol Suite
Subnetting Cheat Chart

Exercises:
35. Which subnet mask applied to 132.30.0.0 will
generate as close as possible to 60 subnets each
supporting up to 1000 hosts?
36. Which subnet mask applied to 190.100.0.0 will
generate 128 subnets each supporting at least 500
hosts?
37. Which subnet mask applied to 191.40.0.0 will
generate 512 subnets each supporting up to 100
hosts?
38. Your boss hands you subnet 10.0.0.0/21 and asks you
to work out how many subnets and hostsper- subnet
this will generate. What do you tell her?
Internet Protocol Suite
Subnetting Cheat Chart

Exercises:
39. You have taken over a network from another network designer. You can see that 10.0.0.0/23
has been allocated. How many subnets and hosts-per-subnet has this generated?
40. You have taken over a network from another network designer. You can see that 10.0.0.0/17
has been allocated. How many subnets and hosts-per-subnet has this generated?
Internet Protocol Suite
IPv6

 The latest version of Internet Protocol


 Layer 3 Internet Protocol version 6
 Intended to replace IPv4
 Became a draft standard in December 1998
 Formally become Internet Standard on 14 July, 2017
Internet Protocol Suite
IPv6

 Better Security
 Larger address space: 128-bit vs 32-bit length address
 More efficient IP header (fewer fields and no checksum)
 Built-in IP Mobility
Internet Protocol Suite
IPv6 address

 IPv6 address:
o a 128-bit address broken up into eight different sections separated by a colon
o Each section made up of 16 bits.
o 1111:AABB:CCDD:0001:0123:4567:8901:ABCD
 This address can be divided into 3 section: as an organizational prefix, the subnet,
and the device IDs
Internet Protocol Suite
IPv6 address

Example address
1111:AABB:CCDD:0001:0123:4567:8901:ABCD
We can break it out into the following parts:
 Organizational Prefix (48 bits): 1111:AABB:CCDD
 Subnet ID (16 bits): 0001
 Device IDs (64 bits): 0123:4567:8901:ABCD

1111:AABB:CCDD 0001 0123:4567:8901:ABCD


Organizational Prefix (48 bits) Subnet ID Device IDs (64 bits)
Internet Protocol Suite
IPv6 address

Example address
1111:AABB:CCDD:0001:0123:4567:8901:ABCD
We can break it out into the following parts:
 Organizational Prefix (48 bits): 1111:AABB:CCDD
 Subnet ID (16 bits): 0001
 Device IDs (64 bits): 0123:4567:8901:ABCD

1111:AABB:CCDD 0001 0123:4567:8901:ABCD


Organizational Prefix (48 bits) Subnet ID Device IDs (64 bits)
Internet Protocol Suite
IPv6 address

 How many devices are there in the network with an IP schema like this?
 In the above example:
o 16-bit section for subnetting: provide us with the capability to have more than
65,000 subnets and,
o And 64 bits for actual IP addresses: quintillions of unique device IDs in the IP
range
Internet Protocol Suite
IPv6 address

• How to assign the individual device ID numbers for all of the computers, servers,
and devices on our network?
1. Start with number 1 and go up from there.
2. Calculate out the old IPv4 addresses into hex and use this as the last 32 bits of
the address
 Then utilize ID numbers in combination with the organizational prefix and the
subnet ID to create a static IPv6 address
E.g., An IPv4 192.168.1.5 factors out to C0A8:0105
IPv6: 1111:AABB:CCDD:0001:0:0:C0A8:0105
Internet Protocol Suite
IPv6 address Simplified

• The IPv6 address:

• 1111:AABB:CCDD:0001:0000:0000:C0A8:0105

1. Dropping leading zeroes from any group.

o For example: 1111:AABB:CCDD:1:0:0:C0A8:105


• 2. Using a pair of colons (::) to represent a string of consecutive groups with a value
of zero
o For example: 1111:AABB:CCDD:1::C0A8:105
• 3. pair of colons can not used more than one time within an IP address
Internet Protocol Suite
Type of IPv6 address

• One-to-one association between two individual devices


• Each unicast destination address uniquely identifies a single
receiver on a network
Internet Protocol Suite
Type of IPv6 address

EX: ICMPv6: NDP to


find MAC

• One-to-many communication
Internet Protocol Suite
Type of IPv6 address

• One-to-nearest any association


• Typically used by routers
• The address can be assigned to a group of routers
Internet Protocol Suite
Type of IPv6 address

• Several types of unicast for different purposes


Internet Protocol Suite
Type of IPv6 address
Internet Protocol Suite
Type of IPv6 address

DHCP
client
Internet Protocol Suite
Type of IPv6 address
Internet Protocol Suite
Type of IPv6 address
Internet Protocol Suite
Type of IPv6 address: Global unicast addresses

 Similar to IPv4 public IP: used when a host want to used Internet
 Routable on the IPv6 Internet
 Currently always starts with 2001::/3

48 bits 16 64
45 bits bits bits
001 Global routing prefix Subnet ID Interface ID

Prefix managed Prefix assigned to Subnet bits for Client Interface


by IANA top-level ISPs organizations ID
Internet Protocol Suite
Type of IPv6 address: Global unicast addresses

How does devices get global unicast address?

The first 64-bit part (Global


routing prefix and subnet ID):
comes from default gateway
Internet Protocol Suite
Type of IPv6 address: Global unicast addresses

How does devices get global unicast address?


• The second 64-bit part generated by the device: typically derived from device’s
MAC address
Internet Protocol Suite
Type of IPv6 address: Global unicast addresses

How does devices get global unicast address?


EUI- Extended Unique Identifier

Flip the 7th bit


from the left
Internet Protocol Suite
Type of IPv6 address: Global unicast addresses

 Are equivalent to IPv4 private addresses


 Require the organization ID to be randomly generated
 Allocate 16 bits for internal subnetting

8 40 16 64
bits bits bits bits

11111100 Organization ID Subnet ID Interface ID

FC00::/7 or FD00::/7
Internet Protocol Suite
Autoconfiguration options for IPv6
Internet Protocol Suite
Autoconfiguration options for IPv6

65132IfAdd
Managed
Check
Check
Derive
for or Otheron
for aaddress
router
Link-Local
prefixes
flag
theis
conflicts
Address
4 set, check
network
using
Check theDHCPv6
neighbor
routersolicitation
for prefixes
IPv6 Client
Autoconfigured IP Timeline

Valid • fe80::d593:e1e:e612:53e4%10
• Router configuration information
Tentative Preferred Deprecated Invalid
• Additional routerTime
prefixes
Preferred Lifetime • DHCPv6 information received
Valid Lifetime

IPv6 Router IPv6 DHCP Server


Internet Protocol Suite
Autoconfiguration options for IPv6
Internet Protocol Suite
IPV6 packet format

You might also like