0% found this document useful (0 votes)
14 views67 pages

Understanding IPv4, IPv6, and Routing

The document provides an overview of the Network Layer, focusing on IPv4 and IPv6 protocols, their characteristics, and the need for transitioning from IPv4 to IPv6 due to the exhaustion of IPv4 address space. It discusses the differences between the two protocols, including address size, header structure, and functionalities. The document emphasizes the advantages of IPv6, such as a larger address space and improved network capabilities.

Uploaded by

kds850
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)
14 views67 pages

Understanding IPv4, IPv6, and Routing

The document provides an overview of the Network Layer, focusing on IPv4 and IPv6 protocols, their characteristics, and the need for transitioning from IPv4 to IPv6 due to the exhaustion of IPv4 address space. It discusses the differences between the two protocols, including address size, header structure, and functionalities. The document emphasizes the advantages of IPv6, such as a larger address space and improved network capabilities.

Uploaded by

kds850
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

The Network Layer: Introducing IPv4,

IPv6, and Routing


Rick Graziani
Cabrillo College
graziani@[Link]
Data Link IP Header TCP Header HTTP Data Link
Header Header Data Trailer

Data Link Data Link


Header
IP Packet Trailer

Data Link Data Link


Header IP Packet Trailer

Data Link Data Link


Data Link
Header IP Packet Trailer
Trailer

Data Link IP Header TCP Header HTTP Data Link


Header Header Data Trailer
Network Layer Protocols

 Network Layer Delivery Protocols


 Internet Protocol version 6 (IPv6)
 Internet Protocol version 4 (IPv4)
The Network Layer: Introducing IPv4,
IPv6, and Routing
Rick Graziani
Cabrillo College
graziani@[Link]
Characteristics of IP
Rick Graziani
Cabrillo College
graziani@[Link]
Characteristics of IP

 Connectionless:
 No connection is established before sending data packets.
 Best effort delivery:
 No additional overhead is used to guarantee packet delivery.
 Media independent:
 Operates independently of the medium carrying the data.
Connectionless
Best Effort
IP Media Independent:
"IP over anything"

IP doesn’t care
what type of media
the packet is
carried on.
Characteristics of IP
Rick Graziani
Cabrillo College
graziani@[Link]
Need to Transition from IPv4 to IPv6

Rick Graziani
Cabrillo College
graziani@[Link]
Beginning with IPv4

• IPv4 (Internet Protocol version 4)


• Developed in the early 1980s
• RFC 760 Jan 1980 obsoleted
by RFC 791 Sep 1981
IPv4

[Link]
[Link]

• 32-bit addresses represented in dotted-decimal notation.


• Provides 4.29 billion addresses.
• Why not more addresses?
• It seemed like a lot of addresses at the time!
IPv4 - 1981 IPv4
IPv4 was standardized in 1981,
provisioning 4.29 billion (232) IP
addresses for a world population
of 4.41 billion people. *

= 100,000,000
= 100,000,000
*[Link]
IPv4 Addresses World Population 1980

• 4.29 billion addresses, about a 1:1 ratio with the world’s population.
• What was the Internet like in 1981?
• No WWW, no mobile devices, and most people never heard of the Internet
• Mostly mainframe and minicomputers
• The IBM PC was introduced trying to overtake the Apple II
The Internet Begins to Take Off

• 1990s introduced the World Wide Web.


• Everyone was getting on the Internet.
• Internet routing tables growing rapidly – 20,000 routes in 1994.
• IETF realized that it would soon run out of IPv4 address space.
IPv4: Running Out of Addresses
Private Address
Space
[Link]/8
[Link]/12
[Link]/16

• Short term solutions included:


• NAT (Network Address Translation)
• Private address space
• CIDR (Classless Inter-Domain Routing)
IPv4
• Long-term solution: IPv6
The Need for IPv6
• We are running out of IPv4
address space.
• Monday, January 31, 2011
IANA allocated the last /8 IPv4
address blocks to the RIRs.
• RIR’s have very few, if any
IPv4 address left.
• Many ISPs are severely
limited and some have already
run out.

Source: [Link]/tools/ipv4
Note: APNIC and RIPE are not completely out of addresses
but they are very restrictive on allocation of addresses.
Running Out of IPv4

• The regions with the largest populations have the lowest percentages of
people connected to the Internet
Graphic from Internet World Stats, [Link]/[Link]
• Not a “new” protocol.
Introducing IPv6 • Developed mid to late 1990s.
• Much learned from IPv4.
• 128-bit address space, written in hexadecimal.
• This gives us 340 undecillion addresses!

128 bits
2001:db8:cafe:1::a736

128 bits
2001:db8:cafe:1::1

340 undecillion
= 340,282,366,920,938,463,463,374,607,431,768,211,456
Increased Address Space
Scientific
Number name Number of zeros
Notation
3
1 Thousand 10 1,000

6
1 Million 10 1,000,000

1 Billion 10
9
1,000,000,000 There are 4.29 billion
IPv4 addresses
12
1 Trillion 10 1,000,000,000,000

15
1 Quadrillion 10 1,000,000,000,000,000

18
1 Quintillion 10 1,000,000,000,000,000,000

21
1 Sextillion 10 1,000,000,000,000,000,000,000

24
1 Septillion 10 1,000,000,000,000,000,000,000,000

27
1 Octillion 10 1,000,000,000,000,000,000,000,000,000

30
1 Nonillion 10 1,000,000,000,000,000,000,000,000,000,000

33
1 Decillion 10 1,000,000,000,000,000,000,000,000,000,000,000

36
1 Undecillion 10 1,000,000,000,000,000,000,000,000,000,000,000,000 There are 340 undecillion
IPv6 addresses
Move from IPv4 to IPv6
• As mentioned previously the benefits of
IPv6 include:
• Larger address space
• Stateless autoconfiguration
• End-to-end reachability without private
addresses and NAT
• Better mobility support
• Peer-to-peer networking easier to create
and maintain, and services such as VoIP
and Quality of Service (QoS) become
more robust.
Graphic from IPv6 Forum, [Link]
• The “killer application” for the Internet is
the Internet itself.
Need to Transition from IPv4 to IPv6

Rick Graziani
Cabrillo College
graziani@[Link]
Comparing IPv4 and IPv6
Rick Graziani
Cabrillo College
graziani@[Link]
Similar fields

Understanding IPv4 and IPv6


IPv4
together
• Several differences between IPv4 and IPv6
headers.

• Simpler IPv6 64-bit memory word


header.
IPv6
• Fixed 40 byte
IPv6 header.
• Lets look at the
differences…
Version
IPv4

• IPv4 Version contains 4.


• IPv6 Version contains 6.
• Version 5?
• Internet Stream Protocol (ST2)

IPv6
IPv4 Internet Header Length IPv4
1
• IPv4 Internet Header Length (IHL)
2
• Length of IPv4 header in 32-bit words
including any Options or Padding. 3
• IPv6 4
• IHL for IPv6 is not needed. 5
• IPv6 header is fixed at 40 bytes.
?
IPv6
8 bytes
8 bytes

40 bytes = 8 bytes
8 bytes
8 bytes
IPv4 ToS and IPv6 Traffic Class
IPv4
• IPv4 Type of Service
• IPv6 Traffic Class
• Not mandated by any IPv6 RFCs.
• Same functionality as IPv4.
• Uses same Differentiated Services
technique (RFC 2474) as IPv4.

IPv6

7 6 5 4 3 2 1 0
IP Precedence Unsused

DiffServ Code Point (DSCP) IP ECN


IPv6 Flow Label
• New field in IPv6 – not part of IPv4. IPv4
• Flow label is used to identify the packets in a common
stream or flow.
• Traffic from source to destination share a common flow
label.

11001011000101100

10110010111000111

IPv6
IPv4 Total Length and IPv6 IPv4 Header Data (Payload)
Payload Length
• IPv4 Total Length – Number of bytes of IPv4
the IPv4 header (options) + data.
• Length of data = total length - IHL
• IPv6 Payload Length – Number of bytes
of the payload.
• Does not include the main IPv6 header.
• Includes extension headers + data
IPv6

Payload
IPv6 Extension
IPv6 Header Header (Optional) Data

Figure 3-6 –IPv4 Total Field and Figure 3-7 – IPv6 Payload Length Field
IPv4 Fragmentation
IPv4
• IPv4 fields used for fragmentation and
reassembly.
• Intermediate devices such as IPv6 routers
do not perform fragmentation.
• Any fragmentation needed will be handled
by the source using an extension header.

IPv6
MTU of outgoing link It is my job to
IPv4 Fragmentation smaller than packet size reassemble the packet
– fragment IPv4 packet. fragments.

PCA Link with PCB


R1 R2 smaller MTU R3

Source Destination
1 2 3
IPv4 IPv4
IPv4 Packet Packet IPv4 Packet
Packet

IPv4 IPv4
Packet Packet

IPv4 IPv4
Packet
Packet
IPv6 No Fragmentation
IPv4 IPv6
IPv6 No Fragmentation MTU of outgoing link smaller
Packet received.
than packet size. Drop packet.
No reassembly
I will use MTU of the Send ICMPv6 Packet Too Big
required.
interface. message, use MTU 1350.

MTU = 1500 MTU = 1500 MTU = 1350 MTU = 1500


PCA PCB
R1 R2 Link with R3
smaller MTU
Source Destination
1
IPv6 Packet – MTU 1500

2
ICMPv6 Packet Too Big
Use MTU 1350

3
IPv6 Packet
MTU 1350
IPv4 Protocol and IPv6 Next Header
IPv4
• IPv4 Protocol
• IPv6 Next Header
• For both protocols, the field indicates the
type of header following the IP header.

• Common values:
• 6 = TCP
IPv6
• 17 = UDP
• 58 = ICMPv6
• 88 = EIGRP
• 89 = OSPF IPv6 Next Data
Header Header (Protocol: TCP, UDP, ICMPv6, etc.)
IPv4 TTL and IPv6 Hop Limit
I decrement these
• IPv4 TTL (Time to fields by 1 and discard IPv4
Live) the packet if the
• IPv6 Hop Limit resulting value is 0.
• Renamed to more
accurately reflect
process.
• Set by source, every
IPv6
router in path
decrements hop limit by
1.
• When 0, drop
packet.
• No TTL in
Ethernet… why do
you think they didn’t
include one?
IPv4 Header Checksum
IPv4
• IPv4 Header Checksum
• Not used in IPv6.
• Upper-layer protocols generally have a
checksum (UDP and TCP).
• So, in IPv4 the UDP checksum is optional.

• Because it’s
not in IPv6, the IPv6
UDP checksum
is now
mandatory.
IPv4: TCP and UDP Checksums
• UDP checksum, which is optional in IPv4, but is mandatory in IPv6.
• The designers of IPv6 did not include a Checksum field because Layer 2 data
link technologies such as Ethernet perform their own checksum and error
control.
Checksum
 IPv4 Header checksum (2 bytes):
Simple 16-bit long checksum covers
only header.
 Upper layer protocols cover data
 IP is highest hop-by-hop protocol;
need to minimize processing

How Checksum is calculated:


[Link]
IPv6 Source and Destination
IPv4
Addresses
• IPv6 Source and Destination addresses
have the same basic functionality as IPv4.
• IPv4 – 32-bit addresses.
• IPv6 – 128-bit addresses.
• Some significant changes in IPv6.

IPv6
IPv4 Options and Padding
• IPv4 Options and Padding
IPv4
• Not used in IPv6.
• Variable length, optional.
• IPv4 Options are handled using extension
headers in IPv6.
• Padding makes
sure IPv4 options
fall on a 32-bit
boundary. IPv6
• IPv6 header is fixed
at 40 bytes.
• Uses an Extension
Header.
Fixed 40 bytes =
Comparing IPv4 and IPv6
Rick Graziani
Cabrillo College
graziani@[Link]
Host Forwarding
Rick Graziani
Cabrillo College
graziani@[Link]
Default Gateway
IP address [Link]
Subnet mask: [Link]
Default gateway: [Link]
Default Gateway – ipconfig
C:\Users\Admin>ipconfig

Windows IP Configuration

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :


Link-local IPv6 Address . . . . . : fe80::b572:c6c:f983:cadc%11
IPv4 Address. . . . . . . . . . . : [Link]
Subnet Mask . . . . . . . . . . . : [Link]
Default Gateway . . . . . . . . . : [Link]

C:\Users\Admin>
netstat IPv4 Information
C:\Users\PC1> netstat -r

<Output omitted>

IPv4 Route Table


===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
[Link] [Link] [Link] [Link] 25
[Link] [Link] On-link [Link] 306
[Link] [Link] On-link [Link] 306
[Link] [Link] On-link [Link] 306
[Link] [Link] On-link [Link] 281
[Link] [Link] On-link [Link] 281
[Link] [Link] On-link [Link] 281
[Link] [Link] On-link [Link] 306
[Link] [Link] On-link [Link] 281
[Link] [Link] On-link [Link] 306
[Link] [Link] On-link [Link] 281
===========================================================================

<Output omitted>
Host Forwarding
Rick Graziani
Cabrillo College
graziani@[Link]
Default Gateways: Host, Switch, Router
Rick Graziani
Cabrillo College
graziani@[Link]
Host

IP address [Link]
Subnet mask: [Link]
Default gateway: [Link]
Switch
Router
Default Gateways: Host, Switch, Router
Rick Graziani
Cabrillo College
graziani@[Link]
Introduction to Routing: Cisco IPv4
Routing Table
Rick Graziani
Cabrillo College
graziani@[Link]
Data Link IP Header TCP Header HTTP Data Link
Header Header Data Trailer

Data Link Data Link


Header
IP Packet Trailer

Data Link Data Link


Header IP Packet Trailer

Data Link Data Link


Data Link
Header IP Packet Trailer
Trailer

Data Link IP Header TCP Header HTTP Data Link


Header Header Data Trailer
IPv4 Routing
Table

Directly Connected
Remote

R1# show ip route

[Link]/8 is variably subnetted, 2 subnets, 2 masks


D [Link]/24 [90/2170112] via [Link], 00:00:05, Serial0/0/0
D [Link]/24 [90/2170112] via [Link], 00:00:05, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/24 is directly connected, GigabitEthernet0/0
L [Link]/32 is directly connected, GigabitEthernet0/0
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/24 is directly connected, GigabitEthernet0/1
L [Link]/32 is directly connected, GigabitEthernet0/1
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/30 is directly connected, Serial0/0/0
L [Link]/32 is directly connected, Serial0/0/0
Directly
Connected
Routes

R1# show ip route

[Link]/8 is variably subnetted, 2 subnets, 2 masks


D [Link]/24 [90/2170112] via [Link], 00:00:05, Serial0/0/0
D [Link]/24 [90/2170112] via [Link], 00:00:05, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/24 is directly connected, GigabitEthernet0/0
L [Link]/32 is directly connected, GigabitEthernet0/0
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/24 is directly connected, GigabitEthernet0/1
L [Link]/32 is directly connected, GigabitEthernet0/1
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/30 is directly connected, Serial0/0/0
L [Link]/32 is directly connected, Serial0/0/0
Remote
Routes

Dynamic
Static

R1# show ip route

[Link]/8 is variably subnetted, 2 subnets, 2 masks


D [Link]/24 [90/2170112] via [Link], 00:00:05, Serial0/0/0
D [Link]/24 [90/2170112] via [Link], 00:00:05, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/24 is directly connected, GigabitEthernet0/0
L [Link]/32 is directly connected, GigabitEthernet0/0
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/24 is directly connected, GigabitEthernet0/1
L [Link]/32 is directly connected, GigabitEthernet0/1
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/30 is directly connected, Serial0/0/0
L [Link]/32 is directly connected, Serial0/0/0
IPv4 Routing
Table

Directly Connected
Remote

R1# show ip route


Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

[Link]/8 is variably subnetted, 2 subnets, 2 masks


D [Link]/24 [90/2170112] via [Link], 00:00:05, Serial0/0/0
D [Link]/24 [90/2170112] via [Link], 00:00:05, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 3 masks
C [Link]/24 is directly connected, GigabitEthernet0/0
Introduction to Routing: Cisco IPv4
Routing Table
Rick Graziani
Cabrillo College
graziani@[Link]
Introduction to Routing: Routing
Principles
Rick Graziani
Cabrillo College
graziani@[Link]
Forwarding Tables
 Each router and each host maintains a forwarding table (or routing
table) which tells the router how to process an outgoing packet
 Main columns:
 Destination address: where is the IP packet going to?
 Next hop and/or exit interface: how to forward the IP packet ?
 Routing tables are set so that a packet gets closer to the its
destination every hop
Forwarding (Routing) Table Lookup
 When a router or host needs to
transmit an IP packet, it
performs a forwarding table
lookup
 Forwarding table lookup:
Use the IP destination address
as a key to search the routing
table.
 Result of the lookup is the IP
address of a next hop router,
and/or exit interface
Alex Zinin’s Routing Table Principles
I know about my remote
networks but it is not my
responsibility if R2 and R3
know about their remote
networks.

 Principle 1: Every router makes its decision alone, based on the information it
has in its own routing table.
 R1 makes forwarding decisions based solely on the information in the routing table.
 R1 does not consult the routing tables in any other routers.
 Making each router aware of remote networks is the responsibility of the network
administrator.
Alex Zinin’s Routing Table Principles
Just because I know how to get
to R3’s LAN, [Link]/24 and
I send that packet to R2, doesn’t ???
mean R2 knows how to get there.

 Principle 2: The fact that one router has certain information in its
routing table does not mean that other routers have the same
information.
Alex Zinin’s Routing Table Principles
And if the packet for R3’s LAN
reaches [Link]/24, I don’t
know if R3 has a route back to
[Link]/24 for any return
traffic.
???

 Principle 3: Routing information about a path from one network


to another does not provide routing information about the
reverse, or return, path.
Introduction to Routing: Routing
Principles
Rick Graziani
Cabrillo College
graziani@[Link]
Who has what: IP? ARP cache? MAC
Address Table? Routing Table?
Rick Graziani
Cabrillo College
graziani@[Link]
MAC Address Table

Port MAC Address

Fa0/1 S1 Fa0/2 Fa0/1


Fa0/1
Fa0/1 S1 Fa0/2 Fa0/1

You might also like