Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Layer 4-1 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4.

Similar presentations


Presentation on theme: "Network Layer 4-1 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4."— Presentation transcript:

1 Network Layer 4-1 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4 addressing  ICMP  IPv6 4.5 routing algorithms  link state  distance vector  hierarchical routing 4.6 routing in the Internet  RIP  OSPF  BGP 4.7 broadcast and multicast routing Chapter 4: outline

2 Network Layer 4-2 Intra-AS Routing  also known as interior gateway protocols (IGP)  most common intra-AS routing protocols:  RIP: Routing Information Protocol  OSPF: Open Shortest Path First  IGRP: Interior Gateway Routing Protocol (Cisco proprietary)

3 Network Layer 4-3 RIP (Routing Information Protocol)  included in BSD-UNIX distribution in 1982  Distance Vector algorithm  distance (cost) metric: # hops (max = 15 hops), each link has cost 1  DVs exchanged with neighbors every 30 sec via advertisement message  each advertisement: list of up to 25 destination subnets within AS D C BA u v w x y z subnet hops u 1 v 2 w 2 x 3 y 3 z 2 from router A to destination subnets:

4 Network Layer 4-4 RIP: example w x y z A C D B 1 2 3 Destination NetworkNext Router Num. of hops to dest. w A 2 y B 2 z B 7 x -- 1 …. …..... Routing/Forwarding table in D Interface 2 3 2 …

5 Network Layer 4-5 w x y z A C D B dest next hops w - 1 x - 1 z C 4 …. …... A-to-D advertisement RIP: example Routing/Forwarding table in D Destination NetworkNext Router Num. of hops to dest. w A 2 y B 2 z BA 7 5 x -- 1 …. …..... Interface 2 3 3 2 2 …

6 Network Layer 4-6 RIP: link failure, recovery if no advertisement heard after 180 sec --> neighbor/link declared dead  “routes via the dead neighbor” invalidated  new advertisements sent to neighbors  neighbors in turn send out new advertisements (if tables changed)  link failure info quickly propagates to entire net  poison reverse used to prevent ping-pong loops (infinite distance = 16 hops)

7 Network Layer 4-7 RIP table processing  RIP routing tables managed by application- level process called routed (daemon)  advertisements sent in UDP packets, periodically repeated physical link network forwarding (IP) table transport (UDP) routed physical link network (IP) transprt (UDP) routed forwarding table

8 Network Layer 4-8 OSPF (Open Shortest Path First)  “open”: publicly available  uses link state algorithm  LS packet dissemination  topology map at each node  route computation using Dijkstra’s algorithm  advertisements flooded to entire AS  carried in OSPF messages directly over IP (rather than TCP or UDP  IS-IS routing protocol: nearly identical to OSPF  OSPF: IETF Protocol  IS-IS routing: ISO Protocol http://www.enclue.com/library/protocol_isis.html

9 Network Layer 4-9 OSPF “advanced” features (not in RIP)  security: all OSPF messages authenticated (to prevent malicious intrusion)  multiple same-cost paths allowed (only one path in RIP)  for each link, multiple cost metrics can be used  integrated uni- and multicast support:  Multicast OSPF (MOSPF) uses same topology data base as OSPF  hierarchical OSPF in large domains.

10 Network Layer 4-10 Hierarchical OSPF boundary router backbone router area 1 area 2 area 3 backbone area border routers internal routers

11 Network Layer 4-11  two-level hierarchy: local area, backbone area.  link-state advertisements only in an area  each nodes has detailed area topology It only know direction (shortest path) to nets in other areas.  area border routers: “summarize” net info. in own area, advertise to other Area Border routers.  backbone routers: run OSPF routing limited to backbone.  boundary routers: connect to other AS’s. Hierarchical OSPF

12 Network Layer 4-12 Internet inter-AS routing: BGP  BGP (Border Gateway Protocol): the de facto inter- domain routing protocol  “glue that holds the Internet together”  BGP provides each AS a means to:  eBGP: obtain subnet reachability information from neighboring ASs.  iBGP: propagate reachability information to all AS- internal routers.  determine “good” routes to other networks based on reachability information and policy.  allows subnet to advertise its existence to rest of Internet: “I am here”

13 Network Layer 4-13 BGP basics  when AS3 advertises a prefix to AS1:  AS3 promises it will forward datagrams towards that prefix  AS3 can aggregate prefixes in its advertisement Suppose there are four subnets attached to AS3: 138.16.64/24, 138.16.65/24, 138.16.66/24, and 138.16.67/24. Then AS3 aggregate the four prefixes and let BGP to advertise the single prefix to 138.16.64/22 to AS1. AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks  BGP session: two BGP routers (“peers”) exchange BGP messages:  advertising paths to different destination network prefixes  exchanged over semi-permanent TCP connections BGP message BGP message

14 Network Layer 4-14 BGP basics: distributing path information AS3 AS2 3b 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks  using eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1.  1c can then use iBGP do distribute new prefix info to all routers in AS1  1b can then re-advertise new reachability info to AS2 over 1b-to-2a eBGP session  when router learns of new prefix, it creates entry for prefix in its forwarding table. eBGP session iBGP session

15 Network Layer 4-15 Path attributes and BGP routes  advertised prefix includes BGP attributes  prefix + attributes = “route”  two important attributes:  AS-PATH: contains ASs through which prefix advertisement has passed: e.g., AS 67, AS 17 Routing loop eliminated https://training.apnic.net/docs/eROU04_BGP_Attributes.pdf  NEXT-HOP: the router interface that begins the AS-PATH. indicates specific internal-AS router to next-hop AS  Intra-AS routing protocols use the Next-Hop  RIP or OSPF’s network view 3a AS1 1c 1a 1d 1b 2a

16 Network Layer 4-16 Path attributes and BGP routes  Another Role of NEXT-HOP  Can know two peering links  Two routes could have the same AS-PATH to a prefix x, but could have different NEXT-HOP values  Using the NEXT-HOP values and the intra-AS protocol, the router R can determine the cost of the path to each peering link, and then apply hot-potato routing to determine the appropriate interface.

17 Network Layer 4-17 BGP route selection  gateway router receiving route advertisement uses import policy to accept/decline  e.g., never route through AS x  policy-based routing  router may learn about more than one route to destination AS, selects route based on: 1.local preference value attribute: policy decision 2.shortest AS-PATH 3.closest NEXT-HOP router 1.hot potato routing: which one among two or more gateways? 2.Intra-AS routing: which one among two or more interfaces? 4.additional criteria

18 Network Layer 4-18 BGP routing policy  A,B,C are provider networks  X,W,Y are customer (of provider networks)  X is dual-homed: attached to two networks  X does not want to route from B via X to C .. so X will not advertise to B a route to C A B C W X Y legend : customer network: provider network

19 Network Layer 4-19 BGP routing policy (2)  A advertises path AW to B  B advertises path BAW to X  Should B advertise path BAW to C?  No way! B gets no “revenue” for routing CBAW since neither w nor C are B’s customers  B wants to force C to route to w via A  B wants to route only to/from its customers! A B C W X Y legend : customer network: provider network export policy

20 Network Layer 4-20 Why different Intra-, Inter-AS routing ? policy:  intra-AS: single admin, so no policy decisions needed  inter-AS: admin wants control over how its traffic routed, who routes through its net. performance:  intra-AS: can focus on performance  inter-AS: policy may dominate over performance

21 Network Layer 4-21 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4 addressing  ICMP  IPv6 4.5 routing algorithms  link state  distance vector  hierarchical routing 4.6 routing in the Internet  RIP  OSPF  BGP 4.7 broadcast and multicast routing Chapter 4: outline

22 Unicasting, Broadcasting, Multicasting  인터넷 전송 방식  유니캐스팅 (Unicasting): 하나의 송신자가 다른 하나의 수신자로 데이터를 전송하는 방식. 점대점 통신 (one-to-one)  브로드 캐스팅 (Broadcasting): 하나의 송신자가 같은 서브네트웍 상의 모든 수신자에게 데이터를 전송하는 방식.  멀티캐스팅 (Multicasting): 동일한 메시지를 하나이상의 수신자에게 동시에 보내는 방식 (one-to-many). VOD, 인터넷 화상 회의 등의 응용에서 사용. Network Layer 4-22

23 Network Layer 4-23 R1 R2 R3R4 source duplication R1 R2 R3R4 in-network duplication duplicate creation/transmission duplicate Broadcast routing  deliver packets from source to all other nodes  source duplication is inefficient:  source duplication:  network is overloaded  how does source determine recipient addresses?

24 Broadcast Routing  N-way Unicast  Broadcast (and Multicast) Network Layer 4-24

25 Broadcast Address  Definition  An IP address that allows information to be sent to all machines on a given subnet rather than a specific machine.  The standard is laid out in RFC 919.  Local Limited Broadcast Address  255.255.255.255 :  Can be used, during the DHCP (or BOOTP) process, when a host might not know its IP address and subnet mask, and discover DHCP (BOOTP) server  A datagram destined for the limited broadcast address is never forwarded by a router.

26 Broadcast Address  Net-directed broadcast Address  net Id (netid) + host ID (all one) : Router must forward a net-directed broadcast by default –but it must also have an option to disable this forwarding. Class A net-directed broadcast address: netid.255.255.255 Class B net-directed broadcast address: netid.netid.255.255 Class C net-directed broadcast address: netid.netid.netid.255  Subnet-directed Broadcast net ID (netid) + subnet ID (subnetid) + All host IDs (all one) Configuration Method –subnet mask - 255.255.192.0 –IP address - 172.16.148.196 –the bit complement of the subnet mask is 0.0.63.255 –172.16.148.196 OR 0.0.63.255 = 172.16.191.255 Network Layer 4-26

27 Network Layer 4-27 In-network duplication  flooding: when node receives broadcast packet, sends copy to all neighbors  problems: cycles & broadcast storm  controlled flooding: node only broadcasts pkt if it hasn’t broadcast same packet before  node keeps track of packet ids already broadacsted  or reverse path forwarding (RPF): only forward packet if it arrived on shortest path between node and source  spanning tree:  no redundant packets received by any node

28 Network Layer 4-28 A B G D E c F A B G D E c F (a) broadcast initiated at A (b) broadcast initiated at D Spanning tree  first construct a spanning tree  nodes then forward/make copies only along spanning tree

29 Network Layer 4-29 A B G D E c F 1 2 3 4 5 (a)stepwise construction of spanning tree (center: E) A B G D E c F (b) constructed spanning tree Spanning tree: creation  center node  each node sends unicast join message to center node  message forwarded until it arrives at a node already belonging to spanning tree

30 Broadcasting vs. Multicasting  Broadcasting and Multicasting only apply to UDP  The problem with IP broadcasting :  If there are 50 hosts on the cable, but only 20 are participating in the application (Application is designed to use UDP broadcasts), 30 hosts have to process the broadcast, all the way through the UDP layer, before UDP datagram is discarded. UDP datagram is discarded by these 30 hosts because the destination port number is not in use. Network Layer 4-30

31 Multicasting  Multicast group address  Class D Multicast addresses are identified by the pattern “1110” in the first four bits 224.0.0.0 – 239.255.255.255 Host group can locate in multiple networks. Membership in a host group is dynamic.

32 Group Management  Multicast Group Management  IGMP (Internet Group Management Protocol) The IGMP operates between a host and its directly attached router. It provides the means for a host to inform its attached router that an application running on the hosts wants to join a specific multicast group. Network Layer 4-32

33 Four situation of IGMP operation Network Layer 4-33

34 IGMP in Internet-Wide Net  A host in Internet can join a multicast group Network Layer 4-34 Join

35 Network Layer 4-35 Multicast routing: problem statement goal: find a tree (or trees) connecting routers having local multicast group members  tree: not all paths between routers used  shared-tree: same tree used by all group members shared tree source-based trees group member not group member router with a group member router without group member legend  source-based: different tree from each sender to rcvrs

36 Multicast Routing Protocols  IETF Protocols  Distance-Vector Multicast Routing Protocol (DVMRP) – RFC 1075 Source-based  Protocol Independent Multicast (PIM) – RFC 2362 Dense Mode (RFC 3973, PIM-DM) - Source-based Sparse Mode (RFC 3569, RFC 4607, PIM-SM) – Both Shard and Source-based Network Layer 4-36


Download ppt "Network Layer 4-1 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4."

Similar presentations


Ads by Google