顯示包含「Cisco」標籤的文章。顯示所有文章
顯示包含「Cisco」標籤的文章。顯示所有文章

2012年7月17日星期二

Configure Cisco switch telnet login and password

1.) Connect console cable
2.) Use terminal emulation program to connect to switch or router. The default settings should be: Bits Per Second: 9600, Data Bits: 8, Parity: None, Stop Bits: 1, Flow Control: None. Connect
3.) Enter Privileged Exec mode via typing enable. The prompt with “>” dictates that it is “user” mode. Exec mode is “#”.
4.) Enter configure terminal mode by typing that in after enable (while in exec/privileged mode)or config t for short.
5.) Type in line vty 0 15 (meaning virtual telnet 0 – 15, 16 in all. You can set different passwords for different vtys. It is not limited to ONLY 0 15. Meaning ONLY 0-15.)
6.) Type “password *password*”, where the asterisks dictate what you want to set your password as.

DHCP Snooping


DHCP snooping acts like a firewall between untrusted hosts and DHCP servers. You use DHCP snooping to differentiate between untrusted interfaces connected to the end user and trusted interfaces connected to the DHCP server or another switch. When a switch receives a packet on an untrusted interface and the interface belongs to a VLAN that has DHCP snooping enabled, the switch compares the source MAC address and the DHCP client hardware address. If the addresses match (the default), the switch forwards the packet. If the addresses do not match, the switch drops the packet. The switch drops a DHCP packet when one of these situations occurs:
·         A packet from a DHCP server, such as a DHCPOFFER, DHCPACK, DHCPNAK, or DHCPLEASEQUERY packet, is received from outside the network or firewall.
·         A packet is received on an untrusted interface, and the source MAC address and the DHCP client hardware address do not match.
·         The switch receives a DHCPRELEASE or DHCPDECLINE broadcast message that has a MAC address in the DHCP snooping binding database, but the interface information in the binding database does not match the interface on which the message was received.
·         A DHCP relay agent forwards a DHCP packet, which includes a relay-agent IP address that is not 0.0.0.0, or the relay agent forwards a packet that includes option-82 information to an untrusted port.
Refer to DHCP Snooping Configuration Guidelines for the guidelines on how to configure DHCP snooping.

Note: For DHCP snooping to function properly, all DHCP servers must be connected to the switch through trusted interfaces.

Note: In a switch stack with Catalyst 3750 Switches, DHCP snooping is managed on the stack master. When a new switch joins the stack, the switch receives DHCP snooping configuration from the stack master. When a member leaves the stack, all DHCP snooping bindings associated with the switch age out.

Note: In order to ensure that the lease time in the database is accurate, Cisco recommends that you enable and configure NTP. If NTP is configured, the switch writes binding changes to the binding file only when the switch system clock is synchronized with NTP.
Rogue DHCP servers can be mitigated by DHCP snooping features. The ip dhcp snooping command is issued in order to enable DHCP globally on the switch. When configured with DHCP snooping, all ports in the VLAN are untrusted for DHCP replies. Here, only the FastEthernet interface 1/0/3 connected to the DHCP server is configured as trusted.

DHCP Snooping
Cat3750#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Cat3750(config)#ip dhcp snooping
 
 
!--- Enables DHCP snooping on the switch.
 
Cat3750(config)#ip dhcp snooping vlan 1
 
 
!--- DHCP snooping is not active until DHCP snooping is enabled on a VLAN.
 
Cat3750(config)#no ip dhcp snooping information option
 
!--- Disable the insertion and removal of the option-82 field, if the  
!--- DHCP clients and the DHCP server reside on the same IP network or subnet.
 
Cat3750(config)#interface fastEthernet 1/0/3
Cat3750(config-if)#ip dhcp snooping trust
 
!--- Configures the interface connected to the DHCP server as trusted.
 
Cat3750#show ip dhcp snooping
Switch DHCP snooping is enabled
DHCP snooping is configured on following VLANs:
1
Insertion of option 82 is disabled
Option 82 on untrusted port is not allowed
Verification of hwaddr field is enabled
Interface                    Trusted     Rate limit (pps)
------------------------     -------     ----------------
FastEthernet1/0/3            yes         unlimited
 
!--- Displays the DHCP snooping configuration for the switch.
 
Cat3750#show ip dhcp snooping binding
MacAddress          IpAddress        Lease(sec)  Type           VLAN  Interface
------------------  ---------------  ----------  -------------  ----  --------------------
00:11:85:A5:7B:F5     10.0.0.2        86391       dhcp-snooping  1    FastEtheret1/0/1
00:11:85:8D:9A:F9     10.0.0.3        86313       dhcp-snooping  1    FastEtheret1/0/2
Total number of bindings: 2
 
!--- Displays the DHCP snooping binding entries for the switch.
 
Cat3750#
 
!--- DHCP server(s) connected to the untrusted port will not be able 
!--- to assign IP addresses to the clients.
Refer to Configuring DHCP Features for more information.

2011年11月9日星期三

2011年9月26日星期一

Resetting Catalyst Switches to Factory Defaults

ref: http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800c4546.shtml


Cat2950# write erase
Erasing the nvram filesystem will remove all files! Continue? [confirm]y[OK]
Erase of nvram: complete
Cat2950#
Cat2950# reload

System configuration has been modified. Save? [yes/no]: n    

!--- Do not save the configuration at this prompt. Otherwise, the switch
!--- reloads with the current running configuration and does not reset to default.

Proceed with reload? [confirm]y                              

2w0d: %SYS-5-RELOAD: Reload requested

C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
Compiled Mon 22-Jul-02 18:57 by antonino
WS-C2950G-12-EI starting...


!--- Output suppressed. 


32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 00:05:DC:C9:79:00
Motherboard assembly number: 73-5781-08
Motherboard serial number: FAB0515A069
Model revision number: 02
Model number: WS-C2950-24
System serial number: FAB0517Q00B

--- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]:n 
00:00:16: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
00:00:21: %SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software 
IOS (tm) C2950 Software(C2950-I6Q4L2-M)Version 12.1(19)EA1, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2003 by cisco Systems, Inc.
Compiled Tue 09-Dec-03 00:12 by yenanh

Press RETURN to get started!

00:00:37: %LINK-5-CHANGED: Interface Vlan1, changed state to administratively down
00:00:38: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
Switch>
Switch>

2011年8月18日星期四

2011年7月12日星期二

Cisco VLAN Command

PC-SW01#confi
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL
PC-SW01(config)#inter
PC-SW01(config)#interface giga
PC-SW01(config)#interface gigabitEthernet 2/0/47
PC-SW01(config-if)#switchport access vlan 6
PC-SW01(config-if)#switchport mod
PC-SW01(config-if)#switchport mode acc
PC-SW01(config-if)#switchport mode access
PC-SW01(config-if)#macro
PC-SW01(config-if)#macro de
PC-SW01(config-if)#macro description de
PC-SW01(config-if)#macro description des
PC-SW01(config-if)#macro description desk
PC-SW01(config-if)#macro description desktop
PC-SW01(config-if)#macro description desktop-con
PC-SW01(config-if)#macro description desktop-config
PC-SW01(config-if)#spann
PC-SW01(config-if)#spanning-tree port
PC-SW01(config-if)#spanning-tree portfast
PC-SW01(config-if)#spanning-tree bp
PC-SW01(config-if)#spanning-tree bpdug
PC-SW01(config-if)#spanning-tree bpduguard enable
PC-SW01(config-if)#exit
PC-SW01(config)#interface gigabitEthernet 2/0/48
PC-SW01(config-if)#switchport access vlan 6
PC-SW01(config-if)#switchport mode access
PC-SW01(config-if)#macro description desktop-config
PC-SW01(config-if)#spanning-tree portfast
PC-SW01(config-if)#spann
PC-SW01(config-if)#spanning-tree bp
PC-SW01(config-if)#spanning-tree bpdugu
PC-SW01(config-if)#spanning-tree bpduguard enable
PC-SW01(config-if)#exit
PC-SW01(config)#