Professional Documents
Culture Documents
Prepared by
Anand Gachhadar
Assistant Professor
Department of Electrical and Electronics Engineering
Kathmandu University, Dhulikhel
B 2
Djkistras
Bellmanford Algorithm
Forwarding
Routing is applying strategies and running
some routing protocol to create the
decision making tables for each router.
Forwarding is defined as the action
applied by each router when a packet
arrives at the interface.
Flow Control
Network layer in the internet does not
provide flow control due to following
reasons.
Since there is no error control in this layer, the
job of network layer at the receiver is so simple
that it is rarely overwhelmed.
The upper layer services implement buffers to
receive data from network layer so they do not
consume the data as fast as it is received.
Flow control is provided for most of the upper
layer protocols so another level of flow control in
network layer makes the network layer more
complicated and inefficient.
Congestion Control
Congestion occurs if number of
datagrams sent by source is beyond the
capacity of the networks or routers.
Some routers may drop some of the data
grams.
If the congestion continues, sometimes a
situation may reach where the system
collapse and no datagrams are received.
Network layer performance
Delay
Transmission delay
Propagation delay
Processing Delay
Queuing Delay
Throughput
Packet loss
Delay
Transmission Delay
If the first bit of the packet is put on line at time t1 and the last bit is put on time t2,
transmission delay of the packet is (t2-t1).
Delay = (packet length)/(Transmission Rate)
Propagation Delay
Propagation delay is the time it takes to travel from point A to point B in transmission
media.
Delay = (Distance)/(propagation speed)
Processing Delay
Processing delay is the time required for a router host to receive a packet from its
input port, remove the header, perform error detection procedure, and deliver the
packet to the output port or deliver packet to the upper layer protocols.
Queuing Delay
A router has an input queue connected to each of its input ports to store packets
waiting to be processed.The router also has a output queue connected to each of its
output port to store packets waiting to be transmitted.
Address space
Prefix length: slash notation
The notation is referred to as slash
notation and formally referred to as CIDR
(classless Inter domain routing).
m2
m1 m3
n = 24
n = 25 n = 26 28 Unused
N = 128 N = 64 N = 16
Example of Address Aggregation
160.70.14.0/26
All packet with
To
destination
160.70.14.63/26
addresses
160.70.14.0/24
To 160.70.14.255/24
are sent to ISP
160.70.14.64/26
To
160.70.14.127/26
Internet
160.70.14.128/26
To
160.70.14.191/26
160.70.14.192/26
To
160.70.14.255/26
Special addresses
This-host address
The only address in the block 0.0.0.0/32 is called this-
host address.
Limited Broadcast address
The only address in the block 255.255.255.255/32 is
called limited broadcast address.
Loopback address
The block 127.0.0.0/8 is called loop back address.
Private address
Four blocks are assigned as private addresses: 10.0.0.0/8,
172.16.0.0/12, 192.168.0.0/16, and 169.254.0.0/16.
Multicast address
The block 224.0.0.0/4 is reserved for multicast address.
Dynamic Host Configuration
Protocol (DHCP)
Dynamic address assignment.
Widespread use in Internet and is often
called plug and play protocol.
Four piece of information are normally
needed for communication
Computer address
Prefix
Address of a router
IP address of a name server
DHCP Message format
DHCP is a client-server protocol in which
a client sends a request message and the
server returns a response message.
Opcode Htype HLen HCount Fields:
Opcode: Operation Code, request(1) or reply (2)
Transaction ID
Htype: Hardware type (Ethernet.)
Time Elapsed Flags Hlen: Length of Hardware address
Client IP Address Hcount: maximum number of hops packet can travel
Transaction ID: An integer set by the client and
Your IP Address repeated by server.
Time Elapsed: the number of seconds since the
Server IP Address
client started to boot
Gateway IP Address Flags: first bit defines unicast(0) or multicast(1)
Client IP Address: Set to 0 if the client does not know
Client hardware address Your IP Address: The client IP address sent by the serv
Server IP Address: A broadcast IP address if client
does not know it
Server name Gateway IP address: default router address.
Server name: A 64-byte domain name server
Boot file name Boot file name: A 128-byte file name holding extra
information.
Options: A 64 byte field with dual purpose.
Options
Client Server
IP Address: ? IP Address: 181.14.16.170
DHCPDISCOVER Application
INIT
DHCPOFFER
DHCP DISCOVER
SELECTING
DHCP ACK
Lease time 50% expired DHCP RELEASE
DHCP REQUEST
BOUND
172.18.3.1
200.24.5.8
172.18.3.2
172.18.3.30
172.18.3.20
Address Translation
Source: 172.18.3.1 Source: 200.24.5.8
172.18.3.1
200.24.5.8
172.18.3.2
172.18.3.30
S: 172.18.3.1 2 S: 200.24.5.8
D: 25.8.2.10 D: 25.8.2.10
Data Data
1
Private Universal
172.18.3.1 25.8.2.10
Private Network 4 3
S: : 25.8.2.10 S: 25.8.2.10
D: 172.18.3.1 D: 200.24.5.8
Data Data
Using One IP address
A translation table has two columns: the
private address and external address.
When a router translates the source
address it also makes note of destination
address.
NAT is mostly use by ISPs that assign
single address to a customer.
Use of only one global address allows
only one private network host to access a
given external host.
Using a pool of IP address
NAT router can use a pool of global
addresses.
NAT router can use four addresses
(200.24.5.8, 200.24.5.9, 200.24.5.10 and
200.24.5.11).
Four private host can communicate with
the same external host at the same time
because each pair of address defines a
separate connection.
Forwarding of IP Packets
Forwarding means to deliver packets to the
next hop.
IP protocol was originally designed as a
connectionless protocol, tendency is
changed it to a connection-oriented
protocol.
In connectionless protocol, forwarding is
based on the destination address of the IP
datagram.
In connection oriented protocol, forwarding
is based on label attached to an IP datagram.
Forwarding based on destination
address
Forwarding based on destination address is a
traditional approach.
In this case, forwarding required a host or router
to have a forwarding table.
When a host has packet to be forwarded, it looks
at this table to find the next hop.
In classless addressing, the whole address space is
one entity. There are no classes.
The table needs to be searched based on the
network address (first address of the block)
Unfortunately, the destination address in the
packet gives no clue about the network address.
To solve this problem, we need to include
the mask (/n) in the table.
Classless forwarding needs four piece of
information.
The mask
Network address
Interface number
IP address of the next router
Simplified forwarding module in
classless address
Router Forwarding Table
180.70.65.128/25
180.70.65.135/25
m0
201.4.16.0/22 m1 m3
201.4.22.0/24
m2 R1
201.4.16.2/22
201.4.22.3/24
1180.70.65.194/26
180.70.65.192/26
180.70.65.200/26
Forwarding table for router R1
140.24.7.64/26 m0
m1
m0 m1
R1 R2
m4
m2
m3
Net address/mask Next-hop address Interface
140.24.7.128/26
140.24.7.0/26 ----- m0
140.24.7.64/26 ----- m1
140.24.7.128/26 ----- m2
140.24.7.192/26
140.24.7.192/26 ----- m3
0.0.0.0/0 Address of R2 m4
Longest Mask Matching
This principle states that the forwarding
table is stored from the longest mask to
the shortest mask
E.g if there are three mask, /27, /26, /24
the mask must be /27 at first and /24 at
last entry.
140.24.7.0/26 ----- m0
140.24.7.64/26 ----- m1
140.24.7.128/64 ----- m2
m1 m0
m3 m0 m2
m2
m0
Small
ISP
Local
ISP
Small
ISP
Local Region
ISP al ISP
Local
ISP
Forwarding based on label
In connectionless network router
forwards a packet based on destination
address in the header of the packet.
In a connection oriented network a
switch forwards a packet based on label
attached to a packet.
Routing in done on searching the table of
content, switching is done based on
accessing a table using an index.
Forwarding based on destination address
32 NF
31 NF
31 NF
31 NF
31 NF
30 F y 2
Destination Address
0
1
x y
2
x
Forwarding based on label
Switching label
Label used as index
Interface Next label
0000
0001
0002
0003 2 0012
0004
0005
label 0006
0
0003 switch 1
0012
2
MPLS
MPLS behaves both as a router and as a
switch.
It can forward packets behaving like a
router and as a switch.
The IPV4 packet is encapsulated in a
MPLS packet and MPLS header is added.
MPLS
IP Header IP payload
header
MPLS header
0 20 24 31
label exp S TTL
ANY QUERIES?...