0% found this document useful (0 votes)
24 views84 pages

Group2 Module7&8

The document discusses routing between networks. It covers the need for routing when networks grow large and need to be divided. Routers are used to interconnect these divided networks and control traffic flow. Routers use routing tables to determine the best path to a destination network. The routing table contains network addresses and the interfaces they can be reached through. Hosts use a default gateway address to determine which router to send traffic through when going to another network.

Uploaded by

rexjimenez28
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)
24 views84 pages

Group2 Module7&8

The document discusses routing between networks. It covers the need for routing when networks grow large and need to be divided. Routers are used to interconnect these divided networks and control traffic flow. Routers use routing tables to determine the best path to a destination network. The routing table contains network addresses and the interfaces they can be reached through. Hosts use a default gateway address to determine which router to send traffic through when going to another network.

Uploaded by

rexjimenez28
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/ 84

Module 7:

Routing Between Networks

Module Objective: Create a fully connected LAN.


● The Need for Routing
● The Routing Table
● Create a LAN
Topic 7.1
The Need for Routing
Criteria for Dividing the Local Network

As networks grow, it is often necessary to divide one access layer


network into multiple access layer networks. There are many ways to
divide networks based on different criteria:
- Broadcast containment
- Security requirements
- Physical locations
- Logical grouping
Criteria for Dividing the Local Network

The distribution layer connects these independent local networks and controls the
traffic flowing between them. It is responsible for ensuring that traffic between hosts
on the local network stays local. Only traffic that is destined for other networks is
passed on. The distribution layer can also filter incoming and outgoing traffic for
security and traffic management.
Networking devices that make up the distribution layer are designed to interconnect
networks, not individual hosts. Individual hosts are connected to the network via
access layer devices, such as switches. The access layer devices are connected to
each other via the distribution layer device, such as a router.
Broadcast Containment

Routers in the distribution layer can


limit broadcasts to the local network
where they need to be heard. Although
broadcasts are necessary, too many
hosts connected on the same local
network can generate excessive
broadcast traffic and slow down the
network.
Security

Routers in the distribution layer can


separate and protect certain groups of
computers where confidential
information resides. Routers can also
hide the addresses of internal
computers from the outside world to
help prevent attacks, and control who
can get into or out of the local network.
Locations

Routers in the distribution layer can be


used to interconnect local networks at
various locations of an organization
that are geographically separated.
Logical Grouping

Routers in the distribution layer can be


used to logically group users, such as
departments within a company, who
have common needs or for access to
resources.
Now We Need Routing
In most situations we want our devices to be able to connect beyond our local network: out to
other homes, businesses, and the internet. Devices that are beyond the local network segment are
known as remote hosts. When a source device sends a packet to a remote destination device, then
the help of routers and routing is needed. Routing is the process of identifying the best path to a
destination.
A router is a networking device that connects multiple Layer 3, IP networks. At the distribution
layer of the network, routers direct traffic and perform other functions critical to efficient network
operation. Routers, like switches, are able to decode and read the messages that are sent to them.
Unlike switches, which make their forwarding decision based on the Layer 2 MAC address, routers
make their forwarding decision based on the Layer 3 IP address.
Now We Need Routing
The packet format contains the IP addresses of the destination and source hosts, as well as the
message data being sent between them. The router reads the network portion of the destination IP
address and uses it to find which one of the attached networks is the best way to forward the
message to the destination.

Anytime the network portion of the IP addresses of the source and destination hosts do not match,
a router must be used to forward the message. If a host located on network 1.1.1.0 needs to send
a message to a host on network 5.5.5.0, the host will forward the message to the router. The
router receives the message, de-encapsulates the Ethernet frame, and then reads the destination
IP address in the IP packet. It then determines where to forward the message. It re-encapsulates
the packet back into a new frame, and forwards the frame on to its destination.
IP Packet Encapsulated in an Ethernet Frame
Topic 7.2
The Routing Table
Router Packet Forwarding
Path Selection

How does the router determine which interface to use to send the message on a
path to get to the destination network?

Each port, or interface, on a router connects to a different local network. Every


router contains a table of all locally connected networks and the interfaces that
connect to them. These routing tables can also contain information about the
routes, or paths, that the router uses to reach other remote networks that are not
locally attached.
Path Selection

When a router receives a frame, it decodes the frame to get to the packet containing
the destination IP address. It matches the network portion of the destination IP
address to the networks that are listed in the routing table. If the destination network
address is in the table, the router encapsulates the packet in a new frame in order to
send it out. (Note that it will insert a new destination MAC address as well, and
recalculate the FCS field, in the new frame). It forwards the new frame out of the
interface associated with the path, to the destination network. The process of
forwarding the packets toward their destination network is called routing.
Router interfaces do not forward messages that are addressed to the local network
broadcast IP address. As a result, local network broadcasts are not sent across routers
to other local networks
Path Selection
Messages Within and Between Networks - Part 1
Messages Within and Between Networks - Part 2
Packet Forwarding
A router forwards a packet to one of two places: a directly connected network containing the
actual destination host, or to another router on the path to reach the destination host. When a
router encapsulates the frame to forward it out an Ethernet interface, it must include a destination
MAC address.
This is the MAC address of the actual destination host, if the destination host is part of a network
that is locally connected to the router. If the router must forward the packet to another router
through an Ethernet interface, it will use the MAC address of the connected router. Routers obtain
these MAC addresses from ARP tables.
Each router interface is part of the local network to which it is attached and maintains its own ARP
table for that network. The ARP tables contain the MAC addresses and IPv4 addresses of all the
individual hosts on that network.
Packet Forwarding
Routing Table Entries

Routers move information between local and remote networks. To do this, routers
must use routing tables to store information. Routing tables are not concerned
with the addresses of individual hosts. Routing tables contain the addresses of
networks, and the best path to reach those networks. Entries can be made to the
routing table in two ways: dynamically updated by information received from other
routers in the network, or manually entered by a network administrator. Routers
use the routing tables to determine which interface to use to forward a message
to its intended destination.
Routing Table Entries

If the router cannot determine where to forward a message, it will drop it. Network
administrators configure a static default route that is placed into the routing table
so that a packet will not be dropped due to the destination network not being in
the routing table. A default route is the interface through which the router
forwards a packet containing an unknown destination IP network address. This
default route usually connects to another router that can forward the packet
towards its final destination network.
Routing Table Entries
The Default Gateway

● To send a message to another host on the same local network, a host will use ARP to
discover the MAC address of the destination host and then forward the message
directly.
● To send a message to a host on a remote network, a host will use the router. The host
will include the IP address of the destination host in the packet and encapsulate the
packet into a frame using the MAC address of the router as the destination.
● The source host determines the MAC address of the router by using ARP to resolve the
default gateway IPv4 address. The default gateway address is configured in the host
TCP/IP settings and is the address of the router interface connected to the same local
network as the source host.
The Default Gateway

It is important that the correct default


gateway be configured on each host on
the local network. If no default gateway
is configured in the host TCP/IP
settings, or if the wrong default gateway
is specified, messages addressed to
hosts on remote networks cannot be
delivered.
Topic 7.3
Create a LAN
Local Area Networks
Local area network (LAN) refers to a group of
interconnected local networks under the
same administrative control. Initially, LANs were
small networks in a single location, but they
have evolved to include hundreds of hosts in
multiple buildings and locations. LANs typically
use Ethernet or wireless protocols and support
high data rates. The term intranet is often used
to refer to a private LAN owned by an
organization, accessible only to authorized
members, employees, or others. It is crucial to
note that all local networks within a LAN are
under one administrative control.
Local and Remote Network Segments

Within a LAN, it is possible to place all hosts on a single local network or divide
them up between multiple networks connected by a distribution layer device. How
this placement is determined depends on desired results.

- All Hosts in One Local Segment


- Hosts on a Remote Segment
All Hosts in One Local Segment

Placing all hosts on a single local network allows them to be seen by all other
hosts. This is because there is one broadcast domain and hosts use ARP to find
each other.

In a simple network design, it may be beneficial to keep all hosts within a single
local network. However, as networks grow in size, increased traffic will decrease
network performance and speed. In this case, it may be beneficial to move some
hosts onto a remote network.
All Hosts in One Local Segment

Advantages of a single local segment:

- Appropriate for simpler networks


- Less complexity and lower network cost
- Allows devices to be "seen" by other devices
- Faster data transfer - more direct communication
- Ease of device access
All Hosts in One Local Segment

Disadvantages of a single local segment:

- All hosts are in one broadcast domain which causes more traffic on the
segment and may slow network performance
- Harder to implement QoS
- Harder to implement security
All Hosts in One Local Segment
Hosts on a Remote Segment

Placing additional hosts on a remote network will decrease the impact of traffic
demands. However, hosts on one network will not be able to communicate with
hosts on the other network without the use of routing. Routers increase the
complexity of the network configuration and can introduce latency, or time delay,
on packets sent from one local network to the other.
Hosts on a Remote Segment

Advantages:

- More appropriate for larger, more complex networks


- Splits up broadcast domains and decreases traffic
- Can improve performance on each segment
- Makes the machines invisible to those on other local network segments
- Can provide increased security
- Can improve network organization
Hosts on a Remote Segment

Disadvantages:

- Requires the use of routing (distribution layer)


- Router can slow traffic between segments
- More complexity and expense (requires a router)
Hosts on a Remote Segment
Module 8:
The Internet Protocol

Module Objective: Explain how communication occurs on Ethernet networks.


We will learn…
● Purpose of an IPv4 Address
● Binary Convention of an IPv4 Address
● The IPv4 Address Structure
● Classful IPv4 Addressing
● Public and Private Addresses
● Unicast, Broadcast and Multicast Addresses
Topic 8.1
Purpose of the IPv4 Address
The Purpose of an IPv4 Address

An IPv4 address is essential for a host to connect


to the internet and local networks. It serves as a
unique identifier for the host, enabling both local
and remote communication. The address is
assigned to the host's network interface, typically a
NIC, found in devices like workstations, servers,
printers, and IP phones. Some servers may have
multiple NICs, each with its own IPv4 address, and
router interfaces also require IPv4 addresses to
connect to IP networks.
Topic 8.2
Binary Conversion of an IPv4 Address
IPv4 Addressing

An IPv4 address is simply a series of 32 binary bits (ones and zeros). There are
over 4 billion possible IPv4 addresses using a 32-bit addressing scheme.

It is very difficult for humans to read a binary IPv4 address. For this reason, the 32
bits are grouped into four 8-bit bytes called octets. An IPv4 address in this format
is hard for humans to read, write, and remember. To make the IPv4 address easier
to understand, each octet is presented as its decimal value, separated by a
decimal point or period. This is referred to as dotted-decimal notation.
IPv4 Addressing

When a host is configured with an IPv4 address, it is entered as a dotted decimal


number such as 192.168.1.5, as shown in the figure. The 32-bit binary equivalent
is 11000000101010000000000100000101. If you mistyped just one bit, the
address would be different, and the host may not be able to communicate on the
network.
Binary to Decimal

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1
Binary to Decimal

Example: Convert the IPv4 Address from binary to dotted-decimal notation.

10000001 00001011 01001011 11101111

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1
Binary to Decimal

Example: Convert the IPv4 Address from binary to dotted-decimal notation.

10000001 00001011 01001011 11101111

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

1 0 0 0 0 0 0 1

Octet 1: 128+1 = 129


Binary to Decimal

Example: Convert the IPv4 Address from binary to dotted-decimal notation.

10000001 00001011 01001011 11101111

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

0 0 0 0 1 0 1 1

Octet 2: 8+2+1 = 11
Binary to Decimal

Example: Convert the IPv4 Address from binary to dotted-decimal notation.

10000001 00001011 01001011 11101111

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

0 1 0 0 1 0 1 1

Octet 3: 64+8+2+1 = 75
Binary to Decimal

Example: Convert the IPv4 Address from binary to dotted-decimal notation.

10000001 00001011 01001011 11101111

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

1 1 1 0 1 1 1 1

Octet 4: 128+64+32+8+4+2+1 = 239


Binary to Decimal

Example: Convert the IPv4 Address from binary to dotted-decimal notation.

10000001 00001011 01001011 11101111


Octet 1: 128+1 = 129

Octet 2: 8+2+1 = 11 Answer: 129.11.75.239

Octet 3: 64+8+2+1 = 75

Octet 4: 128+64+32+8+4+2+1 = 239


Decimal to Binary

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1
Decimal to Binary

Example: Convert the IPv4 Address from dotted-decimal notation to binary.

Decimal: 94

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1
Decimal to Binary

Example: Convert the IPv4 Address from dotted-decimal notation to binary.

Decimal: 94
27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

0 1 0 1 1 1 1 0

1. 94 - 64 = 30
2. 30 - 16 = 14 Answer: 01011110
3. 14 - 8 = 6
4. 6-4=2
5. 2-2=0
Topic 8.3
The IPv4 Address Structure
Networks and Hosts

The logical 32-bit IPv4 address is hierarchical and is made up of two parts, the
network and the host. In the figure, the network portion is blue, and the host
portion is red. Both parts are required in an IPv4 address. Both networks have the
subnet mask 255.255.255.0.
As an example, there is a host with an IPv4 address 192.168.5.11 with a subnet
mask of 255.255.255.0. The first three octets, (192.168.5), identify the network
portion of the address, and the last octet, (11) identifies the host. This is known as
hierarchical addressing because the network portion indicates the network on
which each unique host address is located. Routers only need to know how to
reach each network, rather than needing to know the location of each individual
host.
Networks and Hosts

With IPv4 addressing, multiple logical networks can exist on one physical network,
if the network portion of the logical network host addresses is different. For
example: three hosts on a single, physical local network have the same network
portion of their IPv4 address (192.168.18) and three other hosts have different
network portions of their IPv4 addresses (192.168.5). The hosts with the same
network number in their IPv4 addresses will be able to communicate with each
other, but will not be able to communicate with the other hosts without the use of
routing. In this example, there is one physical network and two logical IPv4
networks.
Networks and Hosts

Another example of a hierarchical network is the telephone system. With a


telephone number, the country code, area code and exchange represent the
network address and the remaining digits represent a local phone number.
Networks and Hosts

Another example of a hierarchical network is the telephone system. With a


telephone number, the country code, area code and exchange represent the
network address and the remaining digits represent a local phone number.
Logical AND

A logical AND is one of three basic binary operations used in digital logic. The other
two are OR and NOT. Although all three are used in data networks, only AND is used in
determining the network address. Therefore, our discussion here will be limited to the
logical AND operation.

1 AND 1 = 1

0 AND 1 = 0

1 AND 0 = 0

0 AND 0 = 0
Logical AND

To identify the network address of an IPv4 host, the IPv4 address is logically
ANDed, bit by bit, with the subnet mask. ANDing between the address and the
subnet mask yields the network address.
To illustrate how AND is used to discover a network address, consider a host with
IPv4 address 192.168.10.10 and subnet mask of 255.255.255.0. The following
figure displays the host IPv4 address and converted binary address. The host
subnet mask binary address is ANDed.
Logical AND
Logical AND
Calculate Whether the Destination is Local or Remote

When an IPv4 host is configured, a subnet mask is assigned along with an IPv4
address. Like the IPv4 address, the subnet mask is 32 bits long. The subnet mask
signifies which part of the IPv4 address is network and which part is host.
The subnet mask is compared to the IPv4 address from left to right, bit for bit. The 1s
in the subnet mask represent the network portion; the 0s represent the host portion. In
the example shown, the first three octets are network, and the last octet represents the
host.
When a host sends a packet, it compares its subnet mask to its own IPv4 address and
the destination IPv4 address. If the network bits match, both the source and
destination host are on the same network and the packet can be delivered locally. If
they do not match, the sending host forwards the packet to the local router interface to
be sent on to the other network.
Calculate Whether the Destination is Local or Remote
Calculate the Number of Hosts

The subnet masks we see most often with home and small business networking are:
255.0.0.0 (8-bits), 255.255.0.0 (16 bits) and 255.255.255.0 (24 bits). A subnet mask of
255.255.255.0 (decimal) or 11111111.11111111.1111111.00000000 (binary) uses 24
bits to identify the network number which leaves 8 bits to number the hosts on that
network, as shown in the figure.
To calculate the number of hosts that can be on that network, take the number 2 to the
power of the number of host bits (2 ^ 8 = 256). From this number, we must subtract 2
(256-2). The reason we subtract 2 is that all 1s within the host portion of an IPv4
address is a broadcast address for that network and cannot be assigned to a specific
host. All 0s within the host portion indicate the network ID and again, cannot be
assigned to a specific host. Powers of 2 can be calculated easily with the calculator
that comes with any Windows operating system.
Calculate the Number of Hosts

Another way to determine the number of hosts available is to add up the values of
the available host bits (128+64+32+16+8+4+2+1 = 255). From this number,
subtract 1 (255-1 = 254), because the host bits cannot be all 1s. It is not
necessary to subtract 2 because the value of all 0s is 0 and is not included in the
addition.

With a 16-bit mask, there are 16 bits (two octets) for host addresses and a host
address could have all 1s (255) in one of the octets. This might appear to be a
broadcast but as long as the other octet is not all 1s, it is a valid host address.
Remember that the host looks at all host bits together, not at octet values.
Calculate the Number of Hosts
Topic 8.4
Classful IPv4 Addressing
Classful and Classless Addressing

In 1981, internet IPv4 addresses were assigned using classful addressing. Customers were allocated a network address based on one of
three classes, A, B, or C. The addresses were divided into the following ranges or classes:

● Class A (0.0.0.0/8 to 127.0.0.0/8) - Designed to support extremely large networks with more than 16 million host addresses. It used
a fixed /8 prefix (255.0.0.0) with the first octet to indicate the network address and the remaining three octets for host addresses.
● Class B (128.0.0.0 /16 - 191.255.0.0 /16) - Designed to support the needs of moderate to large size networks with up to
approximately 65,000 host addresses. It used a fixed /16 prefix (255.255.0.0) with the two high-order octets to indicate the network
address and the remaining two octets for host addresses.
● Class C (192.0.0.0 /24 - 223.255.255.0 /24) - Designed to support small networks with a maximum of 254 hosts. It used a fixed /24
prefix (255.255.255.0) with the first three octets to indicate the network and the remaining octet for the host addresses.

Note: There is also a Class D multicast block consisting of 224.0.0.0 to 239.0.0.0 and a Class E experimental address block consisting of
240.0.0.0 - 255.0.0.0.
Classful and Classless Addressing
Video - Classful IPv4 Addressing
Topic 8.5
Public and Private IPv4 Addresses
Private IPv4 Addressing

- Public IPv4 addresses are addresses which are globally routed between ISP
(internet service provider) routers.

- However, not all available IPv4 addresses can be used on the internet. There
are blocks of addresses called private addresses that are used by most
organizations to assign IPv4 addresses to internal hosts.
Private IPv4 Addressing

- In the mid-1990s private IPv4 addresses were introduced because of the


depletion of IPv4 address space. Private IPv4 addresses are not unique and
can be used by an internal network.

- Examples of private address block:


10.0.0.0 /8 or 10.0.0.0 to 10.255.255.255
172.16.0.0 /12 or 172.16.0.0 to 172.31.255.255
192.168.0.0 /16 or 192.168.0.0 to 192.168.255.255
Private IPv4 Addressing
- It is important to know that
addresses within these address
blocks are not allowed on the internet
and must be filtered (discarded) by
internet routers.

- Network Address Translation (NAT)


is used to translate between private
IPv4 and public IPv4 addresses. This
is usually done on the router that
connects the internal network to the
ISP's network.
Assignment of IPv4 Addresses

- For a company or organization to support network hosts, such as web servers


that are accessible from the internet, they must have a block of public
addresses assigned.
- Public addresses must be unique, and use of these public addresses is
regulated and allocated to each organization separately. This is true for IPv4
and IPv6 addresses.
Assignment of IPv4 Addresses

Both IPv4 and IPv6 addresses are managed by the Internet Assigned Numbers
Authority (IANA)

- The IANA manages and allocates blocks of IP addresses to the Regional


Internet Registries (RIRs).

- RIRs are responsible for allocating IP addresses to ISPs who in turn provide
IPv4 address blocks to organizations and smaller ISPs.
Regional Internet Registries
Topic 8.6
Unicast, Broadcast and Multicast Addresses
Unicast Transmission

- is used for normal host-to-host communication in both a client/server and a


peer-to-peer network.

- use the address of the destination device as the destination address and can
be routed through an internetwork.
Unicast Transmission

- For unicast communication, the


addresses assigned to the two end
devices are used as the source and
destination IPv4 addresses.
Broadcast Transmission

- Pockets are sent to all hosts in the


network using a broadcast address
- Broadcast may be directed or limited
- In Directed Broadcast, a host in one
network sends the message to all
host in another network.
- In Limited Broadcast, the data
reaches to all the host in a same
network as the source.
Multicast Transmission
- reduces traffic by allowing a host to send a single packet to a selected set of
hosts that subscribe to a multicast group.

Multicast group:

- Contains a server that is responsible for transmitting data packets to the


clients in the same group.
- IPv4 has reserved the 224.0.0.0 to 239.255.255.255 addresses.
Multicast Transmission
Thank you for Listening

You might also like