Layer 3
Layer 3
hostname MLS1
username admin secret 123
service password-encryption
enable secret 123
line console 0
login local
exit
line vty 0 15
login local
transport input ssh
exit
ip domain-name ITgate.com
crypto key generate rsa
ip ssh version 2
int r g0/1-2
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40,1
vlan 10
vlan 20
vlan 30
vlan 40
ex
interface vlan 10
ip add 192.168.10.1 255.255.255.0
no shut
ex
interface vlan 20
ip add 192.168.20.1 255.255.255.0
no shut
ex
interface vlan 30
ip add 192.168.30.1 255.255.255.0
no shut
ex
interface vlan 40
ip add 192.168.40.1 255.255.255.0
no shut
ex
ip routing
int vlan 10
standby 1 ip 192.168.10.100
standby 1 priority 150
standby 1 preempt
ex
int vlan 20
standby 1 ip 192.168.20.100
standby 1 priority 150
standby 1 preempt
ex
int vlan 30
standby 1 ip 192.168.30.100
standby 1 priority 150
standby 1 preempt
ex
int vlan 40
standby 1 ip 192.168.40.100
standby 1 priority 150
standby 1 preempt
ex
ip dhcp pool VLAN10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.100
dns-server 8.8.8.8
ip dhcp excluded-address 192.168.10.100 ?
ip dhcp excluded-address 192.168.10.100
ip dhcp excluded-address 192.168.10.50
ip dhcp excluded-address 192.168.10.1
ex
MLS1#
ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
MLS2
hostname MLS2
username admin secret 123
service password-encryption
enable secret 123
line console 0
login local
exit
line vty 0 15
login local
transport input ssh
exit
ip domain-name ITgate.com
crypto key generate rsa
ip ssh version 2
int r g0/1-2
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40,1
interface vlan 10
ip add 192.168.10.2 255.255.255.0
no shut
ex
vlan 10
vlan 20
vlan 30
vlan 40
ex
interface vlan 20
ip add 192.168.20.2 255.255.255.0
no shut
ex
interface vlan 30
ip add 192.168.30.2 255.255.255.0
no shut
ex
interface vlan 40
ip add 192.168.40.2 255.255.255.0
no shut
ex
ip routing
int vlan 10
standby 1 ip 192.168.10.100
standby 1 priority 100
standby 1 preempt
ex
int vlan 20
standby 1 ip 192.168.20.100
standby 1 priority 100
standby 1 preempt
ex
int vlan 30
standby 1 ip 192.168.30.100
standby 1 priority 100
standby 1 preempt
ex
int vlan 40
standby 1 ip 192.168.40.100
standby 1 priority 100
standby 1 preempt
ex