Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

Similar documents
Addressing and Routing

TCP/IP and the OSI Model

Lab Using Wireshark to Examine Ethernet Frames

Exercise 1 INTERNET. x.x.x.254. net /24. net /24. x.x.x.33. x.x.x.254. x.x.x.52. x.x.x.254. x.x.x.254. x.x.x.

ICS 451: Today's plan

Lab Using Wireshark to Examine Ethernet Frames

To make a difference between logical address (IP address), which is used at the network layer, and physical address (MAC address),which is used at

Connecting to the Network

ITEC 3210 M - Applied Data Communications and Networks. Professor: Younes Benslimane, Ph.D.

TSIN02 - Internetworking

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

TSIN02 - Internetworking

IP: Addressing, ARP, Routing

AN INTRODUCTION TO ARP SPOOFING

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Auxiliary Protocols

Module 7 Internet And Internet Protocol Suite

To see how ARP (Address Resolution Protocol) works. ARP is an essential glue protocol that is used to join Ethernet and IP.

Ethernet. Network Fundamentals Chapter Cisco Systems, Inc. All rights reserved. Cisco Public 1

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

The Internet. 9.1 Introduction. The Internet is a global network that supports a variety of interpersonal and interactive multimedia applications.

Oracle 1Z Oracle Solaris 10 Network Administrator(R) Certified Expert.

Vorlesung Kommunikationsnetze

Internet Protocol Addressing and Routing. Redes TCP/IP

Interconnecting Networks with TCP/IP

Fundamentals of Networking. OSI & TCP/IP Model. Kuldeep Sonar 1

Internet Protocol (IP)

Network Layer. The Network Layer. Contents Connection-Oriented and Connectionless Service. Recall:

Network Layer. Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control

Homework 3 Discussion

EECS Introduction to Computer Networking. Local Area Networks / Ethernet. Hub

LAB THREE STATIC ROUTING

ECPE / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Defining Networks with the OSI Model. Module 2

Material for the Networking lab in EITF25 & EITF45

ROUTING INTRODUCTION TO IP, IP ROUTING PROTOCOLS AND PROXY ARP

ECPE / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Internet. Organization Addresses TCP/IP Protocol stack Forwarding. 1. Use of a globally unique address space based on Internet Addresses

TCPIP Protocol Suite & Utilities. Revision no.: PPT/2K403/02

Interconnecting Networks with TCP/IP. 2000, Cisco Systems, Inc. 8-1

Revision of Previous Lectures

ARP, IP. Chong-Kwon Kim. Each station (or network interface) should be uniquely identified Use 6 byte long address

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

Putting it all together

Router Router Microprocessor controlled traffic direction home router DSL modem Computer Enterprise routers Core routers

Routing. Directly Connected IP Networks. Data link layer routing. ifconfig command

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

CCNA MCQS with Answers Set-1

Ch.6 Mapping Internet Addresses to Physical Addresses (ARP)

IP Basics Unix/IP Preparation Course June 29, 2010 Pago Pago, American Samoa

521262S Computer Networks 2 (fall 2007) Laboratory exercise #2: Internetworking

Switching & ARP Week 3

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi).

Objectives. Chapter 10. Upon completion you will be able to:

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

CISCO SYSTEM ADMINISTRATION (41)

Routing. Directly Connected IP Networks. Data link layer routing. ifconfig command

CS4450. Computer Networks: Architecture and Protocols. Lecture 20 Pu+ng ALL the Pieces Together. Spring 2018 Rachit Agarwal

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

15-441: Computer Networks Spring 2017 Homework 3

Quick guide for configuring a system with multiple IP-LINKs

Computer Network Addressing. The TCP/IP Layers and Addresses. Topics. The Internet Communication. The TCP/IP Layers and Addresses IP Address

Introduction... xiii Chapter 1: Introduction to Computer Networks and Internet Computer Networks Uses of Computer Networks...

ITexamGuide. High-quality IT Cert Exam study guide

Auxiliary protocols. tasks that IP does not handle: Routing table management (RIP, OSPF, etc.). Congestion and error reporting (ICMP).

Static Routing NETWORK INFRASTRUCTURES NETKIT - LECTURE 4 MANUEL CAMPO, MARCO SPAZIANI

SC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers

Copyright 2011 Sakun Sharma

EXAM - HP0-Y52. Applying HP FlexNetwork Fundamentals. Buy Full Product.

Interconnecting Cisco Networking Devices Part1 ( ICND1) Exam.

shortcut Tap into learning NOW! Visit for a complete list of Short Cuts. Your Short Cut to Knowledge

Exam : Title : Sun Certified Network Administrator for Solaris 10 OS. Version : DEMO

Troubleshooting Tools

TCP/IP Protocol Suite

IP Protocols. ALTTC/Oct

PART X. Internetworking Part 1. (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution)

TCP/IP Fundamentals. Introduction. Practice Practice : Name. Date Period

Cisco Exam Cisco Certified Network Associate (CCNA) Version: 14.7 [ Total Questions: 653 ]

Chapter Motivation For Internetworking

TCP/IP Network Essentials

ICND1 Router Questions

IP Routing & Bridging

TCP/IP THE TCP/IP ARCHITECTURE

Exercise Sheet 4. Exercise 1 (Routers, Layer-3-Switches, Gateways)

SYSTEMS ADMINISTRATION USING CISCO (315)

Essay MCQ Total Midterm Exam Computer Networks. Model answer 0X April minutes ID: Name:

Unit C - Network Addressing Objectives Purpose of an IP Address and Subnet Mask Purpose of an IP Address and Subnet Mask

ISO/OSI Model and Collision Domain NETWORK INFRASTRUCTURES NETKIT - LECTURE 1 MANUEL CAMPO, MARCO SPAZIANI

cs144 Midterm Review Fall 2010

ICS 351: Networking Protocols

DGS-1510 Series Gigabit Ethernet SmartPro Switch Web UI Reference Guide

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Data Communication Prof. A. Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 34 TCP/ IP I

Fundamentals of Computer Networking AE6382

Section 3.1: Network Adapters

TCP/IP Protocol Suite and IP Addressing

OSI Model. Teran Subasinghe MBCS, Bsc.(Hons) in Computer Science - University of Greenwich, UK

Networking Fundamentals

The Network 15 Layer IPv4 and IPv6 Part 3

Cisco Interconnecting Cisco Networking Devices Part 1.

CIS 632 / EEC 687 Mobile Computing

Transcription:

IP Routing Routing is the process performed by routers to transfer packets from the source machine to the destination. Unlike switches, routers are configured by a network administrator. Routers share information about the different routes and the health of each router among themselves so that all of them can draw a picture of the whole network. Each router stores a table known as Routing table that contains information about the different routes that the router can send the packet through. Each machine on the network has some form of routing table. Routing tables in hosts (computer) usually have few entries (5 to 10 entries) depending on the number of network interface cards installed. Routing tables in Internet routers may have 100,000 different entries or possibly more. Format of a Routing Table Consider the following network (designed in the previous lecture). There are two routers (Router 1 and Router 2). Let us look at the format of the routing table in these routers. 1

A typical routing table may look something like the following: Destination Next Hop Flags (H = 1 Destination is a Host) (H = 0 Destination is a Network) (G = 1 Next Hop is a Gateway/Router) (G = 0 Next Hop is not Gateway/Router) Network Interface Metric Destination: This lists the IP addresses of the possible destinations that the router knows how to route a packet to. Next Hop: This gives the next IP address that the packet will be transmitted over. Flags: These provide information about the devices that are connected to the router (gateway/router or not) and the type of destination (host or network). Network Interface: The port that the router will send the packet over. Metric: A measure of the quality of the link to help determine the most efficient link over which to send the packet. Types of Destinations: Generally, there are 3 types of destinations that can be found in routing tables: Complete Destination IP Address: This represents the complete destination IP address in the packet. Destination Network ID: This represents the network ID of destination IP address of the packet. Default Gateway: This is where packets with destination IP addresses and Network IDs that are not found in the routing table will be sent. Order of Searching the Routing Table 1. Destination column is searched to determine if the table contains an entry with the complete destination IP address If found, IP packet is forwarded along the next hop using the proper network interface 2. If the above was not found, the routing table is searched for the destination Net ID If found, IP packet is forwarded along the next hop using the proper network interface 2

3. If the above were not found, the routing table is searched for a default router entry If found, IP packet is forwarded to it using the proper network interface 4. If all the above were not found The packet is stated to be undeliverable and an ICMP message (host unreachable error) is sent back to the originating host. Note: To see the routing table of a computer, try the DOS Command: netstat r The following is an example of using netstat r C:\Documents and Settings\Wajih>netstat -r Route Table Interface List 0x1... MS TCP Loopback interface 0x2...00 16 6f 70 11 9f... Intel(R) PRO/Wireless 2200BG Network Connection - Packet Scheduler Miniport 0x3...00 15 60 ae 50 5e... Broadcom NetXtreme Gigabit Ethernet - Packet Sch eduler Miniport Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 10.59.0.64 10.59.8.50 20 10.59.0.0 255.255.240.0 10.59.8.50 10.59.8.50 20 10.59.8.50 255.255.255.255 127.0.0.1 127.0.0.1 20 10.255.255.255 255.255.255.255 10.59.8.50 10.59.8.50 20 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 224.0.0.0 240.0.0.0 10.59.8.50 10.59.8.50 20 255.255.255.255 255.255.255.255 10.59.8.50 2 1 255.255.255.255 255.255.255.255 10.59.8.50 10.59.8.50 1 Default Gateway: 10.59.0.64 Persistent Routes: None 3

Examples Consider the network shown below (same network that was designed in the previous lecture). Write 6 entries in the routing table of Router 2. 168.48.16.4 168.48.16.0 168.48.0.0 1 168.48.0.1 2 168.48.16.1 168.48.16.3 168.48.80.1 168.48.80.2 3 Router 1 168.48.80.0 Hub 168.48.16.2 168.48.80.3 Switch 168.48.144.0 168.48.144.2 1 168.48.80.4 168.48.144.1 168.48.96.1 3 2 Router 2 168.48.96.0 168.48.96.2 Solution Destination Next Hop Flags (H = 1 Destination is a Host) (H = 0 Destination is a Network) (G = 1 Next Hop is a Gateway/Router) (G = 0 Next Hop is not Gateway/Router) 4 Network Interface Metric (I selected random values here) 127.0.0.1 127.0.0.1 H = 1, G = 0 Port 0 1 168.48.80.0 168.48.80.4 H = 0, G = 0 Port 1 12 168.48.16.0 168.48.80.1 H = 0, G = 1 Port 1 15 168.48.144.2 168.48.144.2 H = 1, G = 0 Port 3 8 168.48.16.4 168.48.80.1 H = 1, G = 1 Port 1 13 Default 168.48.80.1 H = 0, G = 1 Port 1 15

Note on Routing Tables (see similar color of text in the table above): When the Destination = 127.0.0.1 Next hop = 127.0.0.1 When the Destination is Network ID that is directly connected to the Router (so Host ID = 0) Next Hop = IP address of router port that is connected to the network. When the Destination is Network ID that is not connected to Router directly Next Hop = IP address of next Router that will bring the packet closer to the desired network When the Destination is a Host connected to the Router Next Hop = IP address of host When the Destination is a Host in a network that is not directly connected to the router Next Hop = IP address of next Router that will bring the packet closer to the desired network. When the Destination is Default Next Hop = IP address of next Router that will bring the packet closer to its destination (usually in this case it is the Internet) Note: How are MAC addresses and IP addresses used in the transmission of information over multiple networks? As we know, there are two addresses that are used in networking (Network layer address called IP address, and Data Link layer address called MAC address). How are these addresses used as information is being transmitted over the network? The answer is that IP addresses are used for the source to destination transmission while MAC addresses are used for single hop transmission. As we now know, each port of a router or of a host on the network has its own network interface card (each of these has a MAC address and an IP address. This is illustrated in the following figure where we have two host machines and two routers that connect them together. Assume that: Lower Host 0 machine has: IP 0 MAC 0 Router 1 has 3 ports with: IP 1A MAC 1A (Port 1) IP 1B MAC 1B (Port 2) IP 1C MAC 1C (Port 3) Router 2 has 3 ports with: IP 2A MAC 2A (Port 1) IP 2B MAC 2B (Port 2) IP 2C MAC 2C (Port 3) Upper Host 3 machine has: IP 3 MAC 3 From the structure of the network, if the lower machine (Host 0) wants to send a packet to the upper machine (Host 3), the packet will have to leave Host 0 going to Router 1 through port 1, which will have 5

to make a determination that port 3 is the port through which this packet will have to be transmitted. This packet will then reaches Router 2 through port 1, which will have to make a determination that port 2 is the necessary port for transmitting the packet that will send it to its final destination of Host 3. Let us know look at what are the IP addresses that are in the packets as they are being transmitted over the different links and also the MAC addresses of the frames that carry these packets as they are being transmitted. Link between Host 0 and Router 1 Packet Header: Source IP Address = IP 0 Destination IP Address = IP 3 Frame Header: Source MAC Address = MAC 0 Destination MAC Address = MAC 1A Link between Router 1 and Router 2 Packet Header: Source IP Address = IP 0 Destination IP Address = IP 3 Frame Header: Source MAC Address Destination MAC Address = MAC 1C = MAC 2A 6

Link between Router 2 and Host 3 Packet Header: Source IP Address = IP 0 Destination IP Address = IP 3 Frame Header: Source MAC Address = MAC 2B Destination MAC Address = MAC 3 Conclusion: The IP addresses in a packet do not change as it travels over a network but the MAC addresses change depending on the links they are traveling over. Address Resolution Protocol (ARP) This protocol is used in networks such as Ethernet. To transmit frames in Ethernets, MAC addresses are used which have the format (xx:xx:xx:xx:xx:xx) where each (x) is a hexadecimal number. MAC addresses are unique to each computer in the world since these addresses are linked to the Network Interface Cards (NIC). So, a computer that would like to send a packet to another with a specific IP address on the network would broadcast an ARP packet on network asking all computers a question that looks like To the machine with IP address x.x.x.x, please inform me (where my MAC address is xx:xx:xx:xx:xx:xx) about your MAC address. The computer with the particular IP address x.x.x.x will respond only to the requesting computer with its MAC address. Reverse Address Resolution Protocol (RARP) In specific cases, a host on the network may know the MAC address but not the IP address. In this situation, a reverse process to that done in the ARP is used to get the IP address assigned to the machine. So, a host may use the RARP protocol to ask the question that looks like Machine with MAC address xx:xx:xx:xx:xx:xx, please inform me of the corresponding IP address. 7