Linux Training in Coimbatore & Best Linux Server Administration Training Institute NUX SOFTWARE SOLUTIONS FREE DEMO CLASSES AVAILABLE Call us 096263 53489
Kernel:It is a program.Kernel is a Core component
of operating system, interacts directly with hardware and provides low level
services to upper layer components.
Shell:
An interface to kernel, hiding complexity of kernel’s functions from users.
Takes commands from user and executes kernel’s functions.
User
Interface: In information technology, the user interface (UI) is
everything designed into an information device with which a human being may
interact. Two types CLI (Command line interface) and GUI (Graphical User
Interface).
System
Library - System libraries are special functions or programs using which
application programs or system utilities accesses Kernel's features. These
libraries implements most of the functionality of the operating system and do
not requires kernel module's code access rights.
System
Utility - System Utility programs are responsible to do specialized,
individual level tasks.
Kernel Mode vs User Mode
Kernel component code executes in a special privileged mode
called kernel mode with full access to all resources of the computer.
This code represents a single process, executes in single address space
and do not require any context switch and hence is very efficient and
fast. Kernel runs each processes and provides system services to
processes, provides protected access to hardwares to processes.
Support code which is not required to run in kernel mode is in
System Library. User programs and other system programs works in User
Mode which has no access to system hardwares and kernel code. User
programs/ utilities use System libraries to access Kernel functions to
get system's low level tasks.
Basic Features
Following are some of the important features of Linux Operating System.
Portable - Portability means softwares can works on different
types of hardwares in same way.Linux kernel and application programs
supports their installation on any kind of hardware platform.
Open Source - Linux source code is freely available and it is
community based development project. Multiple teams works in
collaboration to enhance the capability of Linux operating system and it
is continuously evolving.
Multi-User - Linux is a multiuser system means multiple users
can access system resources like memory/ ram/ application programs at
same time.
Multiprogramming - Linux is a multiprogramming system means multiple applications can run at same time.
Hierarchical File System - Linux provides a standard file structure in which system files/ user files are arranged.
Shell - Linux provides a special interpreter program which
can be used to execute commands of the operating system. It can be used
to do various types of operations, call application programs etc.
Security - Linux provides user security using authentication
features like password protection/ controlled access to specific files/
encryption of data.
Linux System Architecture is consists of following layers
Hardware layer - Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
Kernel - Core component of Operating System, interacts directly with hardware, provides low level services to upper layer components.
Shell - An interface to kernel, hiding complexity of kernel's
functions from users. Takes commands from user and executes kernel's
functions.
Utilities - Utility programs giving user most of the functionalities of an operating systems.
UNIX is the first Operating system in the
world, developed by Kem Thompson and Dennis Ritchie in 1969 at Bell Lab by
AT&T Company
IBM:AIX
SGI:IRIX
Sun:Solaris
Free
software foundation organization, they start a project by name GNU. The main
aim of this project is to develop such an operating system that can run on any
platform.
In 1991, a student Linuz Torvalds developed a
kernel named Linux’s kernel plus GNU application called Linux operating system.
Linux is an open source technology.
Different companies that provide Linux in
Market are Redhat, SuSe, Scientific, Centos, and Knoppix etc.
Features:
ØLinux is the fastest Operating
system in the world. It runs 2 to 3 times fast than windows OS.
ØLinux is the much secured OS
because there is no any problem of virus.
ØLinux file format is text
format and windows file format is binary format.
ØLinux is very reliable OS
because kernel of Linux is very stable as compare to windows kernel not crashed
easily.
ØKernel of Linux is very small
in size it can be stored in floppy.
ØLinux uses the x-Window system
which is advanced network windowing system. Using this system we can display
output of any workstation monitor attached in the network.
Advantages:
ØVirus Proof
ØCrash Proof
ØEconomical
ØMultiuser, Multi-Tasking and
Multi processing capacity
Login Modes:
Two modes:
1.Text mode (CLI) - All the commands can be executed
2.Graphical
Mode (GUI)
Login
to Text mode we have use (Ctrl+Alt+F1…..F6, F8….F12) (Ctrl+Alt+F7) for
Graphical Mode
Open Source
The idea behind Open Source software is rather simple: when programmers
can read, distribute and change code, the code will mature. People can adapt
it, fix it, debug it, and they can do it at a speed that dwarfs the performance
of software developers at conventional companies. This software will be more
flexible and of a better quality than software that has been developed using
the conventional channels, because more people have tested it in more different
conditions than the closed software developer ever can.
The Open Source initiative started to make this clear to the commercial
world, and very slowly, commercial vendors are starting to see the point. While
lots of academics and technical people have already been convinced for 20 years
now that this is the way to go, commercial vendors needed applications like the
Internet to make them realize they can profit from Open Source. Now Linux has
grown past the stage where it was almost exclusively an academic system, useful
only to a handful of people with a technical background. Now Linux provides
more than the operating system: there is an entire infrastructure supporting the
chain of effort of creating an operating system, of making and testing programs
for it, of bringing everything to the users, of supplying maintenance, updates
and support and customizations, etcetera. Today, Linux is ready to accept the
challenge of a fast-changing world.
Nagios project
is started in 1999. Nagios Enterprise monitoring tool will monitor your
entire IT infrastructure to ensure systems, applications, services and
business process are functioning properly. Which has two types of
Software’s one is Nagios Core which is fully free (opensource) we have
to configure everything by our own. Another one is Nagios XI which has
beautiful GUI interface it is very easy to configure monitoring.
Nagios
monitors your entire IT infrastructure to ensure systems, applications,
services, and business processes are functioning properly. In the event
of a failure, Nagios can alert technical staff of the problem, allowing
them to begin remediation processes before outages affect business
processes, end-users, or customers. With Nagios you’ll never be left
having to explain why an unseen infrastructure outage hurt your
organization’s bottom line.
Monitoring
Servers and networking devices with icinga2 is very easy. You can
download and add plugins as many as like. No need to make set-up or
maintenance of the monitoring system itself any more complex. That’s why
Icinga 2 features a new configuration format that is intuitive to
write, efficient to execute and even adjusts to the changing conditions
of your environment at run-time.
Clear-cut, object-based configuration
Icinga 2 introduces a new object-based, rule-driven configuration
format, which offers user-friendly features such as apply rules for
dynamic object generation. Taking inspiration from Puppet formats,
Icinga 2 offers clear, “one best way” configuration rules. This allows
Icinga 2 to depart from Nagios(TM)’s multiple configuration formats
(e.g. defining host/service dependencies and parent/child relationships
for hosts) – the cause of much user confusion.
The Icinga 2
configuration format is currently set as text files, in preparation for
later transition to configuration via API, or GUI and CLI. A
configuration migration script that translates existing Icinga 1 /
Nagios configurations into the new Icinga 2 format also makes migration
easier. Apply & assign attributes Keep configuration work to
a minimum by defining templates to ”apply” to configuration objects.
Apply services and notifications to hosts, or downtimes and dependencies
to services.
Clever commands & runtime macros Commands in
Icinga 2 are smarter than their Nagios™-style cousins. To begin with,
Icinga 2 offers three distinct command types: Check, notification and
event commands. They can be given default values, custom attributes,
runtime macros and conditional behaviours. Each additional option can be
given precedence over the other, so that your configuration
intelligently adapts at runtime to changing monitoring conditions.
Logical Dependencies
Say goodbye to confusing parent/child relationships. Dependencies in
Icinga 2 are straightforward; they can be defined as host-host,
service-service or mixed (host-service and service-host) and all work in
the same manner.
Dynamic Notifications Similar to Icinga 1,
event handlers and notifications are supported. Thanks to the new
dynamic configuration format, users can adjust notification settings at
runtime (e.g. in order to implement on-call rotation). For example,
new notification objects replace notification-specific attributes for
services, while user and user groups replace contact and contact groups.
This new format allows notifications to be defined more precisely and
intuitively. On top of this, escalations in Icinga 2 are configured as
notifications with a defined beginning and end, as are recurring
downtimes.
OpenNMS
is the world’s first Enterprise opensource monitoring tool. Which is
capable of monitoring Servers and Networking devices using SNMP
protocol. OpenNMS has more and more features such as
Automated and Directed discovery and provisioning
Event and Notification Management
Service Assurance
Performance Measurement
Open Source: OpenNMS is 100% Free and Open Source software, with no license fees, software subscriptions or special “enterprise” versions.
Using
zabbix enterprise level monitoring tool, we can monitorr real time
thousands of servers, networking devices, virtual machines
simultaneously. Along with storing the data, visualization features are
available (overviews, maps, graphs, screens, etc), as well as very
flexible ways of analyzing the data for the purpose of alerting. Zabbix
offers great performance for dat gathering and can be scaled to very
large environments.
Cacti
mainly used for Network device monitoring. We can create templates.
Download performance data as CSV and we can do whatever we want. User
Management and graphs. Cacti makes use of RRDTool
to generate graphs and collect data from Networking devices. The
frontend is completely PHP driven. Along with being able to maintain
Graphs, Data Sources, and Round Robin Archives in a database, cacti
handles the data gathering. There is also SNMP support for those used to
creating traffic graphs with MRTG.
Features
Graphs
Datasources
Data Gathering
Template creation
Graph Display
User Management
Graph
templates enable common graphs to be grouped together by templating.
Every field for a normal graph can be templated or specified on a
per-graph basis.
Data source templates enable common data source
types to be grouped together by templating. Every field for a normal
data source can be templated or specified on a per-data source basis.
Host
templates are a group of graph and data source templates that allow you
to define common host types. Upon the creation of a host, it will
automatically take on the properties of its template.
The tree
view allows users to create “graph hierarchies” and place graphs on the
tree. This is an easy way to manage/organize a large number of graphs.
The list view lists the title of each graph in one large list which links the user to the actual graph.
The
preview view displays all of the graphs in one large list format. This
is similar to the default view for the 14all cgi script for
RRDTool/MRTG.
To be able to route a packet, a router must know at least the following:
Destination address to where the packet is destined. Layer 3 protocols such an IP take care of this.
Neighboring routers from which remote networks can be learned of and packets can be moved to on way to its destination.
Routes to remote networks and a way to determine the best route to each of them.
Way to learn, verify and manage routing information. Incomplete,
incorrect or unstable routing information is worse than not having any
routing information. If a router does not have routing information, it
will drop the packets and let the source know. If a router has incorrect
routing information, loops can form and bring down networks.
As you would have realized by now, the essence of routing is how the
router learns about the remote networks. Routing information is stored
in the routing table also called the Routing Information Base (RIB).
The RIB consists of routes to destination networks. Each route is a
combination of the destination network address, subnet mask and the next
hop towards the destination. There are three ways for a router to learn
routes:
Static Routing – This is the method by which an administrator
manually adds routes to the routing table of a router. This is a method
for small networks but it is not scalable for larger networks.
Default Routing – This is the method where all routers are
configured to send all packets towards a single router. This is a very
useful method for small networks or for networks with a single entry and
exit point. It is usually used in addition to Static and/or Dynamic
routing.
Dynamic Routing – This is the method where protocols and
algorithms are used to automatically propagate routing information. This
is the most common method and most complex method of routing. Each
routing protocol can have chapters or even whole books written about
then. Most of them have one or more RFCs dedicated to them. In fact, the
whole of the next chapter is dedicated to dynamic routing.
The following sections look at each of these routing types while implementing the first two types in our example network.
Static Routing
When you manually add routes to the routing table, it is called
static routing. There are advantages and disadvantages in using static
routing. The advantages are:
There is no overhead in terms of CPU usage of the router as well as
bandwidth between routers. When dynamic routing is used, packets are
exchanged between routers and that uses bandwidth. That can be costly
when they traverse across WAN links. The routers also need to process
these packets and that consumes some CPU cycles as well.
It adds a certain degree of security since the administrator controls which routes the routers can know and learn.
The disadvantages of static routing are:
The administrator needs to know the internetwork so well that he/she
knows where each destination network lies and which is the next hop
towards it.
Every change needs to be manually done on each router in the internetwork.
In large networks this can be unmanageable.
To add a static route, use the following command in the global configuration mode:
ip route destination_network mask {next_hop_address | exit_interface}
As you can see, the command is pretty simple. You need to specify the
destination network address, its mask and the address of the next hop
towards the destination. You can also specify the exit interface instead
of the next hop address. Using the exit interface will cause the router
to reply or ARP query and response from the next hop router and is not
generally recommended.
Figure 4-2Static Routing
Let us configure our example network shown in Figure 4-2 (Figure 4-1
is repeated as Figure 4-2 so that you it is easier to understand), using
static routing. To configure static routing, you need to look at the
path traffic will taken from source to destination and back from
destination to source. Each router in the path should know the source
and destination network. So assuming our source is in network
192.168.1.0/24 (Host1) and our destination is in 192.168.5.0/24 network
(Host3), let us look at the source to destination path, which is
Router1->Router2->Router3.
Router1 does not know about the destination network. So we need to
add a route. The next hop for Router1 towards the destination is
Router2’s fa0/0 interface. The route can be added using the following
command:
Router2 also does not know about the destination network. So we need
to add a route telling it that the next hop towards 192.168.5.0/24 is
Router3’s fa0/0 interface. The following command can be used to add the
route:
Router1, being directly connected to 192.168.1.0/24, knows about the network already.
To view the routing table and verifying static routing, you can use the show ip route command. The output from all three routers in our example is given below:
Router1#sh ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route
Gateway of last resort is not set S 192.168.5.0/24 [1/0] via 10.1.1.2 10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0 Router2#sh ip route -output truncated– S 192.168.5.0/24 [1/0] via 10.1.2.2 10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, FastEthernet0/1
C 10.1.1.0 is directly connected, FastEthernet0/0 S 192.168.1.0/24 [1/0] via 10.1.1.1 Router3#sh ip route -output truncated–
Gateway of last resort is not set
C 192.168.5.0/24 is directly connected, FastEthernet0/1
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.2.0 is directly connected, FastEthernet0/0 S 192.168.1.0/24 [1/0] via 10.1.2.1
Though the output of the show ip route command will be discussed in detail later in the chapter and in the next chapter, here are a few things you need to know now:
The letter at the start of each line shows how the router was
learned. The meaning of each letter is given at the beginning of the
output as can be seen form the output from Router1. C stands for
directly connected routes. These are the networks to which the router is
directly connected. S stands for static routes. As you can see, the
routes that you added are shown in lines that start with S.
You should verify the network and subnet mask in the output to see if you typed the correct information.
The IP address after “via” shows the next hop address for this destination.
The outputs show that all the routes that you added above have taken
effect and traffic can flow between the 192.168.1.0/24 and
192.168.5.0/24 networks in both directions now. You may have noticed
that Router1 still does not know about the network between Router2 and
Router3 (10.1.2.0/24) and Router3 does not know about the network
between Router1 and Router2 (10.1.1.0/24). Though it is not necessary
for them to know about these networks, from a troubleshooting
perspective it better to add routes for these networks also as shown
below:
After these routes are added, the example network has complete reachability using static routing.
Default Routing
Default routing can be considered a special type of static routing.
The difference between a normal static route and a default route is that
a default route is used to send packets destined to any unknown
destination to a single next hop address. To understand how this works,
consider Router1 from our example (Figure 4-2), without any static
routes in it. When it receives a packet destined to 192.168.5.0/24 it
will drop it since it does not know where the destination network is. If
a default route is added in Router1 with next hop address of Router2,
all packets destined to any unknown destination, such as 192.168.5.0/24
will be sent to Router2.
Default routes are useful when dealing with a network with a single
exit point. It is also useful when a bulk of destination networks have
to be routed to a single next-hop device. When adding a default route,
you should ensure that the next-hop device can route the packet further,
or else the next hop device will drop the packet.
Another point to remember is that when a more specific route to a
destination exists in the routing table, the router will use that route
and not the default route. The only time the router will use the default
route is when a specific route does not exist.
The command to add a default route is same as that of adding a static
route, but with the network address and mask set to 0.0.0.0 as shown
below:
ip route 0.0.0.0 0.0.0.0 next-hop
In our example network, the only exit point for the 192.168.1.0/24
and 192.168.5.0/24 networks is towards Router2. Hence, we can remove the
static routes from Router1 and Router3 and add default routes as shown
below:
Router1(config)#no ip route 10.1.2.0 255.255.255.0 10.1.1.2
Router1(config)#no ip route 192.168.5.0 255.255.255.0 10.1.1.2 Router1(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.2
Router3(config)#no ip route 10.1.1.0 255.255.255.0 10.1.2.1
Router3(config)#no ip route 192.168.1.0 255.255.255.0 10.1.2.1 Router3(config)#ip route 0.0.0.0 0.0.0.0 10.1.2.1
Remember that since Router2 has multiple exists, you cannot use default routing there. It still needs the static routes.
Take a look at the routing table on Router1 and Router3 after the above changes:
Router1#sh ip route
–output truncated– Gateway of last resort is 10.1.1.2 to network 0.0.0.0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0 S* 0.0.0.0/0 [1/0] via 10.1.1.2
Router3#sh ip route
–output truncated– Gateway of last resort is 10.1.2.1 to network 0.0.0.0
C 192.168.5.0/24 is directly connected, FastEthernet0/1
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.2.0 is directly connected, FastEthernet0/0 S* 0.0.0.0/0 [1/0] via 10.1.2.1
In the above output notice that the static route to 0.0.0.0/0
is now seen in the routing table. Apart from that, the gateway of last
resort is now the next-hop as specified in the default route.
A second way of adding a default route would be to specify the exit
interface instead of the next-hop address. For example, on Router1, you
can use the following command instead of the one used above: Router1(config)#ip route 0.0.0.0 0.0.0.0 fa0/0
This tells the route to forward all packets, destined to unknown
destinations, out fa0/0. While this will accomplish the same thing, the
big difference is that a static route with an exit interface specified
will take preference over a static route with next-hop specified. This
is because the administrative distance of a route with exit interface is
lower than the other one. Administrative distance is covered later in
the chapter.
A third way of defining a default route is using the ip default-network
command. Using this command you can tell the router to use the next-hop
address of a known network as the gateway of last resort. For example,
on Router1, you can use the following two commands to set the gateway of
last resort:
The second command will cause the router to lookup the route to
10.1.2.0 and use 10.1.1.2 (next-hop address for 10.1.2.0) as the gateway
of last resort.
The routing table will look as shown below, after the above two commands are entered:
Router1#sh ip route Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route Gateway of last resort is 10.1.1.2 to network 10.1.2.0 S 10.1.2.0/24 [1/0] via 10.1.1.2 10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
The difference between using the ip route command and the ip default-network command for adding a default route is that the route added using ip route command is local and does not get propagated through a routing protocol, if one is enabled. The route added through the ip default-network command will get propagated by a routing protocol.
Another thing to remember is that prior to IOS version 12.4, the ip classless command was not enabled by default. You will remember from Chapter 2, that if the ip classless command
is not used, the router will do classful routing and expect a default
mask on each interface. A side effect of this command not being present
is that if the destination network is not in the routing table, the
router will drop the packet. If you are using default routing, it is
possible that you do not have any specific routes in the table. So you
must enable classless routing using the ip classless command for default routing to work.
Dynamic Routing
Dynamic routing is when protocols, called routing protocols, are used
to build the routing tables across the network. Using a routing
protocol is easier than static routing and default routing, but it is
more expensive in terms of CPU and bandwidth usage. Every routing
protocol defines its own rules for communication between routers and
selecting the best route.
Routing protocols are broadly classified as Interior Gateway
Protocols (IGP) or Exterior Gateway Protocols (EGP). IGPs are used to
exchange routing information within internetworks that fall under a
single administrative domain (also called Autonomous Systems). EGPs on
the other hand are used to exchange routing information between
different autonomous systems. Common examples of IGPs are Routing
Information Protocol (RIP), Enhanced Interior Gateway Routing Protocol
(EIGRP) and Open Shortest Path First (OSPF). These are covered in detail
in the next chapter. On the other hand, Border Gateway Protocol (BGP)
is an example of EGP. It is the protocol used for routing information
exchange on Internet. It is beyond the scope of CCNA, hence we will not
cover it in this book.
While the next chapter covers the IGPs in detail, the rest of this
chapter is dedicated to basics of routing protocols that are necessary
for you to understand before looking into specific protocols.
Understanding IP Routing Home/Study Guides/CCNA Routing & Switching 200-120/Chapter 4 Introduction to IP Routing/4-1 Understanding IP Routing
In the simplest terms, IP Routing is the process of moving packets from its source to its destination across internetworks. To be able to route packets, a router must know at a minimum the following:
Destination address Neighbor routers from which it can learn about remote networks Possible routes to all remote networks The best route to each remote network Be able to maintain and verify routing information
Unfortunately the process is not as simple as it sounds because it involves multiple protocols at multiple layers. To understand the complete process of how a packet moves from the source to the destination, consider the network shown in Figure 4-1.
Figure 4-1 Understanding IP Routing
understanding ip routing
In the network shown above, when Host1 sends a TCP segment to Host3, the following happens:
The TCP segment is handed off to IP, which adds a header consisting of the source address, 192.168.1.10 and destination address 192.168.5.20 and hands off that packet to the next layer. Using the subnet mask of the host, it is determined that the destination address lies in a remote network and hence the packet must be sent to the default gateway, 192.168.1.1. So Host1 sends out an ARP request to find the MAC address of Router1. When a response is received, it frames the packet with the source MAC address of Host1 and destination MAC address of Router1. When Router1 receives the frame, it strips of the header and trailer and looks at the destination address in the IP header. Since the packet is not destined to Router1, it must be routed out. It tries to match the destination address to a list of known networks, called the routing table. It finds that the destination network is reachable via Router2, so it frames the packet with the source MAC address of its exit interface (interface with the IP address of 10.1.1.1) and the destination address of Router2’s interface. When Router2 receives the frame, it repeats the strip and lookup process and frames the packet again before sending it to Router3. This time the MAC address of Router2’s exit interface is the source address while the MAC address of Router3 is the destination address. Finally Router3 looks at the destination MAC address and realizes that the destination network is directly connected. It finds the MAC address of the destination host and frames the packet using its own MAC address as the source while the MAC address of Host3 as the destination address. At last the frame is sent out and reaches the destination host. At the destination, the frame is stripped and the destination IP address is verified. Then the IP header is stripped and the TCP segment reaches Layer 4 of the destination. Now when Host3 needs to reply back to Host1, TCP will hand off the reply segment to IP. IP will add a header consisting of a source address of 192.168.5.20 and a destination address of 192.168.1.10 and will send it to layer 2 for framing. By the subnet mask of Host3, it is determined that the destination lies in a remote network. Hence the frame will need the MAC address of the default gateway as destination. If Host3 does not have the MAC address of Router3, it will send an ARP query to get it. Once Host3 has the MAC address, it will frame the segment and send it out to Router3. Router3 strip the frame header and look at the destination IP address in the IP header. From its routing table, it will know that the packet needs to go to Router2. It will frame the packet with a source MAC address of its fa0/0 interface and the destination MAC address will be the address of Router2’s fa0/1 interface and then send it out to the wire. Router2 receives the frame and repeats process to send the packet to Router 1. Router1 receives the frame from Router2 and removes the frame. By the destination IP address it knows that the packet belongs to a directly connected interface. Since it received a frame from Host1 earlier, it has the MAC address of the host mapped to its IP address in the ARP table. The router uses that to create a frame with its fa0/0 interface’s MAC address as source and Host1’s MAC address as destination and sends the frame out the interface. When Host1 receives the frame, it verifies the destination address, strips the frame and IP header and sends the TCP segment to layer 4.
Exam Alert: Remember that the source and destination IP address do not change throughout the process while the source and destination MAC address changes at each segment. You will see multiple questions about this on the CCNA exam! The MAC address is only locally significant and changes each hop.
The above steps show how a TCP segments moves from its source to its destination across an internetwork. The steps above assume that each router in the path knows where the destination network lies. But as you have seen in the previous chapter, a new router has no configuration and the router is not going to discover remote networks by itself. You will need to tell the router about the remote networks manually or configure it to learn the routes dynamically by talking to other routers. Note: The network shown in Figure 4-1 will be used throughout the chapter. I strongly suggest you setup the above network and configure the basic connectivity. It will also allow you to practice everything learned in the previous chapter, once again.
Virtual Memory is called as Swap space in Linux and is used when the physical memory (RAM) is full. When the system needs more memory and the RAM is full, inactive pages in the memory will be moved to the swap space. Swap is not a replacement to physical memory, it is just a small portion on hard drive; it must be created during the installation. It is better to have swap space equal to 2X RAM.
Sometimes, system will use full amount of swap memory even when the system has enough physical memory available, this happens because inactive pages that are moved to swap during the high memory usage have not gone back to the physical memory in normal condition. That time we have to manually clear (Move the inactive page to Physical RAM) by using the following command.
First issue the following command to initiate the move, this will take time depends on size of the swap memory.
PS: You must have enough physical memory available on the system before initiating the following commands, that means
Swap Memory = Free Memory of Physical RAM.
If you want to clear the 2GB of swap memory, you need to have more than 2GB free memory on the physical memory RAM.
swapoff -a
Once the above command completed successfully, issue the following command to re enable the swap.