NDC Chapter 2
NDC Chapter 2
1
Network Devices
• Network devices are components used to connect computers or
other electronic devices together so that they can share files or
resources like printers or fax machines.
• Router
• Functions of routers
The router uses its routing table to determine the best path to forward
and send packets toward their destination the packet.
Router Components
Hardware Components
5
Router memory…
ROM: maintain instructions of POST diagnosis
• Mini IOS
• Ex. Serial Ethernet, Fast Ethernet, Token Ring, ATM, ISDN, Loopback interfaces etc.
• Lines identify ports that allow us to connect into, and then configure, Cisco devices.
• Example Console ports, Auxiliary ports and VTY (telnet) ports and identified like
Console 0
8
9
Categories of router interfaces
Categories of interfaces Interfaces Function of interface
LAN interfaces Ethernet , Fast Used to connect router
Ethernet Ports, to LAN
Gigabit network
10
Using Lines to Configure the IOS
• The console port is generally a RJ-45 connector, and requires a rollover
cable to connect.
• The opposite side of the rollover cable connects to a PC’s serial port
using a serial terminal adapter.
• The auxiliary port functions the same with console except it support modem
commands providing dial-in access to Cisco devices.
11
• Telnet, and now SSH, are the most common methods of
remote access to routers and switches.
12
Internetwork Operating System (IOS)
Cisco IOS manages the hardware and software resources of the router,
13
Router Boot-up-Process
• There are four major phases to the boot up process
1. Performing the POST: After the POST has been completed, the
router executes the bootstrap program.
The main task of the bootstrap program is to locate the Cisco IOS
and load it into RAM.
14
3. Locating and Loading Cisco IOS:
A TFTP server is usually used as a backup server for IOS but it can
also be used as a central point for storing and loading the IOS.
15
4. Locating and Loading the Configuration File: After the IOS is
loaded, the bootstrap program searches for the startup
configuration file, known as startup-config, in NVRAM.
16
Basics configuration of router and switch
• Most of the router manufacturers provide SDM (Security
Device Manager) software along with the router to enable
users configure the router graphically.
18
Most commonly used mode
19
User EXEC Mode:
When you are connected to the router, you are started in user EXEC mode. The user
EXEC commands are a subset of the privileged EXEC commands.
Privileged EXEC Mode:
Privileged commands include the following:
• Configure – Changes the software configuration.
• Debug – Display process and hardware event messages.
• Setup – Enter configuration information at the prompts.
Enter the command disable to exit from the privileged EXEC mode and return to
user EXEC mode.
20
Configuration Mode
• To enter configuration mode, enter the command configure terminal
and exit by pressing Ctrl-Z.
Basic Router/Switch Configuration- use the hole configuration for
the following topology
21
1. Getting Help
In any command mode, you can get a list of available commands by entering a
Router>?
To obtain a list of commands that begin with a particular character sequence, type
in
Router#co?
• Hostname is case sensitive. The host name is used in prompts and default
configuration filenames. For instance the first router R1 can be renamed as
DTUR1 as follow.
• DTUR1(config) #
• To display the system clock, use the show clock EXEC command.
Example
25
5. Setting the Banner
26
6. Setting Passwords
a. Console Password
• DTUR1 (config-line)#login
27
Next b. Vty lines password
• Virtual terminal lines (vty) are used to allow remote access to the
router (by telneting through its interfaces). The router has five
virtual terminal lines by default.
• DTUR1 (config-line)#login
28
Privileged Access Password
• To set a local password to control access to various privilege levels, use the
enable password global configuration command.
• Use the no form of this command to remove the password requirement.
• Must contain from 1 to 25 uppercase and lowercase alphanumeric
characters.
• Must not have a number as the first character.
• Can have leading spaces, but they are ignored. However, intermediate and
trailing spaces are recognized
• DTUR1 (config)# enable password WeakPrivilegePassword
29
Setting Secret (Encrypted) Password
• To set an encrypted local password to control access to various
privilege levels, use
30
7. Bring up an interface
• show ip interface brief at the user privilege mode on cisco routers
ACKNOWLEDGEMENT.
abbreviated as DORA
with the “ip helper-address …” command, the router will accept that
broadcast message and cover it into a unicast packet and forward it to the
DHCP Server.
35
When a DHCP address conflict occurs
• During the IP assignment process, the DHCP Server uses ping to
test the availability of an IP before issuing it to the client.
• If no one replies then the DHCP Server believes that IP has not been
allocated and it can safely assign that IP to a client.
36
Configure a DHCP Server on Cisco router
Router(config)#ip dhcp pool CLIENTS
Router(dhcp-config)#network 10.1.1.0 /24 (/24subnet mask)
Router(dhcp-config)#default-router 10.1.1.1
Router(dhcp-config)#dns-server 10.1.1.2
Router(dhcp-config)#domain-name DTU.com
Router(dhcp-config)#lease 0 12-The syntax is “lease{days[hours] [minutes] |
infinite}”in this case the lease is 12 hours. The default is a one-day lease
Router(dhcp-config)#exit
Router(config)# ip dhcp excluded-address 10.1.1.3 10.1.1.10
37
12. Handling configuration Files
DTUR1>enable
DTUR1#show running-config
Saving
DTUR1>enable
DTUR1#write/Wr
DTUR1>enable
DTUR1#erase startup-config
40
no and do commands
• Use the command without the keyword no to reenable a disabled
feature or to enable a feature that is disabled by default
Example
DTUR1(config)#int fa0/0
DTUR1(config-if)#no ip address
DTUR1(config)#line console 0
DTUR1(config-line)#logging synchronous
41
15. Remote Device Management (telnet & SSH)
• SSH i.e. Secure Shell and Telnet are the network protocols that serves the same
purpose that is to provide remote access to the system in order to establish some
sort of communication between the systems.
SSH encrypts the data/packets being transferred between the systems so it cannot
be Decoded by the Hackers.
SSH uses authentication which ensures that the source of the data is still the same
system and not another
SSH uses public and private keys, to identify hosts and users (authentication).
43
Configuring Telnet
• A virtual terminal line is "virtual port" on the router.
44
Cont..
Router#configure terminal
Router(config)#banner motd #Welcome to DTU Router#
Router(config)#enable password dtu123
Router(config)#interface fastethernet0/0
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#line vty 0 4
Router(config-line)#password dtuvty123
Router(config-line)#login
Router(config-line)#logging synchronous
Router(config-line)#exec-timeout 30
Router(config-line)#motd-banner
45
Testing Telnet Connectivity
PC>telnet 192.168.0.1
Trying 192.168.0.1 …Open Welcome to DTU Router
User Access Verification
Password:
Router>enable
Password:
Router#
If you need to disconnect the logged in remote connection type “logout”
and press enter. 46
Configuring SSH
Open the router Router console line and create domain and user name.
Router(config)#ip domain-name dtu.com
Router(config)#username dtu Password dtussh123
Router(config)#
If you don’t, just follow and generate the encryption keys for securing the
ssh session.
Router(config)#crypto key generate rsa
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable…[OK]
47
Cont..
Now enable SSH version 2, set time out duration and login attempt
time on the router.
Router(config)#line vty 0
Router(config-line)#password dtu123
Router(config-line)#login
Router(config-line)#motd-banner
Router(config-line)#exit
Router(config)#
49
Testing SSH Connectivity
Open
Password:
Router>enable
Password:
Router#configure terminal
Router(config)#
Connection established successfully and the connection is secured with Secure Shell.
50
Troubleshooting: TCP/IP Utilities
• Ping: To test if your network connection is complete between two
computers, you can use the Packet Internet Groper, better known as ping
52
Places to store and display syslog messages
53
Cont.
• seq no:timestamp%FACILTY-SEVERITY-MNEMONIC: message text
• Seq no: a sequence number only if the service sequence-numbers global
configuration command is configured
• Timestamp: Date and time of the message or event. This information appears only
if the service timestamps global configuration command is configured.
• FACILITY: This tells the protocol, module, or process that generated the message.
• Some examples are SYS for the operating system, IF for an interface…
• SEVERITY: A number from 0 to 7 designating the importance of the action
reported.
• MNEMONIC: A code that identifies the action reported.
54
Level Keyword Description
0 emergencies System is unusable
1 alerts Immediate action is needed
2 critical Critical conditions exist
3 errors Error conditions exist
4 warnings Warning conditions exist
5 notification Normal, but significant, conditions
exist
6 informational Informational messages
7 debugging Debugging messages 55
Syslog message example
56
57