Компјутерски мрежи и безбедност – Лабораториска вежба 5
Упатство за работа:
Прочитајте ги задачите и извршете ги во Cisco Packet Tracer симулаторот.
Команди кои се користат во Cisco Packet Tracer:
Command Purpose
enable Logs you into enable mode, which is also known as user
exec mode or privileged mode
configure terminal Logs you into configuration mode
interface fastethernet/number Enters interface configuration mode for the specified fast
ethernet interface
reload An exec mode command that reboots a Cisco switch or
router
hostname name Sets a host name to the current Cisco network device
copy from-location to-location An enable mode command that copies files from one file
location to another
copy running-config startup-config An enable mode command that saves the active config,
replacing the startup config when a Cisco network device
initializes
copy startup-config running-config An enable mode command that merges the startup config
with the currently active config in RAM
write erase An enable mode command that deletes the startup config
erase startup-config
ip address ip-address mask Assigns an IP address and a subnet mask
Компјутерски мрежи и безбедност – Лабораториска вежба 5
shutdown Used in interface configuration mode. “Shutdown” shuts
down the interface, while “no shutdown” brings up the
no shutdown interface.
ip default-gateway ip_address Sets the default gateway on a Cisco device
show running-config An enable mode command that displays the current
configuration
description name-string A config interface command to describe or name an
interface
show running-config interface interface An enable mode command to display the running
slot/number configuration for a specific interface
show ip interface [type number] Displays the usability status of interfaces that are
configured for IP
ip name-server serverip-1 serverip-2 A configure mode command that sets the IP addresses of
DNS servers
copy run start Short for copy running-config startup-config. Places a
configuration into NVRAM
banner login ^ [message] ^ Creates a banner for users who log in to the router
banner motd ^ [message] ^ Creates a Message of the Day banner
Troubleshooting Commands
ping {hostname | system-address} Used in enable mode to diagnose basic network
[source source-address] connectivity
speed {10 | 100 | 1000 | auto} An interface mode command that manually sets the speed
to the specified value or negotiates it automatically
duplex {auto | full | half} An interface mode command that manually sets duplex to
half, full or auto
Компјутерски мрежи и безбедност – Лабораториска вежба 5
cdp run A configuration mode command that enables or disables
Cisco Discovery Protocol (CDP) for the device
no cdp run
show mac address-table Displays the MAC address table
show arp Show the ARP table including all protocols or only
show ip arp addresses learned by IP protocol
show cdp Shows whether CDP is enabled globally
show cdp neighbors[detail] Lists summary information about each neighbor
connected to this device; the “detail” option lists detailed
information about each neighbor
show interfaces Displays detailed information about interface status,
settings and counters
show interface status Displays the interface line status
show interfaces switchport Displays a large variety of configuration settings and
current operational status, including VLAN trunking details.
show interfaces trunk Lists information about the currently operational trunks
and the VLANs supported by those trunks
show vlan Lists each VLAN and all interfaces assigned to that VLAN
but does not include trunks
show vlan brief
show vtp status Lists the current VTP status, including the current mode
Routing and VLAN Commands
ip routenetwork-number network-mask {ip- Sets a static route in the IP routing table
address | interface}
router rip Enables a Routing Information Protocol (RIP) routing
Компјутерски мрежи и безбедност – Лабораториска вежба 5
process, which places you in router configuration mode
network ip-address In router configuration mode, associates a network with a
RIP routing process
version 2 In router configuration mode, configures the software to
receive and send only RIP version 2 packets
no auto-summary In router configuration mode, disables automatic
summarization
default-information originate In router configuration mode, generates a default route
into RIP
passive-interface interface In router configuration mode, sets only that interface to
passive RIP mode. In passive RIP mode, RIP routing
updates are accepted by, but not sent out of, the specified
interface.
show ip rip database Displays the contents of the RIP routing database
ip nat [inside | outside] An interface configuration mode command to designate
that traffic originating from or destined for the interface is
subject to NAT
ip nat inside source {list{access-list- A configuration mode command to establish dynamic
number | access-list-name}} interface type source translation. Use of the “list” keyword enables you to
number[overload] use an ACL to identify the traffic that will be subject to NAT.
The “overload” option enables the router to use one global
address for many local addresses.
ip nat inside source static local-ip global-ip A configuration mode command to establish a static
translation between an inside local address and an inside
global address
vlan Creates a VLAN and enters VLAN configuration mode for
further definitions
switchport access vlan Sets the VLAN that the interface belongs to.
Компјутерски мрежи и безбедност – Лабораториска вежба 5
switchport trunk encapsulation dot1q Specifies 802.1Q encapsulation on the trunk link.
switchport access Assigns this port to a VLAN
vlan vlan-id [name vlan-name] Configures a specific VLAN name (1 to 32 characters)
switchport mode { access | trunk } Configures the VLAN membership mode of a port. The
access port is set to access unconditionally and operates
as a non-trunking, single VLAN interface that sends and
receives non-encapsulated (non-tagged) frames. An access
port can be assigned to only one VLAN.
The trunk port sends and receives encapsulated (tagged)
frames that identify the VLAN of origination. A trunk is a
point-to-point link between two switches or between a
switch and a router.
switchport trunk {encapsulation { dot1q } Sets the trunk characteristics when the interface is in
trunking mode. In this mode, the switch supports
simultaneous tagged and untagged traffic on a port.
encapsulation dot1q vlan-id A configuration mode command that defines the matching
criteria to map 802.1Q frames ingress on an interface to
the appropriate service instance
DHCP Commands
ip address dhcp A configuration mode command to acquire an IP address
on an interface via DHCP
ip dhcp pool name A configuration mode command to configure a DHCP
address pool on a DHCP server and enter DHCP pool
configuration mode
domain-name domain Used in DHCP pool configuration mode to specify the
domain name for a DHCP client
network network-number [mask] Used in DHCP pool configuration mode to configure the
network number and mask for a DHCP address pool
primary or secondary subnet on a Cisco IOS DHCP server
Компјутерски мрежи и безбедност – Лабораториска вежба 5
ip dhcp excluded-address ip-address [last-ip- A configuration mode command to specify IP addresses
address] that a DHCP server should not assign to DHCP clients
ip helper-address address An interface configuration mode command to enable
forwarding of UDP broadcasts, including BOOTP, received
on an interface
default-router address[address2 ... address8] Used in DHCP pool configuration mode to specify the
default router list for a DHCP client
Security Commands
Password pass-value Lists the password that is required if the login command
(with no other parameters) is configured
username name password pass-value A global command that defines one of possibly multiple
user names and associated passwords used for user
authentication. It is used when the login local line
configuration command has been used.
enable password pass-value A configuration mode command that defines the password
required when using the enable command
enable secret pass-value A configuration mode command that sets this Cisco device
password that is required for any user to enter enable
mode
service password-encryption A configuration mode command that directs the Cisco IOS
software to encrypt the passwords, CHAP secrets, and
similar data saved in its configuration file
ip domain-name name Configures a DNS domain name
crypto key generate rsa A configuration mode command that creates and stores (in
a hidden location in flash memory) the keys that are
required by SSH
transport input {telnet | ssh} Used in vty line configuration mode, defines whether
Telnet or SSH access is allowed into this switch. Both
values can be specified in a single command to allow both
Компјутерски мрежи и безбедност – Лабораториска вежба 5
Telnet and SSH access (default settings).
access-list access-list-number {deny | A configuration mode command that defines a standard IP
permit} source [source-wildcard] [log] access list
access-class Restricts incoming and outgoing connections between a
particular vty (into a basic Cisco device) and the addresses
in an access list
ip access-list {standard | extended} {access-list- A configuration mode command that defines an IP access
name | access-list-number} list by name or number
permit source [source-wildcard] Used in ACL configuration mode to set conditions to allow
a packet to pass a named IP ACL. To remove a permit
condition from an ACL, use the “no” form of this command.
deny source [source-wildcard] Used in ACL configuration mode to set conditions in a
named IP ACL that will deny packets. To remove a deny
condition from an ACL, use the “no” form of this command.
ntp peer <ip-address> Used in global configuration mode to configure the
software clock to synchronize a peer or to be synchronized
by a peer
switchport port-security Used in interface configuration mode to enable port
security on the interface
switchport port-security Used in interface configuration mode to set the maximum
maximum maximum number of secure MAC addresses on the port
switchport port-security mac-address {mac- Used in interface configuration mode to add a MAC
addr | {sticky [mac-addr]}} address to the list of secure MAC addresses. The “sticky”
option configures the MAC addresses as sticky on the
interface.
switchport port-security Used in interface configuration mode to set the action to
violation {shutdown | restrict | protect} be taken when a security violation is detected
show port security [interface interface-id] Displays information about security options configured on
the interface
Компјутерски мрежи и безбедност – Лабораториска вежба 5
Monitoring and Logging Commands
logging ip address Configures the IP address of the host that will receive the
system logging (syslog) messages
logging trap level Used in configuration mode to limit messages that are
logged to the syslog servers based on severity. Specify the
number or name of the desired severity level at which
messages should be logged.
show logging Enable mode command that displays the state of system
logging (syslog) and the contents of the standard system
logging buffer.
terminal monitor An enable mode command that tells Cisco IOS to send a
copy of all syslog messages, including debug messages, to
the Telnet or SSH user who issues this command
Целта на оваа лабораториска вежба е студентот да се запознае со работата на разводник (hub) и
преклопник (switch). Дополнително студентот ќе се запознае со работната околина на Cisco Packet
Tracer симулаторот кој ќе се работи на наредните лабораториски вежби.
Компјутерски мрежи и безбедност – Лабораториска вежба 5
Запознавање со Cisco Packet Tracer
Прво, симнете го симулаторот од страната https://www.computernetworkingnotes.com/ccna-study-
guide/download-packet-tracer-for-windows-and-linux.html и инсталирајте го.
По отворање на симулаторот, ќе се појави следниот екран каде ќе треба да одберете креирање на
корисничка сметка преку опцијата Cisco Skills For All (зелено копче).
Компјутерски мрежи и безбедност – Лабораториска вежба 5
Внимателно прочитајте ги командите и нивните објаснувања дадени на почетокот на вежбата.
1. Со помош на графичкиот интерфејс креирајте ја мрежата од сликата:
2. Разгледајте кои се уреди може да се додадат и како се додаваат. Како се врши поврзување
на домаќин со преклопник?
3. Поврзете се на преклопникот Switch0 со клик на него -> CLI. Ќе се појави Switch> промптот.
Прочитајте кој е овој начин на работа и што овозможува?
4. Со која наредба се префрлува во привилегиран начин на работа, како изгледа промптот
тогаш и како потоа се враќа назад?
_______________________________________
5. За да се конфигурира уредот преку Command Line Interface (CLI), глобални промени на
конфигурацијата на уредот може да се направат со помош на configure terminal која врши
промена на т.н. running-config. Само со config се овозможува бирање од каде ќе се врши
конфигурацијата (default: terminal)
a. Испробајте ја config наредбата и наведете го промптот на преклопникот
___________________________________
b. Како се излегува од овој дел?
___________________________________
6. Преглед на моменталната конфигурација може да се добие со show running-config
a. Како е конфигуриран преклопникот? Колку FastEthernet интерфејси има на
преклопникот?
___________________________________
7. Поставете го името на преклопникот да биде Switch_vashIndeks
a. Која е командата која ја искористивте?
___________________________________
8. Кликнете врз еден од домаќините. Разгледајте што се може да конфигурирате кај еден
домаќин.
a. Поставете име на еден од домаќините да биде Host_vashIndeks
Компјутерски мрежи и безбедност – Лабораториска вежба 5
Конфигурирање на преклопник
Пред да почнете да го работите овој дел, внимателно прочитајте ги командите и нивните
објаснувања дадени на почетокот на вежбата.
1. Отворете го Cisco Packet Tracer и со помош на графичкиот интерфејс креирајте ја мрежата
од сликата која содржи четири домаќини, два преклопници и два насочувачи
a. По поврзување на уредите, доколку конекциите светат црвено, значи дека не се
активни. Отворете ги уредите и во делот Config проверете го статусот на
интерфејсите кои се поврзани.
2. Поврзете се на преклопникот Switch1 со клик на уредот -> CLI.
a. Во глобален начин на конфигурација поставете лозинка да е еднаква на ‘mrezi’
________________________________________
b. Обидете се да поставите тајна лозинка (енкриптирана) исто да е еднаква на ‘mrezi’
________________________________________
3. За промена на конфигурацијата на интерфејс се користи interface командата од глобалниот
конфигурациски начин на работа, конфигурацијата е interface type slot/port. Со помош на
командите, видете колку интерфејси има овој преклопник и од кој тип се тие?
_________________________________________________________________
4. Влезете во делот за конфигурација на првиот интерфејс за FastEthernet 0/1. Како изгледа
промптот на преклопникот?
_________________________________________________________________
5. Поставете ја брзината на комуникација на full-duplex и брзината на 100mbs на интерфејсот
Fa0/1
_________________________________________________________________
Компјутерски мрежи и безбедност – Лабораториска вежба 5
a. Проверете го графичкиот приказ дали сите конекции до преклопникот се активни.
Имајќи во предвид дека го сменивме интерфејсот во full duplex, проверете дали
домаќинот има исто поставување.
6. Со проверка на интерфејсот со командата show interface FastEthernet0/1 може да се види
дека е административно исклучен. Интерфејсот се вклучува со помош на no shutdown
командата во интерфејс конфигурацискиот режим.
7. Која команда се користи кај преклопникот за приказ на табелата на научени MAC адреси?
__________________________________
a. Колку записи има во MAC табелата на овој преклопник? ________________
b. Како се научени?
c. На кои интерфејси се поврзани уредите и за секој поврзан уред напишете која MAC
адреса ја има.
___________________________________________
___________________________________________
8. Со која команда се запишува конфигурацискиот фајл од DRAM во NVRAM? Извршете ја
командата и проверете ја Вашата конфигурација која треба да се прегледа.
___________________________________________
Конфигурирање на насочувач
1. Поврзете се на насочувачот Router0
2. Поставете го името на насочувачот да биде ‘FINKI-Router’
__________________________________
3. На насочувачот може да се постави и т.н. banner така што кога корисникот се најавува на
насочувачот или администраторот се поврзува преку telnet, banner – от им дава некаква
информација
a. Проверете кои опции ги нуди командата banner
b. Message of the Day се користи најчесто и дава порака на секој кој се поврзува со
насочувачот на било кој начин. Поставете порака од ваков тип.
____________________________________
c. Испробајте дали пораката се појавува со исклучување и повторно поврзување со
насочувачот
4. Извршете конфигурација на лозинки на насочувачот исто како кај преклопникот.
____________________________________
5. Прегледајте ја моменталната конфигурација и проверете дали ги има сите побарани
конфигурации. Потоа вклучете енкрипција на лозинките.
a. Повторно прегледајте ја конфигурацијата за да се уверите дека лозинките се
криптирани
____________________________________
Компјутерски мрежи и безбедност – Лабораториска вежба 5
6. Конфигурацијата на интерфејсите е една од најважните конфигурации за насочувачот. Без
интерфејси, насочувачот е бескорисен. Конфигурациите на интерфејсот мора да се точни за
да тој може да комуницира со други уреди
a. За да се конфигурира интерфејс на насочувач, командата е иста како кај
преклопникот. Треба да се постави конфигурација интерфејсот на насочувачот кој
ви е поврзан со другиот насочувач. Поставете IP адреса еднаква на 192.168.10.1 на
насочувачот Router0 и 192.168.10.2 на насочувачот Router1 секаде со маска
255.255.255.0
__________________________________________
b. На насочувачот кој сте го поставиле за DCE крај треба да поставите и clock rate.
Поставете ја на 56000.
__________________________________________
c. Не ја заборавајте командата no shutdown за да го активирате интерфејсот на двата
уреди
7. Конфигурирајте ја и FastEthernet портата која го поврзува Router0 со Switch1 со IP адреса
192.168.20.1 и маска 255.255.255.0 и активирајте го интерфејсот
______________________________________
8. Запишете ја моменталната конфигурација на двата насочувачи во почетната и проверете ја
вашата конфигурација која треба да се прегледа
Конфигурирање на HDLC протокол
1. Потребно е сега на двата сериски интерфејси од насочувачите да се постави конфигурација
за HDLC протоколот од податочно ниво, со помош на командата encapsulation hdlc
2. Поставете опис на двата интерфејси “hdlc at 56000 bps on Serial <X>”, каде X е бројот на
серискиот интерфејс на тој насочувач
________________________________________________
3. Командата ping Ви овозможува проверка на функционалноста на насочувачите и дали тие
може да комуницираат. Проверете како се користи командата и пробајте да го пингате
насочувачот 1 од насочувачот 0. Успешен ping треба да Ви враќа извичници (!!!!), доколку
уредите не може да комуницираат тогаш за секој испратен пакет ќе ви се запише точка (.)
________________________________________________
Компјутерски мрежи и безбедност – Лабораториска вежба 5
Конфигурирање на PPP протокол
1. Потребно е сега на двата сериски интерфејси од насочувачите да се постави конфигурација
за Point-to-Point протоколот од податочно ниво, со помош на командата encapsulation ppp.
Не ја заборавајте командата no shutdown за да го активирате интерфејсот на двата уреди
2. Поставете опис на двата интерфејси “ppp at 56000 bps on Serial <X>” каде X е бројот на
серискиот интерфејс на тој насочувач
_______________________________________________
3. Командата ping Ви овозможува проверка на функционалноста на насочувачите и дали тие
може да комуницираат. Проверете како се користи командата и пробајте да го пингате
насочувачот 1 од насочувачот 0. Успешен ping треба да Ви враќа извичници (!!!!), доколку
уредите не може да комуницираат тогаш за секој испратен пакет ќе ви се запише точка (.)
________________________________________________
4. Запишете ја моменталната конфигурација на двата насочувачи во почетната и проверете ја
вашата конфигурација која треба да се прегледа
________________________________________________
Проверка на ARP табела
1. На домаќинот 1 со клик во делот за конфигурација поставете IP адреса да биде
192.168.20.3, маска 255.255.255.0 и default gateway IP адресата на насочувачот 0
192.168.20.1
2. Направете пинг од насочувачот 0 до домаќинот 1.
_____________________________________________
3. Со командата дадена во табелата, проверете ја состојбата на ARP табелата кај насочувачот
1 и запишете го резултатот
_____________________________________________