36
1 The Network Layer The Network Layer in the Internet in the Internet

1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

Embed Size (px)

Citation preview

Page 1: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

11

The Network Layer in The Network Layer in the Internetthe Internet

Page 2: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

22

OverviewOverview

Internet IntroInternet Intro The IP ProtocolThe IP Protocol IP AddressesIP Addresses SubnetsSubnets Internet Control ProtocolsInternet Control Protocols CIDR – Classless InterDomain RoutingCIDR – Classless InterDomain Routing IPv6IPv6

Page 3: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

33

Internet IntroInternet Intro At the network layer, the Internet can be At the network layer, the Internet can be

viewed as a collection of subnetworks or viewed as a collection of subnetworks or Autonomous Systems (AS) that are connected Autonomous Systems (AS) that are connected together.together.

There is no real structure, but several major There is no real structure, but several major backbones exist. These are constructed from backbones exist. These are constructed from high-bandwidth lines and fast routers. high-bandwidth lines and fast routers.

Attached to the backbones are regional Attached to the backbones are regional (midlevel) networks, and attached to these (midlevel) networks, and attached to these regional networks are the LANs at many regional networks are the LANs at many universities, companies and Internet service universities, companies and Internet service providers. providers.

Page 4: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

44

Internet IntroInternet Intro A sketch of this semi-hierarchical A sketch of this semi-hierarchical

organization is given below:organization is given below:

Page 5: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

55

Internet IntroInternet Intro The glue that holds the Internet together is the The glue that holds the Internet together is the

network layer protocol, IP (Internet Protocol).network layer protocol, IP (Internet Protocol). Unlike most older network layer protocols, it Unlike most older network layer protocols, it

was designed from the beginning with was designed from the beginning with internetworking in mind. internetworking in mind.

A good way to think of the network layer is this: A good way to think of the network layer is this: its job is to provide a best-effort way to its job is to provide a best-effort way to transport datagrams (packets) from source to transport datagrams (packets) from source to destination, without regard to whether or not destination, without regard to whether or not these machines are on the same network, or these machines are on the same network, or whether or not there are other networks in the whether or not there are other networks in the between them.between them.

Page 6: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

66

Internet IntroInternet Intro

DatagramDatagram – in the context of the – in the context of the internal operations of the subnet, a internal operations of the subnet, a connection is usually called a virtual connection is usually called a virtual circuit (in analogy with the physical circuit (in analogy with the physical circuits set up by the telephone circuits set up by the telephone system). The system). The independent packets of independent packets of the connectionless organizationthe connectionless organization are are called called datagramsdatagrams, in analogy with , in analogy with telegrams.telegrams.

Page 7: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

77

Internet IntroInternet Intro Communication in the Internet works as follows:Communication in the Internet works as follows:

• The transport layer takes data streams and breaks The transport layer takes data streams and breaks them up into datagrams.them up into datagrams.

• In theory datagrams can be up to 64KB each, but in In theory datagrams can be up to 64KB each, but in practice they are usually around 1500bytes. Each practice they are usually around 1500bytes. Each datagram is transmitted through the Internet, possibly datagram is transmitted through the Internet, possibly being fragmented into smaller units as it goes. being fragmented into smaller units as it goes.

• When all the pieces finally get to the destination When all the pieces finally get to the destination machine, they are reassembled by the network layer machine, they are reassembled by the network layer into the original datagram. into the original datagram.

• This datagram is then handed to the transport layer, This datagram is then handed to the transport layer, which inserts it into the receiving process’ input which inserts it into the receiving process’ input stream.stream.

Page 8: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

88

The IP ProtocolThe IP Protocol

An appropriate place to start our study of An appropriate place to start our study of the network layer in the Internet is the the network layer in the Internet is the format of the IP datagrams themselves. format of the IP datagrams themselves.

An An IP datagramIP datagram consists of: consists of: • a a headerheader part and part and • a a data/textdata/text part part

The header has a 20-byte fixed part and a The header has a 20-byte fixed part and a variable length optional part.variable length optional part.

Page 9: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

99

The IP Protocol HeaderThe IP Protocol Header

Fig. 1. The IP (Internet Protocol) header

Page 10: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1010

The IP ProtocolThe IP Protocol The The VersionVersion field keeps track of which version of field keeps track of which version of

the protocol the datagram belongs to.the protocol the datagram belongs to. Since the header length is not constant, a field in Since the header length is not constant, a field in

the header, called the header, called IHLIHL, is provided to tell how , is provided to tell how long the header is, in 32 bit words. (min 5, max long the header is, in 32 bit words. (min 5, max 15)15)

The The type of servicetype of service field allows the host to tell the field allows the host to tell the subnet what kind of service it wants. (various subnet what kind of service it wants. (various combinations of reliability and speed are combinations of reliability and speed are possible)possible)

The The total lengthtotal length includes everything in the includes everything in the datagram – both header and data. The maximum datagram – both header and data. The maximum length is 65,535 bytes. length is 65,535 bytes.

Page 11: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1111

The IP ProtocolThe IP Protocol The The identificationidentification field is needed to allow the field is needed to allow the

destination host to determine which datagram a destination host to determine which datagram a newly arrived fragment belongs to. All the fragments newly arrived fragment belongs to. All the fragments of a datagram contain the same Identification value. of a datagram contain the same Identification value.

Next comes an unused bit, and then two 1-bit fields: Next comes an unused bit, and then two 1-bit fields: • DFDF stands for stands for Don’t FragmentDon’t Fragment - it is an order to the routers - it is an order to the routers

not to fragment the packet, because the destination is not to fragment the packet, because the destination is incapable of putting the pieces back togetherincapable of putting the pieces back together

• MFMF stands for stands for More FragmentsMore Fragments - all fragments except the - all fragments except the last one have this bit set. It is needed to know when all last one have this bit set. It is needed to know when all fragments of a datagram have arrived.fragments of a datagram have arrived.

Page 12: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1212

The IP ProtocolThe IP Protocol The The Fragment offsetFragment offset tells where in the current tells where in the current

datagram this fragment belongs. datagram this fragment belongs. The The Time to liveTime to live field is a counter used to limit field is a counter used to limit

packet lifetimes. It is supposed to count time in packet lifetimes. It is supposed to count time in seconds, allowing maximum lifetime of 255 sec. It seconds, allowing maximum lifetime of 255 sec. It must be decremented on each hop. When it hits 0, must be decremented on each hop. When it hits 0, the packet is discarded and a warning packet is the packet is discarded and a warning packet is sent back to the source host. This feature prevents sent back to the source host. This feature prevents datagrams from wondering around forever. datagrams from wondering around forever.

When the network layer has assembled a complete When the network layer has assembled a complete datagram, it needs to know what to do with it. The datagram, it needs to know what to do with it. The ProtocolProtocol field tells it which transport process to give field tells it which transport process to give it to. TCP is one possibility, but so are UDP and it to. TCP is one possibility, but so are UDP and some others. The numbering of protocols is some others. The numbering of protocols is standard across the entire Internet.standard across the entire Internet.

Page 13: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1313

The IP ProtocolThe IP Protocol The The Header checksumHeader checksum verifies the header. It verifies the header. It

is useful for detecting errors generated by is useful for detecting errors generated by bad memory words inside a router. bad memory words inside a router.

The The Source address Source address and and Destination address Destination address indicate the network number and host indicate the network number and host number. We will discuss Internet addresses number. We will discuss Internet addresses in the next section.in the next section.

The The OptionsOptions field was designed to provide field was designed to provide an escape to allow subsequent versions of an escape to allow subsequent versions of the protocol to include information not the protocol to include information not present in the original design, and to permit present in the original design, and to permit experimenters to try new ideas. The options experimenters to try new ideas. The options are variable length. Currently 5 options are are variable length. Currently 5 options are defined:defined:

Page 14: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1414

The IP ProtocolThe IP Protocol

Fig. 2. IP options

Page 15: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1515

IP AddressesIP Addresses Every host and router on the Internet has Every host and router on the Internet has

an an IP addressIP address, which , which encodes its network encodes its network number and host numbernumber and host number. .

The combination is unique: no two The combination is unique: no two machines have the same IP address.machines have the same IP address.

All IP addresses are All IP addresses are 32 bits long32 bits long and are and are used in the used in the Source addressSource address and and Destination addressDestination address of IP packets. of IP packets.

Those machines that connect to multiple Those machines that connect to multiple networks have a different IP address on networks have a different IP address on each network.each network.

Page 16: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1616

The formats used for IP addresses are shown The formats used for IP addresses are shown below:below:

IP AddressesIP Addresses

Fig. 3. IP address formats

Page 17: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1717

The classes allow for the following number The classes allow for the following number of networks/hosts each:of networks/hosts each:

• A – up to 126 networks (e.g. LANs) with 16 A – up to 126 networks (e.g. LANs) with 16 million hosts eachmillion hosts each

• B – 16,382 (2B – 16,382 (21414) networks with up to 64K hosts) networks with up to 64K hosts• C – 2 million networks with up to 254 hosts C – 2 million networks with up to 254 hosts

eacheach• D – multicast, in which a datagram is directed D – multicast, in which a datagram is directed

to multiple hoststo multiple hosts• E – addresses beginning with 11110 are E – addresses beginning with 11110 are

reserved for future usereserved for future use

IP AddressesIP Addresses

Page 18: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1818

IP AddressesIP Addresses Tens of thousands of networks are now Tens of thousands of networks are now

connected to the Internet, and the number connected to the Internet, and the number doubles every year.doubles every year.

Network numbers are assigned by the NIC Network numbers are assigned by the NIC ((Network Information CenterNetwork Information Center) to avoid ) to avoid conflictsconflicts

Network addresses, which are 32-bit Network addresses, which are 32-bit numbers, are usually written in numbers, are usually written in dotted dotted decimal notationdecimal notation..

In this format, each of the 4 bytes is written In this format, each of the 4 bytes is written in decimal – from 0 to 255. For example in decimal – from 0 to 255. For example 192.41.6.20192.41.6.20 . The lowest IP address is . The lowest IP address is 0.0.0.0 and the highest is 255.255.255.255 .0.0.0.0 and the highest is 255.255.255.255 .

Page 19: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

1919

IP AddressesIP Addresses

Fig. 4. Special IP addresses

Page 20: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2020

As we have seen, As we have seen, all the hostsall the hosts in a network must in a network must have the have the same network numbersame network number. This property of . This property of IP addressing IP addressing can cause problemscan cause problems as networks as networks grow.grow.

For example, consider a company that stars out For example, consider a company that stars out with one class C LAN on the Internet. As time with one class C LAN on the Internet. As time goes on, it might acquire more than 254 goes on, it might acquire more than 254 machines, and thus need a second class C machines, and thus need a second class C address. Eventually, it might end up with many address. Eventually, it might end up with many LANs, each with its own router and each with its LANs, each with its own router and each with its own class C network number.own class C network number.

Every time a new network is installed the system Every time a new network is installed the system administrator has to contact NIC to get a new administrator has to contact NIC to get a new network number. Then this number must be network number. Then this number must be announced to the world.announced to the world.

SubnetsSubnets

Page 21: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2121

SubnetsSubnets The solution to these problems is to allow a The solution to these problems is to allow a network to be network to be

split into several parts for internal usesplit into several parts for internal use, but still act like a , but still act like a single network to the outside world. In the Internet single network to the outside world. In the Internet literature, these parts are called literature, these parts are called subnetssubnets..

So, if our growing company started up with a class B So, if our growing company started up with a class B address instead of a class C address, it could start out just address instead of a class C address, it could start out just numbering the hosts from 1 to 254. When the second LAN numbering the hosts from 1 to 254. When the second LAN arrived, it could decide, for example to split the 16-bit host arrived, it could decide, for example to split the 16-bit host number into a 6 bit subnet number and a 10-bit host number into a 6 bit subnet number and a 10-bit host number, as shown below:number, as shown below:

This split allows 62 LANs, each with up to 1022 hosts.This split allows 62 LANs, each with up to 1022 hosts.

Fig. 5. One of the ways to subnet a class B network

Page 22: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2222

SubnetsSubnets Outside the network, the subnetting is not Outside the network, the subnetting is not

visible, so allocating a new subnet does visible, so allocating a new subnet does not require contacting contacting NIC or not require contacting contacting NIC or changing any external databases. changing any external databases.

In our example, the first subnet might use In our example, the first subnet might use IP addresses starting at 130.50.IP addresses starting at 130.50.44.1, the .1, the second subnet might start at 130.50.second subnet might start at 130.50.88.1, .1, and so on.and so on.

To see how subnets work, it is necessary To see how subnets work, it is necessary to explain how IP packets are processed at to explain how IP packets are processed at a router.a router.

Page 23: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2323

Subnets/Router processingSubnets/Router processing Each router has a table listing some number of Each router has a table listing some number of

(network, 0) IP addresses and (this-network, host) (network, 0) IP addresses and (this-network, host) IP addresses. The first kind tells how to get to IP addresses. The first kind tells how to get to distant networks. The second kind tells how to get distant networks. The second kind tells how to get to local hosts. Associated with each table is the to local hosts. Associated with each table is the network interface to use to reach the destination, network interface to use to reach the destination, and certain other information. When an IP packet and certain other information. When an IP packet arrives, its destination address is looked up in the arrives, its destination address is looked up in the routing table. routing table.

If the packet is for a If the packet is for a distant networkdistant network, it is , it is forwarded to the next router on the interface forwarded to the next router on the interface

given in the table.given in the table. If it is a If it is a local hostlocal host (e.g., on the router’s LAN), it is (e.g., on the router’s LAN), it is

sent directly to the destination.sent directly to the destination.

Page 24: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2424

Subnets/Router processingSubnets/Router processing If the network is If the network is not presentnot present, the packet is , the packet is

forwarded to a default router (gateway) with forwarded to a default router (gateway) with more extensive tables.more extensive tables.

This algorithm means that each router only has to This algorithm means that each router only has to keep track of other networks and local hosts, and keep track of other networks and local hosts, and not complete (network, host) pairs, which is not complete (network, host) pairs, which is greatly reducing the size of the the routing table.greatly reducing the size of the the routing table.

When When subnetsubnetting is introduced, the ting is introduced, the routing tables routing tables are changedare changed, adding entries of the form , adding entries of the form (this-(this-network, subnet, 0)network, subnet, 0) and and (this-network, this-(this-network, this-subnet, host)subnet, host). .

Thus a router on subnet Thus a router on subnet kk knows how to get to all knows how to get to all the other subnets and also how to get to all hosts the other subnets and also how to get to all hosts on subnet on subnet kk . It does not have to know the details . It does not have to know the details about hosts on other subnets.about hosts on other subnets.

Page 25: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2525

Subnets/Router processingSubnets/Router processing In fact, all that needs to be changed is to have In fact, all that needs to be changed is to have

each router do a each router do a Boolean ANDBoolean AND, with the network’s , with the network’s subnet masksubnet mask (shown on Fig.5.) to get rid of the (shown on Fig.5.) to get rid of the host number. Next, look up the resulting address host number. Next, look up the resulting address in its tables (after determining which network in its tables (after determining which network class it is).class it is).

For example, a packet addressed to 130.50.15.6 For example, a packet addressed to 130.50.15.6 and arriving at a router on subnet 5 is AND-ed and arriving at a router on subnet 5 is AND-ed with the subnet mask on Fig.5. to give the with the subnet mask on Fig.5. to give the address 130.50.12.0 . This address is then looked address 130.50.12.0 . This address is then looked up in the routing table to find out it is on subnet up in the routing table to find out it is on subnet 3, and how to forward it there. The router on 3, and how to forward it there. The router on subnet 5 is thus spared of the work of keeping subnet 5 is thus spared of the work of keeping track of the addresses of hosts which are not on track of the addresses of hosts which are not on subnet 5. subnet 5.

Page 26: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2626

Internet Control ProtocolsInternet Control Protocols

In addition to IP, which is used for In addition to IP, which is used for data transfer, the Internet has data transfer, the Internet has several control protocols used in the several control protocols used in the network layer, including:network layer, including:

• ICMP (Internet Control Message ICMP (Internet Control Message Protocol) Protocol)

• ARP (Address Resolution Protocol)ARP (Address Resolution Protocol)• RARP (Reverse Address Resolution RARP (Reverse Address Resolution

Protocol) and Protocol) and • BOOTP (Bootstrap Protocol)BOOTP (Bootstrap Protocol)

Page 27: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2727

Internet Control Protocols - ICMPInternet Control Protocols - ICMP The operation of the Internet is monitored The operation of the Internet is monitored

closely by the routers. When something closely by the routers. When something unexpected occurs, the event is reported unexpected occurs, the event is reported by the by the ICMP (Internet Control Message ICMP (Internet Control Message Protocol)Protocol), which is also used to test the , which is also used to test the Internet. Internet.

About a dozen types of ICMP messages are About a dozen types of ICMP messages are defined. The most important ones are defined. The most important ones are listed in Fig. 6. Each ICMP message is listed in Fig. 6. Each ICMP message is encapsulated in an IP packet.encapsulated in an IP packet.

Page 28: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2828

Internet Control Protocols - ICMPInternet Control Protocols - ICMP

Fig. 6. The principal ICMP message types

Page 29: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

2929

Internet Control Protocols - ARPInternet Control Protocols - ARP Although every machine on the Internet has one Although every machine on the Internet has one

(or more) IP addresses, these cannot be used for (or more) IP addresses, these cannot be used for sending packets because the data link layer sending packets because the data link layer hardware does not understand Internet hardware does not understand Internet addresses. addresses.

Nowadays, most hosts are attached to a LAN by a Nowadays, most hosts are attached to a LAN by a network interface/cardnetwork interface/card that only understands LAN that only understands LAN addresses. For example, every Ethernet card ever addresses. For example, every Ethernet card ever manufactured comes equipped with a manufactured comes equipped with a 48-bit 48-bit Ethernet addressEthernet address. Manufacturers of Ethernet . Manufacturers of Ethernet cards request a block of addresses from a central cards request a block of addresses from a central authority to ensure that no two cards have the authority to ensure that no two cards have the same address (to avoid conflicts). The cards send same address (to avoid conflicts). The cards send and receive frames based on this 48-bit Ethernet and receive frames based on this 48-bit Ethernet address. They know nothing at all about 32-bit IP address. They know nothing at all about 32-bit IP addresses. addresses.

Page 30: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

3030

Internet Control Protocols - ARPInternet Control Protocols - ARP How do IP addresses get mapped onto data link How do IP addresses get mapped onto data link

layer addresses?layer addresses?

One solution is for a host 1 to output a broadcast One solution is for a host 1 to output a broadcast packet onto the Ethernet asking: “Who owns IP packet onto the Ethernet asking: “Who owns IP address x.y.z.23 ?” The broadcast will arrive at address x.y.z.23 ?” The broadcast will arrive at every machine on Ethernet x.y.z.0, and each one every machine on Ethernet x.y.z.0, and each one will check its IP address. The host 2, with IP will check its IP address. The host 2, with IP address x.y.z.23, will respond with its Ethernet address x.y.z.23, will respond with its Ethernet address, let’s say address, let’s say E2E2. .

The protocol for asking this question and getting The protocol for asking this question and getting the reply is called the reply is called ARP (Address Resolution ARP (Address Resolution Protocol)Protocol)..

Page 31: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

3131

Internet Control Protocols - RARPInternet Control Protocols - RARP ARP solves the problem of finding out which ARP solves the problem of finding out which

Ethernet address corresponds to a given IP Ethernet address corresponds to a given IP address. But sometimes the reverse problem address. But sometimes the reverse problem needs to be solved – needs to be solved – given an Ethernet address, given an Ethernet address, what is the corresponding IP addresswhat is the corresponding IP address??

The The RARP (Reverse Address Resolution Protocol)RARP (Reverse Address Resolution Protocol) addresses this issue.addresses this issue.

This protocol allows for a newly booted workstation This protocol allows for a newly booted workstation to broadcast its Ethernet address and say: “My 48-to broadcast its Ethernet address and say: “My 48-bit Ethernet address is: 14.04.05.18.01.25. Does bit Ethernet address is: 14.04.05.18.01.25. Does anyone out there know my IP address?” The RARP anyone out there know my IP address?” The RARP server sees this request, looks up the Ethernet server sees this request, looks up the Ethernet address in its configuration files, and sends back address in its configuration files, and sends back the corresponding IP address.the corresponding IP address.

Page 32: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

3232

CIDR – Classless InterDomain RoutingCIDR – Classless InterDomain Routing

Unfortunately, IP is rapidly becoming a victim of Unfortunately, IP is rapidly becoming a victim of its own popularity: it is running out of addresses. its own popularity: it is running out of addresses. This looming disaster has sparked a great deal of This looming disaster has sparked a great deal of discussion and controversy within the Internet discussion and controversy within the Internet community for what to do about it.community for what to do about it.

The problem, simply stated, is that The problem, simply stated, is that the Internet is the Internet is rapidly running out of IP addressesrapidly running out of IP addresses..

In principle, over 2 billion addresses exist, but the In principle, over 2 billion addresses exist, but the practice of organizing the address space by practice of organizing the address space by classes (as shown on Fig. 3.), wastes millions of classes (as shown on Fig. 3.), wastes millions of them. them.

Page 33: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

3333

CIDR – Classless InterDomain RoutingCIDR – Classless InterDomain Routing In particular, the real villain is the class B network. In particular, the real villain is the class B network.

For most organizations, a class A network, with 16 For most organizations, a class A network, with 16 million addresses is too big, and a class C network, million addresses is too big, and a class C network, with 256 addresses is too small. A class B network, with 256 addresses is too small. A class B network, with 65,536, is just right. In Internet folklore, this with 65,536, is just right. In Internet folklore, this situation is known as the situation is known as the three bears problemthree bears problem. .

In reality, a class B address is far too large for In reality, a class B address is far too large for most organizations. most organizations. Studies have shown that more Studies have shown that more than half of all class B networks have fewer than than half of all class B networks have fewer than 50 hosts50 hosts. A class C network would have done the . A class C network would have done the job, but no doubt every organization that asked for job, but no doubt every organization that asked for a class B address thought that one day it would a class B address thought that one day it would outgrow the 8-bit host field. There are 2 million of outgrow the 8-bit host field. There are 2 million of class C addresses available v.s. only 16,384 class class C addresses available v.s. only 16,384 class B. B.

Several solutions have been suggested which Several solutions have been suggested which solve one problem, but create a new one. solve one problem, but create a new one.

Page 34: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

3434

CIDR – Classless InterDomain RoutingCIDR – Classless InterDomain Routing One solution that is now being implemented and which One solution that is now being implemented and which

will give the Internet a bit of extra breathing room is will give the Internet a bit of extra breathing room is CIDR (Classless InterDomain Routing)CIDR (Classless InterDomain Routing). .

The basic idea is to allocate the remaining class C The basic idea is to allocate the remaining class C networks, of which there are almost 2 million, in networks, of which there are almost 2 million, in variable-sized blocks. If a site needs, say 2000 variable-sized blocks. If a site needs, say 2000 addresses, it is given a block of 2048 addresses (8 addresses, it is given a block of 2048 addresses (8 continuous class C networks), and not a full class B continuous class C networks), and not a full class B address.address.

The world was partitioned into four zones, and each The world was partitioned into four zones, and each one given a portion of the class C address space:one given a portion of the class C address space:• Addresses 194.0.0.0 to 195.255.255.255 are for EuropeAddresses 194.0.0.0 to 195.255.255.255 are for Europe• Addresses 198.0.0.0 to 199. 255.255.255 are for North Addresses 198.0.0.0 to 199. 255.255.255 are for North

AmericaAmerica• Addresses 200.0.0.0 to 201.255.255.255 are for Central and Addresses 200.0.0.0 to 201.255.255.255 are for Central and

South AmericaSouth America• Addresses 202.0.0.0 to 203.255.255.255 are for Asia and the Addresses 202.0.0.0 to 203.255.255.255 are for Asia and the

PacificPacific

Page 35: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

3535

IPv6IPv6 While CIDR may buy a few More years’ time, While CIDR may buy a few More years’ time,

everyone realizes that the days of IP in its current everyone realizes that the days of IP in its current version (IPv4) are numbered.version (IPv4) are numbered.

In 1990, the IETF (Internet Engineering Task Force) In 1990, the IETF (Internet Engineering Task Force) started to work on a started to work on a new version of IPnew version of IP, one which , one which would never run out of IP addresses, would solve a would never run out of IP addresses, would solve a variety of other problems, and be more flexible variety of other problems, and be more flexible and efficient as well. Some of its major goals were and efficient as well. Some of its major goals were to:to:• Support billions of hosts, even with inefficient address Support billions of hosts, even with inefficient address

space allocationspace allocation• Reduce the size of routing tablesReduce the size of routing tables• Simplify the protocol, to allow routers to process packets Simplify the protocol, to allow routers to process packets

fasterfaster• Provide better security (authentication and privacy)Provide better security (authentication and privacy)• Pay more attention to type of service, particularly for real-Pay more attention to type of service, particularly for real-

time datatime data• Allow the protocol to evolve in the futureAllow the protocol to evolve in the future

Page 36: 1 The Network Layer in the Internet. 2 Overview Internet Intro Internet Intro The IP Protocol The IP Protocol IP Addresses IP Addresses Subnets Subnets

3636

IPv6IPv6 The IETF issued a call for proposals, and by 1993 a The IETF issued a call for proposals, and by 1993 a

proposal by Deering and Francis was selected, which proposal by Deering and Francis was selected, which meets the goals fairly well, and given the designation meets the goals fairly well, and given the designation IPv6IPv6. .

The IPv6 uses a 128 bit address v.s. 32 bit. A new The IPv6 uses a 128 bit address v.s. 32 bit. A new notation has been devised for these addresses, and notation has been devised for these addresses, and they are written as 8 groups of 4 hexadecimal digits they are written as 8 groups of 4 hexadecimal digits with colons between the groups, like this:with colons between the groups, like this:

8000:0000:0000:0000:0123:4567:89AB:CDEF8000:0000:0000:0000:0123:4567:89AB:CDEF

Perhaps it is unnecessary to be explicit about it, but Perhaps it is unnecessary to be explicit about it, but there are a lot of 128 bit addresses. Specifically, there there are a lot of 128 bit addresses. Specifically, there are 2are 2128 128 of them. If the entire earth, land, and water of them. If the entire earth, land, and water were covered with computers, IPv6 would allow 7x10were covered with computers, IPv6 would allow 7x1023 23

IP addresses per square meter. While it is not the IP addresses per square meter. While it is not the intention to give every molecule on the surface of the intention to give every molecule on the surface of the earth its own IP address, we are not that far off.earth its own IP address, we are not that far off.