180 likes | 312 Views
CSCE 515 : Computer Network Programming. Chin-Tser Huang huangct@cse.sc.edu University of South Carolina. Open Shortest Path First (OSPF). A link-state routing protocol Each router tests status of all its links and broadcasts its link status to all routers on network
E N D
CSCE 515:Computer Network Programming Chin-Tser Huang huangct@cse.sc.edu University of South Carolina
Open Shortest Path First (OSPF) • A link-state routing protocol • Each router tests status of all its links and broadcasts its link status to all routers on network • Use IP to carry its message • Provide features superior to RIP
OSPF Message Format 1 1 2 4 4 2 2 8 ver- sion type packet length router ID area ID checksum auth type authentication data
Autonomous Systems • A collection of networks administered by single entity, e.g. a corporation or a campus • Three categories of AS • Stub AS • Multihomed AS • Transit AS
Example of Autonomous System Source: Internetworking Technologies Handbook by Cisco Press
IGP and EGP • Each AS selects its interior gateway protocol (IGP) for communications between routers in this AS • E.g. RIP, OSPF • Multiple AS’s use exterior gateway protocol (EGP) for communications between routers in different AS’s • E.g. EGP, BGP
Border Gateway Protocol (BGP) • An exterior gateway protocol • Distance-vector protocol but enumerates route to each destination • Allow policy-based routing • Use TCP to transport its messages
Classless Interdomain Routing (CIDR) • Solve two problems • Shortage of class B network IDs • Explosion in routing table size due to allocation of multiple class C network IDs • Summarize multiple IP addresses into a smaller number of routing table entries
Requirements of CIDR • Multiple IP addresses to be summarized need to share same high-order bits • Routing decisions need to be based on 32-bit IP address and 32-bit mask • Routing protocols need to carry 32-bit mask in addition to 32-bit address
Example of CIDR CIDR Block Prefix # Equivalent Class C # of Host Addresses /27 1/8th of a Class C 32 hosts /26 1/4th of a Class C 64 hosts /25 1/2 of a Class C 128 hosts /24 1 Class C 256 hosts /23 2 Class C 512 hosts … /15 512 Class C 131,072 hosts /14 1,024 Class C 262,144 hosts /13 2,048 Class C 524,288 hosts
User Datagram Protocol (UDP) • A datagram-oriented transport layer protocol • Each output operation by a process produces exactly one UDP datagram • Provide no reliability
source port number destination port number UDP length UDP checksum data (if any) UDP Header 0 15 16 31 8 bytes
UDP Checksum • Cover UDP header and UDP data • End-to-end checksum calculated by sender and verified by receiver • Should always be enabled • 16-bit one’s complement sum of header (including a pseudo header) and data is calculated
Computation of UDP Checksum 0 15 16 31 source IP address destination IP address UDP pseudo header zero protocol(17) UDP length source port number destination port number UDP header UDP length UDP checksum data (if any) pad byte(0)
Fragmentation • Need to fragment if size of resulting IP datagram exceeds MTU • Can take place at source or at an intermediate router • Fragments are reassembled at destination
Example of UDP Fragmentation IP header UDP header UDP data 20 8 1473 IP header UDP header IP header 20 8 1472 20 1
ICMP Unreachable Error (Fragmentation Required) 0 7 8 15 16 31 type(3) code(0-15) checksum unused (must be 0) MTU of next-hop network IP header + first 8 bytes of original datagram data
Next Class • UDP • Broadcasting and multicasting • Class MulticastSocket • Read TI Ch. 11, 12, JNP Ch. 22