ADM4378 CHAPTER 5
Classfull Addressing Address range
- Addresses are assigned into a particular class by the value of the first byte (the original standard used the term "octet" to mean a "byte," so you may see documents using the term "octet"). - The first byte can be any number from 0 to 255, excluding 0 itself
Datagram lifetime
- Datagrams could loop indefinitely - Consumes resources - Transport protocol may need upper bound on datagram life - Datagram marked with lifetime - Time To Live field in IP - Once lifetime expires, datagram discarded (not forwarded) - Hop count: Decrement time to live on passing through a each router - Time count: Need to know how long since last router
Types of addresses
- Each computer has several addresses, each used by a different layer. - The translation of addresses from application to netwotk to data link is address resolution - Users type in an Application layer address (www.uottawa.ca) and the request is formatted into an application layer packet using HTTP and is sent to the network layer - The network layer translates the application layer address into a Network layer address using TCP/IP protocol. Here the application layer address is translated into an IP address (if IPV4, then it will be 32 bits) - Network layer will find the best route to get to the final destination and will find the data link address. If the data link address is running on ethernet net, the IP address will be converted into an ethernet address. - MAC address is stored on the hardware of a computer (network card) uniquely identifies it from every other computer in the world. - IP address ending in 0 represents a network address
IPV6 Specficiations
- Extended Address Space (128-bit addressing instead of 32-bit used in IPv4). - IPv6 uses 128-bit addresses: - 3.2 x 1038 addresses, a very large number - Little chance this address space will ever be used up - Simpler packet header (optional fields are separated from original header). - Improved support for resource allocation, packet labeling and special delivery. - Use of Flow Label and Traffic Class - Increased performance and speed.
Internet Protocol (IP)
- IP is the network layer protocol in TCP/IP protocol suit. - Provides a best-effort connectionless service (like postal system). - Provides no error checking or tracking and no flow control. - Responsible for addressing and routing of packets Two versions IPv4: uses 32-bit addresses. uses decimals to express addresses (e.g., 128.192.55.72) by breaking the address into four bytes IPv6: larger address space (128-bit addresses) uses hexadecimal IP packets are also called datagram.
Why subnet masks exists
- It is not efficient for all users to use the same network - Enable every computer on TCP/IP network to determine which computers are on the same subnet (i.e., LAN) that it is on and which computers are outside of its subnet
How does segmentation work?
- Only application data that is too large must be broken down into smaller frames - Application layer only is responsible for sending one large block of data - Data link layer can only transmit data of certain lengths - Transportation layer must segment data for the data link layer to send across the circuit ** at the receiver end, the transportation layer will assemble the segments back together agian
subnet mask (network address)
- is created by dividing the host ID into subnet ID and host ID - 0 indicates that byte is not part of the subnet - Used to make it easier to separate the subnet part of the address from the host part. - Network Administrators use subnet masks to define how many bits are allocated for hosts. *** -Customary to use the first 3 bytes to indicate subnet mask (192.123.5.X) however it is not required - If network was configured to use only the first two btyes to indicate subnet mask, IP address of 128.184.22.33 would be on the same subnet as 128.184.78.90.
IP address broken into 3 parts
1. Network address (assigned by ICANN) 2. Subnet (assigned by network managers or programs and placed in config files) 3. host ID
Why is IPV4 being replaced by IPV6
1. Providing more address space - Two level addressing (network and host) wastes space - e.g., Indiana University: uses a Class A IP address space (65,000 addresses; many more than needed) - Network addresses used even if not connected to Internet - Growth of networks and the Internet and Extended use of TCP/IP 2. Requirements (e.g. Quality of Services) for new types of service - IPv6's simpler packet structure makes it easier to perform routing and supports a variety of new approaches to addressing and routing.
loopback
127 address range is reserved for a computer to communicate with itself
Routing Information Protocol (RIP)
A distance vector interior routing protocol - Once popular on Internet; now used on simple networks - Operations: •Routing tables broadcast periodically (every minute or so) by all nodes •When a new node added, RIP counts number of hops between routers and updates routing tables
PDO (Protocol Data Unit)
A single unit of information consisting of protocol and user data
How to get the network address from ADD opertion of subnet and IP address
AND operator means # in subnet and IP address must be 1. If either of them have a 0, hen network address will also have a 0
TCP connections
Before any data packet is sent, a connection is established •Use SYN packet to establish connection •Use FIN packet to close the connection Handling of HTTP packets •Old version (HTTP 1.0): •a separate TCP connection for each HTTP Request •Newer version (HTTP 1.1): •Open a connection when a request (first HTTPP Request) send to the server •Leave the connection open for all subsequent HTTP requests to the same server •Close the connection when the session ends
Traffic Shaping: The Leaky Bucket Algorithm
Bursts are completely eliminated: packets are passed to the network when available, and all at the same rate.
Network Congestion
Congestion occurs when too many packets try to access the same buffer pool in a switch. If the incoming rate is larger than the outgoing rate, the delay and queue length will increase without bound. Impact on throughput: • Limited Buffer size leads to Packet dropping. • Long delays results in retransmission. • In worst case, the only traffic in the network will consist of retransmissions = Zero Throughput.
Criteria for selection of a route
Distance (minimum number of hops), total cost, delay.
Dynamic Routing Algorithms
Distance-vector and Link-state
routing table
Each router has a routing table that specifies how messages will travel through the network is a two-column table. The first column lists every network or computer that the router knows about, and the second column lists the interface that connects to it.
Routing
Finding a path from source to destination in a packet-switched network.
Dynamic Addressing
Giving addresses to clients (automatically) only when they are logged in to a network •Eliminates assignment of permanent addresses to clients •When the computer is moved to another location, its new IP address is assigned automatically •Makes efficient use of IP address space
Network Layer Address (IP address)
Has 32 bits, 4 bytes (each byte has 8 bits) •Assigned by network managers, or by programs such as DHCP, and placed in configuration files •Every network on the Internet is assigned a range of possible IP addresses for use on its network •Servers have permanent addresses, clients usually do not This IP address that the corporation has received from ICANN must be assigned to specific computers on the network The first part of the address defines the network, and the second part of the address defines a particular computer or host on the network. (if no subnet exists)
Message Moving Through Layers
Host Computers •Packets move through all layers Gateways, Routers •Packet moves from Physical layer to Data Link Layer through the network Layer At each stop along the way •Ethernet packets is removed and a new one is created for the next node •IP and above packets never change in transit (created by the original sender and destroyed by the final receiver)
Subnet address
IP address + subnet mask
Who decides which IP form should be used?
Interestingly, it is not the transport layer that decides whether TCP or UDP is going to be used. This decision is left to the engineer who is writing the application.
Internet Addresses
Managed by ICANN •Internet Corporation for Assigned Names and Numbers •Manages the assignment of both IP and application layer name space (domain names) •Both assigned at the same time and in groups •Manages some domains directly (e.g., .com, .org, .net) •Authorizes private companies to become domain name registrars as well Example: Indiana University •URLs that end in .indiana.edu and iu.edu •IP addresses in the 129.79.x.x range (where x is any number between 0 and 255)
TCP (Transmission Control Protocol)
Most common protocol suite developed in 1974 by Vinton Cerf and Bob Kahn •As part of Arpanet (U.S. Department of Defense) Provides reliable, ordered, and error-checked delivery of a stream of packets on the internet. TCP is tightly linked with IP. Destination port: tells the TCP software at the destination which application-layer program to go to Links the application layer to the network layer Performs packetization and reassembly reliabily: 1. Breaking up a large message into smaller packets (Each segment cannot exceed 64Kbytes) 2. Numbering the packets and 3. Reassembling them at the destination end using the sequence number E.g. www, email
Elements of Routing mechanism
Network Information Source: None, Local, Adjacent Node, Node along the route, All nodes. Network Information Update Timing: Continuous, Periodic, Major Load Change, Topology Change. Performance Criteria: Number of hops, Cost, Delay, Throughput Routing Decision Place: Each node (Distributed), Central Node (Centralized), Originating Node (Source)
packets
Network layer PDUs
Routing Protocols
Note the distinction between routing in an autonomous system, and between Autonomous Systems: lInterior Gateway Routing Protocol (IGP) Intra-AS routing is concerned with getting packets from source to destination. It should do this as best as possible (optimal routing). lExterior Gateway Routing (EGP) Inter-AS routing has to deal with policies and reachability (Example: Do not accept packets from AS#1. Do not travel across AS#2).
MAC Address Resolution
Problem: •What is the MAC address of the node whose IP address is known? Solution: •Uses Address Resolution Protocol (ARP) Operation: •Broadcasts an ARP message to all nodes on a LAN asking which node has a certain IP address •Host with that IP address then responds by sending back its MAC address •Stores this MAC address in its address table •Sends the message to the destination node
UDP - User Datagram Protocol
Protocol used for connectionless routing in TCP/IP suite (no acks, no flow control) Uses only a small packet header containing 4 fields: •Source port •Destination port •Message length •Header checksum Commonly used for applications where error checking is not required (e.g. Voice transmission) Unreliable delivery Reduced overhead
User Datagram Protocol (UDP)
Provides a lightweight service for connectionless data transfer without error detection and correction E.g. VOIP
Routing Strategies
Random (Hot Potato): Send the packet randomly to a neighbor except the one from which it was received. Flooding: Send the packet to every neighbor (except the one from which it was received) until it reaches the destination. Static: Choose a route in advance and don't change it with network conditions. Example: Source Routing (the path from source to destination is specified by source, the packet carries that information with itself, and travels through that path) Dynamic (Adaptive ): Monitor network conditions and find the optimal path on the fly. Notes: - Flooding and random routing are simple to implement. Adaptive routing requires lots of processing power. - Flooding does not require any network topology information. - Adaptive routing optimizes the use of network resources.
TCP Congestion Control Mechanism
Receiver broadcasts an advertised window. Sender keeps a congestion window, and transmits at the minimum of advertised and congestion windows. Three-Phase operation: 1. Slow Start (increase the congestion window exponentially) 2. Congestion Avoidance (increase the congestion window linearly) 3. Congested (reduce the congestion window to half, then to one segment.
Buffering
Reducing jitter as much as possible by buffering incoming packets at the receiver before passing them to the application (Smoothing the stream by buffering packets).
How Domain Name Service works
Resolving name server must communicate with the following three severs in order: 1. Root server 2. Top level domain server (.com,.edu,.gov) 3. Authentication server
How are incoming packets delievered?
The application layer software has 2 options to choose from: - all packets are held until delievered at the same time (email) - packets are delievered one at a time (web pages)
datagram
UDP PDU Single packet of information sent using UDP e.g. for a domain name service (DNS) request only four fields (8 bytes of over- head) plus the application layer packet: source port, destination port, length, and a CRC-16.
Address resolution
When addresses are translating from one layer to another E.g. application address to IP address (network layer) to MAC address (data link layer)
How does the Transportation ensure packets are going to the right applications?
With TCP, each application layer software package has a unique port address - 2-byte each (source, destination) Application layers tell's TCP software its own port address (i.e., the source port address) and the port address at the destination computer (i.e., the destination port address) E.g. Standard: Web servers communicate on port 80 SMTP communicate on port 25 Non standard: possible, requires configuration
Which two subnets addresses cannot be assigned as an IP address to any computer?
XXX.XXX.XX.0 - network address XXX.XXX.XX.225 - broadcast address
Centralized Routing
all routing decisions are made by one central computer or router. commonly used in host-based networks routing decisions are rather simple
Static Routing
decentralized, which means that all computers or routers in the network make their own routing decisions following a formal routing protocol.
Techniques for Achieving Good Quality of Service
l Over provisioning (Load Control) l Buffering to reduce jitter l Traffic shaping and policing l Admission control l Packet priority & scheduling l Resource reservation l Multi-Protocol Label Switching
Open Shortest Path First (OSPF)
lA link state interior routing protocol lMore popular on Internet •More reliable paths •Incorporates traffic and error rate measures •Less burdensome to the network •Only the updates sent (not entire routing tables)
Case 1: Known Address, Same Subnet
lCase: •A Client (128.192.98.130) requests a Web page from a server (www1.anyorg.com) •Client knows the server's IP and Ethernet addresses lOperations (performed by the client) •Prepare HTTP packet and send it to TCP •Place HTTP packet into a TCP packet and sent it to IP •Place TCP packet into an IP packet, add destination IP address, 128.192.98.53 •Use its subnet mask to see that the destination is on the same subnet as itself •Add server's Ethernet address into its destination address field, and send the frame to the Web server
DNS - Domain Name Service
lIs used to determine IP address for a given URL lProvided through a group of name servers DNS Database •Databases containing directories of domain names and their corresponding IP addresses Large organizations maintain their own name servers •smaller organizations rely on name servers provided by their ISPs When a domain name is registered, IP address of the DNS server must be provided to registrar for all URLs in this domain •Example: Domain name: indiana.edu URLs: www.indiana.edu, www.kelly.indiana.edu, abc.indiana.edu
Case 3: Unknown Address
lOperations (by the host) •Determine the destination IP address •Send a UDP packet to the local DNS server •Local DNS server knows the destination host's IP address •Sends a DNS response back to the sending host •Local DNS server does not know the destination IP address •Send a second UDP packet to the next highest DNS host, and so on, until the destination host's IP address is determined •Follow steps in Case 2
Case 1 HTTP response to client
lOperations (performed by the server) •Receive Ethernet frame, perform error checking and send back an ACK •Process incoming frame successively up the layers (data link, network, transport and application) until the HTTP request emerges •Process HTTP request and sends back an HTTP response (with requested Web page) •Process outgoing HTTP response successively down the layers until an Ethernet frame is created •Send Ethernet frame to the client • • lOperations (performed by the client) •Receive Ethernet frame and process it successively up the layers until the HTTP response emerges at browser
Case 2: Known Address, Different Subnet
lSimilar to Case 1a lDifferences •Use subnet mask to determine that the destination is NOT on the same subnet •Send outgoing frames to the local subnet's GW •Local gateway operations •Receive the frame and remove the Ethernet header •Determine the next node (via Router Table) •Make a new frame and send it to the destination GW •Destination gateway operations •Remove the header, determine the destination (by destination IP address) Place the IP packet in a new Ethernet frame and send it to its final destination
Dynamic Routing
routing decisions are made in a decentralized manner by individual computers attempts to improve network performance by routing messages over the fastest possible route, away from busy circuits and busy computers
Socket and socket number
socket: Sender and receiver create end points socket number: IP address of host + port (16 bits)
Session Management
thought of as a conversation between two computers. connection-oriented messaging: When the sending computer wants to send a message to the receiver, it usually starts by establishing a session with that computer. The sender transmits the segments in sequence until the conversation is done, and then the sender ends the session connectionless messaging: the sender only wants to send one short information message or a request. In this case, the sender may choose not to start a session but just send the one quick message and move on.
Quality of Services (QoS)
Ø End-to-End Delay Ø Ø Jitter (Delay variability) Ø Ø Packet Loss (Reliability) Ø Ø Throughput (bandwidth) • q Non-real time traffic (Data, Email, File Transfer etc) are very sensitive to packet loss, but less sensitive to delay or jitter. q q Real time voice and video traffic are very sensitive to delay and jitter, but less sensitive to packet loss. q q Users must be able to negotiate their QoS conditions with service providers.
Dynamic Host Control Protocol (DHCP)
•A program residing in a client establishes connection to DHCP server •A client broadcasts a message requesting an IP address (when it is turned on and connected) •Server (maintaining IP address pool) responds with a message containing IP address (and its subnet mask) •IP addresses can also be assigned with a time limit (leased IP addresses) •When expires, client must send a new request
Application Layer address (URL)
•For servers only (clients don't need a URL) •Assigned by network managers and placed in configuration files. •Some servers may have several application layer addresses
Server Name Resolution
•Translating destination host's domain name to its corresponding IP address •e.g., application layer address (www.yahoo.com) to network layer address (204.71.200.74) •Uses one or more Domain Name Service (DNS) servers to resolve the address - Name servers: - provide DNS - "directory assistance" computers for the Internet. Anytime a computer does not know the IP number for a computer, it sends a message to the name server requesting the IP number.
Border Gateway Protocol (BGP)
•Used to exchange routing info between autonomous systems •Based on a distance vector algorithm •Far more complex than interior routing protocols •Provide routing info only on selected routes (e.g., preferred or best route) • Privacy concern •Too many routes; can't maintain tables of every single route
Link-state
•Uses a variety of information to decide how to route a packet (more sophisticated) •e.g., number of hops, congestion, speed of circuit •Links state info exchanged periodically (every 30 seconds or when a major change occurs) by each node to keep every node in the network up to date •Used by Open Shortest Path First (OSPF) - Runs directly on IP. - Each router understands complete network topology. - Each router floods link-state information every 30 seconds or when a major change occurs - Find out who your neighbors are and get their network addresses. - Calculate the cost for getting a packet to a neighbor. (to calculate the cost, send an ECHO packet through each interface, and measure the round-trip delay. That'll give you a reasonable estimate of the actual delay.) - Construct a link state packet telling all other routers about what you have just learned (about the network topology and the cost of the links) - Send that packet to all other routers. (use Flooding algorithm to distribute these info to all other routers) - Perform a Dijkstra algorithm to calculate your shortest paths (min-cost paths) to all other routers in the network. (all other routers would do the same: they calculate their own shortest paths to all other routers in the network)
Distance Vector
•Uses the least number of hops (one router counts as one hop) to decide how to route a packet •Exchange hop counts periodically (1 or 2 minutes) •Used by Routing Information Protocol (RIP) -Uses distance (number of hops) for finding shortest paths) -Allows maximum of 15 hops. - Nodes send updated distance information to their neighbors every 1 or 2 minutes. Take a look at the costs that your direct neighbors are advertising to get a packet to the destination. Select the neighbor whose advertised cost, added with the cost to get to that neighbor, is the lowest. Advertise that new cost to the other neighbors.