[Notes] Network Planning and Administration: Configuring Interconnect Devices
Configuration of network interconnection devices.
Enable DHCP
On a generic server:
Config Tab > Services: DHCP > Service: On > Default Gateway: Whatever > DNS Server: Whatever > Start IP Address: Whatever > Subnet Mask: Whatever > Maximum Number of Users: Whatever > Save Button
Enable DNS
On a generic server:
Config tab > Services: DNS > Service: On > Create A-Records > Save? button
Enable HTTP
On a generic server:
Config tab > Services: HTTP > Service: On > Create index.html file > Save? button
Assign an IP and passwords to a switch to manage it from the network
The switches already come with a VLAN (Vlan1) created by default but not configured:
Switch(config)# int Vlan1
Switch(config-if)# ip address 192.168.1.10 255.255.255.0
Switch(config-if)# no shutdown
(192.168.1.10 is a ip compatible with the device to be managed from)
A password must be assigned to the switch in order for it to accept Telnet connections:
Switch(config)# line vty 0 15
Switch(config-line)# password WhatEver
Switch(config-line)# login
Telnet connections are now accepted but only as a user, not as an administrator (the enable command will not work). Assign password to enable:
Switch(config)# enable password AnotherWhatEver
or stronger:
Switch(config)# enable secret AnotherWhatEver
On the device from which the switch is to be managed: Desktop > Command Prompt (not Terminal):
PC> telnet 192.168.1.10
(192.168.1.10 is the ip of the switch)
Encrypt passwords
Switch(config)# service password-encryption
Create a VLAN on a switch and assign mouths (ports) to it
On a switch, the VLAN is first created and then ports are assigned to it (switchport access). In CLI:
Switch(config)# vlan 10
Switch(config-vlan)# name VirtualNetwork-10
Switch# show vlan
Switch(config)# int Fa0/1
Switch(config-if)# switchport access vlan 10
Switch(config-if)# int Fa0/2
Switch(config-if)# switchport access vlan 10
[...]
Switch# show vlan
Ports can also be assigned by rank:
Switch(config)# interface range Fa0/1-3
Switch(config-if-range)# switchport access vlan 10
Connect two switches in trunk mode (for traffic between different VLANs)
Two switches are connected by the gigabit ports and with the black dashed cable (crossed ethernet cable). In order for traffic between different VLANs (by tags) to pass, on both switches the trunk mode is activated:
Switch(config)# int Gig1/1
Switch(config-if)# switchport mode trunk
Use a multilayer switch (layer 3) as a switch and as a router
The switch called 3560-24PS (Multilayer) also has routing functions. It is configured the same as a generic switch but it has two particularities:
Before activating trunk mode:
Switch(config)# int Gig1/1
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport mode trunk
And each of the VLANs must be assigned IP and mask as if they were router adapters. On the CLI of the switch:
Switch(config)# int Vlan10
Switch(config-if)# ip address 192.168.10.254 255.255.255.0
Finally we activate routing:
Switch(config)# ip routing
Use the VTP protocol for a switch to pass the VLAN configuration to the rest of the switches
Three switches are connected through the gigabit ports and with the discontinuous black cable (crossed ethernet cable) and in trunk mode.
One of the switches will be the “server”, the one with the VLAN database (choose a switch that not will be replaced in the following steps by a layer 3 switch):
Switch(config)# vtp domain LocalNetwork
Switch(config)# vtp mode server
Switch(config)# vtp password Password
Switch(config)# int range Gig1/1-2
Switch(config-if-range)# switchport mode trunk
(LocalNetwork is a made up name, Password is the one we give to the VLAN database)
(Remember that if the switch is layer 3 it requires an additional command for trunk -see above-)
And we create the VLANs on the “server” switch:
Switch(config)# vlan 10
Switch(config-vlan)# name Accounting
Switch(config-vlan)# vlan 20
Switch(config-vlan)# name Sales
Switch(config-vlan)# vlan 100
Switch(config-vlan)# name Guests
Switch(config-vlan)# exit
Switch(config)# show vlan
The other two switches will be “clients” (the same on each of the other switches):
Switch(config)# vtp domain LocalNetwork
Switch(config)# vtp mode client
Switch(config)# vtp password Password
Switch(config)# int range Gig1/1-2
Switch(config-if-range)# switchport mode trunk
Switch(config)# show vlan
(LocalNetwork as the server, Password is the one we gave to the VLAN database on the server)
(Remember that if the switch is layer 3 it requires an additional command for trunk -see above-)
And in each switch you have to assign slots (ports) to each VLAN (see “Create a VLAN on a switch and assign slots (ports) to it” bearing in mind that you can assign mouths by ranks):
Switch(config)# interface range Fa0/1-6
Switch(config-if-range)# switchport access vlan 10
Communication between different VLANs (with a normal router)
If there is already a layer 3 switch, use it as a router (see above), if not: Install a normal router, turn off and plug in as many ethernet adapters as VLAN there is (3) and turn on.
Configure each adapter for each corresponding VLAN:
Router(config)# int Fa0/0
Router(config-if)# ip address 192.168.10.254 255.255.255.0
Router(config-if)# no shutdown
(For vlan 10, 192.168.10.0/24)
Connect the router with solid black cables to any of the switches. Each router adapter must be connected to a switch port that is assigned to the corresponding VLAN. For example: If the mouth Fa0/0 of the router is from vlan 10, it must connect to a mouth of the range of the switch assigned in previous steps to vlan 10 (the one that is free in the range Fa0/1 to Fa0/6 of the Previous example).
Link aggregation for high availability
Three types of link aggregation:
1.Ether channel
2. LACP (+ LACP with traffic between different VLANs)
3. PAgP
Link aggregation via Etherchannel
Connect the two switches by two (or more) Fast-Ethernet adapters with two crossover cables (dashed black). That is, port Fa0/23 of switch 1 with port Fa0/23 of switch 2 and port Fa0/24 of switch 1 with port Fa0/24 of switch 2.
Configure each of the two each adapters of the two switches. On switch 1:
Switch(config)# int Fa0/23
Switch(config-if)# channel-group 1 mode on
Switch(config-if)# int Fa0/24
Switch(config-if)# channel-group 1 mode on
The same on switch 2, remembering that it can be configured by ranges:
Switch(config)# int range Fa0/23-24
Switch(config-if-range)# channel-group 1 mode on
Link aggregation via LACP
Connect the two switches by four (or two, or more) Fast-Ethernet adapters with four crossover cables (dashed black). That is, port Fa0/21 of switch 1 with port Fa0/21 of switch 2, port Fa0/22 of switch 1 with port Fa0/22 of switch 2, etc.
Configure each of the four each adapters of the two switches. A switch has to be in active mode, in this case on switch 1:
Switch(config)# int range Fa0/21-24
Switch(config-if-range)# channel-group 1 mode active
The other switch (or the rest of the switches if there are more) must be in passive mode, in this case on switch 2:
Switch(config)# int range Fa0/21-24
Switch(config-if-range)# channel-group 1 mode passive
Link aggregation via LACP with traffic between different VLANs
Connect the two switches by two (or more) Fast-Ethernet adapters with two crossover cables (dashed black). That is, port Fa0/21 of switch 1 with port Fa0/21 of switch 2 and port Fa0/22 of switch 1 with port Fa0/22 of switch 2.
Configure each of the two each adapters of the two switches. A switch has to be in active mode, in this case on switch 1:
Switch(config)# int range Fa0/21-22
Switch(config-if-range)# channel-group 1 mode active
The other switch (or the rest of the switches if there are more) must be in passive mode, in this case on switch 2:
Switch(config)# int range Fa0/21-22
Switch(config-if-range)# channel-group 1 mode passive
You have to put the port channel (Port-channel 1) in trunk mode on both switches:
Switch(config)# int Port-channel 1
Switch(config-if-range)# switchport mode trunk
Link aggregation via PAgP
Connect the two switches by two (or more) Fast-Ethernet adapters with two crossover cables (dashed black). That is, port Fa0/23 of switch 1 with port Fa0/23 of switch 2 and port Fa0/24 of switch 1 with port Fa0/24 of switch 2.
Configure each of the two each adapters of the two switches. A switch has to be in “desirable” mode, in this case on switch 1:
Switch(config)# int range Fa0/23-24
Switch(config-if-range)# channel-group 1 mode desirable
The other switch (or the rest of the switches if there are more) must be in auto mode, in this case on switch 2:
Switch(config)# int range Fa0/23-24
Switch(config-if-range)# channel-group 1 mode auto