Sie sind auf Seite 1von 28

Computer Networks

An Introduction to IP Addressing
Material taken from a number of sources, acknowledgements to: Victoria University of Wellington, Kurose and Ross Computer Networks

Identifying networks and nodes (a) Classfull Addressing

In classful addressing, the address space is divided into five classes: A, B, C, D, and E.

Class based IP Addressing: NetID and HostID


NetID and HostID are of varying length dependent on class!

A, B and C are unicast addresses D are multicast addresses (destination addresses only) E reserved for experimental uses E.g. 130.195.5.22

Classless IP Addressing (CIDR)


CIDR (Classless Inter-Domain Routing) is designed to extend IP address space lifetime
overcomes limited numbers of class A, B, C networks

Network Mask specifies network id


130.195.0.0 = 10000010 11000011 xxxxxxxx xxxxxxxx/16, fixed for A, B, C classes (/8, /16/, /24 respectively) CIDR allows us to allocate classless network masks

Allocate ISP 200.23.16.0/20, has 8 customers


11001000 00010111 0001xxxx xxxxxxxx ISP allocated: 000x xxxxxxxx Organisation 1 200.23.16.0/23 Organisation 2 200.23.18.0/23 001x xxxxxxxx

Addresses and Networks


128.224.0.3

H
.0.4 .0.6 .0.5

H
.0.4

.0.1 .0.2 .0.3 network 128.224

.0.1 .0.2 .0.3 network 128.221

.0.5

128.221.0.5

H
.0.4

128.230.0.5 R routes based on the netid.

.0.1 .0.2 .0.3 network 128.230

Hosts send datagrams to R mapping Rs IP address to a MAC address on each LAN

Computer Networks

An Introduction to Network and Routing Protocols in the Internet


Material taken from a number of sources, acknowledgements to: Victoria University of Wellington, Kurose and Ross Computer Networks

More Network Protocols and Internetworking


This lecture/seminar: More about protocols and how things work at the network layer An introduction to Internet routing protocols: RIP OSPF BGP4 IP address exhaustion, IPv6 and NAT (Network Address Translation) and internetworking migration

ICMP Internet Control Message Protocol


ICMP always reports error messages to the original source

More of the Support Cast to IP


ARP
Address Resolution Protocol Map local IP addresses to data link addresses such as to IEEE 802 MAC protocol addresses (which are 48 bits long) ARP tables are maintained in hosts and routers on LANs, ATM, etc.

RARP, BOOTP, DHCP


Evolution of self configuration protocols Booting Protocol allows a host to boot over a network, Reverse Address Resolution Protocol whats the IP address of this IEEE 802 MAC protocol address, and Dynamic Host Configuration Protocol assigns an IP address, default router, etc. to a host computer

Fragmentation in Datagram Networks


network 1 MTU = 1500 network 2 MTU = 576 network 3 MTU = 1500

transparent fragmentation
G G Gateway reassembles fragments

independent fragmentation
G G Host reassembles fragments 10

Fragmenting Packets

This is a simplified example based on IP


Each packet carries a sequence number Add a fragment field as large as the length field Assume a packet goes from a network with mtu = 16 through a network with mtu = 10 and then to a network with mtu = 6
packet length packet seq fragment start last fragment I S 12 6 10 1 I S 12 6 10 1 A G A S
11

MTU=16 MTU=10

12 16 0 1 C O M P 3 0 6 12 10 0 0 C O M P 3 0 6 0 0C O M P 3 0 12 4 I S 6 0 6

A A

G A S G A S

MTU= 6 12 6

Inter-network Routing
Multi-homed AS
G G

Transit AS Transit AS

Stub AS
G

Multi-homed AS
12

Interior Routing
Discussed exterior routing (BGP4) in internetworking Within an autonomous system
RIP
Bellman Ford distance vector based protocol Still in relatively widespread use

OSPF
Link state protocol with flooding Dijkstras shortest path algorithm

Others, e.g.
IS-IS Intermediate System (multiprotocol routing support) Proprietary (e.g. CISCOs EIGRP)

13

RIP (Routing Information Protocol)


Included in BSD-UNIX Distribution in 1982 (popular & free) Distance vector algorithm
Distance metric: # of hops (max = 15 hops)

Distance vectors:
exchanged every 30 sec via Response Messages (also called advertisements) Each advertisement contains route of up to 25 destination networks

If no advertisement heard after 180 sec


Neighbour/link declared dead Routes via dead neighbour are invalidated New advertisements sent to the live neighbours Neighbours in turn send out new advertisements (if tables changed) Link failure info quickly propagates to entire network Poison reverse to prevent ping-pong loops (infinite distance = 16 hops)
14

RIP Table processing


RIP routing tables managed as an application-level process called routed (route daemon)
Populates the routing table at network layer (IP)

Advertisements sent in UDP packets, periodically

15

Open Shortest Path First OSPF Advanced Features


open: publicly available, not patented Uses the Link-State algorithm Topology map at each node Routes computed by Dijkstras algorithm OSPF advertisement carries one entry per neighbour router Advertisements are disseminated to entire AS (via flooding) Security: all OSPF messages authenticated; TCP connections used Multiple same-cost paths allowed For each link, multiple cost metrics for different types of service can be used Integrated uni- and multicast support:
Multicast OSPF (MOSPF) uses same topology database as OSPF

Hierarchical OSPF provides scalability for large domains. QOSPF experimental version provides Quality of Service support

16

Hierarchical OSPF
Two-level hierarchy
local areas, one backbone.
area border routers R R R R R area 1 R area 2 R R R R R R area 3
17

boundary router

Area border routers


summarize info advertise to other area border routers.

R R R

Backbone routers
Run OSPF routing limited to the backbone.

Boundary router(s)
Connect to other ASs. Exterior protocol - BGP

Hierarchical Routing
As networks grow in size, router tables grow proportionally. Uses up memory, CPU cycles and can slow routing/ switching with long table searches. Once a network is beyond a certain size, it is no longer feasible to have every router represented in every table. Need hierarchical routing techniques (the telephone network is an example).
Routers are divided into regions, routers know:
How to route to each machine in its region, How to route to other regions, without knowing that regions internal topology.

For huge networks, 2 level hierarchy, may still not be enough.

18

Hierarchical Routing II
Total of 17 routers Two level hierarchy Five regions:
All traffic for region 2 goes via 1B, etc. Best region route on average.
FULL TABLE Condensed TABLE

Some loss of data.

Full table - 1A to 5C is 5 hops, Condensed table 1A to 5C is now 6 hops (slightly less optimal routing).
19

Additional Routing Concepts


NOT EXAMINABLE IN 2011 Broadcast Routing
Flooding Multi-destination routing Spanning tree Reverse Path

Multicast Routing
Routing for sub groups within a network

20

Broadcast Routing
Sometimes we need to send messages to all or most of the hosts on a subnet. One solution is for the source to send a unicast message to each destination. This is:
Wasteful of bandwidth (the path to the source traversed by each unicast message) Requires the source to have a complete list of all destinations.

This is the least desirable method


But in many cases is also the only possible method.

We will now look at some methods that require support in the network layer protocols to broadcast data.

21

Broadcast Routing II
Flooding: is the best choice in some situations, and requires little network knowledge, however:
it generates too many packets and wastes too much bandwidth, so we need something more controlled.

Multi-destination Routing: each packet contains either a list or a bitmap of the required destinations.
Each router uses this information to determine which output links the message is send on (best route for each listed destination). Each selected output line gets a copy of the packet, but the copy only contains the destinations for which this output link is the best route. This partitions the message over the output links. After a sufficient number of hops, each packet will contain only a single destination, and can be treated as a regular packet.

22

Broadcast Routing III


Spanning Tree: uses the sink tree from the source router, to ensure it spans the network. If each intermediate router knows which of its links belong to the spanning tree, it can then just copy the incoming message to just those links
Minimises number of packets Excellent use of bandwidth, but We need a sink tree at the routing protocol

This is only available in say link state routing, and not in distance vector routing.
23

Broadcast Routing IV
Reverse Path Forwarding: Idea is to duplicate the spanning tree algorithm for networks without sink trees (i.e. for Distance Vector). When a packet arrives at a router:

This scheme is efficient and easy to implement and does not rely on global knowledge of the network topology. Does not have the overhead of including a list of destinations as in multi-destination routing.

Check to see if the packet arrived on the link that is usually used for sending packets to the source (i.e next hop to that source). If so, then there is an excellent chance that the broadcast packet itself followed the best route from the source and is therefore the first copy to arrive at this router. The router then copies this packet to all output links except of course the one it arrived on. If the packet arrived on any link other than the preferred one, it is discarded as a likely duplicate.

24

Broadcast Routing V

(a) A subnet.
(b) A sink tree (used for comparison). (c) The tree built by reverse path forwarding from node I.

25

Overview of Broadcast Techniques


When we need to send messages to all or most of the hosts on a subnet, we can:
Send its as a sequence of unicast transactions
Requires knowledge of all end points and a connection or a datagrams per end point

Use flooding - a nave protocol that is very inefficient, but simple broadcast storms, bandwidth wasted, etc. Multi-destination Routing: each packet contains a list or a bitmap determining the required destinations.
Router determine best output links to send message on

Spanning Tree: uses the sink tree from the source router (link-state), to ensure it spans the network.
Each intermediate router knows which links belong to the spanning tree

Reverse Path Forwarding (e.g. for Distance-Vector):

If packet arrived on minimum cost link for sending packets to the source
26

Multicast Routing
Some applications require communication amongst a group of nodes and processes.

If the group is small, they can use repeated unicast. If the group is large (say, the majority of a network), then we can use broadcast.

If the group size is somewhere in-between, we need a form of selective group communication.
This is called multicasting.
Nodes join a multicast group (using a group management protocol) Networks build a set of distribution trees to provide nodes with multicast data
27

Multicast Routing
Source

(a) network with two multicast groups (1 and 2)

(b) the spanning tree for the source router

Waypoint routers (arrows)

(c) Multicast tree for group 1

(d) Multicast tree for group 2

28

Das könnte Ihnen auch gefallen