Вы находитесь на странице: 1из 80

IP

wg_ro_c#configure terminal
wg_ro_c(config)#interface ethernet 0
wg_ro_c(config-if)#ip address 192.168.1.1 255.255.255.0
wg_ro_c(config-if)#no shutdown
wg_ro_c(config-if)#exit

show interfaces
Router#show interfaces
Ethernet0 is up, line protocol is up
Hardware is Lance, address is 00e0.1e5d.ae2f (bia 00e0.1e5d.ae2f)
Internet address is 10.1.1.11/24
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set, keepalive set (10 sec)
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:07, output 00:00:08, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
81833 packets input, 27556491 bytes, 0 no buffer
Received 42308 broadcasts, 0 runts, 0 giants, 0 throttles
1 input errors, 0 CRC, 0 frame, 0 overrun, 1 ignored, 0 abort
0 input packets with dribble condition detected
55794 packets output, 3929696 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 4 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out

Router#show interface serial 0


Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 10.140.4.2/24
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 00:00:09, output 00:00:04, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
(output omitted)

Router#show controller serial 0


HD unit 0, idb = 0x121C04, driver structure at 0x127078
buffer size 1524 HD unit 0, V.35 DTE Cable
cable
.
.
.

Shows the cable type of serial cables

CDPTelnet

CDP

TCP/IP

Novell
IPX

AppleTalk

Others

Cisco

CDP Cisco

SNAP

LANs

ATM

Others

Cisco
PROTOCOL
CDP

Subnetwork Access Protocol


(SNAP)

CDP
CDP10.3Cisco
IOSCisco

CDP

CDP

CDP

show cdp

CDP

Switch A

Router A
S0

10.3.3.2

10.3.3.1

S1

Router B

Switch B

10.1.1.2

10.1.1.1

RouterA#sh cdp ?
entry
Information for specific neighbor entry
interface CDP interface status and configuration
neighbors CDP neighbor entries
traffic
CDP statistics
<cr>
RouterA(config)#no cdp run
RouterA(config)#interface serial0
RouterA(config-if)#no cdp enable

10.2.2.1

10.2.2.2

show cdp neighbor

Switch A

Router A
S0

10.3.3.2

10.3.3.1

10.1.1.1

S1

Router B

Switch B

10.1.1.2

10.2.2.1

10.2.2.2

RouterA#sh cdp neighbors


Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID
RouterB
SwitchA

Local Intrfce
Ser 0
Eth 0

Holdtme
148
167

Capability Platform Port ID


R
2522
Ser 1
T S
1900
2

show cdp entry


Switch A

Router A
S0

10.3.3.2

10.3.3.1

10.1.1.1

S1

Router B

Switch B

10.1.1.2

10.2.2.1

10.2.2.2

RouterA#sh cdp entry *


------------------------Device ID: RouterB
Entry address(es):
IP address: 10.1.1.2
Platform: cisco 2522, Capabilities: Router
Interface: Serial0, Port ID (outgoing port): Serial1
Holdtime : 168 sec
Version :
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(3), RELEASE SOFTWARE (fci)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Mon 08-Feb-99 18:18 by phanguye

CDP

Switch A

Router A
S0

10.3.3.2

10.3.3.1

S1

Router B

Switch B

10.1.1.2

10.1.1.1

10.2.2.1

RouterA#sh cdp traffic


CDP counters :
Packets output: 56, Input: 38
Hdr syntax: 0, Chksum error: 0, Encaps failed: 3
No memory: 0, Invalid packet: 0, Fragmented: 0
RouterA#sh cdp interface
BRI0 is administratively down, line protocol is down
Encapsulation HDLC
Sending CDP packets every 60 seconds
Holdtime is 180 seconds

10.2.2.2

Telnet

Switch A

Router A
S0

10.3.3.2

10.3.3.1

S1

Router B

10.1.1.2

10.1.1.1

RouterA#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
------------------------------------------------Catalyst 1900 Management Console
Copyright (c) Cisco Systems, Inc. 1993-1998
All rights reserved.
Enterprise Edition Software
Ethernet Address:
00-90-86-73-33-40
PCA Number:
73-2239-06
PCA Serial Number:
FAA02359H8K
Model Number:
WS-C1924-EN
System Serial Number: FAA0237X0FQ
.
SwitchB>

Switch B

10.2.2.1

10.2.2.2

Telnet

Switch A

Router A
S0

10.3.3.2

RouterA#sh session
Conn Host
1 10.1.1.2
* 2 10.3.3.2

RouterA#sh user
Line
User
* 0 con 0
11 vty 0

10.1.1.1

10.3.3.1

Address
10.1.1.2
10.3.3.2

Host(s)
10.1.1.2
10.3.3.2
idle

S1

Router B

Switch B

10.1.1.2

10.2.2.1

Byte Idle Conn Name


0
1 10.1.1.2
0
0 10.3.3.2

Idle Location
3
2
1 10.1.1.2

10.2.2.2

Telnet

Switch A

Router A
S0

10.3.3.2

10.3.3.1

10.1.1.1

RouterB#<Ctrl-Shift-6>x
RouterA#sh session
Conn Host
Address
1 10.1.1.2
10.1.1.2
RouterA#resume 1
RouterB#

S1

Router B

Switch B

10.1.1.2

10.2.2.1

10.2.2.2

Byte Idle Conn Name


0
1 10.1.1.2

Telnet

Switch A

Router A
S0

10.3.3.2

10.3.3.1

S1

Router B

Switch B

10.1.1.2

10.1.1.1

10.2.2.1

10.2.2.2

RouterA#disconnect
Closing connection to 10.3.3.2 [confirm]

RouterA#clear line 11
[confirm]
[OK]

ping trace
Router#ping 10.1.1.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
Router#trace 10.1.1.10
Type escape sequence to abort.
Tracing the route to 10.1.1.10

1 10.1.1.10 4 msec
4 msec 4 msec
Router#


Show sessionshow user
Disconnect Clear line
Ctrl+shift+6 x resume

2002, Cisco Systems, Inc. All rights reserved.

99

Router Internal Components

ROM Functions

Contains microcode for basic functions

IOS
show
startup-config

NVRAM

Flash

show
version

:
IOS

1.
2. NVRAM
3. Flash
4.
5. RXBOOT
6. ROMMON

160Breacko/r 0xxxxx
2config-register 0xxxxx

0x0

ROM monitor

0x1

ROM
(IOS)

0x2 to 0xF

NVRAM boot system


(Flash
0x2)

3, 2, 10


show version !
show flash FlashIOS
show startup-config NVRAM

show running-config RAM


26003600
160ctrl+break
2rommon>confreg 0x2142
3rommon>reset
4router#copy startup-config running-config
5router(config)#no enable secrect

6router(config-line)#no enable password


7router#copy running-config startup
8router(config)#config-register 0x2102
2500
160ctrl+break
2>o/r 0x2142
3>i
2600

Cisco IOS File System and Devices

Managing Cisco IOS Images

IOS

wg_ro_a#show flash
System flash directory:
File Length
Name/status
1
10084696 c2500-js-l_120-3.bin
[10084760 bytes used, 6692456 available, 16777216 total]
16384K bytes of processor board System flash (Read ONLY)

IOS

IOS

MAC
/Frame

MAC

0260.8c01.1111

0260.8c01.2222

E0

E1

E2

E3

0260.8c01.3333

0260.8c01.4444

MAC


MAC
E0: 0260.8c01.1111
A

0260.8c01.1111

E0

E1

E2

E3

0260.8c01.2222

0260.8c01.3333

0260.8c01.4444

AC
AMAC E0
E0


MAC
E0: 0260.8c01.1111
E3: 0260.8c01.4444
A

0260.8c01.1111

E0
E2

0260.8c01.2222

E1
E3

0260.8c01.3333

0260.8c01.4444

DC
DMACE03
E3


MAC

0260.8c01.1111

E0:
E2:
E1:
E3:

0260.8c01.1111
0260.8c01.2222
0260.8c01.3333
0260.8c01.4444

E0

E2

0260.8c01.2222

E1

X
X

0260.8c01.3333

E3
0260.8c01.4444

host AC

300

MAC

0260.8c01.1111

E0:
E2:
E1:
E3:

0260.8c01.1111
0260.8c01.2222
0260.8c01.3333
0260.8c01.4444

E0

E1

E2

E3

0260.8c01.2222

0260.8c01.3333

0260.8c01.4444


/ X


MAC


/ X


/ X


/ X

XY
YMACSwitch AB


/ X

XY
YMACSwitch AB
Y

MAC
Y

XY
YMACSwitch AB

MAC
Y

X
Unicast

XY
ABYMAC
ABXMACE0
YAB

Forwarding
Blocking

Port 1
Port 2

Switch X
MAC 0c0011111111
Default priority 32768

Port 1

Port 2

Switch Z
Mac 0c0011110000
Default priority 32768

Port 2

Port 1

100base T

Switch Y
MAC 0c0022222222
Default priority 32768

COST

(NEW IEEE ) ( OLD IEEE )


-----------------------------------------------------------------------------------10 Gbps
2
1
1 Gbps
4
1
100 Mbps
19
10
10 Mbps
100
100

:

20


15

15

IP
Catalyst 2950
wg_sw_2950(config)interface vlan 1
wg_sw_2950(config-if)#ip address {ip_address} {mask}

Configures an IP address and subnet mask for the switch VLAN1 interface
wg_sw_2950(config)#interface vlan 1
wg_sw_2950(config-if)#ip address 10.5.5.11 255.255.255.0

Showing the Switch IP Address


Catalyst 2950
wg_sw_2950#show interface vlan 1
Vlan1 is up, line protocol is up
Hardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia 0010.f6a9.9800)
Internet address is 172.16.80.79/24
. . .
wg_sw_2950#


Half Duplex (CSMA/CD)
HUB

Full Duplex

100M
100M

Catalyst 2950
wg_sw_2950(config)#interface fa0/1
wg_sw_2950(config-if)#duplex {auto | full | half}

MAC
sw2950#sh mac-address-table
Mac Address Table
-------------------------------------------

Catalyst 2950

Vlan Mac Address


Type
Ports
---- ------------------ ----All 000f.72db.4ec0 STATIC
CPU
All 0100.0ccc.cccc STATIC
CPU
All 0100.0ccc.cccd STATIC
CPU
All 0100.0cdd.dddd STATIC
CPU
1 0000.0c3f.0b05 DYNAMIC Fa0/12
1 0030.94e6.391d DYNAMIC Fa0/11
1 00e0.b05a.5bfe DYNAMIC Fa0/10
Total Mac Addresses for this criterion: 7
sw2950#

MAC
Catalyst 2950 only
wg_sw_2950(config)#mac-address-table static
mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]]

sw2950(config)#mac-address-table static 1111.1111.1111 vlan 1 interface f0/1

Port Security
sw2950(config-if)#switchport mode access
sw2950(config-if)#switchport port-security
sw2950(config-if)# switchport port-security maximum 2 (1-132)
sw2950(config-if)# switchport port-security mac-address 0030.94e6.04c2
sw2950(config-if)# switchport port-security mac-address 0030.94e6.04c3
sw2950(config-if)# switchport port-security violation shutdown/protect/restrict

sw2950#sh port-security
Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security Action
(Count)
(Count)
(Count)
--------------------------------------------------------------------------Fa0/12
1
1
10
Restrict
--------------------------------------------------------------------------Total Addresses in System (excluding one mac per port) : 0
Max Addresses limit in System (excluding one mac per port) : 1024
sw2950#

NVRAM(:)

Catalyst 2950
wg_sw_2950#erase startup-config

Resets the system configuration to factory defaults

CSMA/CD
Carrier Sense, Multiple Access with
Collision Detection

port

port


port

VLAN

VLAN Operation

Each logical VLAN is like a separate physical bridge.


VLANs can span across multiple switches.
Trunks carry traffic for multiple VLANs.

Trunks use special encapsulation to distinguish between


different VLANs.

VLAN

CAT5000
ciscowork2000

802.1Q Trunking

802.1Q Frame

Per-VLAN Spanning Tree

ISL
ISLVLAN

(ASIC)

VLAN

VLAN

ISL
ISL
ISLVLAN


ISL

ISL

ISLCRC
VLAN
VLAN
BPDU

VTP
(VLAN Trunking Protocol )

VLAN
VLAN

VTPTrunk
(, FDDI, ATM)

VTP ICND
3.vlan

2
1.vlan

VTP
vlan
vlan
vlan
/


flash


flash

vlan
vlan
vlan


flash

VTP

VTP
VTP

VTP5

1.VLAN
2.3 -->4

4.3 -->4
5.VLAN

4.3 -->4
5.VLAN

VTP

: AVLAN

VLAN2

1
6

VLAN
1.VLAN
sw(config)#vlan 2
Sw(config)#name VLAN2
2.VLAN

sw(config-if)#switchport mode access


sw(config-if)#switchport access vlan 2
3.
Switch#show vlan

VLAN Configuration Modes


Global Mode
Switch# configure terminal
Switch(config)# vlan 3
Switch(config-vlan)# name Vlan3
Switch(config-vlan)# exit
Switch(config)# end
VLAN:
Wisdom#
Wisdom#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Wisdom(config)#vlan 2-10 //210VLAN
Wisdom(config-vlan)#end
Wisdom#conf t
Wisdom(config)#no vlan 2-10 //210VLAN
:VLAN

VLAN Configuration Modes


Database Mode(,)

Switch# vlan database


Switch(vlan)# vlan 3
VLAN 3 added:
Name: VLAN0003
Switch(vlan)# exit
APPLY completed.
Exiting....

//VLAN

Вам также может понравиться