0% found this document useful (0 votes)
28 views64 pages

Chapter 4

1) An IP address is a unique number that identifies devices on a computer network. Vinton Cerf and others developed the TCP/IP protocol in the 1970s-1980s, enabling networking and giving us nearly 4 billion possible IPv4 addresses. 2) IPv4 addresses are 32-bit numbers written in dotted-decimal notation like 202.70.91.200. They identify interfaces on every host and router. IPv4 addresses are divided into classes based on network and host portions. 3) Dynamic routing allows routers to automatically adjust their routing tables in response to network changes without manual configuration. Distance vector routing uses periodic routing table updates between neighbors to share topology changes.

Uploaded by

Razan Gaihre
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views64 pages

Chapter 4

1) An IP address is a unique number that identifies devices on a computer network. Vinton Cerf and others developed the TCP/IP protocol in the 1970s-1980s, enabling networking and giving us nearly 4 billion possible IPv4 addresses. 2) IPv4 addresses are 32-bit numbers written in dotted-decimal notation like 202.70.91.200. They identify interfaces on every host and router. IPv4 addresses are divided into classes based on network and host portions. 3) Dynamic routing allows routers to automatically adjust their routing tables in response to network changes without manual configuration. Distance vector routing uses periodic routing table updates between neighbors to share topology changes.

Uploaded by

Razan Gaihre
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

1

Internet Layer
By: Bikash Shrestha
2

What is an IP Address?
An Internet Protocol (IP) address is a
number that identifies a device on a
computer network.
3

History
• Between 1973 and 1983 , Vinton Cerf, John Pastel and
Robert Kahn devised networking system that enabled
them to communicate with each other.
• Their Work led to the introduction of TCP/IP Protocol.
• The IP V4 is of 32 bit so their invention now gives us
the ability to link together 232 (4,294,967,296 i.e.
nearly 4 billion ip address ) machine.
• When it was first deployed, less than 1,000 computers
were linked by IPv4.
4

IP v4 Address Notation
• IP v4 is 32 bits long.
• Thus a total of 232 IP address is possible in IPv4.
• These address are typically written in so called dotted-decimal
notation.
▫ e.g. 202.70.91.200
▫ (202)10 = ( 11001010)2
• Each interface on every host and router in the global Internet
must have an IP address that is globally Unique .
5

IPv4 Supported address type


• Unicast Address
• Multicast Address
• Broadcast Address
6

IPv4 address division and its classes


• 32 bits of IP address is divided into network and host portion.
Network Host
• Classes
▫ A (8 bits is used for networks and rest 24 bits for host)
▫ B (16 bits is used for networks and rest 16 bits for host)
▫ C (24 bits is used for networks and rest 8 bits for host)
▫ D (Used for Multicasting)
▫ E (For Future Use)
7

IPv4 Address class


Class A
• Range : 0 – 127
• So total of 126 (28-1-2) Networks are possible and total host = 224 in each
Network.
• Default subnet mask is 255.0.0.0

Class B
• Range : 128 – 191
• So total of 216-2 Networks are possible and total host = 216 in each Network.
• Default subnet mask is 255.255.0.0
8

IPv4 Address classes Contd..


Class C
• Range : 192 – 223
• So total of 224-3 Networks are possible and total host = 28 in each Network.
• Default subnet mask is 255.255.255.0
Class D
• Range : 224 – 239
• Used for Multicasting
• E.g. 224.0.0.1 (group)
Class E
• Range 240-255
• Not used ( for future use)
9

Public and Private IP address


• Public IP globally Unique
▫ e.g. 202.70.91.7
• Private IP significant in Local Sites only.
• Private IP are commonly Used when the public IP couldn’t be obtained
for all devices.
• Private IP address Range
10

IPV4 Datagram Format


11

IPV4 Datagram Format


• Version: these 4 bits specify the IP Protocol version of Datagram
• Header Length (4 bits): Because an IPV4 datagram can contain a variable
number of options these four bits are needed to determine where in the IP
datagram the data actually begins(minimum HLEN = 20 bytes).
• Type of Service (8bits): TOS is included in the IP V4 header to allow
different types of IP datagram(e.g. datagram particularly requiring low
delay, high throughput , or reliability ) to be distinguished from other.
12

IPV4 Datagram Format


• Datagram Length(16 bits): contains the total length of datagram (Header+
Datagram)
• Identifier, flag and Fragmentation offset : used for IP fragmentation.
• Time to live (8bits): to ensure that the datagram don't circulate forever in the
network.
• Upper layer Protocol(8bits): These 8 bits are used to identify the next level
protocol above the IP that is to receive the datagram.
13

IPV4 Datagram Format


• Header Check sum (16 bits): used to detect a error that may occur in the
header
• Source and Destination address: Carries 32 bit source and destination
address
• Options: used to identify several additional services, not used in every
datagram
• Data: contains the user data
14

Network Address Translation


15

Routing
• Routing is the process that a router uses to forward packets toward the
destination network.
• A router makes decisions based upon the destination IP address of a
packet.
• All devices along the way use the destination IP address to send the
packet in the right direction to reach its destination.
• To make the correct decisions, routers must learn how to reach remote
networks. .
16

Routing
17

Routing
18

Routing types
• Nonadaptive algorithms (Static)
• Adaptive algorithms (Dynamic)
19

Static Routes
• Static routes are configured manually, network administrators must add
and delete static routes to reflect any network topology changes.
• In a large network, the manual maintenance of routing tables could
require a lot of administrative time.
• On small networks with few possible changes, static routes require very
little maintenance.
• Static routing is not as scalable as dynamic routing because of the extra
administrative requirements
• Even in large networks, static routes that are intended to accomplish a
specific purpose are often configured in conjunction with a dynamic
routing protocol.
• The default administrative distance when using a static route is 1.
• Sometimes static routes are used for backup purposes.
20

Flooding
• Another static algorithm is flooding, in which every incoming packet is
sent out on every outgoing line except the one it arrived on.
• Flooding obviously generates vast numbers of duplicate packets, in fact,
an infinite number unless some measures are taken to damp the process.
• Technique for damming the flood is to keep track of which packets have
been flooded, to avoid sending them out a second time.
• Achieve this goal is to have the source router put a sequence number in
each packet it receives from its hosts..
21

Flooding
22

Dynamic routing
• Dynamic routing makes it possible to avoid the configuration of static
routes.
• Dynamic routing makes it possible to avoid the time-consuming and
exacting process of configuring static routes.
• Dynamic routing also makes it possible for routers to react to changes in
the network and to adjust their routing tables accordingly, without the
intervention of the network administrator.
23

Dynamic Routing Algorithm


• Distance Vector Routing
• Link State Routing
24

Autonomous System(AS)
• An AS is a collection of networks under a common administration that
share a common routing strategy.
• To the outside world, an AS is viewed as a single entity.
• Regional Internet Registry distribute AS number.
• Autonomous systems divide the global internetwork into smaller and
more manageable networks.
• Each AS has its own set of rules and policies and an AS number that will
distinguish it from all other autonomous systems.
25

Routing Protocol according to AS


• Interior Gateway Protocol (IGP)
▫ Between same AS
• Exterior Gateway Protocol (EGP)
▫ Between different AS
26

Examples of routing protocols are as follows:


• Routing Information Protocol (RIP)
Distance Vector interior routing Protocol and IGP
• Interior Gateway Routing Protocol (IGRP)
Distance Vector interior routing Protocol and IGP
• Enhanced Interior Gateway Routing Protocol (EIGRP)
Distance Vector interior routing Protocol and IGP
• Open Shortest Path First (OSPF)
Link State interior routing Protocol and IGP
• Border Gateway Routing Protocol (BGP)
Distance Vector exterior routing Protocol and EGP

NOTE:
• Routing Between Same AS is called Interior Routing Protocol
• Routing Between Different AS is called Exterior Routing Protocol
27

Distance Vector Routing

• The distance vector routing algorithm passes periodic copies of a routing


table from router to router. These regular updates between routers
communicate topology changes.
• The distance vector routing algorithm is also known as the Bellman-Ford
algorithm.
28

Distance Vector Routing


• Each router receives a routing
table from its directly connected
neighbor routers.
• Router B receives information
from Router A. Router B adds a
distance vector number, such as
a number of hops.
• This number increases the
distance vector. Then Router B
passes this new routing table to
its other neighbor, Router C.
• This same step-by-step process
occurs in all directions between
neighbor routers.
29

Distance Vector Routing


30

Distance Vector Routing


• The algorithm eventually accumulates network distances so that it can
maintain a database of network topology information.
• the distance vector algorithm does not allow a router to know the exact
topology of an internetwork since each router only sees its neighbor
routers.
• Each router that uses distance vector routing first identifies its neighbors.
The interface that leads to each directly connected network has a distance
of 0.
• As the distance vector discovery process proceeds, routers discover the
best path to destination networks based on the information they receive
from each neighbor.
• Router A learns about other networks based on the information that it
receives from Router B. Each of the other network entries in the routing
table has an accumulated distance vector to show how far away that
network is in a given direction.
31

Distance Vector Routing


32

Distance Vector Routing


• Path from J to B ( Multiple path)
• J  AB=8+12=20
• J I B=10+36=46
• J H B= 12+31=43

• Least cost Path = J  AB so it is chosen.


33

Link State Routing

• The link-state algorithm is also known as Dijkstra's algorithm or as the


shortest path first (SPF) algorithm.
• The link-state routing algorithm maintains a complex database of
topology information.
• The distance vector algorithm has nonspecific information about distant
networks and no knowledge of distant routers.
• The link-state routing algorithm maintains full knowledge of distant
routers and how they interconnect.
34

Link-state routing uses the following


features:

• Link-state advertisement (LSA) - a small packet of routing information


that is sent between routers
• Topological database - a collection of information gathered from LSAs
• SPF algorithm - a calculation performed on the database that results in
the SPF tree
• Routing table - a list of the known paths and interfaces
35

Concerns related to link-state


protocols:
• Processor overhead
• Memory requirements
36

Cost Calculation in Link state


37

Cost Calculation in Link state

Steps Node D(B), P(B) D(c), P(C ) D(D), P(D) D(E), P(E) D(F), D(F)

0 A 2,A 5,A 1,A

1 AD 2,A 4,D - 2,D

2 ADE 2,A 3,E - - 4,E

3 ADEB - 3,E - - 4,E

4 ADEBC - - - - 4,E

5 ADEBCF - - - - -
38

Routing Information Protocol (RIP)


• The Routing Information Protocol (RIP) is a distance-vector routing
protocol.
• Intra AS routing Protocol.
• employs the hop count as a routing metric.
• RIP prevents routing loops by implementing a limit on the number of hops
allowed in a path from the source to a destination.
• The maximum number of hops allowed for RIP is 15.
• This hop limit, however, also limits the size of networks that RIP can
support.
• A hop count of 16 is considered an infinite distance and used to deprecate
inaccessible, inoperable, or otherwise undesirable routes in the selection
process.
39

Routing Information Protocol (RIP)


• Periodic updates every 30 seconds, even the topology not changed.
• In the early deployments, routing tables were small enough that the
traffic was not significant. As networks grew in size, however, it became
evident there could be a massive traffic burst every 30 seconds, even if
the routers had been initialized at random times
• RIP uses the User Datagram Protocol (UDP) as its transport protocol, and
is assigned the reserved port number 520
40

RIP Types
• RIP version 1
• RIP version 2
• RIPng (RIP next generation)
41

RIP version 1
• uses classful routing.
• The periodic routing updates do not carry subnet information,
• lacking support for variable length subnet masks (VLSM).
• There is also no support for router authentication, making RIP vulnerable
to various attacks.
• Broadcast is used for database update
42

RIP version 2
• RIP version 2
• It included the ability to carry subnet information, thus supporting
Classless Inter-Domain Routing (CIDR).
• In an effort to avoid unnecessary load on hosts that do not participate in
routing,
• RIPv2 multicasts the entire routing table to all adjacent routers at the
address 224.0.0.9, as opposed to RIPv1 which uses broadcast.
• Support Authentication
43

RIPng (RIP next generation)


• Support of IPv6 networking.
• RIPng sends updates on UDP port 521 using the multicast group FF02::9.
44

RIP

Routing Table of Router A

Network Gateway Cost Interface


202.70.64.0/28 0.0.0.0 0 Int 1
202.70.64.32/30 0.0.0.0 0 Int 2
202.70.64.36/30 0.0.0.0 0 Int 3
202.70.64.40/30 202.70.64.38 1 Int 3
202.70.64.16/28 202.70.64.38 2 Int 3
202.70.64.34 2 Int 2
202.70.64.44/30 202.70.64.34 1 Int 2
45

Open Shortest Path First(OSPF)


• Link State Routing Algorithm
• Cost/Metric = Link Bandwidth
• Shortest Path Algorithm to Calculate best path from source to destination.
• Open Shortest Path First (OSPF) is an adaptive routing protocol for
Internet Protocol (IP) networks.
• It uses a link state routing algorithm and falls into the group of interior
routing protocols, operating within a single autonomous system (AS).
46

Open Shortest Path First(OSPF)


• OSPF is perhaps the most widely-used interior gateway protocol (IGP) in
large enterprise networks
• It included the ability to carry subnet information, thus supporting
Classless Inter-Domain Routing (CIDR).
• Supports Authentication
47

Routers in OSPF
• Internal router
• Backbone router
• Area Border Router (ABR)
• Autonomous System Boundary Router (ASBR)
48

Internal router
• Routers that have all interfaces in the same area are internal routers.
• Internal routers within the same area have identical link-state databases.

• Backbone router
▫ Routers that sit in the backbone area.
▫ They have at least one interface connected to Area 0.
▫ These routers maintain OSPF routing information using the same
procedures and algorithms as internal routers.
▫ Area 0 serves as the transit area between other OSPF areas.
49

Backbone router
• Routers that sit in the backbone area.
• They have at least one interface connected to Area 0.
• These routers maintain OSPF routing information using the same
procedures and algorithms as internal routers.
• Area 0 serves as the transit area between other OSPF areas.
50

Area Border Router (ABR)


• Routers that have interfaces attached to multiple areas.
• These routers maintain separate link-state databases for each area to
which they are connected, and route traffic destined for or arriving from
other areas.
• ABRs are exit points for the area, which means that routing information
destined for another area can get there only via the local area’s ABR.
• ABRs may summarize information from their link-state databases of their
attached areas and distribute the information into the backbone area.
• The backbone ABRs then forward the information to all other connected
areas. An area can have one or more ABRs.
51

Autonomous System Boundary Router


(ASBR)
Routers that have at least one interface into an external internetwork
(another autonomous system), such as a non- OSPF network and another
interface within OSPF.
These routers can import (referred to as redistribution) non-OSPF network
information to the OSPF network, and vice versa.
52

OSPF Routing Table Example


• Destination/Mask Proto Pre Cost NextHop Interface
• 202.70.70.32/28 OSPF 10 5 202.70.93.157 GigabitEthernet1/0/0
• 202.70.70.48/28 OSPF 10 5 202.70.93.157 GigabitEthernet1/0/0
• 202.70.70.128/27 OSPF 10 4 202.70.93.157 GigabitEthernet1/0/0
53

Border Gateway Protocol (BGP)


• Exterior Gateway protocol
• Called Path vector Routing Algorithm.
• Neighboring BGP routers i.e. BGP peers exchange detailed path
information.
• Used for communicating between two AS
54

Border Gateway Protocol (BGP)


• Revolves around three activities
▫ Receiving and filtering route advertisement from directly attached
neighbors.
▫ Route Selection
▫ Sending route advertisements to neighbors.
55

Border Gateway Protocol (BGP)


56

Border Gateway Protocol (BGP)


• Routing Table of ISP 1
Destination Network Gateway AS Path Pref
*> 202.70.64.0/19 0.0.0.0 i
*> 49.244.0.0/16 0.0.0.0 i
*> 202.70.1.0/24 190.1.1.2 1111 i
*> 180.1.1.0/24 190.1.1.2 1111 i
*> 25.25.0.0/16 190.1.1.3 2222 i
*> 190.1.1.0/24 190.1.1.3 2222 i
*> 8.8.0.0/16 202.70.64.2 9345 i
*> 9.9.0.0/16 202.70.64.2 9345 i
*> 11.11.0.0/16 202.70.64.10 6453 i
*> 12.10.0.0/16 202.70.64.10 6453i
*> 0.0.0.0 202.70.64.10 6453 i
202.70.64.2 9345 i
57

Border Gateway Protocol (BGP)


• Routing Table of ISP 2
Destination Network Gateway AS Path Pref
*> 202.70.64.0/19 190.1.1.1 12345 I
*> 49.244.0.0/16 190.1.1.1 12345 I
*> 202.70.1.0/24 0.0.0.0 i
*> 180.1.1.0/24 0.0.0.0 i
*> 25.25.0.0/16 190.1.1.3 2222 i
*> 190.1.1.0/24 190.1.1.3 2222 i
*> 8.8.0.0/16 202.70.64.2 12345 9345 i
*> 9.9.0.0/16 202.70.64.2 12345 9345 i
*> 11.11.0.0/16 202.70.64.10 12345 6453 i
*> 12.10.0.0/16 202.70.64.10 12345 6453 i
*> 0.0.0.0 202.70.64.10 12345 6453 i
202.70.64.2 12345 9345 i
58

Border Gateway Protocol (BGP)


• Routing Table of ISP 3
Destination Network Gateway AS Path Pref
*> 202.70.64.0/19 190.1.1.1 12345 i
*> 49.244.0.0/16 190.1.1.1 12345 i
*> 202.70.1.0/24 190.1.1.2 1111 I
*> 180.1.1.0/24 190.1.1.2 1111 I
*> 25.25.0.0/16 0.0.0.0 I
*> 190.1.1.0/24 0.0.0.0 I
*> 8.8.0.0/16 202.70.64.2 9345 I
*> 9.9.0.0/16 202.70.64.2 9345 I
*> 11.11.0.0/16 202.70.64.10 9345 6453 I
*> 12.10.0.0/16 202.70.64.10 9345 6453i
*> 0.0.0.0 190.1.1.18 9345 i
59

Other Protocols
• ARP
▫ Address Resolution Protocol (ARP) is a telecommunications protocol used
for resolution of network layer addresses into link layer addresses
• RARP
▫ RARP (Reverse Address Resolution Protocol) is a protocol by which a
physical machine in a local area network can request to learn its IP address
from a gateway server's Address Resolution Protocol (ARP) table or cache.
▫ A network administrator creates a table in a local area network's gateway
router that maps the physical machine (or Media Access Control - MAC
address) addresses to corresponding Internet Protocol addresses.
▫ When a new machine is set up, its RARP client program requests from the
RARP server on the router to be sent its IP address. Assuming that an
entry has been set up in the router table, the RARP server will return the
IP address to the machine which can store it for future use.
60
61

Internet Control Message Protocol


(ICMP)
• is one of the core protocols of the Internet Protocol Suite.
• It is used by the operating systems of networked computers to send error
messages indicating, for example, that a requested service is not
available or that a host or router could not be reached.
• ICMP can also be used to relay query messages.
• ICMP diffeers from transport protocols such as TCP and UDP in that it is
not typically used to exchange data between systems, nor is it regularly
employed by end-user network applications (with the exception of some
diagnostic tools like ping and traceroute).
• Most Typical Use of ICMP is for error reporting.
62

ICMP: Internet Control Message Protocol

Type Code description


0 0 echo reply (ping)
• used by hosts & routers to 3 0 dest. network unreachable
communicate network-level 3 1 dest host unreachable
information 3 2 dest protocol unreachable
▫ error reporting: unreachable 3 3 dest port unreachable
3 6 dest network unknown
host, network, port, protocol
3 7 dest host unknown
▫ echo request/reply (used by 4 0 source quench (congestion
ping) control - not used)
• network-layer “above” IP: 8 0 echo request (ping)
▫ ICMP msgs carried in IP 9 0 route advertisement
datagrams 10 0 router discovery
11 0 TTL expired
• ICMP message: type, code plus 12 0 bad IP header
first 8 bytes of IP datagram
causing error
63

By: Bikash Shrestha

Questions ?
64

Thank you

You might also like