0% found this document useful (0 votes)
35 views6 pages

Routing & Switching Lab

Uploaded by

azayrate06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views6 pages

Routing & Switching Lab

Uploaded by

azayrate06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

•••• BASIC CONFIGURATION :

••• NECESSARY CONFIGURATION :


• Hostname
• Banner
• Service DNS
• Access Security
• IP Addressing
• Access Line (Console)
• Users and Administrators
• Web interfaces

••• CONFIG.TEXT :
• System file saved on the Flash memory.
• Contains all the global configuration (Interfaces, hostnames, lines, Services,
STP, ...).

••• SWITCH :
enable (Mode User (>) to Mode Exec (#))
configure terminal (Mode Exec (#) to Mode Global Configuration (Config)# )
hostname SWx (Nommer le switch : 1<x<3)
banner motd c GROUP X LAB c (LAB Description : 1<X<3)
ip domain-name UITS.MA (Domain Name)
ip name-server 8.8.8.8 (DNS Server)
ip domain-lookup (Enable DNS resolution)
enable secret 123456 (Secure the Exec Access using a 5 encrypted password method)
line console 0 (Console Access Configuration)
password 123456 (Console Password)
login (User Verification at login)
exec-timeout 120 (Timeout with 120min → By default 5min)
logging synchronous (Prevents logging output from interrupting console session)
exit (Quit the console line)
username admin priv 15 secret 123456 (New super user)
username user priv 10 secret 123456 (New standard user)
ip http server (Web interface using HTTP access)
ip http secure-server (Web interface using HTTPS access)
ip http authentication local (Secure HTTP access using a local user/super user)

• EXAMPLE :
ena
conf t
hostname SW1
banner motd c GROUP 1 LAB c
ip domain-name UITS.MA
ip name-server 8.8.8.8
ip domain-lookup
enable secret 123456
line console 0
password 123456
login
exec-timeout 120
logging synchronous
exit
username admin priv 15 secret 123456
username user priv 10 secret 123456
ip http server
ip http secure-server
ip http authentication local

••• ROUTER :
enable (Mode User (>) to Mode Exec (#))
configure terminal (Mode Exec (#) to Mode Global Configuration (Config)# )
hostname Rx (Rename the router : 1<x<3)
banner motd c GROUP X LAB c (LAB Description : 1<X<3)
ip domain-name UITS.MA (Domain Name)
ip name-server 8.8.8.8 (DNS Server)
ip domain-lookup (Enable DNS resolution)
enable secret 123456 (Secure the Exec Access using a 5 encrypted password method)
int fa 0/1 (Interface Configuration Access)
no sh (Enable Interface)
ip add 192.168.10.X 255.255.255.0 (Add a new static IP address (1<X<3))
exit (Quit interface mode configuration)
int fa 0/0 (Interface Configuration Access)
no sh (Enable Interface)
exit (Quit interface mode configuration)
line console 0 (Console Access Configuration)
password 123456 (Console Password)
login (User Verification at login)
exec-timeout 120 (Timeout with 120min → By default 5min)
logging synchronous (Prevents logging output from interrupting console session)
exit (Quit the console line)
username admin priv 15 secret 123456 (New super user)
username user priv 10 secret 123456 (New standard user)
ip http server (Web interface using HTTP access)
ip http secure-server (Web interface using HTTPS access)
ip http authentication local (Secure HTTP access using a local user/super user)

• EXAMPLE :
ena
conf t
hostname R1
banner motd c GROUP 1 LAB c
ip domain-name UITS.MA
ip name-server 8.8.8.8
ip domain-lookup
enable secret 123456
int fa 0/1
no sh
ip add 192.168.10.1 255.255.255.0
exit
int fa 0/0
no sh
exit
line console 0
password 123456
login
exec-timeout 120
logging synchronous
exit
username admin priv 15 secret 123456
username user priv 10 secret 123456
ip http server
ip http secure-server
ip http authentication local

•••• VLAN CONFIGURATION :


••• INTRODUCTION :
•• What is a VLAN ?
• VLAN = Virtual Local Area Network
• Allows to create a lot of networks (Virtual networks) on the same Switch
(Physical Switch).

•• BENIFITS :
• Bandwidth optimization
• Flows Separation
• Improve the network security
• Network Management Optimization
• Segmentation
• Reduce the Broadcast and collision domain
• Cost optimization

•• VLAN TYPES :
• Default VLAN : 1 (By default all the connected hosts on the switch are added to
the VLAN 1 + It's possible to use it as a management interface).
• Data (For the end users : PC, Printer, Server, ...)
• Voice (For the VOIP : IP Phones)
• Management (For the switch management. This VLAN should be configured with an IP
Address)

•• VLAN.DAT :
• System file saved on the Flash memory.
• Contains all the vlan configuration and VTP configuration.

•• PORT TYPE CONFIGURATION :


• Access : SW<->End Device
• Voice : SW<->IP Phone
• Trunk : SW<->SW or SW<->Router or Switch<->Firewall

••• CONFIGURATION :
•• Default vlans verification :
# show vlan brief

•• SWITCH CONFIGURATION :
• CREATE VLANs :
enable (Mode User (>) to Mode Exec (#))
configure terminal (Mode Exec (#) to Mode Global Configuration (Config)# )
vlan X (Create a new vlan, X = Vlan Number : 11, 21, 31)
name ADM (Specify a new vlan name)
exit
vlan Y (Create a new vlan, Y = Vlan Number : 12, 22, 32)
name PROD (Specify a new vlan name)
exit
vlan Z (Create a new voice vlan, Z = Vlan Number : 101, 102, 103)
name VOICE (Specify a new vlan name)
exit

• CONFIGURE INTERFACES :
- INTERFACES VERIFICATION :
do show ip interface brief
→ Fastethernet0/x (Example : Fastethernet0/1, Fastethernet0/2,
Fastethernet0/3, ...)
→ Fastethernetx/0/y (Example : Fastethernet4/0/1, ..., Fastethernet6/0/1, ...)

- TRUNK CONFIGURATION :
int range fa 0/1 - 2 OR int range fa 6/0/1 - 2 OR int range fa 4/0/1 - 2
switchport trunk encapsulation dot1q
switchport mode trunk
exit
- ACCESS CONFIGURATION :
int range fa 0/4 - 12 OR int range fa 6/0/4 - 12 OR int range fa 4/0/4 - 12
switchport mode access
switchport access vlan X (X = Vlan Number : 11, 21, 31)
switchport voice vlan Z (Z = Vlan Number : 101, 102, 103)
exit
int range fa 0/13 - 22 OR int range fa 2/0/13 - 22 OR int range fa 4/0/13 - 22
switchport mode access
switchport access vlan Y (Y = Vlan Number : 12, 22, 32)
switchport voice vlan Z (Z = Vlan Number : 101, 102, 103)
exit

•• ROUTER CONFIGURATION :
• INTER-VLAN ROUTING CONFIGURATION :
ena
conf t
int fa 0/0
no sh
exit
int fa 0/0.X (Create a new subinterface, (X = Vlan Number : 11, 21, 31)
encapsulation dot1Q X (X = Vlan Number : 11, 21, 31)
ip add 192.168.X.1 255.255.255.0 (X = Vlan Number : 11, 21, 31)
exit
int fa 0/0.Y (Create a new subinterface, (Y = Vlan Number : 12, 22, 32)
encapsulation dot1Q Y (Y = Vlan Number : 12, 22, 32)
ip add 192.168.Y.1 255.255.255.0 (Y = Vlan Number : 12, 22, 32)
exit
int fa 0/0.Z (Create a new subinterface, (Z = Vlan Number : 101, 102, 103)
encapsulation dot1Q Z (Z = Vlan Number : 101, 102, 103)
ip add 192.168.Z.1 255.255.255.0 (Z = Vlan Number : 101, 102, 103)
exit

• EXAMPLE :
- SWITCH :
ena
conf t
vlan 11
name ADM
vlan 12
name PROD
vlan 101
name VOICE
exit
int range fa 0/1 - 2
switchport trunk encapsulation dot1q
switchport mode trunk
exit
int range fa 0/4 - 12
switchport mode access
switchport access vlan 11
switchport voice vlan 101
exit
int range fa 0/13 - 22
switchport mode access
switchport access vlan 12
switchport voice vlan 101
exit
- ROUTER :
ena
conf t
int fa 0/0
no sh
no ip add
exit
int fa 0/0.11
encapsulation dot1Q 11
ip add 192.168.11.1 255.255.255.0
exit
int fa 0/0.12
encapsulation dot1Q 12
ip add 192.168.12.1 255.255.255.0
exit
int fa 0/0.101
encapsulation dot1Q 101
ip add 192.168.101.1 255.255.255.0
exit

•••• DHCP SERVICE CONFIGURATION :


••• INTRODUCTION :
• DHCP = Dynamic Host Configuration Protocol
• TCP/IP dymamic configuration
• Application Layer Protocol
• Use ports : 67 & 68 over UDP
• Offer : IP Address, Subnet Mask, Gateway, DNS Servers, Domain Name, NTP
Addresses, ...

••• CONFIGURATION :
•• ROUTER :
ena
conf t
ip dhcp excluded-address 192.168.X.1 192.168.X.10
ip dhcp excluded-address 192.168.Y.1 192.168.Y.10
ip dhcp excluded-address 192.168.Z.1 192.168.Z.10
ip dhcp pool VLAN-X (DHCP POOL FOR VLAN X)
network 192.168.X.0 255.255.255.0
default-router 192.168.X.1
dns-server 8.8.8.8
domain-name UITS.MA
lease 0 8 0
exit
ip dhcp pool VLAN-Y (DHCP POOL FOR VLAN Y)
network 192.168.Y.0 255.255.255.0
default-router 192.168.Y.1
dns-server 8.8.8.8
domain-name UITS.MA
lease 0 8 0
exit
ip dhcp pool VLAN-Z (DHCP POOL FOR VLAN Z)
network 192.168.Z.0 255.255.255.0
default-router 192.168.Z.1
dns-server 8.8.8.8
domain-name UITS.MA
lease 0 8 0
exit

• EXAMPLE :
ip dhcp excluded-address 192.168.11.1 192.168.11.10
ip dhcp excluded-address 192.168.12.1 192.168.12.10
ip dhcp excluded-address 192.168.101.1 192.168.101.10
ip dhcp pool VLAN-11
network 192.168.11.0 255.255.255.0
default-router 192.168.11.1
dns-server 8.8.8.8
domain-name UITS.MA
lease 0 8 0
exit
ip dhcp pool VLAN-12
network 192.168.12.0 255.255.255.0
default-router 192.168.12.1
dns-server 8.8.8.8
domain-name UITS.MA
lease 0 8 0
exit
ip dhcp pool VLAN-101
network 192.168.101.0 255.255.255.0
default-router 192.168.101.1
dns-server 8.8.8.8
domain-name UITS.MA
lease 0 8 0
exit

You might also like