1. Trang chủ
  2. » Công Nghệ Thông Tin

Part 4: Addressing Resolution & IP Routing ppsx

17 235 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 17
Dung lượng 601,19 KB

Nội dung

PITITHCM- Computer Network dept Internal Using only 1 Computer Network Part 4. Addressing Resolution & IP Routing • ARP • R-ARP/ DHCP • DNS • IP Routing – Concepts & terminologies – Static & dynamic routing – Routing algorithms • Distance vector • Link-state – Routing protocols • RIP • OSPF IP Infrastructure Services IP Infrastructure Services •IP best-effort packet-delivery service – IP addressing and packet forwarding with datagram mode. – Multiplexing accomplished by transport protocols (TCP, UDP) • And how to build on top of the narrow waist –Domain Name System (DNS) for resolution between name and addresses – Dynamic host configuration protocol-DHCP for IP configurations – build on below of the narrow waist: ARP for Destination MAC address •Glue (ARP, R-ARP/DHCP, DNS, ICMP) • Security with end-system/ essential devices protection and data privacy (NAT, firewalls) • And how to get the traffic from internal to external – Internet routing (Intra-domain and inter-domain) Three Kinds of Identifiers for Communication • Host name (e.g., www.cnn.com) – Mnemonic name appreciated by humans – Provides little (if any) information about location – Hierarchical, variable # of alpha-numeric characters • IP address (e.g., 64.236.16.20) –Numericaladdress appreciated by routers/ host – Related to host’s current location in the topology – Hierarchical name space of 32 bits • MAC address (e.g., 00-15-C5-49-04-A9) –Numericaladdress appreciated within local area network – Unique, hard-coded in the adapter when it is built – Flat name space of 48 bits Mapping Between Identifiers • Domain Name System (DNS) – Given a host name, provide the IP address – Given an IP address, provide the host name • Dynamic Host Configuration Protocol (DHCP) – Given a MAC address, assign a unique IP address – Tell host other stuff about the Local Area Network –IP Address –Network Mask – Default Router To automate the boot-strapping process • Address Resolution Protocol (ARP) – Given an IP address, provide the MAC address – To enable communication within the Local Area Network Address Resolution Protocol (ARP) Address Resolution Protocol (ARP) • In order for devices to communicate, the sending devices need both the IP addresses and the MAC addresses of the destination devices. • When they try to communicate with devices whose IP addresses they know, they must determine the MAC addresses. • ARP enables a computer to find the MAC address of the computer that is associated with an IP address. ARP Flowchart Send Data to a device Send Data Send an ARP request Get an ARP reply Is the MAC address in my ARP cache N N Y Y Insert the new record into ARP cache PITITHCM- Computer Network dept Internal Using only 2 197.15.22.33 A.B.C.1.3.3 197.15.22.35 A.B.C.7.3.5 197.15.22.34 A.B.C.4.3.4 A A B B C C ARP operation: ARP request MAC A.B.C.1.3.3 MAC ff.ff.ff.ff.ff.ff IP 197.15.22.33 IP 197.15.22.35 What is your MAC Addr? A Broadcast: who knows the Ethernet address for 197.15.22.35? 10.0.2.1 A.B.C.1.3.3 10.0.2.9 A.B.C.7.3.5 10.0.2.5 A.B.C.4.3.4 A A B B C C ARP Reply and Caching MAC A.B.C.7.3.5 MAC A.B.C.1.3.3 IP 197.15.22.35 IP 197.15.22.33 This is my MAC Addr C reply in Unicast : Yes, I am A.B.C.7.3.5 ARP Table: A.B.C.7.3.5 – 197.15.22.35 R A M R A M 197.15.22.33 A.B.C.1.3.3 197.15.22.35 A.B.C.7.3.5 197.15.22.34 A.B.C.4.3.4 A A B B C C ARP Cache For Creating A Data Frame ARP Table: A.B.C.7.3.5 – 197.15.22.35 MAC A.B.C.1.3.3 MAC A.B.C.7.3.5 IP 197.15.22.33 IP 197.15.22.35 Data Default gateway • In order for a device to communicate with another device on another network, you must supply it with a default gateway. • A default gateway is the IP address of the interface on the router that connects to the network segment on which the source host is located. • In order for a device to send data to the address of a device that is on another network segment, the source device sends the data to a default gateway. A R P R e p l y Default gateway Eo E 1 Reverse-ARP Dynamic addressing • There are a few different methods that you can use to assign IP addresses dynamically: – RARP: Reverse Address Resolution Protocol. – BOOTP: BOOTstrap Protocol. – DHCP: Dynamic Host Configuration Protocol. PITITHCM- Computer Network dept Internal Using only 3 Solutions for dynamic assignment of IP addresses • Reverse Address Resolution Protocol -RARP – Workstations running RARP have codes in ROM that direct them to start the RARP process, and locate the RARP server. – Broadcast a request for the IP address associated with a given MAC address – RARP server responds with an IP address – Only assigns IP address (not the default router and subnetmask) RARP Ethernet MAC address (48 bit) ARP IP address (32 bit) BOOTP • BOOTstrap Protocol (BOOTP) • From 1985 • Host can configure its IP parameters at boot time. •3 services. – IP address assignment. – Detection of the IP address for a serving machine. – The name of a file to be loaded and executed by the client machine (boot file name) – Not only assign IP address, but also default router, network mask, etc. – Sent as UDP messages (UDP Port 67 (server) and 68 (host)) – Use limited broadcast address (255.255.255.255): • These addresses are never forwarded DHCP • Dynamic Host Configuration Protocol (DHCP) –From 1993 – An extension of BOOTP, very similar to DHCP – Same port numbers as BOOTP – Extensions: • Supports temporary allocation (“leases”) of IP addresses • DHCP client can acquire all IP configuration parameters needed to operate – DHCP is the preferred mechanism for dynamic assignment of IP addresses – DHCP can interoperate with BOOTP clients. IP address assignment static addressing and dynamic addressing Dynamic addressing: RARP MAC: Known IP: Unknown MAC: MAC: Known Known IP: IP: Unknown Unknown RARP Request RARP Request RARP Reply RARP Reply RARP server RARP server Dynamic addressing: DHCP MAC: Known IP: Unknown MAC: MAC: Known Known IP: IP: Unknown Unknown DHCP Discover DHCP Discover UDP Broadcast UDP Broadcast DHCP Offer DHCP Offer UDP Broadcast UDP Broadcast DHCP server DHCP server IP1 IP2 IP3 IP IP 1 1 IP IP 2 2 IP IP 3 3 DHCP Request DHCP Request DHCP Ack DHCP Ack Gateway IP of other servers And more … Gateway Gateway IP of other servers IP of other servers And more … And more … IP Address Lease time DHCP sever IP Address IP Address IP Address Lease time Lease time DHCP sever IP DHCP sever IP Address Address PITITHCM- Computer Network dept Internal Using only 4 DHCP Timeline Includes the Lease Time (LT), Renewal Time (T1), and Rebinding Time (T2) Other options (selection) • Other DHCP information that is sent as an option: Subnet Mask, Name Server, Hostname, Domain Name, Forward On/Off, Default IP TTL, Broadcast Address, Static Route, Ethernet Encapsulation, X Window Manager, X Window Font, DHCP Msg Type, DHCP Renewal Time, DHCP Rebinding, Time SMTP-Server, SMTP- Server, Client FQDN, Printer Name, … INIT SELECTING -/DHCPDISCOVER DHCPOFFER/ Process offer REQUESTING Select offer/DHCPREQUEST BOUND DHCPACK/Set T1,T2 DHCPACK/Set T1,T2 DHCPACK/Set T1,T2 RENEWING T1/ Unicast DHCPREQUEST REBINDING T2/Broadcast DHCPREQUEST DHCPNAK/ Stop using IP address DHCPNAK, Lease expires/ Stop using IP address DHCPACK (in use)/ DHCPDECLINE DHCPNAK/ Discard offer DHCP client Behavior Detail PITITHCM- Computer Network dept Internal Using only 5 DHCP Relay Agents • The relay agent function is typically loaded on a router connected to the segment containing DHCP clients • This relay agent device is configured with the address of the DHCP server, and can communicate unicast directly with that server DHCP Relay Agents • Figure 8-11 shows the communication sequence on a network that supports a DHCP relay agent Summary • The function of a subnet mask is to map the parts of an IP address that are the network and the host • Someday IPV4 will be completely obsolete and IPV6 will be the commonly used version • A computer must have an IP address to communicate on the Internet • An IP address may be configured statically or dynamically • A dynamic IP address may be allocated using RARP, DHCP • DHCP supplies more information to a client than BOOTP • DHCP allows computers to be mobile allowing a connection to many different networks • ARP and Proxy ARP can be used to solve address resolution problems DNS Domain Name Service The Domain Name System The Domain Name System •The domain name system is usually used to translate a host name into an IP address and vice versa. • DNS comprises three main elements: – Domain name space – Name servers –Resolver • Domain name space – A hierarchical and logical tree structure – An inverted tree with the root node at the top – Each node has a label- The root node has a null label, written as “.” Name Space vnn vnn com com edu edu gov gov com com edu edu gov gov uk uk fr fr vn vn . . Root www www abc abc • Domain names comprise a hierarchy so that names are unique, easy to remember. •Each host name is made up of a sequence of labels separated by periods. •Examples: – www.abc.edu.vn PITITHCM- Computer Network dept Internal Using only 6 DNS (Name) Servers • DNS name servers with DNS distributed database- indexed by name . – Process of resolving names to IP addresses - resolve forward lookup queries – A reverse lookup query resolves an IP address to a name -resolve reverse lookup queries • a special second-level domain called in-addr.arpa was created. • Name Caching- Name server caching and that the name server caches the query results to reduce the DNS traffic on the network Resolvers/ DNS Clients • A DNS client is called a resolver . Which query name servers about the name space • Resolving Resolution –Recursionrequests the name server to find out the answer (possibly by contacting other servers). – Iteration request the name server response may be a list of other name servers to contact. DNS: System vnn vnn com com edu edu gov gov com com edu edu gov gov uk uk fr fr vn vn . . . . DNS: Database vn vn com com ctt ctt www.ctt.com.vn 203.162.50.100 www 203.162.4.10 203.162.50.1 203.162.0.1 63.63.0.1 www – 203.162.50.100 mail – 203.162.50.101 Lab – 203.160.100.1 www – 203.162.50.100 mail – 203.162.50.101 Lab – 203.160.100.1 ctt – 203.162.50.1 aaa – 203.162.70.201 bbb – 203.160.9.7 ctt – 203.162.50.1 aaa – 203.162.70.201 bbb – 203.160.9.7 DNS: Resolve www.yahoo.com vnn vnn yahoo yahoo com com vn vn . . Address of com server Address of com server Address of yahoo.com server Address of yahoo.com server Address of www.yahoo.com Address of www.yahoo.com Address of www.yahoo.com Address of www.yahoo.com Request Request Request Reply Reply Reply Back… IP Network Infrastructure For Interconnection IP ROUTING OVERVIEW IP Network Infrastructure For Interconnection IP ROUTING OVERVIEW PITITHCM- Computer Network dept Internal Using only 7 Routing overview • Routing is processes of finding the most efficient path • Router with control plane and forwarding plane. – Maintain routing tables / knowing of changes – Datagram processing: • Path determination: – Choose the next hop basing on routing table – Metric bases on bandwidth, hop, delay, load, cost •Packet switching: – re-encapsulates – then switches the packet out that port. » switches the packets to the appropriate interface - Some Routing Concepts (1/2) ¾ Hierarchical routing in structure of ASs, Areas, networks • Autonomous System: a collection of networks that falls under the same administration domain. – Connecting ASs are boundary routers • Areas: – The main units in AS – Include in Networks and Sub-networks – Connecting between areas are border routers – Connecting between networks/ subnetworks in a area are internal routers • Interior Gateway Protocol (IGP): is used for exchanges of routing information by routers located within an autonomous system. – Border routers run interior routing protocol with other border routers • Exterior Gateway Protocol (EGP ): The Exterior Gateway Protocol is used for exchanging routes between two autonomous systems. – Boundary routers run exterior routing protocol with other gateway routers Some Routing Concepts (2/2) 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 Internet: OSPF, IS-IS, RIP Internet: BGP Routing Fundamentals (1/2) • Routing table contain of routing information. • A router learns paths (routes), from the static configuration entered by an administrator or dynamically from other routers, through routing protocols. • Routers keep a routing table in RAM. • A routing table is a list of the best known available routes. • Routers use this table to make decisions about how to forward a packet. Routing Fundamentals (2/2) •Static routing – An administrator manually defines routes to one or more destination networks. •Static routing is not suitable for large, complex networks that include redundant links, multiple protocols, and meshed topologies. •Dynamic routing – used in complex networks must adapt to topology changes quickly and select the best route from multiple candidates. PITITHCM- Computer Network dept Internal Using only 8 Basic Dynamic Routing Methods •Source-based:source gets a map of the network, – source gives a list of routes to reach destination – signals the route-setup (eg: ATM , Frame relay approach) •Hop by Hop: routers determine e best next hop to a destination –Link statewith least-cost path calculated using global knowledge about network • Maps consistent => next-hops consistent •OSPF; BGP –Distance vector:least-cost path calculated in an iterative, distributed manner • begins with a cost of the directly attached links • info exchange with the neighbouring nodes • RIP; IGP Approaches to Routing – Distance-vector • Each node (router or host) exchange information with adjacent nodes (nodes directly connected to same network) • Node maintains vector of link costs for each directly attached network and distance and next-hop vectors for each destination • Bellman Ford Algorithm used by Routing Information Protocol (RIP) • Requires transmission of lots of information by each router – Distance vector to all neighbors – Contains estimated path cost to all networks – Changes take long time to propagate Static Routing and Dynamic Routing Routing Fundamentals • Routing table contain of routing information. • A router learns paths, or routes, from the static configuration entered by an administrator or dynamically from other routers, through routing protocols. • Routers keep a routing table in RAM. A routing table is a list of the best known available routes. Routers use this table to make decisions about how to forward a packet. ARP tables and Routing tables Static Routing _ Static routing is useful in networks that do not have multiple paths to any destination network. _ Administrators often configure static routes on access routers that connect stub networks. Stub networks have only one way in and one way out. _ Router(config)# ip route destination-prefix destination-prefix-mask {next address | interface } [ distance ] PITITHCM- Computer Network dept Internal Using only 9 Static routing Static routing also is used by security reason. Static routing is not suitable for large, complex networks that include redundant links, multiple protocols, and meshed topologies . Routers in complex networks must adapt to topology changes quickly and select the best route from multiple candidates. Therefore, dynamic routing is the better choice. Dynamic routing • Routers use metrics to evaluate, or measure, routes. • When multiple routes to the same network exist and the routes are from the same routing protocol, the route with the lowest metric is considered the best . • Each routing protocol calculates its metrics differently. Due to Routing protocol’s criteria, as: Bandwidth; Delay; Load; Reliability; MTU… Routing Protocol • Routing protocols allow routers to choose the best path for data from source to destination. • Functions includes the following: – Provides processes for sharing route information. – Allows routers to communicate with other routers to update and maintain the routing tables Composite Routing metrics • Bandwidth – The data capacity of a link. • Delay – The length of time required to move a packet along each link from source to destination. • Load – The amount of activity on a network resource such as a router or a link. • Reliability – Usually a reference to the error rate of each network link. Default Route • Default routes are used when the router cannot match a destination network with a specific entry in the routing table. The router must use the default route, or the gateway of last resort, to send the packet to another router. •Using default routes keep routing tables small is a key scalability feature. They make it possible for routers to forward packets destined to any Internet host without having to maintain a table entry for every destination network. • Default routes can be statically entered by an Admin or dynamically learned through a routing protocol. Finding path Algorithms Distance Vector & Link State PITITHCM- Computer Network dept Internal Using only 10 Routing vs. Forwarding  Forwarding: select an output port based on destination address and routing table Data-plane function Often implemented in hardware  Routing: process by which routing table is built and maintained  so that the series of local forwarding decisions takes the packet to the destination with high probability, and reachability condition.  the path chosen/resources consumed by the packet is efficient in some sense (optimality and filtering condition)  Control-plane function  Implemented in software Interconnection Devices H H B H H Router Extended LAN =Broadcast domain LAN= Collision Domain Network Datalink Physical Transport Router Bridge/Switch Repeater/Hub Gateway Application Network Datalink Physical Transport Application Routing problem • Collect, process, and condense global state into local forwarding information • Global state – inherently large –dynamic – hard to collect • Hard issues: – Consistency+ completeness (convergence time), scalability (interior / exterior ) –Impact of resource needs of sessions Consistency •Defn: A series of independent local forwarding decisions must lead to connectivity between any desired (source, destination) pair in the network. • If the states are inconsistent, the network is said not to have “ converged ” to steady state (I.e. is in a transient state) – Inconsistency leads to loops , wandering packets etc – In general a part of the routing information may be consistent while the rest may be inconsistent. –Large networks => inconsistency is a scalability issue. • Consistency can be achieved in two ways: – Fully distributed approach: a consistency criterion or invariant across the states of adjacent nodes – Signaled approach: the signaling protocol sets up local forwarding information along the path (SS7; RSVP…). Completeness • Define: The network as a whole and every node has sufficient information to be able to compute all paths. – In general, with more information available locally, routing algorithms tend to converge faster, because the chances of inconsistency reduce. – But this means that more distributed state must be collected at each node and processed. – The demand for completeness also limits the scalability of the algorithm. • Since both consistency and completeness pose scalability problems, large networks have to be structured hierarchically and abstract entire networks as a single node. Global & decentralized routing algorithms 1. Global routing algorithm • least-cost path calculated using global knowledge about network •input:connectivity between all nodes & link costs • Link state algorithms 2. Decentralized routing algorithm • least-cost path calculated in an iterative, distributed manner • no node has complete info about the costs of all network links • begins with a cost of the directly attached links • info exchange with the neighbouring nodes • Distance vector algorithms [...]... destinations • 4 Routing table = next-hops of these paths • 5 Hierarchical routing: organization of areas, and filtered control plane information flooded Hierarchical routing protocols • The Internet uses hierarchical routing – it is split into Autonomous Systems (AS) • routers at the border: gateways • gateways must run both intra & inter AS routing protocols – routers within AS run the same routing algorithm... people's use of a connection by Ips, though “gateways” have for the most part nullified that feeble attempt • Hiding internal topology and services to outside • Maps Internet IP Addresses to Private LAN IP Addresses Internal Using only NAT- Functions • Many-to-one NAT (Dynamic NAT) – Maps many private LAN IP Addresses to a single Internet address or a pair of public IP address and port number – Dynamic... entire configuration – Can calculate shortest path to each destination network • Router constructs routing table, listing first hop to each destination • Router does not use distributed routing algorithm – Use any routing algorithm to determine shortest paths – In practice, Dijkstra's algorithm Approaches to Routing – Distance-vector • Each node (router or host) exchange information with neighboring nodes... algorithm • the administrator can chose any Interior Gateway Protocol – Routing Information Protocol (RIP) – Open Shortest Path First (OSPF) – between AS gateways use Exterior Gateway Protocol • Border Gateway Protocol (BGP) Internal Using only Firewall IP Network Infrastructure for protecting internal network 15 PITITHCM- Computer Network dept IP Network Infrastructure for Security- Firewall • A firewall is... metric changes on a link, a router immediately sends out an update without waiting for the end of the update period • Full Routing Table Update: Most distance vector routing protocol send their neighbors the entire routing table (not only entries which change) • Route invalidation timers: Routing table entries are invalid if they are not refreshed A typical value is to invalidate an entry if no update is... Horizon with Poisoned Reverse • Solution 1: – Always advertise the entire path in an update message (Path vectors) – If routing tables are large, the routing messages require substantial bandwidth – BGP uses this solution Report “split-horizon” routes as infinity to break loops on the first routing exchange A B C D E – Insight: It’s not useful to claim reachability for a destination to the neighbor from... as: – Packet Filter – NAT – Proxy • Functions: – Blocking & permitting traffic – Enabling secure remote connections (VPN) – Content filtering (blocking): viruses, attacks – Logging traffic Packet Filtering (2/2) • Packet filtering rules mostly based on: – IP protocol (UDP, TCP, …) Packet Filtering (1/2) • Filtering based on network layer of the IP stack • Default permit or default deny design • A good... capabilities – Source IP address – Destination IP address – Source/Destination port (socket) firewall – Connection state (TCP: SYN, RST, established,… or e.g FTP states) filters the traffic it can be a dual-homed gateway or a simple packet filter – screening router – Incoming/outgoing interface – etc Internal network NAT - Network Address Translation • Solving limited number of publish IP addresses available... 10.0.5.0 10.0.4.1 10.0.4.1 - 2 1 0 0 t=3: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 10.0.4.1 10.0.4.1 10.0.4.1 - 3 2 1 0 0 Now, routing tables have converged ! The count-to-infinity problem Characteristics of Distance Vector Routing • Periodic Updates: Updates to the routing tables are sent at the end of a certain time period A typical value is 90 seconds via 2 Router B t=2: 10.0.1.0 10.0.2.0 10.0.3.0... makes it difficult for someone outside the network to monitor individual usage patterns • One-to-one NAT (Static NAT) – Maps one private IP Address to one Internet IP Address – This allows an internal host, such as a Web server, to have an unregistered (private) IP address and still be reachable over the Internet 16 PITITHCM- Computer Network dept Application Gateway- Proxy NAT Inside Outside 10.4.4.5 . only 1 Computer Network Part 4. Addressing Resolution & IP Routing • ARP • R-ARP/ DHCP • DNS • IP Routing – Concepts & terminologies – Static & dynamic routing – Routing algorithms •. server DHCP server IP1 IP2 IP3 IP IP 1 1 IP IP 2 2 IP IP 3 3 DHCP Request DHCP Request DHCP Ack DHCP Ack Gateway IP of other servers And more … Gateway Gateway IP of other servers IP of other servers And. Link-state – Routing protocols • RIP • OSPF IP Infrastructure Services IP Infrastructure Services IP best-effort packet-delivery service – IP addressing and packet forwarding with datagram mode. – Multiplexing

Ngày đăng: 05/07/2014, 00:20

TỪ KHÓA LIÊN QUAN