1 chapter 2 the architecture of networks organizing with layers and hierarchies layers organize...

51
1 pter 2 The Architecture of Networks anizing with Layers and Hierarchies Layers organize effort-divide and conquer

Upload: amie-parsons

Post on 25-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

1

Chapter 2 The Architecture of Networks

Organizing with Layers and Hierarchies•Layers organize effort-divide and conquer

Page 2: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

2

第 N 層

第 N-1 層

第 1 層傳輸介質

Chapter 2 The Architecture of Networks

Organizing with Layers and Hierarchies對等協定(Peer Protocol)

Page 3: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

3

Chapter 2 The Architecture of Networks

Organizing with Layers and Hierarchies

FTP

TCP

IP

Encapsulation and Decapsulation

Page 4: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

4

Chapter 2 The Architecture of Networks

Organizing with Layers and Hierarchies•Hierarchies organize information and delegate responsibility

Page 5: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

5

Chapter 2 The Architecture of Networks

Organizing with Layers and Hierarchies

Layering Advantages :•Isolating the various services from one another•Flexibility (changing from cable to fiber without your knowing)

Hierarchies Advantages:•Organize information and delegate responsibility

Page 6: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

6

ISO OSI 的參考模型

應用層

表達層

交談層

傳輸層

網路層

資料連結層

實體層

應用層

表達層

交談層

傳輸層

網路層

資料連結層

實體層傳輸介質

application

presentation

session

transport

network

data link

physical

Chapter 2 The Architecture of NetworksLayers

•different communication protocolsHierarchies

Internet naturally organizes its components into hierarchies

Page 7: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

7

Chapter 2 The Architecture of Networks

Two distinct roles for Internet•Host and Router

The TCP/IP Internet: TCP/IP Protocols

TCP/IP Layering

Page 8: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

8

Chapter 2 The Architecture of Networks

The TCP/IP Internet: Links, Subnetworks, and Internets

Network: has a completely routing abilityInternet: join several network (herein define subnetwork) together

Page 9: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

9

Chapter 2 The Architecture of Networks

The TCP/IP Internet: •Hosts: send or receive messages•Routers: relay messages across networks

Page 10: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

10

Chapter 2 The Architecture of Networks

The TCP/IP Internet: Hosts and Routers (protocol stacks)

Page 11: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

11

Chapter 2 The Architecture of Networks

The TCP/IP Internet: Internet Hierarchy

Site: collection of networks, controlled by a single administrator

Page 12: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

12

Chapter 2 The Architecture of Networks

Communication Services: Connectionless Delivery

Page 13: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

13

Chapter 2 The Architecture of Networks

Communication Services: Connectionless Delivery

Page 14: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

14

Chapter 2 The Architecture of Networks

Communication Services: Connection-Oriented Delivery

Page 15: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

15

Chapter 2 The Architecture of Networks

Communication Services: Connection-Oriented Delivery

Page 16: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

16

Chapter 2 The Architecture of Networks

Communication Services: Combining Services

(TCP, CO)

(IP, CL)

(TCP, CO)

Page 17: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

17

Chapter 2 The Architecture of Networks

Network Addressing

Internet Protocol software must hide the details of physical networks and offer the facilities of a large virtual network (hide the differential network technology).

The Internet designers are free to choose addresses, packet formats, and delivery techniques independent of the details of the physical hardware.

Addressing is a critical component of the Internet abstract. To give the appearance of a single, uniform system, all host computers must use a uniform addressing scheme.

Page 18: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

18

Chapter 2 The Architecture of Networks

Network Addressing: The role of network addressesIP addresses do not specify an individual computer, buta connection to a network.TCP/IP addresses identify interfaces, not systemsMulti-home host: more than one network interface, each interface requires one network address

Page 19: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

19

Chapter 2 The Architecture of Networks

Network Addressing: Type of Addresses•Unicast, Muticast, Anycast

Page 20: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

20

Chapter 2 The Architecture of NetworksNetwork Addressing: Type of AddressesUnicast, Muticast, Anycast (compromise between unicast and multicast)

Anycast address refers to any one of interfaces, not all of themEx: router recognizes that the message has already reached at least one appropriate interface

Page 21: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

21

IP denoted - in the form <a.b.c.d> each number represents, in decimal, 1 byte of the 4-byte IP address.

Why are IP addresses necessary? Easy to find the destination station IP addresses are hierarchical addresses

• Every IP address has two parts.– network number (provided by InterNIC)– host number (provided by local administrator)

Where to find the IP address• International Network Information Center, or InterNIC

There are five classes of Network (Five type IP)• only three of these are used commercially. These are the class "A," "B," and "C" ne

tworks• the class “D” is reserved for multicast• the class “E” is reserved for experiment/research

Network Addressing: IPv4 address format (32-bit address)

Page 22: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

22

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv4 address format (32-bit address)

投影片 26

class A 0 7-bit netid 24-bit hostid

class B 1 0 16-bit hostid

class C 1 1 0 8-bit hostid

14-bit netid

21-bit netid

class D 1 1 1 0 28-bit multicast group ID

class E 1 1 1 1 0 reserved for future use

Note that the IP address has been defined in such a way that it is possible to extract the hostid or netid portions quickly.Routers, which use the netid portion when deciding where tosend a packet, depend on efficient extraction to achieve highspeed.

0 ~ 127

128 ~ 191

192 ~ 223

224 ~ 239

240 ~ 255

Page 23: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

23

What IP addresses are reserved for the Networks? Network address : all host address are set to zero Broadcase address : all host address are set to one

Question: What would the network/broadcase address be for devices such as the one with an IP address of 197.22.103.221?

In order to provide extra flexibility for the network administrator, often networks, particularly large networks, are divided into smaller networks called subnetworks. Most of the time subnetworks are simply referred to as subnets.

Who assigns subnet addresses? this is done by the network administrator

Page 24: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

24

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv4 address format (32-bit address)

IPv4 address weakness:

The most obvious disadvantage is that addresses refer to network connections, not to host computer:If a host computer moves from one network to another,its IP address must change.

Inconvenient for mobile computers

Another weakness:Class C is too small while class B is too large.

Page 25: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

25

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv4 address format (32-bit address)

Typical Routing Table Format (Router A)

Destination-Network Next Hop Mask100.203.10.x 100.204.10.1 255.255.255.0

Router A Router100.204.10.1 100.203.10.1

What is NetMask?

Page 26: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

26

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv4 address format (32-bit address)

Network Mask

Subnetting: Subdivide the host-id field in IP address divide class C into subnets of power of 2 for example: assign 192.100.100.0~63, 64~127, 128~191, 192~255 to four subnets. We can have a mask of 255.255.255.192

Supernetting: Assign class C in chunks of power of 2 (supernet). For example, Assign 203.64.0.* ~ 203.64.3.* to one organization. Then we can have a mask of 255.255.252.0.

Classless Inter Domain Routing (CIDR)

Page 27: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

27

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv4 address format (32-bit address)

IPv4 address weakness:

Another problem:

R A B

Network 1

Network 2

The usual A to B path

I

When link I fails, we have one address that can be used to reach B and another that can't. Routing table only records one path. It may take a long time to find out the other path.

Page 28: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

28

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Text Representation of Addresses

There are three conventional forms for representing IPv6 addresses as text strings:

1. The preferred form is x:x:x:x:x:x:x:x, where the 'x's are the hexadecimal values of the eight 16-bit pieces of the address. Examples: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 1080:0:0:0:8:800:200C:417A

Page 29: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

29

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Text Representation of Addresses

2. Due to the method of allocating certain styles of IPv6 addresses, it will be common for addresses to contain long strings of zero bits. In order to make writing addresses containing zero bits easier a special syntax is available to compress the zeros. The use of "::" indicates multiple groups of 16-bits of zeros. The "::" can only appear once in an address. The "::" can also be used to compress the leading and/or trailing zeros in an address.

Page 30: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

30

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

For example the following addresses:

1080:0:0:0:8:800:200C:417A 1080::8:800:200c:417A FF01:0:0:0:0:0:0:43 FF01::43 0:0:0:0:0:0:0:1 ::1 (Loopback address) 0:0:0:0:0:0:0:0 :: (unspecified address)

Text Representation of Addresses

Page 31: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

31

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Text Representation of Addresses

3. An alternative form that is sometimes more convenient when dealing with a mixed environment of IPv4 and IPv6 nodes is x:x:x:x:x:x:d.d.d.d, where the 'x's are the hexadecimal values of the six high-order 16-bit pieces of the address, and the 'd's are the decimal values of the four low-order 8-bit pieces of the address (standard IPv4 representation).

For example, 0:0:0:0:0:0:13.1.68.3 in compressed form is ::13.1.68.3

Page 32: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

32

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Hierarchy: solve the routing table explosion•Different level only lookup the associated level information

3+5+16+16+8+32=80The remaining 48 bits define the particular system on the subnetwork.

Page 33: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

33

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Address Prefixes

An address prefix indicates both an address itself, and thenumber of significant bits in the addresses.

Page 34: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

34

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

IPv6 Address Allocation – Special Addresses

Allocation Prefix Fraction of (binary) Address Space------------------------------- -------- -------------Reserved hierarchy 0000 0000 1/256 (0::/8)Unassigned 0000 0001 1/256 (100::/8)Reserved for NSAP Allocation 0000 001 1/128 (200::/7)Reserved for IPX Allocation 0000 010 1/128 (400::/7)Unassigned 0000 011 1/128 (600::/7)Unassigned 0000 1 1/32 (800::/5)Unassigned 0001 1/16 (1000:/4)

Page 35: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

35

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

IPv6 Address Allocation

Allocation Prefix Fraction of (binary) Address Space------------------------------- -------- -------------Aggregatable Global Unicast Addresses 001 1/8 (2000::/3)Unassigned 010 1/8 (4000::/3)Unassigned 011 1/8 (6000::/3)Unassigned 100 1/8 (8000::/3)Unassigned 101 1/8 (A000::/3)Unassigned 110 1/8 (C000::/3)Unassigned 1110 1/16 (E000::/4)

Page 36: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

36

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

IPv6 Address Allocation

Allocation Prefix Fraction of (binary) Address Space------------------------------- -------- -------------Unassigned 1111 0 1/32 (F000::/5)Unassigned 1111 10 1/64 (F800::/6)Unassigned 1111 110 1/128 (FC00::/7)Unassigned 1111 1110 0 1/512 (FE00::/9)Link Local Unicast Addresses 1111 1110 10 1/1024 (FE80::/10)Site Local Unicast Addresses 1111 1110 11 1/1024 (FEC0::/10)Multicast Addresses 1111 1111 1/256 (FF00::/8)

Page 37: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

37

IPv6 Address Allocation – Special Addresses 0:0:0:0:0:0:0:0 unspecified address (never appear in the destination field)

0:0:0:0:0:0:0:1 loopback address

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Page 38: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

38

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Two types of IPv6 addresses support the transition from IPv4. IPv4-compatible and IPv4-mapped

IPv4-compatible IPv6 Addresses The IPv6 transition mechanisms include a technique for hosts and routers to dynamically tunnel IPv6 packets over IPv4 routing infrastructure. Router at the boundary of the IPv4 network canconvert those address to true IPv4 addressesIPv6 nodes that utilize this technique are assigned special IPv6 unicast addresses that carry an IPv4 address in the low-order 32-bits. This type of address is termed an "IPv4- compatible IPv6 address" and has the format: 96 bits |0000..............................00000000| IPv4 address |

Page 39: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

39

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

IPv4-compatible IPv6 Addresses

Page 40: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

40

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

IPv4-mapped IPv6 address

IPv4-mapped addresses indicate systems that do not supportIPv6. They are instead limited to IPv4. As long as intervening routers perform the mapping, these addresses let IPv6 systems communicate with IPv4-only systems

The format is 80 bits of zero, 16 bits of one, and 32 bits of an IPv4 address.Ex: IPv4: 4.3.2.1 , IPv4-mapped: ::FFFF:0403:0201

Page 41: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

41

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

IPv4-mapped IPv6 address

Page 42: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

42

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

The structure of both IPv4-compatible and IPv4-mapped addresses is not arbitrary. Both formats were chosen because of the particular checksum algorithm that many TCP/IP protocols use. (for pseudo header)

Either address format contributes the same value to the checksum, whether it is specified as an IPv6 addresses or as an IPv4 address.

Page 43: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

43

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Anycast Address (the subnet-router address)

Page 44: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

44

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Multicast Address: begin with eight bits of 1, the next eight bits give more information about the address (so far, only the fourth bit ha a defined meaning)

T=0: a global authority has permanently assigned the address to a particular group. Ex: FF02::1 identifies the group of all systems on a link

Page 45: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

45

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Multicast Address

Page 46: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

46

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Multicast Address

Page 47: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

47

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Multicast Address

Page 48: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

48

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Multicast Address

Standard identified five permanently assigned address

FF01::1 all systems node-local scopeFF02::1 all systems link-local scopeFF01::2 all routers node-local scopeFF02::2 all routers link-local scopeFF05::2 all routers site-local scope

Page 49: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

49

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Solicited node address (one of multicast address)

Every unicast (or anycast) address maps to exactly one solicited node address. Different unicast addresses may form the same solicited node address.TO create a solicited node address, a system takes the last 24-bits of its unicast or anycast address and appends them to the 104-bit prefix FE02::1:FF00/104. For example, a host with unicast address FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 automatically belongs to the group of systems with multicast address FE02::1:FF54:3210.ICMP uses solicited node addresses to perform neighbor discovery and duplicate address detection.

Page 50: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

50

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Addresses that host must support

Page 51: 1 Chapter 2 The Architecture of Networks Organizing with Layers and Hierarchies Layers organize effort-divide and conquer

51

Chapter 2 The Architecture of NetworksNetwork Addressing: IPv6 address format (128-bit address)

Addresses that router must support