NSDM Lecture 8 - Layer 3 Design
NSDM Lecture 8 - Layer 3 Design
0 LAYER 3 DESIGN
The third-lowest layer of the OSI Reference Model is the network layer. If the data link layer is the one
that basically defines the boundaries of what is considered a network, the network layer is the one that
defines how internetworks (interconnected networks) function. The network layer is the lowest one in
the OSI model that is concerned with actually getting data from one computer to another even if it is on
a remote network; in contrast, the data link layer only deals with devices that are local to each other.
Network layer takes the responsibility for routing packets from source to destination within or outside a
subnet. Two different subnet may have different addressing schemes or non-compatible addressing
types. Same with protocols, two different subnet may be operating on different protocols which are not
compatible with each other. Network layer has the responsibility to route the packets from source to
destination, mapping different addressing schemes and protocols.
While all of layers 2 through 6 in the OSI Reference Model serve to act as “fences” between the layers
below them and the layers above them, the network layer is particularly important in this regard. It is at
this layer that the transition really begins from the more abstract functions of the higher layers—which
don't concern themselves as much with data delivery—into the specific tasks required to get data to its
destination. The transport layer, which is related to the network layer in a number of ways, continues
this “abstraction transition” as you go up the OSI protocol stack.
Layer-3 Functionalities
Devices which work on Network Layer mainly focus on routing. Routing may include various tasks
aimed to achieve a single goal. These can be:
Addressing devices and networks.
Populating routing tables or static routes.
Queuing incoming and outgoing data and then forwarding them according to quality of service
constraints set for those packets.
Internetworking between two different subnets.
Delivering packets to destination with best efforts.
Provides connection oriented and connection less mechanism.
Some of the specific jobs normally performed by the network layer include:
Logical Addressing: Every device that communicates over a network has associated with it a
logical address, sometimes called a layer three address. For example, on the Internet, the
Internet Protocol (IP) is the network layer protocol and every machine has an IP address. Note
that addressing is done at the data link layer as well, but those addresses refer to local physical
devices. In contrast, logical addresses are independent of particular hardware and must be
unique across an entire internetwork.
Routing: Moving data across a series of interconnected networks is probably the defining
function of the network layer. It is the job of the devices and software routines that function at
the network layer to handle incoming packets from various sources, determine their final
destination, and then figure out where they need to be sent to get them where they are supposed
to go.
Datagram Encapsulation: The network layer normally encapsulates messages received from
higher layers by placing them into datagrams (also called packets) with a network layer header.
Fragmentation and Reassembly: The network layer must send messages down to the data link
layer for transmission. Some data link layer technologies have limits on the length of any
message that can be sent. If the packet that the network layer wants to send is too large, the
network layer must split the packet up, send each piece to the data link layer, and then have
pieces reassembled once they arrive at the network layer on the destination machine. A good
example is how this is done by the Internet Protocol.
Error Handling and Diagnostics: Special protocols are used at the network layer to allow
devices that are logically connected, or that are trying to route traffic, to exchange information
about the status of hosts on the network or the devices themselves.
With its standard functionalities, Layer 3 can provide various features as:
Quality of service management
Load balancing and link management
Security
Interrelation of different protocols and subnets with different schema.
Different logical network design over the physical network design.
L3 VPN and tunnels can be used to provide end to end dedicated connectivity.
A router is a Layer 3 networking device that connects network segments or entire networks. It is
considered more intelligent than Layer 2 devices because it makes decisions based on information
received about the network as a whole. A router examines the IP address of the destination computer to
determine which path is best to reach the destination. Path determination is the process that the router
uses to select the next hop, that is, the path to the next connected router that will move the data toward
its destination. This process is known as routing.
After routers determine the path, the transport layer is responsible for reliable data delivery.
Layer 3 Switches operate at the network layer and use both MAC and IP addresses to communicate
with the rest of the network. The universally accepted IP protocol allows for large-sized networks that
can grow virtually limitless and offers advanced features for extra flexibility.
Traditional switching operates at layer 2 of the OSI model, where packets are sent to a specific switch
port based on destination MAC addresses. Routing operates at layer 3, where packets are sent to a
specific next-hop IP address, based on destination IP address. Devices in the same layer 2 segment do
not need routing to reach local peers. What is needed however is the destination MAC address which
can be resolved through the Address Resolution Protocol (ARP).
A Layer 3 switch is basically a switch that can perform routing functions in addition to switching. A
client computer requires a default gateway for layer 3 connectivity to remote subnets. When the
computer sends traffic to another subnet, the destination MAC address in the packet will be that of the
default gateway, which will then accept the packet at layer 2, and proceed to route the traffic to the
appropriate destination based on its routing table.
A Layer 3 switch works much like a router because it has the same IP routing table for lookups and it
forms a broadcast domain. However, the "switch" part of "Layer 3 switch" is there because:
1. The layer 3 switch looks like a switch. It has 24+ Ethernet ports and noWAN interfaces.
2. The layer 3 switch will act like a switch when it is connecting devices that are on the same
network.
3. The layer 3 switch is the same as a switch with the router's IP routing intelligence built in.
4. The switch works very quickly to switch or route the packets it is sent.
In other words, the Layer 3 switch is really like a high-speed router without the WAN connectivity.
A router is a Layer 3 device and is considered one of the most powerful devices in the network
topology.
Layer 3 devices can be used to create unique LAN segments. Layer 3 devices allow communication
between segments based on Layer 3 addresses, such as IP addresses. Implementation of Layer 3
devices allows for segmentation of the LAN into unique physical and logical networks. Routers also
allow for connectivity to WANs, such as the Internet.
Layer 3 routing determines traffic flow between unique physical network segments based on Layer 3
addresses. A router forwards data packets based on destination addresses. A router does not forward
LAN-based broadcasts such as ARP requests. Therefore, the router interface is considered the entry and
exit point of a broadcast domain and stops broadcasts to other LAN segments.
Routers provide scalability because they serve as firewalls for broadcasts and they can divide networks
into subnetworks, or subnets, based on Layer 3 addresses.
In order to decide whether to use routers or switches, it is important to determine the problem that
needs to be solved. If the problem is related to protocol rather than issues of contention, then routers are
the appropriate solution. Routers solve problems with excessive broadcasts, protocols that do not scale
well, security issues, and network layer addresses. Routers are more expensive and more difficult to
configure than switches.
Figure shows an example of an implementation that has multiple networks. All data traffic from
Network 1 destined for Network 2 has to go through the router. In this implementation, there are two
broadcast domains. The two networks have unique Layer 3 network address schemes. Multiple
physical networks can be created if the horizontal cabling and vertical cabling are patched into the
appropriate Layer 2 switch. This can be done with patch cables. This implementation also provides
robust security because all traffic in and out of the LAN must pass through the router.
Once an IP address scheme is developed for a client, it should be clearly documented. A standard
convention should be set for addresses of important hosts on the network. This address scheme should
be kept consistent throughout the entire network. Address maps provide a snapshot of the network.
Physical maps of the network helps to troubleshoot the network.
VLAN implementation combines Layer 2 switching and Layer 3 routing technologies to limit both
collision domains and broadcast domains. VLANs also provide security with the creation of VLAN
groups that communicate with other VLANs through routers.
A physical port association is used to implement VLAN assignment. Ports P1, P4, and P6 have been
assigned to VLAN 1. VLAN 2 has ports P2, P3, and P5. Communication between VLAN 1 and VLAN
2 can occur only through the router. This limits the size of the broadcast domains and uses the router to
determine whether VLAN 1 can talk to VLAN 2.
8.4 Lecture Activities
Continue with the fact -finding mission and get information from the Network
Administrator/Engineer of your company/organization. Try to find out the
following:
Has the network engineer deployed Layer 3 switches in your network?
Do you have any VLANs?
How does your organization connect to the internet?
8.5 Self –Test Questions
List and briefly discuss the functions of the network layer.
When is it appropriate to use a Layer 3 switch and a router?
What are some of the benefits of sub-netting a network?
8.6 Summary
In this lesson we have learned:
About the Network Layer
The functions and features of the Network Layer.
About the Network Layer Devices.
The main concerns in Layer 3 Design.