Professional Documents
Culture Documents
Упражнение 2
Упражнение 2
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
//Задаваме име на хоста
Router(config)#hostname ISP-1229118
//Улесняваме си работата, като казваме да не търси в интернет грешни команди
ISP-1229118(config)#no ip domain-lookup
ISP-1229118(config)#int
ISP-1229118(config)#interface s0/0/1
//задаваме IP адрес на интерфейс s0/0/1
ISP-1229118(config-if)#ip address 209.165.200.226 255.255.255.252
ISP-1229118(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
ISP-1229118(config-if)#end
ISP-1229118#
%SYS-5-CONFIG_I: Configured from console by console
Gateway-1229118(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state
to up
Gateway-1229118(config-if)#exit
Gateway-1229118(config)#int s0/0/1
Gateway-1229118(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up
Gateway-1229118(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up
Gateway-1229118(config-if)#exit
Gateway-1229118(config)#ip nat inside source list 1 interface s0/0/1 overload
//Задаваме настройки от къде да приема пакети, после определяме и листа с адресите,
от които да приема пакети
Gateway-1229118(config)#access-list 1 permit 192.168.1.0 0.0.0.255
Gateway-1229118(config)#exit
Gateway-1229118#
%SYS-5-CONFIG_I: Configured from console by console
Version :
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX,
RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Wed 12-Oct-05 22:05 by pt_team
advertisement version: 2
Duplex: full
---------------------------
Version :
Cisco IOS Software, C1900 Software (C1900-UNIVERSALK9-M), Version 15.1(4)M4,
RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Thurs 5-Jan-12 15:41 by pt_team
advertisement version: 2
Duplex: full
Gateway-1229118#
//Проверяваме кои интерфейси участват в CDP протокола
Gateway-1229118#show cdp interface
Vlan1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/0 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/1 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/0/0 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/0/1 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/1/0 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/1/1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Gateway-1229118#
Команди в: S3-1229118
//Влизаме в конфигурационен режим
Switch>enable
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
//Задаваме име на хоста
Switch(config)#hostname S3-1229118
//Задаваме IP адрес на vlan 1
S3-1229118(config)#interface vlan 1
S3-1229118(config-if)#ip address 192.168.1.3 255.255.255.0
S3-1229118(config-if)#no shutdown
S3-1229118(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
S3-1229118(config-if)# exit
//Задаваме Default-gateway IP адрес
S3-1229118(config)#ip default-gateway 192.168.1.254
S3-1229118(config)#
Команди в: Gateway-1229118
//Влизаме в конфигурационен режим
Gateway-1229118#conf t
Enter configuration commands, one per line. End with CNTL/Z.
//Влизаме в интерфейс s0/0/1 и включваме CDP протокола
Gateway-1229118(config)#int s0/0/1
Gateway-1229118(config-if)#cdp enable
Gateway-1229118(config-if)#end
Gateway-1229118#
%SYS-5-CONFIG_I: Configured from console by console
Команди в: ISP-1229118
//Включваме рутера и влизаме в конфигурационен режим
ISP-1229118>enable
ISP-1229118#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ISP-1229118(config)#int s0/0/1
//Включваме CDP протокола на интерфейс s0/0/1
ISP-1229118(config-if)#cdp enable
ISP-1229118(config-if)#end
ISP-1229118#
%SYS-5-CONFIG_I: Configured from console by console
Команди в: Gateway-1229118
//Проверяваме съседите с включен CDP протокол с повече детайли
Gateway-1229118#show cdp neighbors detail
Version :
Cisco IOS Software, C1900 Software (C1900-UNIVERSALK9-M), Version 15.1(4)M4,
RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Thurs 5-Jan-12 15:41 by pt_team
advertisement version: 2
Duplex: full
---------------------------
Version :
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX,
RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Wed 12-Oct-05 22:05 by pt_team
advertisement version: 2
Duplex: full
Gateway-1229118#
//проверяваме използваемостта на интерфейсите
Gateway-1229118#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES unset administratively down down
GigabitEthernet0/1 192.168.1.254 YES manual up up
Serial0/0/0 unassigned YES unset administratively down down
Serial0/0/1 209.165.200.226 YES manual up up
Serial0/1/0 unassigned YES unset administratively down down
Serial0/1/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down
Gateway-1229118#
//Проверяваме съседите с включен CDP протокол
Gateway-1229118#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
ISP-1229118 Ser 0/0/1 123 R C1900 Ser 0/0/1
S3-1229118 Gig 0/1 131 S 2960 Gig 0/1
Gateway-1229118#
//Влизаме в конфигурационен режим
Gateway-1229118#conf t
Enter configuration commands, one per line. End with CNTL/Z.
//Включваме CDP протокола на интерфейс g0/1
Gateway-1229118(config)#int g0/1
Gateway-1229118(config-if)#cdp enable
Gateway-1229118(config-if)#end
Gateway-1229118#
%SYS-5-CONFIG_I: Configured from console by console
Gateway-1229118#
//Влизаме в конфигурационен режим
Gateway-1229118#conf t
Enter configuration commands, one per line. End with CNTL/Z.
//Изключваме CDP протокола на интерфейс s0/0/1
Gateway-1229118(config)#int s0/0/1
Gateway-1229118(config-if)#no cdp enable
Gateway-1229118(config-if)#end
Gateway-1229118#
%SYS-5-CONFIG_I: Configured from console by console
Gateway-1229118#
//Проверяваме съседите с включен CDP протокол няколко пъти като целта е да видим
как се променя времето.
Gateway-1229118#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
ISP-1229118 Ser 0/0/1 134 R C1900 Ser 0/0/1
S3-1229118 Gig 0/1 142 S 2960 Gig 0/1
Gateway-1229118#
//Проверяваме съседите с включен CDP протокол няколко пъти като целта е да видим
как се променя времето.
Gateway-1229118#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
ISP-1229118 Ser 0/0/1 73 R C1900 Ser 0/0/1
S3-1229118 Gig 0/1 141 S 2960 Gig 0/1
Gateway-1229118#
//Проверяваме съседите с включен CDP протокол няколко пъти като целта е да видим
как се променя времето.
Gateway-1229118#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
ISP-1229118 Ser 0/0/1 50 R C1900 Ser 0/0/1
S3-1229118 Gig 0/1 178 S 2960 Gig 0/1
Gateway-1229118#
//Влизаме в конфигурационен режим
Gateway-1229118#conf t
Enter configuration commands, one per line. End with CNTL/Z.
//Включваме CDP протокола на интерфейс s0/0/1
Gateway-1229118(config)#int s0/0/1
Gateway-1229118(config-if)#cdp enable
Gateway-1229118(config-if)#end
Gateway-1229118#
%SYS-5-CONFIG_I: Configured from console by console
Команди в: S3-1229118
S3-1229118>enable
//Проверяваме съседите с включен CDP протокол
S3-1229118#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/2 121 S 2960 Fas 0/1
Switch Fas 0/1 121 S 2960 Fas 0/2
Gateway-1229118
Gig 0/1 153 R C1900 Gig 0/1
S3-1229118#
//Проверяваме кои интерфейси участват в CDP протокола
S3-1229118#show cdp interface
FastEthernet0/1 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/2 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/3 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/4 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/5 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/6 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/7 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/8 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/9 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/10 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/11 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/12 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/13 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/14 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/15 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/16 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/17 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/18 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/19 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/20 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/21 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/22 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/23 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/24 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/1 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/2 is down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
S3-1229118#
Команди в: Gateway-1229118
//Влизаме в конфигурационен режим
Gateway-1229118#conf t
Enter configuration commands, one per line. End with CNTL/Z.
//Изключваме CDP протокола
Gateway-1229118(config)#no cdp run
Gateway-1229118(config)#exit
Gateway-1229118#
%SYS-5-CONFIG_I: Configured from console by console
Gateway-1229118#
//Проверяваме кои интерфейси участват в CDP протокола
Gateway-1229118#show cdp interface
Vlan1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/0 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/1 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/0/0 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/0/1 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/1/0 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/1/1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Gateway-1229118#
Gateway-1229118#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Gateway-1229118(config)#int s0/0/1
Gateway-1229118(config-if)#no cdp enable
Gateway-1229118(config-if)#exit
Gateway-1229118(config)#exit
Gateway-1229118#
%SYS-5-CONFIG_I: Configured from console by console