Showing posts with label Switch Configurations. Show all posts
Showing posts with label Switch Configurations. Show all posts

Friday, 23 November 2012

CONFIGURING THE SWITCH for ISCSI SAN

HOST: Physical server that will be accessing the iSCSI(SAN) storage.
TARGET: A SAN Storage.(i.e MD3000i)

Let's configure it.
Bring up your terminal consoler, and make sure it is in "#" prompt, instead of ">". Type "enable" to go to the "#" prompt. Type in "config" to enter the configuration mode. Below is the command line to configure the switch. Lines that starts with # are meant for comment so that you'd understand what the command is for. Do not type lines that starts with # into the console.
#start configuration
## the following is recommended by DELL for iSCSI environment
spanning-tree mode rstp
interface range ethernet all
spanning-tree portfast
exit
interface range ethernet all
flowcontrol on
exit
port jumbo-frame
interface range ethernet g(1-20)
switchport mode general
exit
##create 2 new vlans 2 and 3
vlan database
vlan 2-3
exit
##name the two vlans created above
interface vlan 2
name iSCSI
exit
interface vlan 3
name "Live Migration(Failover)"
exit
interface range ethernet g(1-10)
##specify that this port is a general port
switchport mode general
##port 1-10 has has vlan id 2
switchport general pvid 2
##allowed only tagged vlan
switchport general allowed vlan add 2 tagged
switchport general acceptable-frame-type tagged-only
exit
## configure the faiolver vlan.
interface range ethernet g(11-16)
switchport mode general
switchport general pvid 3
switchport general allowed vlan add 3 tagged
switchport general acceptable-frame-type tagged-only
exit
## not really required. this is the default
voice vlan oui-table add 0001e3 Siemens_AG_phone________
voice vlan oui-table add 00036b Cisco_phone_____________
voice vlan oui-table add 00096e Avaya___________________
voice vlan oui-table add 000fe2 H3C_Aolynk______________
voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
voice vlan oui-table add 00d01e Pingtel_phone___________
voice vlan oui-table add 00e075 Polycom/Veritel_phone___
voice vlan oui-table add 00e0bb 3Com_phone______________
iscsi target port 860 address 0.0.0.0
iscsi target port 3260 address 0.0.0.0
##4 assign ip addresses to VLANS
##use the vlan 1 IP to connect to its web interface
interface vlan 1
ip address 197.167.1.1 255.255.255.0
exit
interface vlan 2
ip address 197.167.2.1 255.255.255.0
exit
interface vlan 3
ip address 197.167.3.1 255.255.255.0
exit
## switch setting(labelling)
## don't need default gateway. unless it's plugged in to your corporate network
ip default-gateway 0.0.0.0
hostname SWITCH1
#to have the password encrypted, change the password from the web UI, download running config to your desktop, and copy paste the encrypted value here
username localadmin password your_password_here level 15
snmp-server location "wherever"
snmp-server contact "whoever"
snmp-server community Dell_Network_Manager rw view DefaultSuper
# you can change time zone from the web interface. just make sure to copy it to your startup config.
clock timezone -5
clock summer-time recurring usa zone utc
exit
copy running-config startup-config
Reload
#end configuration

Basic Switch Configuration

Configure Switch hostname as SWITCH1
hostname SWITCH1

Configure the message of the day as "LAB SWITCH Unauthorized access is forbidden"
banner motd #
LAB SWITCH Unauthorized access is forbidden#

Configure the password for privileged mode access as "cisco". The password must be md5 encrypted
enable secret cisco

Configure password encryption on the switch using the global configuration command
service password-encryption

Configure CONSOLE access
line con 0
password ciscoswitch
logging synchronous
login
history size 15
exec-timeout 6 45

Configure TELNET access
line vty 0 15
exec-timeout 8 20
password ciscotelnet
logging synchronous
login
history size 15

Configure the IP address of the switch as 192.168.1.2/24 and it's default gateway IP (192.168.1.1).
interface Vlan1
ip address 192.168.1.2 255.255.255.0
ip default-gateway 192.168.1.1


configure each Switch1 fastethernet switchport for operation.
Switch(config)#interface FastEthernet0/1
switchport mode access
duplex full
speed 100
Switch(config)#interface FastEthernet0/2
switchport mode access
duplex full
speed 100
Switch(config)#interface FastEthernet0/3
switchport mode access
duplex full
speed 100
Switch(config)#interface FastEthernet0/4
switchport mode access
duplex full
speed 100

PC "192.168.1.4" seems to be unable to ping other PCs in the network. Check switch configuration.
Switch(config)#interface FastEthernet0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 1



Choose the right cable to connect :
- Switch0 gigabitethernet 1/1 to Switch1 gigabitethernet 1/1
- Switch1 gigabitethernet 1/2 to Switch2 gigabitethernet 1/2

Packet Tracer 5.3 - Switch interfaces configuration lab solution

Configure those two links as trunk lines without using trunk negotiation between switches
On every interface that has to be configured for trunk operation, configure the following settings
Switch(config)#interface GigabitEthernet1/X
Switch(config-if)#switchport mode trunk

Verify interface operational mode using the "show interface GigabitEthernet1/X switchport command" :
Name: Gig1/2
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none


Another usefull ios command is "show interfaces trunk" :
Switch#sh interfaces trunk
Port        Mode         Encapsulation  Status        Native vlan
Gig1/2      on           802.1q         trunking      1

Port        Vlans allowed on trunk
Gig1/2      1-1005

Port        Vlans allowed and active in management domain
Gig1/2      1

Port        Vlans in spanning tree forwarding state and not pruned
Gig1/2      1