Chapter Three of Networking
Chapter Three of Networking
based on
purpose
Operation:
Which Router/ Routing to Use?
static routing, network administrators must manually create and modify
the routing table entries.
Which Router/ Routing to Use?
Dynamic routing uses a specialized routing protocol to update the table
entries automatically.
Default Routing
The packets are forwarded without the specific address of the next hop.
The default route is basically the address of another router.
If the address on the packet matches the route, the packet is forwarded; else,
it is forwarded through a default route of that router.
The packet can be forwarded through any router which has been configured
for default routing.
Use ip route 0.0.0.0 0.0.0.0 {exit-intf | next-hop-ip}
Advantages of Default Routing
it can be used when there is no predefined route in the routing table.
Disadvantages of Default Routing
The more complex the network is, the more difficult to set up and use
efficiently.
Overview of Internet Routing
Internet routing is the process of transmitting and routing IP packets over the
Internet between two or more nodes.
Internet comprises a large number of interconnected heterogeneous routing
domains called autonomous system (AS).
AS is a collection of IP networks and routers under the same administration
that share a common routing strategy.
An Internet service provider (ISP) is the typical example of an AS.
Each AS must has a 16-bit AS number, which is unique and assigned by a
regional Internet registry such as the American Registry of Internet Numbers
(http://www.arin.net).
Some routing protocols require the AS to make routing decisions.
Interior Vs Exterior Routing Protocols
The routing protocols used within an AS are called interior gateway protocols
IGPs provide information on reachable interior destinations to the outside work
IGPs choose the best path through the network based on some metrics distance,
bandwidth, delay , reliability, load, and MTU
The distance between the two nodes is calculated as a sum of all the metric
values of links along the path
EGPs: is used to find network path information between different networks
are designed to exchange routing information between different autonomous
systems.
EGP serves as a translator for ensuring that external routing information
gets successfully interpreted inside each AS network.
EGPs provide information on reachable exterior destinations to the interior
routers.
Difference between IGP & EGP
IGP (Interior Gateway Protocol) :-
Within a single autonomous system
Single network administration
Unique routing policy
Make best use of network resource
IGP’s fall into two categories:
A. Distance Vector Protocols
Routing Information Protocol (RIP V1, RIP V2 and RIPng)
Interior Gateway Routing Protocol (IGRP)
Enhanced Interior Gateway Routing Protocol (EIGRP)
B. Link State Protocols
Open Shortest Path First (OSPF)
Intermediate System to Intermediate System (IS-IS)
Difference between IGP & EGP…
EGP (Exterior Gateway Protocol ) :-
Among different autonomous systems
Independent administrative entities.
Communication between independent network infrastructures
EGP is commonly used between hosts on the Internet to exchange routing
table information.
Examples of an EGP:
• Each router is "aware" of only its • Each router is "aware" of all other routers
The term routing protocol may refer specifically to one operating at layer
three of the OSI model, which similarly disseminates topology information
Routing with RIP
vector routing protocol, and each router advertises the next hop and hop
count for each destination it can reach to its directly connected neighbors.
It sends the complete routing table out to all active interfaces every 30
seconds.
1. RIP version 1 works only classful routing, which means that all devices
IPv6.
InterGatewayRouting Protocol(IGRP)
IGRP is a classful routing protocol that was built by Cisco
seconds
EIGRP is a classless routing protocol that supports VLSM and both IPv4
and IPv6.
administrative distance 90
Link state Routing Protocol
Routing with Open Shortest Path First (OSPF)
The OSPF protocol is a link-state routing protocol.
Can use a metric calculation that effectively selects the "best" route(s)
based on bandwidth,
Cons
A. Classful routing protocols don’t include the subnet mask with the route
advertisement.
B. Classless routing protocols include the subnet mask with the route
advertisement.
IP is the primary protocol in the Internet Layer of the IP Suite and has the
task of delivering datagrams (packets) from the source host to the destination
host based on their addresses.
For this purpose IP defines addressing methods and structures for datagram
encapsulation.
Two devices on the Internet can never have the same address at the
same time.
The IPv4 addresses are universal in the sense that the addressing
system must be accepted by any host that wants to be connected to
the Internet..
Address Space
A protocol such as IPv4 that defines addresses has an address space.
IPv4 uses 32-bit addresses, which means 232 or 4,294,967,296 (more than 4
billion) the address space
3. 14.23.120.8
4. 252.5.15.111
• Solution
1. The first bit is 0. This is a class A address.
2. The first 2 bits are 1; the third bit is 0. This is a class C address.
3. The first byte is 14; the class is A.
4. The first byte is 252; the class is E.
Classes and Blocks
One problem with classful addressing is that each class is divided
into a fixed number of blocks with each block having a fixed size
Class C addresses were designed for small organizations with a small number of
attached hosts or routers.
A block in class C is probably too small for many organizations.
Network ID and Host ID
In classful addressing, an IP address in class A, B, or C is divided into network
ID and host ID.
These parts are of varying lengths, depending on the class of the address.
In class A, 1 byte defines the network ID & 3 bytes define the host ID.
In class B, 2 bytes define the network ID & 2 bytes define the host ID.
In class C, 3 bytes define the network ID & 1 byte defines the host ID.
172 16 0 0
You lose two host IP Addresses for each subnet, and perhaps one for the
subnet IP address and one for the subnet broadcast IP address.
You lose the last subnet and all of it’s hosts’ IP addresses as the broadcast
for that subnet is the same as the broadcast for the network.
In older networks, you would have lost the first subnet, as the subnet IP
address is the same as the network IP address. (This subnet can be used in
most networks.)
Classless Addressing
To overcome address depletion and give more organizations access to the Internet,
classless addressing was designed and implemented.
In this scheme, there are no classes, but the addresses are still granted in blocks.
Address Blocks
In classless addressing, when an entity, small or large, needs to be connected to
the Internet, it is granted a block (range) of addresses.
The size of the block (the number of addresses) varies based on the nature and
size of the entity.
For example, a household may be given only two addresses; a large
organization may be given thousands of addresses.
An ISP, as the Internet service provider, may be given thousands or hundreds
of thousands based on the number of customers it may serve.
Restriction
To simplify the handling of addresses, the Internet authorities impose three
restrictions on classless address blocks:
1. The addresses in a block must be contiguous, one after another.
2. The number of addresses in a block must be a power of 2 (1, 2, 4, 8 .... ).
3. The first address must be evenly divisible by the number of addresses.
cntd…
The above figure shows a block of addresses, in both binary and dotted-
The number of addresses is a power of 2 (16 = 24), and the first address is
divisible by 16.
However, in classless addressing the mask for a block can take any
value from 0 to 32.
It is very convenient to give just the value of n preceded by a slash (CIDR
– Classless Inter Domain Routing notation).
The address and the /n notation completely define the whole block (the
first address, the last address, and the number of addresses).
Method I
First address
The first address in the block can be found by setting the 32 - n rightmost
bits in the binary notation of the address to 0s.
E.g. 1, A block of addresses is granted to a small organization. We know
that one of the addresses is 205.16.37.39/28. What is the first address in
the block?
Solution: The binary representation of the given address is
11001101 00010000 00100101 00100111
• If we set 32−28 rightmost bits to 0, we get
The number of addresses in the block is the difference between the last
Example
Solution
To find the first address, the last address, and the number of addresses is
to represent the mask as a 32-bit binary (or 8-digit hexadecimal) number.
This is particularly useful when we are writing a program to find these
pieces of information.
In the above example the /28 can be represented as:
(65,536 addresses).
as follows:
b. The second group has 128 customers; each needs 128 addresses.
Reading Assignment
1. Read how NAT works, Investigate the global IP address scheme of AMU
and how they use it in NAT
IPv6 Addresses
Internet Protocol (IP) version 4 is the most commonly used communication
protocol for both the Internet and internal network environments.
Although IPv4 is robust and scalable, new technologies and higher demand
have paved the way for the eventual adoption of IPv6.
Despite all short-term solutions, address depletion is still a long-term problem for
the Internet.
This and other problems in the IP protocol itself have been the motivation for
IPv6.
An IPv6 address is 128 bits or 32 hexadecimal digits long.
Differences Between IPv4 and IPv6
Advantages of IPv6 Addressing Scheme
1. Large address space:- IPv6 uses a 128-bit address space, which allows for
3.4x1038 or 340,282,366,920,938,463,463,374,607,431,768,211,456 possible
addresses.
2. Hierarchical addressing and routing infrastructure:- The IPv6 address space is
designed to be more efficient for routers, which means that even though there are
many more addresses, routers can process data much more efficiently because of
address optimization.
3. Stateless and Stateful address configuration:- Stateless address configuration
refers to host IP configuration without a DHCP server.
interface.
End of Chapter Three
Any question ???