3560-24PS (switch layer3)

advertisement
3560-24PS (switch layer3)
Switching hub – separate bandwidth 10/100/1000Mbs while HUB is decreased to
lowest port connected.
MAC addr = 48 bits -> 24 for vendor and 24 for ID
Bridge also Layer 2 used to connect two different platforms.
Cable:
-
RJ45
Direct (Straight-Through, 568A, 568B) = Connect two diff of Equipments
Cross-over -> A-B or B-A = Connect two same Equipments
Roll-over (|1 8|, |8 1|) Flat Cable = used to configure equipments (
Port RS-232 is used for console only.
ARP (Address Resolution Protocol) – Asking for IP from MAC addr (RARP does
the opposite)
Switch
Mode:
1. User Exec mode
2. Privilege Exec Mode
3. Global Configuration Mode
4. Specific Configuration Mode
Switch>
Switch#
Switch(config)#
Switch(config-xx)#
Setup Switch:
- use console to configure switch
- connect a PC to switch
- open up PC terminal (use default setup)
Switch> ?
>enable -> to get into privilege mode (use exit to get out)
Switch# show ?
#show interfaces
#show vlan
#show running (running-config in full)
= show configuration file
1. Running (file) use in operation, if not save it’s gone.
2. Start-up (file)
#show startup-config
Not present from factory
How to create startup file
1. copy
2. write
#write = create starup file
Change its name
Get into Global Configuration mode
Configure terminal
Switch(configure) #hostname <name>
Exit (one-by-one step)
End (get to privilege mode in some cases, it cannot)
^z (get to privilege mode w/o condition)
#show startup
#show running
#write
Authentication needed
Go to Global Conf
#Conf t
- enable ? (Passwd, Secret (encrypted))
Remove enable password -> use no enable password (negate the command)
Set secret and don’t forget to write it
Line console 0 -> enter to user mode via console
(conf)# line console 0 -> to configure line
(conf-line)# password xxxx
(c-l)# login
(conf)# line vty 0 4 -> Enter to setup via Telnet (0 to 4)
(conf-line)# line vty 4 0
(c-l)#password xxxx
(c-l)# login
Don’t forget of to save (write)
We better set service encryption:
(configure) # service password-encryption
^z
# show run
# write
Setting VLAN
Vlan 2 admin (student in other classroom)
Vlan 3 staff
Vlan 4 office
How to create it:
1. create VLANs
2. set port to the created VLANs
(config) # interface range fa0/1-5
(config) # vlan 2
(conf-vlan)# name ADMIN
Vlan 3
name STAFF …….
^z
Assigning ports to VLAN
Go to conf T
#interface <type> <module/no.) (module is ordered by the speed of the port)
Fast 0/n
Gig 1/1
#interface Fa0/1
or
#interface range fa0/1-5
(conf-if) # switchport ?
(conf-if) # switchport mode ?
(conf-if) # switchport mode access
(conf-if) # switchport access vlan 2
(conf-if) # no shutdown (to enable port when reboot)
Now set
5-10 -> vlan 2
(6-10 in other classroom)
10-15 -> vlan 3
16-20 -> vlan 4
(conf-if)# interface range fa0/5-10
………..
Homework
1-7 VLAN 2
8-24 VLAN 3
15-21 VLAN 4
Add switch to port 24 , then ping to newly added switch
Summary
1. enable (enter privilege mode)
2. show ?
3. write
4. configure terminal
5. hostname <name>
6. enable password/secret xxxx
7. service password-encryption
8. line console 0
9. password xxxx
10. login
11. no shutdown
12. line vty 0 4
13. interface fa0/n
14. interface range fa0/x-y
15. switchport mode access
16. switchport access vlan x (or use #switchport access vlan x)
DCE Cable (one generates clock (DCE), the other receives and called DTE)
VLAN (cont. with ping across switch)
Set trunk
> en
# conf t
(conf)# Interface fa0/24
(conf)# switchport mode trunk
(conf)# switchport trunk allowed vlan [all, no, add, remove]
(conf)# no shutdown
Inter-VLAN Routing
Router:
Link-State - OSPF
Distance Vector - RIP
Hierarchical router - BGP
Creating sub interface (creating logical interfaces out of one physical interface)
Each sub-interface must have an IP address. (slide 82)
Creating sub-interface for router
(conf) # interface FastEthernet 0/0.1
(conf) # description Management VLAN1
(conf) # encapsulation 802.1q 1
(conf) # ip address 192.168.1.1 255.255.255.0
(conf) # interface FastEthernet 0/0.2
……………..
……………
……………..
Setup a router
Conf dialog: no
Router> en
> conf t
# service password-encryption
SDK-Router(config)#enable secret 1234
SDK-Router(config)#line con 0
SDK-Router(config-line)#password 1234
SDK-Router(config-line)#login
SDK-Router(config-line)#line vty 0 4
SDK-Router(config-line)#pass 1234
SDK-Router(config-line)#login
SDK-Router(config)#interface fa0/0
SDK-Router(config-if)#no shutdown
Set sub-interface
SDK-Router(config-if)#interf fa0/0.2
We must set encapsulation before adding an IP address
#encapsulation dot1Q <VLAN no.>
SDK-Router(config-subif)#encapsulation dot1Q 2
SDK-Router(config-subif)#ip address 192.168.2.1 255.255.255.0
SDK-Router(config-subif)# no shutdown
Don’t forget to save
>write
Add module to router
WIC-2T = The 2-port async/sync serial network
Connecting two routers with SERIAL cable (use ip classless at …./30)
- use timing serial cable
Set serial cable:
SDK-Router(config)#interface se0/0
SDK-Router(config-if)#ip address 192.168.100.1 255.255.255.252
SDK-Router(config-if)#clock rate 4000000
SDK-Router(config-if)#no shutdown
Add Routing Protocol (use RIP)
SDK-Router# router rip
We have to add all networks (NetID) attached to this router: (for example)
SDK-Router# network 192.168.2.0
SDK-Router# network 192.168.3.0
SDK-Router# network 192.168.4.0
SDK-Router# network 192.168.100.0
(Suppose that we have Net: 100 connected to another router on the other side
Summary: (tryout.pkt)
create vlan on Switch using
#interface range fa0/1-7
(config) # vlan 2
(conf-vlan)# name TWO
(conf-if) # switchport mode access
(conf-if) # switchport access vlan 2
(conf-if) # no shutdown
…….. 0/7-14
……vlan 3
……….. THREE
………..
………… vlan 3
…………
………..
……..
..
Set Trunk mode on port 24
(conf)# Interface fa0/24
(conf)# switchport mode trunk
(conf)# switchport trunk allowed vlan all
(conf)# no shut
Set up a router
> en
# conf t
Set sub-interface
(config-if)#interf fa0/0.2
SDK-Router(config-subif)#encapsulation dot1Q 2
SDK-Router(config-subif)#ip address 192.168.2.1 255.255.255.0
SDK-Router(config-subif)# no shutdown
….. interf fa0/0.3
…..enc dot 3
………address 192.168.3.1 255.255.255.0
…no shut
……..4
……
……
Add Routing Protocol (use RIP)
Router# router rip
Router# network 192.168.2.0
Router# network 192.168.3.0
Router# network 192.168.4.0
………..
Router# network 192.168.100.0
……….
Download