tcp/ip protocol suite 1 chapter 6 delivery, forwarding, and routing of ip packets

31
TCP/IP Protocol Suite 1 Chapter 6 Chapter 6 Delivery, Forwarding, Delivery, Forwarding, and Routing of IP Packets and Routing of IP Packets

Upload: amy-gordon

Post on 03-Jan-2016

238 views

Category:

Documents


0 download

TRANSCRIPT

TCP/IP Protocol Suite 1

Chapter 6Chapter 6

Delivery, Forwarding, Delivery, Forwarding, and Routing of IP Packetsand Routing of IP Packets

TCP/IP Protocol Suite 2

6.1 DELIVERY

Delivery refers to the way a packet is handled by the network under the Delivery refers to the way a packet is handled by the network under the control of network layer.control of network layer.

Forwarding refers to the way a packet is delivered to the next station.Forwarding refers to the way a packet is delivered to the next station.

Routing refers to the way of routing tables.Routing refers to the way of routing tables.

Two important concepts are the type of connection and direct versus Two important concepts are the type of connection and direct versus indirect delivery. indirect delivery.

TCP/IP Protocol Suite 3

Connection Oriented Service:The local area network first make a connection with network layer protocol at the remote site before sending a data packet.

When a connection is established, a sequence of packets from the source to the destination can be sent one after another.

The decision about the route for a sequence of packets with the source and destination addresses can be made only once, when the connection is established.

Connectionless Service:Every packet is independent

The packets in a massage may or may not travel the same path to their destination.

The decision about the route of a packet is made individually by each router.

TCP/IP Protocol Suite 4

IP is a connectionless protocol.

Note:Note:

TCP/IP Protocol Suite 5

Direct delivery

•This occur when the source & destination of the packet are located on same physical network or if the delivery is between last router & destination host.

•It can extract the network address of the destination(using mask) & compare this address with the addresses of the networks to which it is connected.

TCP/IP Protocol Suite 6

Indirect delivery

•Destination host is not on same network.

•Sender uses destination IP address & routing table to find the IP address of the next router to which the packet should be delivered.

•The sender uses ARP to find the physical address of the next router.

TCP/IP Protocol Suite 7

6.2 FORWARDING

Forwarding means to place the packet in its route to its destination. Forwarding means to place the packet in its route to its destination.

Forwarding requires a host or a router to have a routing table. Forwarding requires a host or a router to have a routing table.

FORWARDING TECHNIQUES:FORWARDING TECHNIQUES:

Next-Hop MethodNext-Hop Method

Network Specific MethodNetwork Specific Method

Host Specific MethodHost Specific Method

Default MethodDefault Method

TCP/IP Protocol Suite 8

Next-hop method

•It reduce the content of a routing table.

•The routing table holds only the address of the next hop instead of information about the complete route.

TCP/IP Protocol Suite 9

Network-specific method•It reduce the routing table & simplify the searching process.

• Instead of having an entry for every destination host, we have only one entry that define the address of destination network.

•For ex, If 1000 host are attached to the same network, their will be only one entry in routing table.

TCP/IP Protocol Suite 10

Host-specific routing

•It is inverse of network specific method.

•The destination host address given in the routing table.

•For ex, If we want all packets arriving for host B delivered to router R3 instead of R1, one single entry in the routing table of host A can explicitly define the route.

TCP/IP Protocol Suite 11

Default routing•Host A is connected to a network with 2 routers.

•R1 routes the packet connected to network N2,Rest of the internet R2 is used.

•Instead of listening all networks in the entire internet, host A can just have one entry called the default.

TCP/IP Protocol Suite 12

Forwarding with classful addressing

Each router table has minimum of three columns:

•The network address of the destination network tells where the destination host is located.

•The Next hop address tells us to which router the packet must be delivered for an indirect delivery. This column is empty for a direct delivery.

•The interface number defines the outgoing port from which the packet is sent out. A router is normally connected to several network. Each connection has a different numbered port or interface.

TCP/IP Protocol Suite 13

Simplified forwarding module in classful address without subnetting

TCP/IP Protocol Suite 14

Simplified forwarding module in classful address with subnetting

TCP/IP Protocol Suite 15

In classful addressing we can have a routing table with three columns;

In classless addressing, we need at least four columns.

Note:Note:

TCP/IP Protocol Suite 16

Simplified forwarding module in classless address

TCP/IP Protocol Suite 17

Address aggregation

When we use classless addressing, the entries in routing table increases. Increase size of the table results in an increase in the amount of time needed to search the table.For remove this problem, the idea of address aggregation (block of addresses are aggregated into one larger block) was designed.

TCP/IP Protocol Suite 18

Hierarchical routing with ISPs

We know that, Internet is divided into international & national ISPs, National ISPs are divided into regional ISPs, Regional ISPs are divided into local ISPs.

TCP/IP Protocol Suite 19

6.3 ROUTING

Routing deals with the issues of creating and maintaining routing tables. Routing deals with the issues of creating and maintaining routing tables.

The topics discussed in this section include:The topics discussed in this section include:

Static Versus Dynamic Routing TablesStatic Versus Dynamic Routing TablesRouting Table Routing Table

20

Static Versus Dynamic Routing Tables

Static Routing Table:•A static routing table contains information entered manually.

•The administrator enters the route for destination into the table.

•When the table is created , it cannot update automatically when there is a change in the internet

•The table must be manually altered by the administrator.

•It is not good strategy to use a static routing table in a big internet such as the Internet.

Dynamic Routing Table:•This table is updated periodically using one of the dynamic routing protocol such as RIP, OSPF, BGP.

•Whenever there is a change in the internet(shutdown of a router or breaking of a link) , the dynamic routing protocols update all of the tables in the routers (eventually in the host).

•The routers in the big internet such as the Internet need to be updated dynamically for efficient delivery of the IP packets.

21

Common fields in a routing table

Mask: This Field defines the mask applied for the entry.

Network address: Defines the network address to which the packet is finally delivered.

Next –hop address: Defines the address of the next hop router to which the packet is delivered.

Interface: This field shows the name of the interface.

Flags: This field defines upto 5 flags. Flags are on/off switches that signify either presence or absence. Reference count: This field gives the number of users that are using this route at the moment. For example, if 5 peoples at the same time are connecting to tha same host from this router, the value of this column is 5.

Use: This field shows the number of packets transmitted through this router for the corresponding destination.

22

Common fields in a routing table

5 Flags are as follows:U(up):This flag indicates the router is up & running. If this flag is not present , it means that the router is down. The packet cannot be forwarded & is discarded.

G(gateway): This means that the destination is in another network. When this flag is missing , it means the destination is in this network(direct delivery).

H(host-specific): this flag indicates that the entry in the network address field is a host specific address. When it is missing, it means that the address is only the network address of the destination.

D(added by direction): This flag indicates that routing information for this destination has been added to the host routing table by a redirection message from ICMP.

M( modified by redirection): The M flag indicates that the routing information for this destination has been modified by a redirection message from ICMP.

TCP/IP Protocol Suite 23

6.4 STRUCTURE OF A ROUTER

We represent a router as a black box that accepts incoming packets from We represent a router as a black box that accepts incoming packets from one of the input ports (interfaces), uses a routing table to find the one of the input ports (interfaces), uses a routing table to find the departing output port, and sends the packet from this output port. departing output port, and sends the packet from this output port.

The topics discussed in this section include:The topics discussed in this section include:

Components Components

TCP/IP Protocol Suite 24

Router components

Router has four components: Input ports, Output ports, Routing processor, switching fabric as shown in the figure.

TCP/IP Protocol Suite 25

Input port

•It perform physical & data link layer functions of the router.

•Errors are detected & corrected.

•The packet is ready to be forwarded by the network layer.

•In addition to a physical layer processor & a data link processor, the input port has a buffer (queues) to hold the packets before they are directed to the switching fabric.

TCP/IP Protocol Suite 26

Output port

•It perform same functions as the input port, but in reverse order.

•First the outgoing packets are queued , then the packet is encapsulated in a frame, &finally the physical layer functions are applied to the frame to create the signal to be sent on the line

TCP/IP Protocol Suite 27

Routing Processor:•It perform the function of the network layer.

•The destination address is used to find the address of the next hop & at the same time the output port number from which the packet is sent out.

•As the routing processor searches the routing table, this activity sometimes called table lookup.

Switching Fabrics:•The most difficult task in a router is to move the packet from the input queue to the output queue.

•The input port stored the packet in memory; the output port got the packet from the memory.Routers are specialized mechanisms that use a variety of switching fabrics.

•The simplest type of switching fabric is the crossbar switch.

TCP/IP Protocol Suite 28

Crossbar switch

•The simplest type of switching fabric is the crossbar switch.

•A crossbar switch connects n inputs to n outputs in a grid, using electronic microswitches at each crosspoint.

29

A banyan switch

•A banyan switch is a multistage switch with micro switches at each stage that route the packets based on the output port represented as a binary string.

•The first stage routes the packet based on the highest order bit of the binary string.

•The second stage routes the packets based on the second highest order bit, & so on.

•Fig shows a banyan switch with 8 inputs & 8 outputs.

TCP/IP Protocol Suite 30

Examples of routing in a banyan switch

TCP/IP Protocol Suite 31

Batcher-banyan switch

•A hardware module called a trap is added between the Batcher switch & the banyan switch.

•The trap module prevents duplicate packets from passing to the banyan switch simultaneously.

•Only one packet for each destination is allowed at each tick; if there is more than one, they wait for the next tick.