Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Layer Lecture # 2 MAHS. 4: Network Layer 4b-2 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables!

Similar presentations


Presentation on theme: "Network Layer Lecture # 2 MAHS. 4: Network Layer 4b-2 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables!"— Presentation transcript:

1 Network Layer Lecture # 2 MAHS

2 4: Network Layer 4b-2 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables! r routing table exchange would swamp links! administrative autonomy r internet = network of networks r each network admin may want to control routing (cost metrics, etc.) in its own network Our routing study thus far - idealization r all routers identical r network “flat” … not true in practice Why?

3 4: Network Layer 4b-3 Hierarchical Routing r Organization: aggregate routers into regions, called “autonomous systems” (AS) r routers in same AS run same routing protocol m “intra-AS” routing (i.e., within an AS) protocol m routers in different AS can run different intra- AS routing protocol r special routers in (on the edge of) an AS r run intra-AS routing protocol with all other routers in AS r also responsible for routing to destinations outside AS m run inter-AS routing (i.e., between AS) protocol with other gateway routers gateway routers

4 4: Network Layer 4b-4 Intra-AS and Inter-AS routing Gateway routers: perform inter-AS routing amongst themselves perform intra-AS routing with other routers in their AS inter-AS, intra-AS routing in gateway A.c network layer data link layer physical layer a b b a a C A B d A.a A.c C.b B.a c b c

5 4: Network Layer 4b-5 Intra-AS and Inter-AS routing Host h2 a b b a a C A B d c A.a A.c C.b B.a c b Host h1 Intra-AS routing within AS A Inter-AS routing between A and B Intra-AS routing within AS B r We’ll examine specific inter-AS and intra-AS Internet routing protocols shortly (section 4.5)

6 4: Network Layer 4b-6 IP datagram format ver length 32 bits data (variable length, typically a TCP segment, a UDP segment, or an ICMP message) 16-bit identifier Header checksum time to live 32 bit source IP address IP protocol version number header length (4-byte multiples) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to (RFC 1700, 3232) head. len type of service DS codepoint, ECN flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit. how much overhead with TCP? r 20 bytes of TCP r 20 bytes of IP r = 40 bytes + app layer overhead

7 4: Network Layer 4b-7 IP Fragmentation & Reassembly r network links have MTU (Max. Transfer Unit) size - largest possible link-level frame. m different link types, different MTUs r large IP datagram is divided (“fragmented”) within network m one datagram becomes several datagrams m “reassembled” only at the final destination m IP header bits are used to identify and order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly

8 4: Network Layer 4b-8 IP Fragmentation and Reassembly ID =x offset =0 More bit =0 bytes* =3980 ID =x offset =0 More bit =1 bytes* =1480 ID =x offset =1480 More bit =1 bytes* =1480 ID =x offset =2960 More bit =0 bytes* =1020 One large datagram becomes several smaller datagrams Note: Offset is actually specified as number of 8-byte (64-bit) units. Example r 4000 byte datagram r MTU = 1500 bytes * This is the number of data bytes in the IP datagram. The IP length field would show this + 20. Why?

9 4: Network Layer 4b-9 DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from network server when it joins a network Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an “on” Support for mobile users who want to join network (more shortly) DHCP overview: m host broadcasts “DHCP discover” msg m DHCP server responds with “DHCP offer” msg m host requests IP address: “DHCP request” msg m DHCP server sends address: “DHCP ack” msg

10 4: Network Layer 4b-10 DHCP client-server scenario 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E DHCP server arriving DHCP client needs address in this network

11 4: Network Layer 4b-11 DHCP client-server scenario DHCP server: 223.1.2.5 arriving client time DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs

12 4: Network Layer 4b-12 NAT: Network Address Translation 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 138.76.29.7 local network (e.g., home network) 10.0.0/24 rest of Internet Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) All datagrams leaving local network have same single source NAT IP address: 138.76.29.7, different source port numbers

13 4: Network Layer 4b-13 NAT: Network Address Translation r Motivation: local network uses just one IP address as far as outside word is concerned: m no need to be allocated range of addresses from ISP: - just one IP address is used for all devices m can change addresses of devices in local network without notifying outside world m can change ISP without changing addresses of devices in local network m devices inside local net not explicitly addressable, visible by outside world (a security plus).

14 4: Network Layer 4b-14 NAT: Network Address Translation Implementation: NAT router must: m outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #)... remote clients/servers will respond using (NAT IP address, new port #) as destination addr. m remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair m incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table

15 4: Network Layer 4b-15 NAT: Network Address Translation 10.0.0.1 10.0.0.2 10.0.0.3 S: 10.0.0.1, 3345 D: 128.119.40.186, 80 1 10.0.0.4 138.76.29.7 1: host 10.0.0.1 sends datagram to 128.119.40, 80 NAT translation table WAN side addr LAN side addr 138.76.29.7, 5001 10.0.0.1, 3345 …… S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 S: 138.76.29.7, 5001 D: 128.119.40.186, 80 2 2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.29.7, 5001, updates table S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 3: Reply arrives dest. address: 138.76.29.7, 5001 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345

16 4: Network Layer 4b-16 NAT: Network Address Translation r 16-bit port-number field: m 60,000 simultaneous connections with a single LAN-side address! r Reserved address space (rfc 1918)rfc 1918 r NAT is controversial: m routers should only process up to layer 3 m violates end-to-end argument NAT possibility must be taken into account by app designers, eg, P2P applications m address shortage should instead be solved by IPv6

17 4: Network Layer 4b-17 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common IGPs: m RIP: Routing Information Protocol (legacy, RIPv2 still in use) m OSPF: Open Shortest Path First (common) m EIGRP: Enhanced Interior Gateway Routing Protocol (proprietary – Cisco Systems)

18 4: Network Layer 4b-18 RIP ( Routing Information Protocol) r Distance vector algorithm r Included in BSD-UNIX Distribution in 1982 m RFC 1058 (version 1), RFC 2453 (version 2) r Distance metric: # of hops (max = 15 hops) m Can you guess why? r Distance vectors: exchanged every 30 seconds via Response Message (also called advertisement) r Each advertisement: routing info for maximum of 25 destination nets within the AS r Uses UDP transport, port 520

19 4: Network Layer 4b-19 Problems/limitations with RIP r Good for small systems, but doesn’t scale well r Count-to-infinity problem… poisoned reverse only r Comparatively slow convergence r 1979 – RIP version 1 r 1988 – IETF initiates work on replacement r 1990 – OSPF became new standard r 1990’s – RIP version 2

20 4: Network Layer 4b-20 OSPF (Open Shortest Path First) r “open”: publicly available r Uses Link State algorithm m LS packet dissemination m Topology map at each node m Route computation using Dijkstra’s algorithm However…. r OSPF advertisement carries only one entry per neighbor router r Advertisements disseminated to entire AS (via flooding) r Sent as payload in IP datagram

21 4: Network Layer 4b-21 EIGRP (Enhanced Interior Gateway Routing Protocol) r CISCO proprietary; successor of RIP (mid 80’s) r uses Distance Vector, like RIP r several cost metrics (delay, bandwidth, reliability, load etc) r uses TCP (!) to exchange routing updates r Loop-free routing via a distributed update routing algorithm (called DUAL) based on diffused computation

22 4: Network Layer 4b-22 Inter-AS routing


Download ppt "Network Layer Lecture # 2 MAHS. 4: Network Layer 4b-2 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables!"

Similar presentations


Ads by Google