Presentation is loading. Please wait.

Presentation is loading. Please wait.

© MMII JW RyderCS 428 Computer Networking1 Reading  Make sure you read all of chapter 2 & 3.

Similar presentations


Presentation on theme: "© MMII JW RyderCS 428 Computer Networking1 Reading  Make sure you read all of chapter 2 & 3."— Presentation transcript:

1 © MMII JW RyderCS 428 Computer Networking1 Reading  Make sure you read all of chapter 2 & 3

2 © MMII JW RyderCS 428 Computer Networking2 Internet Architecture  How are networks interconnected to form an internetwork?  We’ve seen how hosts on a single network interconnect  Physically  2 networks attached by a computer that attaches to both of them  Doesn’t guarantee that the computer will cooperate with other hosts  Need computers willing to shuffle packets from one network to another  They are internet gateways (internet routers)

3 © MMII JW RyderCS 428 Computer Networking3 IP Routers  See figure 3.1 on page 56 (draw)  Need to know about topology of internet beyond connected networks  See figure 3.2 on page 57  R 1 must transfer from network 1 to network 2 all packets destined for both network 2 and 3

4 © MMII JW RyderCS 428 Computer Networking4 IP Routers  In a TCP/IP internet, computers called routers or gateways provide all interconnections among physical networks.  Routers are usually small computers with limited memory and disk storage  Trick: Routers use the destination network, not the destination host when routing a packet

5 © MMII JW RyderCS 428 Computer Networking5 IP Routers  Amount of information needed to keep is proportional to the number of networks in the internet not the number of computers  User’s view of internet is single virtual network to which all machines connect  See figure 3.3 on page 59  Advantage of network level interconnection (over app level) is that application level programs need not be concerned with network details

6 © MMII JW RyderCS 428 Computer Networking6 All Networks are Equal  Any communication system capable of transferring packets counts as a single network  Ethernet LAN  WAN - ANSNET backbone  Point to Point link  How do IP addresses work

7 © MMII JW RyderCS 428 Computer Networking7 Internet Addresses  TCP/IP internet, a virtual network built by interconnecting physical networks with routers  Now we discuss addressing  Hides physical network details

8 © MMII JW RyderCS 428 Computer Networking8 Universal Comm. Service  Any to any host  Needs globally accepted method of computer id  Names - What an object is  Addresses - Where it is  Route - How to get there  IP addresses - 32 bit integers  Chosen to make routing efficient  Encodes id of network to which the host attaches as well as host id itself

9 © MMII JW RyderCS 428 Computer Networking9 IP Addresses  Unique 32 bit address used for ALL communication with that host  Simplest view  Each host has unique 32 bit addr  Bits of all hosts on a common network share same prefix  Each addr. is a pair (netid, hostid)  netid = network id  hostid = host id

10 © MMII JW RyderCS 428 Computer Networking10 IP Address Classes Class A (000) Class B (128) Class C (192) Class D (224) Class E (240) 0 netid hostid 1 0 netid hostid 1 1 0 netid hostid 1 1 1 0 multicast address 1 1 1 1 0 reserved for future use - 2 bits can distinguish between 3 common classes

11 © MMII JW RyderCS 428 Computer Networking11 Address Classes  Class A - Handful of networks that each have more than 2 16 (65,536) hosts  7 bits to netid, 24 bits to hostid  Class B - Intermediate size networks - between 2 8 and 2 16 hosts  14 bits to netid, 16 bits to hostid  Class C - Less than 2 8 hosts  21 bits to the netid, 8 to hostid

12 © MMII JW RyderCS 428 Computer Networking12 IP Addresses  Dealt with as 32 bit addresses  Assume following IP Addr.  137.141.152.35 (Decimal)  89.8D.98.23 (Hexadecimal)  1000 1001.1000 1101.1001 1000.0010 0011 (Binary) Class B (128) 1 0 netid hostid 0 1 2 3 4... 8... 16... 24... 31 1 0 0 0 1 0 0 1 -1 0 0 0 1 1 0 1 - 1 0 0 1 1 0 0 0 - 0 01 0 0 0 1 1 ‘898D’x ‘9823’x 2445 38947 decimal

13 © MMII JW RyderCS 428 Computer Networking13 Multi-Homed Hosts  A router connects 2 or more physical networks  How is one IP address assigned to the router???  IP Addr. encode a network and a host  A router is a multi-homed host

14 © MMII JW RyderCS 428 Computer Networking14 Network Connections  Routers have 2 or more IP Addresses  One for each network on which it resides  IP addresses do not specify and individual computer, but a connection to a network  A router connecting n networks has n distinct IP addresses, one for each network connection

15 © MMII JW RyderCS 428 Computer Networking15 Network Addresses  By convention, hostid 0 is never assigned to an individual host  IP addr. with hostid = 0 refers to the network itself  137.141.0.0 (hostid = 0.0 right??)  This allows IP addresses to refer to networks as well as hosts  All bits of hostid = 0 ?  Refers to a network

16 © MMII JW RyderCS 428 Computer Networking16 Broadcast Address  Any hostid consisting of strictly 1’s is reserved for broadcast  Broadcast not supported on all networks  Early release of Berkeley Unix used all 0’s, still around  Sometime option of specifying 0’s - not recommended  Directed broadcast still correctly identifies the network but broadcasts to all hosts on a given network

17 © MMII JW RyderCS 428 Computer Networking17 Limited Broadcast  32 bits of 1’s  Broadcast only to local network  Host may use this prior to knowing its IP addr. at start up  Field of 1’s = ‘All’  Field of 0’s = ‘This’  IP addr. with hostid = 0 refers to ‘this’ host  Network id = 0 refers to ‘this’ network

18 © MMII JW RyderCS 428 Computer Networking18 This  Receive a packet with netid of dest. addr = 0 and hostid matches its address  Interpret to mean ‘this’ network  Addressing scheme actually slightly more intricate  Subnetting

19 © MMII JW RyderCS 428 Computer Networking19 Internet Addresses  Disadvantages  Address refers to network connections  Host moves to a different network, it must change its IP addr.  If IP addr referred to host itself the could move without changing IP addr.

20 © MMII JW RyderCS 428 Computer Networking20 Traveling PC Example  Disconnect your computer from your local network.  Take it with you on a trip  Reconnect to an internet at destination  PC cannot ‘own’ an IP address because the IP addr. is associated with the physical network not the host  Do 137.141.152.35 example in Lons le Saunier

21 © MMII JW RyderCS 428 Computer Networking21 Another Disadvantage  Any class C network that grows beyond 255 hosts must change its class to Class B  Big pain to change  One less Class B network address available Class C (192) 1 1 0 netid hostid 0 1 2 3 4... 8... 16... 24... 31

22 © MMII JW RyderCS 428 Computer Networking22 Largest Flaw  Not entirely apparent until we do routing  Routing is based on internet addresses (IP addr) with netid portion used to make routing decisions  Multi-homed host  Because routing uses the netid portion of IP addr. the path taken to a multi-homed host will depend entirely upon which IP addr. was supplied

23 © MMII JW RyderCS 428 Computer Networking23 Multiple Routes  Multiple names for same host yield packets for same host behaving differently  It may be impossible to reach a dest. even though you know a valid IP addr. Network 1 Network 2 R A B I 1 I 2 I 3 I 4 I 5 I = IP Addr. R = Router B known by two IP addresses

24 © MMII JW RyderCS 428 Computer Networking24 Dotted Decimals  IP Addresses written as 4 decimal integers separated by decimal points  10000000 00001010 00000010 00011110 is 128. 10. 2. 30  Unix netstat command - displays current routing  telnet, ftp - application programs all use dotted decimal notation Class Lowest Addr. Highest Addr. A 0.1.0.0 126.0.0.0 B 128.0.0.0 191.255.0.0 C 192.0.1.0 223.255.255.0 D 224.0.0.0 239.255.255.255 E 240.0.0.0 247.255.255.255

25 © MMII JW RyderCS 428 Computer Networking25 Loopback Address  Not all possible addresses are assigned to classes  127.0.0.0 not used - Class A  Used for loopback - usual addr used is 127.0.0.1  Intended for TCP/IP testing and IPC on local machine

26 © MMII JW RyderCS 428 Computer Networking26 Special Addresses All 0’s This host All 0’s Host Host on this net All 1’s Limited Broadcast (local net) Net All 1’s Directed Broadcast for specific network 127 Anything,often 1 Loopback Limited and Direct Broadcast addresses are never valid source addresses. Length of netid portion of directed broadcast depends on network class. All 0’s only allowed at system start up.

27 © MMII JW RyderCS 428 Computer Networking27 Internet Addressing Authority  Internet Assigned Number Authority (IANA)  Ultimate control over numbers assigned and sets policy  An organization can obtain network addresses from the Internet Network Information Center (INTERNIC)  Only needed to assign network portion of IP Address. Why ???

28 © MMII JW RyderCS 428 Computer Networking28 More IP Addr Stuff  Only necessary to assign IP Addresses to networks which will participate in the Internet  9.0.0.0 = IBM; 12.0.0.0 = AT&T; 10.0.0.0 = ARPANET  See figure 4.5 on page 73  3 networks, what are their classes? How do you know?

29 © MMII JW RyderCS 428 Computer Networking29 IP Address Assignment  See figure 4.6 on page 73  Host computers now attached and IP addresses assigned  4 hosts  Arthur, Merlin, Guenevere, Lancelot  2 routers  Taliesyn, Glatisant  Multi-homed host  Note network IP addresses, remember classes

30 © MMII JW RyderCS 428 Computer Networking30 Network Byte Order  32 bit binary integer; What does it look like in memory ???  Let’s take the hexadecimal number ‘6789ABCD’x  Which one does it look like ?  a) 6789ABCD  b) ABCD6789  c) CDAB8967  d) 8967CDAB  e) None of the above

31 © MMII JW RyderCS 428 Computer Networking31 Network Byte Order  Let’s take the hexadecimal number ‘6789ABCD’x  Which one does it look like ?  a) 6789ABCD (Big Endian)  b) ABCD6789 (Little Endian)  c) CDAB8967 (LE&ByteSwap)  d) 8967CDAB (Just odd)  e) None of the above  Little Endian stores LOB portion of the integer at the lowest address  Big Endian stores HOB portion of the integer at the lowest address

32 © MMII JW RyderCS 428 Computer Networking32 Network Byte Order  With TCP/IP, Network Standard Byte Order is defined to be Big Endian  Most Significant Byte is sent first and down the line  If the architecture of the machine does not match this pattern then it is the responsibility of the TCP/IP developers for that machine to convert data on the way in and out

33 © MMII JW RyderCS 428 Computer Networking33 Internet Routing  Read Chapters 7 & 8  Routing - Process of choosing a path over which to send packets  Router - A computer making such a choice  Goal: “… provide a virtual network that encompasses multiple physical networks and offers a connectionless datagram delivery service.” - Comer

34 © MMII JW RyderCS 428 Computer Networking34 Routers  An internet composed of multiple physical networks interconnected by computers called routers  Router - direct connections to 2 or more physical networks  Host computer - a single, direct connection

35 © MMII JW RyderCS 428 Computer Networking35 Routers  Multi-homed hosts - direct connections to 2 or more physical networks  Both hosts and routers route IP datagrams  Hosts??  Two or more routers on network? Which to send to? Host must make decision  Any computer with multiple network connections can act as a router

36 © MMII JW RyderCS 428 Computer Networking36 Delivery  Direct - Local  Sender encapsulates datagram in a physical frame  Binds dest IP addr to a physical hardware addr  Sends frame to destination  Known local because netid matches host’s netid  Indirect - Between physical networks

37 © MMII JW RyderCS 428 Computer Networking37 Indirect Delivery  Sender must identify a router to send datagram to  Router then forwards it toward its destination  When frame reaches the router  Software extract the encapsulated datagram  IP software selects next router along the path  Datagram again placed in a frame  Sent over physical network to next router

38 © MMII JW RyderCS 428 Computer Networking38 Table Driven Routing  IP Routing Table on each machine  netstat -nr  Want to contain most minimal information at all times  Next hop routing done by using the routing tables  (N, R) pairs  N = netid part of IP addr  R = Next router along path to N

39 © MMII JW RyderCS 428 Computer Networking39 Next Hop Routing  Important - all routers identified in machine M’s routing table are physically located on the same network as M  When a datagram ready to leave M  IP software locates dest IP addr  extracts the network portion to make routing decision  M will select a router which M can directly reach  Hosts have minimal information, rely on routers

40 © MMII JW RyderCS 428 Computer Networking40 Routing Example R Q S 10.0.0.0 20.0.0.0 30.0.0.0 40.0.0.0 10.0.0.5 20.0.0.5 20.0.0.6 30.0.0.6 30.0.0.7 40.0.0.7 20.0.0.0 Direct Delivery 30.0.0.0 Direct Delivery 10.0.0.0 20.0.0.5 40.0.0.0 30.0.0.7 IP Addr Gateway

41 © MMII JW RyderCS 428 Computer Networking41 Consequences  All traffic destined for given network use same path  Even when multiple paths exist, won’t be used  Only final router can determine if dest. host exists or is operational  Need way for routers to return delivery problem errors  Datagrams travelling from A to B may follow a different path from B to A

42 © MMII JW RyderCS 428 Computer Networking42 Default Routes  Especially useful when local network has small set of hosts and 1 connection to internet  2 tests  One for local network  Default that points to default router

43 © MMII JW RyderCS 428 Computer Networking43 Routing Algorithm RouteDatagram (Datagram, RoutingTable) Extract destination IP addr, D, from the datagram and compute the network prefix, N; If N matches any directly connected network address, deliver datagram to destination D over that network (This involves resolving D to a physical address, encapsulating the datagram, and sending the frame) else if the table contains a host-specific route for D send the datagram to next hop specified in the table else if the table contains a route for network N, send datagram to next hop specified in the table else if the table contains a default route, send datagram to the default router specified in the table else declare a routing error


Download ppt "© MMII JW RyderCS 428 Computer Networking1 Reading  Make sure you read all of chapter 2 & 3."

Similar presentations


Ads by Google