• Nenhum resultado encontrado

Lectures on 4.10.2000

N/A
N/A
Protected

Academic year: 2023

Share "Lectures on 4.10.2000"

Copied!
25
0
0

Texto

(1)

Lectures on 4.10.2000

1st lecture 12:15-13:00

The Internet Protocol (IPv4)

IP Addresses:

Structure of

Problems with

Registration of

Address Resolution Protocol (ARP) 2nd lecture 13:15-14:00

Routing IP Datagrams

Direct and Indirect Delivery

The Need for Routing Protocols

Dividing the Internet into Autonomous Systems

Exterior Routing (EGP, BGP)

Interior Routing (RIP2, EIGRP, OSPF)

On Choosing Routing Protocols

(2)

The Internet Protocol (IP)

The Internet Protocol was designed to provide a connectionless datagram service in internetworks

From the user’s point of view, internet is a virtual network interconnecting all the hosts connected to it - the internal structure of the internet is unessential

Conceptually, a TCP/IP-based internet provides three levels of services (the protocols named in parentheses implement

these services):

Application level services (e.g. SMTP, FTP, HTTP)

Reliable transport service (TCP)

Connectionless packet service (IP)

The basic architecture of the Internet was defined in 1974 by Vinton Cerf and Robert Kahn and has remained unchanged

The success of TCP/IP is largely based on the good func- tioning and adaptability of the architecture (layer structure)

(3)

The Internet Protocol (IP)

The IP-based packet-forwarding service provided by an internet can be characterized as follows:

The service is unreliable, because IP does not use

acknowledgements and the delivery of a datagram is not guaranteed

The service is connectionless, because every packet is routed separately and independently of other packets

The service is based on best-effort delivery, because the internet software is doing its best to deliver every packet

IP defines three significant things:

The structure of the Internet datagram

The routing of datagrams

A number of rules implementing the principles of connectionless packet service

IP is the key technology on which the Internet is based

(4)

IPv4 Datagram Header

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|Version| IHL |Type of Service| Total Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Identification |Flags| Fragment Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Time to Live | Protocol | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The figure depicting the header of an IPv4 datagram is taken directly from RFC-791

(5)

Type of Service Field (RFC791)

Bits 0-2: Precedence.

Bit 3: 0 = Normal Delay, 1 = Low Delay.

Bits 4: 0 = Normal Throughput, 1 = High Throughput.

Bits 5: 0 = Normal Reliability, 1 = High Reliability.

Bit 6-7: Reserved for Future Use.

0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+

| | | | | | | | PRECEDENCE | D | T | R | 0 | 0 | | | | | | | | +---+---+---+---+---+---+---+---+

Precedence

111 - Network Control

110 - Internetwork Control 101 - CRITIC/ECP

100 - Flash Override 011 - Flash

010 - Immediate 001 - Priority 000 - Routine

(6)

IP Addresses

Internet is a logical network consisting of a number of physical networks interconnected via routers

Universal communication service = any-to-any communication

Internet is based on compact, standardized, binary addresses - namely IP addresses

Every network interface connected to the Internet has a

unique 32-bit IP address that is used in communications with this interface

DNS maps the domain names onto IP addresses

Routers route a packet based on its destination IP address

Routing protocols help routers find a path to the destination

The Address Resolution Protocol (ARP) maps IP addresses onto physical (MAC-layer) addresses

(7)

IP Addresses

IP address is written as four decimal numbers, each between 0 and 255, separated with points

For example the binary address “11000001 11010010

00001001 00111111” is written “193.210.9.63” and it stands for node “63” of the class C network “193.210.9”

“0” as the number of a node or a network stands for “this”

and ”-1” (number with all bits 1) stands for ”all” - for this reason, they are not used as node or network numbers

There can be at most 126 class A networks and each of them can have at most 16,777,214 nodes

There can be at most 16,382 class B networks and each of them can have at most 65,534 nodes

There can be at most 2,097,150 class C networks and each of them can have at most 254 nodes

(8)

Structure of IP Addresses

IP addresses are 32-bit integers and they are divided into three main classes: A, B and C

Class D was added for multicasting and class E reserved for future use

1 Network # (14 bit) Node # (16 bit)

Class B 0

Class C 1 1 0 Network # (21 bit) Node # (8 bit)

Class D 1 1 1 0 Network # (28 bit)

Class E 1 1 1 1 Reserved for future use

0 Network # (7 b) Node # (24 bit)

Class A

0 1 2 3 4 5 6 7 8 16 24 31

(9)

IP Addresses

An IP address conceptually consists of a pair: (net-id, host-id)

It is easy to separate the net and host parts from an address

An IP address does not determine a host but a network interface of a host

For example a router has an IP address for each of the networks it is attached to

An IP address can also indicate an entire network

An address with all host-id bits "0" indicates a network

An address with all host-id bits "1" is a broadcast address

Directed broadcast = all hosts in a given network

Limited broadcast (local network broadcast) = all hosts in this network

We normally try to limit broadcasts to as small a scope as possible

Multicasting is a non-trivial function to implement

(10)

Some IP Addresses

Special addresses

Limited broadcast: "255.255.255.255"

Directed broadcast:

"A.255.255.255", "B.B.255.255", "C.C.C.255"

Loopback: "127.X.Y.Z"

All systems on this subnet: "224.0.0.1"

All routers on this subnet: "224.0.0.2"

Some examples of IP addresses:

"0.0.0.0" = some host (source only)

"255.255.255.255" = any host (destination only)

"129.34.0.3" = host #3 in n/wk 129.34

"129.34.0.0" = some host in n/wk 129.34 (source only)

"129.34.255.255" = any host in n/wk 129.34 (destination)

"255.255.0.3" = host #3 in this n/wk

"127.0.0.1" = this host (local loopback)

(11)

Problems with IP Addresses

IP address maps into a network interface => when a host moves into another network its IP address changes

(this is a problem e.g. in portable PCs)

When a network grows, changing the network number and IP addresses becomes very difficult

If a host has several IP addresses, the path to and reachability of the host depend on the address used

The biggest single problem with IP addresses is its inadequate 32-bit address space

(the ”ROADS” problem, Running Out of Address Space)

Especially the number of class B networks is too small

Classless Inter-Domain Routing (CIDR) and Network Address Translation (NAT) provide an interim solution to the problem

IPv6 (IP Next Generation, IPng) solves the problem by using 128-bit addresses but moving into IPv6 is very difficult

(12)

Registration of IP Addresses

In an intranet it is (at least in principle) possible to use unregistered IP addresses

Network connected into the Internet need to be registered

Network numbers are governed by the Internet Assigned Number Authority (IANA)

In practice numbers are assigned by the Internet Network Information Center (INTERNIC)

Today most companies and private people get their IP addresses from an Internet Service Provider (ISP)

Who ”owns” the addresses?

- normally the ISP, which poses limitations to competition

Private Internet Address Space (RFC-1597, including the old ARPANET class A network 10), some registered addresses, and NAT provide a working solution for most companies

(13)

Mapping IP Addresses to Physical Addr.

Two hosts connected to the same physical network can

communicate if they know each other’s physical addresses

In IP terminology " physical address” usually means, depending on the network, either the network address (e.g. in X.25) or MAC address (e.g. in LANs)

In the physical layer of OSI no addresses are used

Assume that A and B are connected to the same physical network and they have IP addresses IA and IB and physical addresses PA and PB, respectively

A mapping: IA => PA and IB => PB is needed - the Address Resolution Problem

If the physical addresses can be chosen (e.g. in proNET), a direct mapping is possible: PA = f(IA)

In the general case, a direct mapping is not possible

(14)

Address Resolution Protocol (ARP)

In LANs fixed 48-bit MAC-level addresses are used

A 32-bit IP address cannot be directly mapped into a 48-bit MAC address

The Address Resolution Protocol (ARP) is a mechanism,

through which a host can find the physical address of another host residing in the same network based on its IP address

The source host sends the inquiry to the local network in a broadcast message, which the target host answers to

The source host caches the physical addresses into a lookup table in order to avoid unnecessary use of the ARP

At the same time the target host can cache the physical address of the source host

ARP is a low-level protocol that helps hide the physical network addresses

(15)

Routing IP Datagrams

We have already gone through the datagram service of internet, IP addresses and the Internet Protocol (IP)

We shall now see, how routers route IP datagrams and deliver them to the right recipient

Routing means the process of choosing paths over which to send packets

Router is a computer that performs routing

In wide area networks (WANs, such as X.25) there happens routing within the network that is invisible to the outside

The purpose of IP is to interconnect various networks into an internet providing a uniform datagram service

(16)

IP Routing

A router is connected to at least two networks and it routes between them

In practice, a router may also have just one physical network interface (e.g. Frame Relay or ATM), in which case routing takes place between virtual circuits or logical networks

Both the sending host and the routers between the sender and receiver participate in routing

Any computer connected to more than one network may act as a router

Internet standards define clear and separate roles for a

computer and a router - a routing computer needs to keep these roles separate

(17)

Direct and Indirect Delivery

Routing can be divided into two forms:

Direct delivery

An IP datagram can be sent directly (without involving routers) to another host on the same physical network

Because all IP addresses of the same network have a

common prefix (net-id), it is easy to determine, what hosts reside on the same network

Indirect delivery

When the recipient is on another network, the IP datagram is delivered indirectly through router(s)

In indirect delivery, the sender has to determine, what router the datagram shall be sent to

The routers of an internet cooperate to form a routing infra- structure that passes datagrams from router to router until they reach a router than can deliver them directly

(18)

IP Routing (continued)

Normally IP routing is based on a routing table, on each

machine, that stores information about possible destinations and how to reach them

Because both computers and routers participate in routing, they both have routing tables

According to the Information hiding principle, we prefer to store information about routes to networks rather than

individual hosts

Typically a routing table entry is of the form: (N, R), where N is the IP address of the destination network and R is the IP address of the ”next” router

The router R is called the ”next hop” and the type of routing described above ”next-hop routing”

As implied by its name, the next-hop router can be reached directly (with one hop) and is connected to the same network

(19)

The Need for Routing Protocols

We have already gone through the functioning of the Internet, which is based on the IP protocol and routers

If the sender and receiver are not on the same network, the IP packet gets sent to a router, that sends it on to the right direction based on the contents of its routing tables

Questions:

What values should the routing tables contain?

How are these values born?

Routing tables shall have initial values which may be empty

Routing tables need to be updated, either manually or automatically

In practice the routing tables of a large network can only be efficiently updated automatically

For this purpose, routers exchange routing information by using a routing protocol

(20)

Growth of the Internet and its Consequences

In the early 1980’s, the whole Internet was a uniform network, whose routers (gateways) exchanged routing information

using the Gateway-to-Gateway Protocol (GGP)

The routing tables of all the routers contained the routing information of all network numbers of the Internet

As the Internet kept growing, the following problems appeared:

The overhead caused by routing increased rapidly

The interoperation of different routers caused difficulties

When the version of the routing protocol was changes, all the routers had to be updated at the same time

A solution was needed, where not all routers exchange routing information

(21)

Dividing the Internet into Autonomous Systems

It was decided, that the Internet should be divided into Autonomous Systems (AS)

One AS if formed by the routers and networks under the same administration

ARPANET and SATNET together formed an AS called by the name ”core” and forming the backbone of the Internet

Other AS’s where called by the name ”stub AS”

Every stub needs to have at least one router connected to at least one core router in order to achieve global connectivity

Inter-AS traffic normally flowed through the core AS

Routers connected to other AS’s were called ”exterior gateways” and the Exterior Gateway Protocol (EGP) was developed for them

(22)

Autonomous Systems

To make routing possible in an increasingly complex network, the Internet was divided into autonomous systems (AS)

An autonomous system is responsible for its internal routing

Router Rn of AS #n tells the core network router RCn, what networks can be reached through it

Core Network

...

R1

Autonomous System #1

RC1

R2

Autonomous System #2

RC2

Rn

Autonomous System #n

RCn

(23)

Interior Routing Protocols

Within an autonomous system an Interior Routing Protocol is used, such as:

Routing Information Protocol (RIP)

A distance vector protocol

Traditional and easy to implement

RIP v2 (RIP2) supports sub- and supernetting

Doesn’t scale well to large networks

Enhanced Interior Gateway Routing Protocol (EIGRP)

The proprietary Cisco distance vector protocol

Widely used and powerful but entirely Cisco-dependent

Open Shortest Path First (OSPF)

A link state protocol

Based on Dijkstra’s Shortest Path First (SPF) algorithm

The recommended interior routing protocol

(24)

Exterior Routing Protocols

Between autonomous systems an Exterior Routing Protocol (a reachability protocol) is used:

Exterior Gateway Protocol (EGP)

A distance vector protocol

Old and now obsolete

Border Gateway Protocol (BGP)

A path vector protocol

“The EGP of the 1990’s”

BGP-4 is defined in RFC-1771 (March, 1995, the latest version) Classless Inter Domain Routing (CIDR)

A supernetting technique

An intermediate solution to the exhaustion of class B network numbers

Requires the use of BGP-4

(25)

On Choosing Routing Protocols

Most companies never have to deal with exterior routing, only interior routing

Telcos and some large organizations have their own

autonomous systems and need to use an exterior routing protocol

In non-redundant networks static routing often is adequate

Cisco has delivered well over 50% of all backbone routers and pushes its proprietary EIGRP routing protocol

Choosing a proprietary routing protocol is not to be

recommended because it ties the organization into one vendor

Openness is worth some effort

The routing protocols recommended by the Internet Architecture Board (IAB) are OSPF and BGP-4

Referências

Documentos relacionados

From this definition we are able to derive all the rules that are traditionally postulated with this type constructor... High Order