Introduction to Computer Networks Tian Song ( 嵩天 ), Ph.D., Assoc. Prof. songtian@bit.edu.cn
Introduction to Computer Networks ICMP, ARP, DHCP, OSPF, BGP Tian Song ( 嵩天 ), Ph.D., Assoc. Prof. songtian@bit.edu.cn
Outline ICMP / ARP / DHCP OSPF BGP 3
Internet Control Protocols Question: Since we already have IP, do we need another protocols? Answer: Yes! IP address < > MAC address, evaluation 4
Basic Idea: ICMP Internet Control Message Protocols Inform hosts and routers when things go wrong, or Send queries to get status information. IP is best effort protocol. Encapsulate control message in normal IP packets Both routers and hosts can respond ICMP. 5
ICMP 6
ICMP tracert and ICMP: tracert (traceroute) is a command to get info. of routers. tracert www.bit.edu.cn tracert cs.bit.edu.cn tracert mit.edu ICMP time exceeded 7
ICMP ping and ICMP: ping is a command to get status of hosts. ping www.bit.edu.cn ping cs.bit.edu.cn ping mit.edu TTL and time ICMP echo & echo reply OS TTL Windows 95/98 32 Linux 64 Windows XP/2k 128 Unix 255 8
Question: ARP How do we find out the hardware address of a host, given its Internet address? or How do we find MAC address by IP address? Observation: Address Resolution Protocol IP packets cannot be forwarded without knowing MAC. 9
ARP Design: Each IP node (host and router) on LAN has ARP tables. ARP tables: IP MAC mapping table arp a command to show ARP table Actually, ARP table has three columns. {IP, MAC, TTL} 10
ARP Two ARP Tables Path 1: IP1 to IP2 Path 2: IP1 to IP6 Broadcast ARP query packet can get MAC info. 11
Question: DHCP If a computer just booted, how it can get its IP address? or, If we know MAC, could we get its IP address? Solution: Dynamic Host Configuration Protocol Static allocation Dynamic allocation: DHCP 12
DHCP DHCP is an application layer protocol 13
TCP/IP Suite 14
IP Routing AS (Autonomous System): An AS is a collection of connected IP routing prefixes under the control of one or more network operators that presents a clearly defined routing policy to the Internet. ASN (AS Number) : Every AS has a unique number, assigned by ICANN. 15
IP Routing Basic Idea: An AS can decide the policy it is favor. An global routing policy among AS is required. Intra AS: Interior Gateway Routing (IGP) Do routing as best as possible (optimal routing) Inter AS: Exterior Gateway Routing (EGP) Do routing by dealing with a lot of politics. Cost, Security, purpose other s problem 16
Intra AS Routing Most known routing protocols: RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gateway Routing Protocol (Cisco) IS IS: Intermediate System to Intermediate System 17
OSPF: Open Shortest Path First Link State Routing Protocol Distance metrics 18
OSPF Hierarchical Routing In an AS 19
OSPF Packet Types 20
Inter AS Routing: BGP Peering ( 对等 ) & Transiting ( 中转 ) 21
Inter AS Routing: BGP BGP: Border Gateway Protocol Basic idea: They are various politics, we cannot do a global routing, only decide neighbor paths. you can reach net A via me AS2 table at R1: dest next hop A R2 AS1 traffic to A R1 BGP R2 A R3 R border router internal router 22
ibgp and ebgp I-BGP IGP: Intradomain routing Example: OSPF R2 IGP R3 AS1 E-BGP AS2 A announce B R1 R border router R4 AS3 R5 internal router B 23
More Details 6 2 3 4 9 2 3 1 Border router Internal router 1. Provide internal reachability (IGP) 2. Learn routes to external destinations (ebgp) 3. Distribute externally learned routes internally (ibgp) 4. Select closest egress (IGP) 24
Conclusion ICMP / ARP / DHCP OSPF BGP 25
End This page is intended blank. 26