730 likes | 888 Views
ICS 156: Networking Lab. Magda El Zarki Professor, ICS UC, Irvine. Course Outline. Ch 1: Introduction Ch 2:Bridges Ch 3:Routers Ch 4: Transport Protocols. Ch. 1 Introduction (1/2). Layered Architectures The TCP/IP (or Internet) Architecture A Networking Example IP Addressing
E N D
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine
Course Outline • Ch 1: Introduction • Ch 2:Bridges • Ch 3:Routers • Ch 4: Transport Protocols
Ch. 1 Introduction (1/2) • Layered Architectures • The TCP/IP (or Internet) Architecture • A Networking Example • IP Addressing • Packet Encapsulation • Port Numbers • Internet Standards • 802.3/Ethernet • IP
Ch 1. Introduction. (2/2) • Address Resolution Protocol • Internet Control Message Protocol • Ping • Traceroute
1.1 Layered Architectures • Networking protocols are developed in layers so as to simplify the task of 1) developing new services and 2) upgrading and maintaining the system. • Each layer performs a well defined function. The internals of a layer can be changed without affecting the neighboring layers. • Layers exchange information via clearly specified interfaces. • Layers communicate on a peer to peer basis.
The 5 Basic Layers • Layer 1: Physical Layer - mechanical and electrical network interface definitions • Layer 2: Data Link Layer - framing, data transparency, error control over one link/trunk • Layer 3: Network Layer - routing, addressing, call set-up and clearing across the data network, flow control (internal and external) • Layer 4: Transport Layer - end-to-end message transfer, connection management, error control • Layer 5: Application Layer – user processes
Ch. 1 Introduction • Layered Architectures • The TCP/IP (or Internet) Architecture • A Networking Example • IP Addressing • Packet Encapsulation • Port Numbers • Internet Standards • 802.3/Ethernet • IP
Ch. 1 Introduction • Layered Architectures • The TCP/IP (or Internet) Architecture • A Networking Example • IP Addressing • Packet Encapsulation • Port Numbers • Internet Standards • 802.3/Ethernet • IP
Ch. 1 Introduction • Layered Architectures • The TCP/IP (or Internet) Architecture • A Networking Example • IP Addressing • Packet Encapsulation • Port Numbers • Internet Standards • 802.3/Ethernet • IP
1.4 IP Addressing • Every device on an internet must have a unique address (just like everyone on the phone network has a unique telephone number!). • Each network element and attached host has two addresses: • Physical Address and Network Address
1.4.2 Addresses and Names • The physical address is generally a flat address whereas the network address is generally hierarchical. • The network address is referred to as an IP address, and is the address of the network interface. • In addition to network addresses, hosts are often given a name too. The name makes it easier for people to remember. They are generally hierarchical too, identifying subnet and net where host is located.
Multiple addresses per Device • A network device that connects to several networks, will have a network address for each network it is connected to and it will also have a physical address per network interface. • A Router is a perfect example of a device that has more than one network address.
1.4.3 Address Mapping • Tables map names to network addresses. Domain Name Servers are used to help find adresses. • Tables also map network addresses to physical addresses. If a physical address is not found in the table, a protocol is used to locate the host and obtain its physical address (ARP and RARP).
1.4.4 Structure of IP Addresses • IPv4 uses 32 bits for addressing, whereas IPv6 has assigned 128 bits. • Both IPv4 and IPv6 have a particular structure for their address space: it is partially hierarchical, it has an internet routing part and a local routing part. • Subnet addressing was introduced to facilitate the routing and administration within organizations. If forms part of the local part and does not affect the internet routing. • IPv4 has 5 address classes. An organization is assigned an address space in a class based upon its size.
1.4.6 Addressing Formats • IP addresses are represented in dotted decimal format. Each 8 bits (byte) is represented by a decimal number. The 4 bytes are separated by dots: • 00001010 00000000 00000000 00000000 = 10.0.0.0 = Class A, net ID: 10 • 10000000 00000011 00000010 00000011 = 128.3.2.3 = Class B, net ID: 128.3, host ID: 2.3 • 11000000 00000000 00000001 11111111 = 192.0.1.255 = Class C, net ID: 192.0.1, host ID: all hosts (broadcast)
Ch. 1 Introduction • Layered Architectures • The TCP/IP (or Internet) Architecture • A Networking Example • IP Addressing • Packet Encapsulation • Port Numbers • Internet Standards • 802.3/Ethernet • IP
1.5 Encapsulation • User data -> application header/trailer -> TCP (or UDP) header/trailer -> IP header/trailer -> data link layer header (e.g. Ethernet header)/trailer. • When the TCP/UDP header is attached the packet is called the TCP/UDP segment. • When the IP header is attached it is referred to as the IP datagram. • When the data link layer header is attached, it is called the link frame (e.g., Ethernet frame)
Ch. 1 Introduction • Layered Architectures • The TCP/IP (or Internet) Architecture • A Networking Example • IP Addressing • Packet Encapsulation • Port Numbers • Internet Standards • 802.3/Ethernet • IP
1.6 Port Numbers • TCP and UDP use port numbers to identify the application. • The port numbers are 16 bits. • Servers are assigned well known port numbers, e.g., FTP is assigned TCP port number 21, telnet is assigned TCP port number 23. • These port numbers are assigned by the Internet Assigned Numbers Authority (IANA). • Ports 1 to 1023 are all well known (listed in /etc/services). • Clients are allocated ephemeral port numbers between 1024 and 5000. They are short lived.
Ch. 1 Introduction • Layered Architectures • The TCP/IP (or Internet) Architecture • A Networking Example • IP Addressing • Packet Encapsulation • Port Numbers • Internet Standards • 802.3/Ethernet • IP
1.7 Internet Standards • The Internet is run by several standards organizations. • The Internet Engineering Task Force (IETF) is responsible for near term planning and develops the specifications that become the Internet standards. • The Internet Research Task Force (IRTF) is responsible for long term planning. They do not produce any standards. • The Internet Architecture Board (IAB) oversees the work of the IETF and IRTF. It makes sure that all the standards are coherent and correct before final approval. • The Internet Society (ISOC) is responsible for the overall growth and global reach of the Internet. It oversees the IAB.
1.7.1 Request for Comments (RFCs) • All Internet related standards are published as RFCs. • An RFC index indicates the latest version of an RFC. • An RFC, called the IAB Official Protocol Standards, specifies the status of all the RFCs, i.e., whether or not it is a standard, and what its recommendation is.
The meaning of RFCs • Each protocol has a standardization state: standard, draft standard, proposed standard, experimental, informational, or historic. • Each protocol also has a requirement level: required, recommended, elective, limited use or not recommended.
Ch. 1 Introduction • Layered Architectures • The TCP/IP (or Internet) Architecture • A Networking Example • IP Addressing • Packet Encapsulation • Port Numbers • Internet Standards • 802.3/Ethernet • IP
1.8 Ethernet/802.3 • LAN Architecture • Topology • CSMA/CD Media Access Control (MAC) • The Frame: Format and Structure and Uses.
1.8.1 The 802.3 and Ethernet Architectures • Ethernet only consists of one single layer, the Media Access Control (MAC) layer • IEEE 802.3 has two sublayers: • The Media Access Control sub-layer (MAC): responsible for gaining access to the shared medium. It is topology dependent. • The Logical Link Control sub-layer (LLC): responsible for reliable communications over a LAN and provides a unified interface to the network layer, i.e., hides the underlying LAN from the upper layers.
Slight Differences in Format • Ehternet was developed by Xerox in the late 70’s and was so popular that it developed into the IEEE 802.3 standard. • Ethernet and 802.3 are very similar except for the LLC sublayer and one field in the header. The length field in 802.3 is used for packet type in Ethernet. The type field in 802.3 is contained in the 8 extra bytes of header of the LLC. • The IEEE 802.3 standard refers to a whole family of CSMA/CD systems that range from 1 to 10Mbps on various media.
1.8.3 The MAC: Based on CSMA/CD • A broadcast bus - stations transmit in both directions • Stations sense the channel before they transmit • When channel is sensedidle they transmit • Stations listenwhile transmitting • Two stations or more could start transmission at approx. the same time -> a collision results
CSMA/CD • When a collision is detected, stations abort their transmission. Note only transmitting stations can detect a collision (compare signal they detect on the bus to what they are sending)! • Stations involved in the collision wait a random period of time and repeat the process starting with 2 above.
Operation of CSMA/CD2/2 • The vulnerable period on the bus is defined as the time from when a station transmits its first bit to the time when the furthest station on the bus has sensed the transmission (the worst case is one propagation delay on the bus, related to the two stations attached to the end points of the bus). • A contention period consists of: one propagation delay for vulnerable period plus another propagation delay for the transmitting station to detect the collision (worst case!).
1.8.4 Types of CSMA/CD • When channel is sensed busy, stations wait till it becomes idle and then schedule their transmission. If length of busy period is long, several stations could become active during that period and a collision becomes inevitable when the channel becomes idle again. This is called persistentCSMA/CD. (IEEE 802.3 and Ethernet) • Non persistent CSMA/CD has stations wait a random period whenever the channel is sensed busy, i.e, not grab it immediately it becomes available. Non persistent gives better throughput under heavy loading, persistent gives better throughput under light loads.
Frame Fields (1/2) • Preamble is 7 bytes of 10101010 and Start of Frame is 10101011 • Addresses: • first bit =1 -> group address - multicast, • all address bits 1’s -> broadcast to whole system, • second bit =1 -> global address - set by IEEE, • second bit =0 local address set by network administrator.
Frame Fields 2/2 • Length field used by 802.3 standard, packet type field used by Ethernet, indicates whether network layer is IP, IPX, AppleTalk, etc. In 802.3 the type field is included in the LLC header. • Data field can be anywhere from 0 to 1500 bytes. • PAD field used by MAC to make ensure that minimum frame length is 64 bytes. (when data =0bytes, pad =46 or 38 bytes)
Frame Requirements • Why do we need a minimum length? Minimum length of 64 bytes guarantees that frame length will be 51.2 microsecs. This is the maximum roundtrip delay that can be incurred on an 802.3 LAN operating at 10Mbps, 2.5Km long and using 4 repeaters (introduce approx. a 20 bit delay) and includes a safety factor to makeup for node detection delays. Recall that collision detection takes at least two roundtrip delays for worst case scenario! If a station transmits a shorter frame, it will have terminated its transmission before discovering that it was involved in a collision. • Checksum used to detect errors (discarded)
1.8.5 Collisions • When a collision is detected by the transmitting station it aborts its transmission and transmits a JAM signal. This signal is 32-48 bits long. • The NIC then computes a random wait period according to the following algorithm (binary exponential backoff): • After n collisions, choose K at random from {0,1,2,3,...,2m-1}, wherem = min{n,10}. The node waits K x 512 bit times before scheduling a transmission.
Ch. 1 Introduction • Layered Architectures • The TCP/IP (or Internet) Architecture • A Networking Example • IP Addressing • Packet Encapsulation • Port Numbers • Internet Standards • 802.3/Ethernet • IP
1.9 The Internet Protocol - IP • Provides connectionless service - Datagram • It has evolved over time, currently version 6 is being deployed (IPv6). • The IP layer is responsible for routing over subnets. It operates end to end over a subnet. • Routers are devices that operate at layer 3 and are used to interconnect subnets. They are responsible for routing.