You are on page 1of 12

Компјутерски мрежи и безбедност – Лабораториска вежба 6

Упатство за работа:

Прочитајте ги задачите и извршете ги во 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


Компјутерски мрежи и безбедност – Лабораториска вежба 6

shutdown Used in interface configuration mode. “Shutdown”


shuts down the interface, while “no shutdown” brings
no shutdown up the 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
Компјутерски мрежи и безбедност – Лабораториска вежба 6

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}
Компјутерски мрежи и безбедност – Лабораториска вежба 6

router rip Enables a Routing Information Protocol (RIP) routing


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
number[overload] you to 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
Компјутерски мрежи и безбедност – Лабораториска вежба 6

switchport access vlan Sets the VLAN that the interface belongs to.

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
Компјутерски мрежи и безбедност – Лабораториска вежба 6

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

ip dhcp excluded-address ip-address [last-ip- A configuration mode command to specify IP


address] addresses 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


Компјутерски мрежи и безбедност – Лабораториска вежба 6

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 Telnet and SSH access (default settings).

access-list access-list-number {deny | A configuration mode command that defines a


permit} source [source-wildcard] [log] standard IP 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- A configuration mode command that defines an IP


list-name | access-list-number} access 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- Used in interface configuration mode to add a MAC


address {mac-addr | {sticky [mac-addr]}} address to the list of secure MAC addresses. The
Компјутерски мрежи и безбедност – Лабораториска вежба 6

“sticky” option configures the MAC addresses as sticky


on the interface.

switchport port-security Used in interface configuration mode to set the action


violation {shutdown | restrict | protect} to be taken when a security violation is detected

show port security [interface interface-id] Displays information about security options
configured on the interface

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

Конфигурација на околина

Креирајте го следното сценарио:


Компјутерски мрежи и безбедност – Лабораториска вежба 6

Со цел да можете да поврзете Serial и FastEthernet конекции на рутерите R_E и R_F потребно е да
додадете интерфејси на рутерите на следниот начин:

Отворете го рутерот и изберете Physical.


4
• Од опциите на левата страна одберете WIC-2T
• Исклучете го рутерот на копчето означено со 2
2 • Повлечете ги портите означени со 3 и однесете ги на
позиција 4
• Вклучете го рутерот на копчето означено со 2

1. Конфигурација на рутери

Потребно е да се изврши следната конфигурација на интерфејсите на рутерите (subnet маските на


сите од адресите се 255.255.255.0) :

Router Interface IP Address


R_A (кон S_A) FastEthernet0/0 172.16.60.1
R_A (кон R_E) FastEthernet0/1 172.16.20.2
R_B (кон S_B) FastEthernet0/1 172.16.70.1
R_B (кон R_E) FastEthernet0/0 172.16.30.2
R_C (кон S_C) FastEthernet0/0 172.16.80.1
R_C (кон R_F) FastEthernet0/1 172.16.40.2
R_D (кон S_D) FastEthernet0/1 172.16.90.1
R_D (кон R_F) FastEthernet0/0 172.16.50.2
R_E (кон R_A) FastEthernet0/0 172.16.20.1
R_E (кон R_B) FastEthernet0/1 172.16.30.1
R_E (кон R_F) Serial0/0/0 172.16.10.1 DCE 64000 (clock
rate)
R_F (кон R_C) FastEthernet0/0 172.16.40.1
R_F (кон R_D) FastEthernet0/1 172.16.50.1
R_F (кон R_E) Serial0/0/0 172.16.10.2
Компјутерски мрежи и безбедност – Лабораториска вежба 6

Треба да се постави:

• Името на секој рутер


• Опис на интерфејсите
• IP адреса на секој интерфејс
• Да се вклучат сите поврзани интерфејси
• Да се постави ратата на часовникот каде што е потребно

2. Проверка на конфигурацијата

По конфигурацијата потребно е да се изврши инспекција на истата со помош на преглед на


работната конфигурација на секој од рутерите

• Преглед на работната конфигурација _______________________________

3. Конфигурација и проверка на домаќините

Секој од домаќините треба да се конфигурираат со IP адреса, подмрежна (subnet) маска и default


gateway. IP адресата може да се постави во делот Config -> FastEthernet0 -> IP Configuration, додека
Default gateway се поставува во делот Config -> Settings -> Gateway/DNS IPv4.

Потребно е самите да одредите која е IP адресата на Default Gateway! Истите наведете ги во


документот со одговори.

Host IP Address Default Gateway


H_E 172.16.60.3
H_F 172.16.70.3
H_G 172.16.80.3
H_H 172.16.90.3

За проверка на конфигурацијата, со помош на ping треба да се провери поврзаноста на


домаќините. Со помош на оваа команда проверете:

• Дали работи ping од домаќинот E до интерфејсите на рутерот A? Ако не, зошто?

• Дали работи ping од домаќинот E до 172.16.10.1? Ако не, зошто?

• Дали работи ping од домаќинот G до интерфејсите на рутерите E и F и до домаќините E, F и


H? Ако не, зошто?
Компјутерски мрежи и безбедност – Лабораториска вежба 6

Конфигурација на статичко рутирање

Статитичко рутирање имаме кога рачно ги додаваме патеките во рутирачките табели на рутерите.
Има неколку предности и недостатоци на статичкото рутирање. Синтаксата на командата која се
користи за поставување на статички рути е:

ip route [destination_network] [mask] [next-hop_address or exitinterface] [administrative_distance]


[permanent]

ip route – команда со која се креира статичка рута

destination_network – мрежата која се запишува во рутирачката табела

mask – маската на подмрежата која се користи (subnet mask)

next-hop_address – Адресата на следниот интерфејс од рутер кој ќе ги прими пакетите и ќе ги


препраќа. Ова е интерфејс на рутер со кој сме директно поврзани. Потребно е да можете да
извршите ping до овој интерфејс пред да ја додадете патеката.

exitinterface – Се користи наместо да додавате IP адреса на следен интерфејс пишувате име на


излезен интерфејс од тековниот рутер, се појавува како директно поврзана патека, наместо како
статичка. Ова се користи само за сериски интерфејси.

administrative_distance – Во основа статичките рути имаат административно растојание од 1 (или 0


ако користиме излезен интерфејс како следен скок). Со додавање на некоја вредност од 0 - 255
може да ја промените оваа вредност.

permanent - Избирањето на оваа опција ќе ја задржи статичката патека во рутирачката табела без
разлика што се случува со интерфејсот (дури и кога не е функционален).

Пример:

Router(config)#ip route 172.16.3.0 255.255.255.0 192.168.2.4

• Командата ip route ни кажува дека се работи за статичка рута.

• 172.16.3.0 е мрежата која ја додаваме во рутирачката табела.

• 255.255.255.0 е маската на таа мрежата.

• 192.168.2.4 е следниот скок, рутер (сосед), на кој се испраќаат пакетите, за да стигнат до


мрежата 172.16.3.0.

Потребно е да конфигурирате статичко рутирање кај рутерите R_A, R_B, како и на FastEthernet
интерфејсите на R_E (не на сериската врска). Со помош на ip route командата поставете ги сите
потребни статички патеки за да се овозможи коректно функционирање на мрежата. За рутерите
мора да се конфигурира статичка патека за секоја мрежа која не е директно поврзана. Следен
скок, односно gateway за секоја од патеките е интерфејс на следниот рутер (до кој има директна
физичка врска) по кој ќе оди пакетот.
Компјутерски мрежи и безбедност – Лабораториска вежба 6

Проверка на статичкото рутирање

Со преглед на содржината на рутирачката табела на секој од рутерите треба да се провери дали


работната конфигурација е добро изработена. Ако има ред со дефиниција на статичка патека која
фали во рутирачката табела, тогаш станува збор грешка во пишување на командата за статички
запис, или пак интерфејсот не е активен.

Втор чекор од проверката е проверка на поврзаност меѓу рутерите се помош на командата ping. Со
помош на оваа команда проверете ја поврзаноста на рутерот А со рутерите B и E.

Конфигурација на динамичко рутирање

За разлика од статичкото рутирање, динамичкото рутирање се базира на концептот на постојано


разменување на пораки помеѓу рутерите, со што тие автоматски ја осознаваат мрежата и потоа
можат да ги насочуваат пакетите.

Конфигурирање на RIP рутирање

За да може да се конфигурираат рутерите да работат со RIP протоколот се користи router rip


командата за да се конфигурира RIP и да им се каже на рутерите за кои мрежи треба да
известуваат. Потребно е да поставите RIP рутирање кај рутерите R_C, R_D, R_F и кај серискиот
интерфејс на R_E.

- Како изгледа конфигурацијата со RIP за рутерот B?

Проверка на RIP рутирање

Проверката на RIP рутирањето се врши со преглед на рутирачката табела на секој од рутерите. Во


неа треба да има записи означени со R за патеки кои се дознаени со помош на рутирачкиот
протокол. RIP протоколот ќе функционира само кога сите рутери ќе бидат коректно конфигурирани
со RIP.

- Запишете како изгледа рутирачката табела за рутерот C.

По завршување на вежбата, потребно е да ги запишете рутирачките табели на сите рутери во


документот со одговори.

You might also like