230 likes | 420 Views
Review the key networking concepts TCP/IP reference model Ethernet Switched Ethernet IP, ARP TCP DNS. FTP data can be infinitely large, when do we chop it into smaller Units?. Internetworking devices Repeaters: PHY device that restores data and collision signals Hub: Multiport repeater
E N D
Review the key networking concepts • TCP/IP reference model • Ethernet • Switched Ethernet • IP, ARP • TCP • DNS
FTP data can be infinitely large, when do we chop it into smaller Units?
Internetworking devices • Repeaters: PHY device that restores data and collision signals • Hub: Multiport repeater • Bridge: Datalink layer device connecting two or more collision domains (extended LAN). MAC multicasts are propagated throughout the extended LAN • Switch: Multiport bridge with parallel paths • Router: Network layer device. • Network address translator (NAT): Transport layer device. • Gateways: Transport layer or application layer devices
Ethernet • Shared medium LAN technology • Need medium access control • CSMA/CD + binary exponential backoff • Frame format: |Preamble|Start|Dst Addr|Src Addr|length| Data | Pad |Checksum 7 1 6 6 2 0-1500 0-46 4 • Minimum data + pad length: 46 bytes • Maximum data length: 1500 bytes
Fast Ethernet (100Mbps) • Reduce cable length and keep everything else • Duplex mode • Gigabit Ethernet (1000Mbps) • Reduce cable length and increase minimum frame size • Duplex mode
Switched Ethernet • Get dedicated link in Ethernet in a transparent manner. • Issue: the switch needs to know where to forward a packet • How is it accomplished? • Self-learning algorithm to obtain the location of each machine • Forwarding algorithm • Can switched Ethernet take advantage of the dense connectivity in the network topology? • Spanning tree algorithm
IP • Addressing (type, network number, host number) • Class A, Class B, Class C • Classless inter-domain routing • IP address + prefix length e.g. 192.168.0.3/22
IP header format: • Version (4 bits): IPv4, IPv6 • Header length (4 bits): in 32-bit words, min header is 5 words or 20 bytes • Type of service (8 bits): reliability, precedence, delay, and throughput. Used in DiffServ (IP QoS support) • Total length (16 bits): header + data in bytes, total must less than 64 KB. • Identifier (16 bits): uniquely identify the datagram during its life for a given source and destination addess.
IP header format: • Flags (3 bits): more flag, no-fragmentation • Fragment offset (13 bits): in units of 8 bytes • Time to live (TTL): specified in router hops • Protocol: next level protocol to receive the data • Header checksum: 1’s complement sum of all 16 bit words in the header • Source/destination address: original source/destination • Options (variable): Security, source route, record route, timestamp recording • Padding (variable): makes header length a multiple of 4 • Data (variable): data + header <= 65535 bytes.
IP functionality: • Framentation • Addressing • Routing is done by other protocols • IP router • Routing: computes the next hop for each destination. • Forwarding: based on the destination address in an IP packet, forward the packet to the right next hop • Longest prefix matching
Internet Routing protocols • RIP: distance vector algorithm • OSPF: link state algorithm • BGP: path vector algorithm that supports policy based routing
32 bits source port # dest port # sequence number acknowledgement number head len not used Receive window U A P R S F checksum Urg data pnter Options (variable length) application data (variable length) TCP segment structure URG: urgent data (generally not used) counting by bytes of data (not segments!) ACK: ACK # valid PSH: push data now (generally not used) # bytes rcvr willing to accept RST, SYN, FIN: connection estab (setup, teardown commands) Internet checksum (as in UDP)
TCP header • Source port (16 bits): identifies the source process. 20=FTP, 23=Telnet, 80=HTTP. • Destination port (16 bits) • Sequence Number (32 bits): Sequence number of the first byte in the segment. If SYN is present, this is the initial sequence number (ISN) and the first data byte is ISN+1 • ACK number (32 bits): Next byte expected • Data offset (4 bits): number of 32-bit words in header • Reserved (6 bits)
TCP header • Control (6 bits): • URG urgent pointer field significant • ACK: ACK field significant • PSH: push function • RST: reset the connection • SYN: synchronize the sequence number • FIN: no more data from sender • Window (16 bits): wil accept [ack] to [ack+window] • Checksum (16 bits): cover the header plus a pseudo header.
TCP header • Urgent pointer (16 bits): points to the byte following urgent data. • Options (variable): max segment size, window scale factor, etc.
Each computer has a name resolver routine (gethostbyname in UNIX) • Each resolver knows the name of a local DNS server • Resolver sends a DNS request to the server • DNS server either gives the answer, forwards the request to another server, or gives a referral • Recursive query / iterative query • Referral = next server to whom the request should be sent