network layer review

31
Network Layer Review So far we look at issues concerning the network layer such as routing and congestion. We considered the implications of heterogeneous (at the data link layer) networks on trying to connect them. Since different data link layer schemes can have incompatible addressing schemes, we need another layer, the Network Layer, to provide a common addressing scheme and associated routing functions. We will look at probably the most popular network layer protocol, Internet Protocol (IP) that is used to connect heterogeneous

Upload: lloyd

Post on 24-Jan-2016

44 views

Category:

Documents


0 download

DESCRIPTION

Network Layer Review. So far we look at issues concerning the network layer such as routing and congestion. We considered the implications of heterogeneous (at the data link layer) networks on trying to connect them. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Network Layer Review

Network Layer Review

So far we look at issues concerning the network layer such as routing and congestion.

We considered the implications of heterogeneous (at the data link layer) networks on trying to connect them.

Since different data link layer schemes can have incompatible addressing schemes, we need another layer, the Network Layer, to provide a common addressing scheme and associated routing functions.

We will look at probably the most popular network layer protocol, Internet Protocol (IP) that is used to connect heterogeneous network into an internet.

Page 2: Network Layer Review

The Network Layer in the Internet

a) The IP Protocolb) IP Addressesc) Internet Control Protocolsd) OSPF – The Interior Gateway Routing Protocole) BGP – The Exterior Gateway Routing Protocolf) Internet Multicastingg) Mobile IPh) IPv6

Page 3: Network Layer Review

Design Principles for Internet

A. Make sure it works.B. Keep it simple (avoid features, Occam's Razor).C. Make clear choices.D. Exploit modularity.E. Expect heterogeneity.F. Avoid static options and parameters.G. Look for a good design; it need not be perfect.H. Be strict when sending and tolerant when receiving.I. Think about scalability.J. Consider performance and cost.

Page 4: Network Layer Review

Collection of Subnetworks

The Internet is an interconnected collection of many networks.

Page 5: Network Layer Review

Service provided by IP

The transport layer gives to IP a datagram and a destination IP address.

IP takes this datagram and sends it over the Internet, possibly in several fragments.

The IP protocol at the destination collects the fragments and if all fragments got through, assembles them into a datagram and delivers it to the destination transport layer.

Page 6: Network Layer Review

IPv4 header The glue that holds the Internet together

IHL – header length in 32-bit words, between 5 and 15Type of service - ignored by the routers.Identification – all fragments of a datagram contain the same valueDF – do not fragment, MF – more fragmentsProtocol – TCP, UDP, assigned numbers are on www.iana.org

Page 7: Network Layer Review

The IP Protocol (2)

Some of the IP options.

5-54

Page 8: Network Layer Review

IP Address formats

IP address do not identify hosts in general. They identify a host on a network. If a computer is connected to more than one network, it has more than one IP address (e.g.,: routers, multihomed hosts).

A: 128 networks with 16 million hosts; B: 16,384 networks with with 64K hosts; (not enough!)C: 2 million networks with 256 hosts

Page 9: Network Layer Review

Special IP Addresses

Special IP addresses.

Page 10: Network Layer Review

Subnets (2)

A class B network subnetted into 64 subnets.

The number of bits that form the network part of the IP address is called the netmask.

Netmask here is 255.255.252.8/22

Class B has a netmask of 16 1s or 255.255.0.0/16

Page 11: Network Layer Review

Network DesignTemple University has been assigned the 155.247.x.x range of addresses. This is a class B address so

10011011 11110111 00000000 00000000 (155.247.0.0)

(total of 256*256 = 65536)

10011011 11110111 11111111 11111111 (155.247.255.255)

16 bit network addr 16 bit host addr

We could have had one big network (with up to 65536 hosts) for the whole university attached to a single router.But that would a administrative nightmare: trouble shooting, traffic locality, and address allocation.

So we create smaller subnets

Page 12: Network Layer Review

Subnets

A campus network consisting of LANs for various departments.

Page 13: Network Layer Review

Subnets (2)10011011 11110111 00000000 00000000

10011011 11110111 00000000 1111111110011011 11110111 00000001 00000000

10011011 11110111 00000001 11111111

10011011 11110111 11111111 11111111

16 bit network 8 bitsubnet

8 bithost

Inside Temple's network, we have subnetted our Class B allocation 155.247.0.0 into 256 subnets, by “stealing” 8 bits from the host bits.Now one or more subnets can be assigned to each department and each department (subnet) can have a router. So a typical Temple IP address is written as 155.247.170.1/24 where the /24 denotes the netmask.

Page 14: Network Layer Review

Storing/Exchanging addressTraditional IP scheme the netmask is implicit in the address. Let see what are the entries that would be stores in a typical router:

Network Next Hop208.12.16/24 11010000 00001100 00010000* x.x.x.x...208.12.21/24 11010000 00001100 00010101* x.x.x.x......208.12.31/24 11010000 00001100 000101111* x.x.x.x

If we use classful addressing we must list 15 entries in the routing table.

Page 15: Network Layer Review

Scaling Issues

A few decades back, given the rate at which the Internet was growing, service providers were facing two major challenges:

- Growth of routing table entries.

- Depletion of addresses space.

Page 16: Network Layer Review

Classless InterDomain Routing (CIDR)

Network Next Hop208.12.16/24 11010000 00001100 00010000* x.x.x.x...208.12.21/24 11010000 00001100 00010101* x.x.x.x......208.12.31/24 11010000 00001100 00011111* x.x.x.x

Returning to our previous example:

Notice that since the first 20 bits are identical for all addresses, these entries could be aggregated as

208.12.16/20 11010000 00001100 0001* x.x.x.x

This reduces the number of entries in the routing table significantly. However, there might be exception that break entries what could have been aggregated. This introduces a set of issues resolved using the longest-prefix-match algorithms.

Page 17: Network Layer Review

Classless InterDomain Routing (CIDR)CIDR only works well if next hop of all the aggregated entries are the same. Suppose we had

Network Next Hop208.12.16/24 11010000 00001100 00010000* x.x.x.x...208.12.21/24 11010000 00001100 00010101* y.y.y.y208.12.22/24 11010000 00001100 00010110* x.x.x.x...208.12.31/24 11010000 00001100 00011111* x.x.x.x

Now not all hosts with first 20 bits common have the same next hop, so what do we do ? We can either go back to not aggregating or create exceptions such as:

208.12.16/20 11010000 00001100 0001* x.x.x.x208.12.21/24 11010000 00001100 00010101* y.y.y.y

But now, 208.12.21.5 will match both the first and second entry, so which one do we choose ? Now we use the longest-prefix-match and use the second entry.

Page 18: Network Layer Review

CIDR – Classless InterDomain Routing

A set of IP address assignments.Dropping the classes makes forwarding more complicated:The routing table is scanned sequentially. The entries can be aggregated, e.g., the 3 entries to 194.24.0.0/19If multiple entries with different subnet mask lengths match, the

longest mask is used.

5-59

Page 19: Network Layer Review

NAT – Network Address Translation

Placement and operation of a NAT box.

Page 20: Network Layer Review

Private IP addresses:10.0.0.0 – 10.255.255.255 (16,777,216 hosts)172.16.0.0 – 172.31.255.255 (1,048,576 hosts)192.168.0.0 – 192.168.255.255 (65,536 hosts)

NAT uses source and destination ports of TCP and UDPto sort packets. Thus, NAT mixes up network layer with transport layer!!!

Page 21: Network Layer Review

Internet Control Message Protocol

ICMP is used to exchange massages between routers.The principal ICMP message types.

5-61

Page 22: Network Layer Review

ARP– The Address Resolution Protocol

Three interconnected /24 networks: two Ethernets and an FDDI ring.

Interface between Data Link Layer and Network Layer.

Mapping between IP addresses and MAC Ethernet addresses.

Host 1 want to send a packet to host 2. It broadcasts on his LAN: Who has IP addr. 192.31.65.5? Host 2 will respond with his MAC addr. E2

Page 23: Network Layer Review

Dynamic Host Configuration Protocol

Operation of DHCP.

Page 24: Network Layer Review

The Interior Gateway Routing Protocol

(a) An autonomous system. (b) A graph representation of (a).

Link State Routing is used.

Page 25: Network Layer Review

2. OSPF (Open Shortest Path First)

The relation between ASes, backbones, and areas in OSPF.

Page 26: Network Layer Review

3. OSPF

The five types of OSPF messages.

5-66

Page 27: Network Layer Review

The Exterior Gateway Routing ProtocolBGP (Border Gateway Protocol)

(a) A set of BGP routers. (b) Information sent to F.We need to worry about politics.

A distance vector routing is used, but the whole path is used.F goes to D: FGCD, and G crashes, then F takes FBCD.

Page 28: Network Layer Review

IP Multicast: Motivation

Multiple Unicasts Multicast

SOURCE

R

R

R

R

R

R

SOURCE

Page 29: Network Layer Review

IP address as a GROUPTraditionally we associate a unicast IP address with a single machine/interface.

An multicast IP address is exactly the opposite it identifies a collection of machines. There machines do not have to be on a single subnet. They could be anywhere in an internet.

In multicast communications, a machines joins and leaves a group as necessary and could be part of more than one group simultaneously.

A machine joins a group by sending a IGMP (Internet Group Management Protocol) join message to a multicast capable router.

Page 30: Network Layer Review

The Main IPv6 Header

Traffic class – the same as Type of service in IPv4Flow label – virtual connection labelHop limit – the same as Time to live in IPv4

Page 31: Network Layer Review

Extension Headers

IPv6 extension headers.

5-69