Group2 Module7&8
Group2 Module7&8
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
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?
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
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.
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
- 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:
Disadvantages:
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
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
Binary to Decimal
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
Binary to Decimal
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
1 0 0 0 0 0 0 1
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
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
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 3: 64+8+2+1 = 75
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
Decimal to Binary
Decimal: 94
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
Decimal 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
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
Both IPv4 and IPv6 addresses are managed by the Internet Assigned Numbers
Authority (IANA)
- 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
- use the address of the destination device as the destination address and can
be routed through an internetwork.
Unicast Transmission
Multicast group: