Multi Lab Assignment
Multi Lab Assignment
Lab Exercise
This exercise will simulate a real word scenario in which a company might use two gateways to balance
Your task is to configure the network in the diagram above to allow connectivity between PC1 and
PC2 to the external network 8.8.8.8/32. PC1 will use Gateway 1 as the default gateway with Gateway
2 as secondary and PC2 will use Gateway 2 as the primary default gateway with Gateway 1 as
secondary. PC1 will be located in VLAN 10, while PC2 will be located in VLAN20. HSRP will be
configured for each VLAN between the two gateways. Gateway 1 will learn the external network
through EIGRP, while Gateway 2 will learn about the external network through OSPF. The gateways
Lab Objectives
3. Configure EIGRP;
4. Configure OSPF;
5. Configure HSRP;
7. Test connectivity.
Purpose
OSPF
EIGRP
VLANs
HSRP
Access-lists
NAT
Lab Walk-Through
1. Configure the necessary VLANs on the switch. We need trunk ports towards the gateways
(carrying VLANs 10 and 20) and access ports towards the PCs.
Switch(config)#int fa1/1
Switch(config)#no shut
Switch(config)#int fa1/2
Switch(config)#no shut
Switch(config)#int fa1/3
Switch(config)#no shut
Switch(config)#int fa1/4
Switch(config)#no shut
External_Router:
interface FastEthernet0/0
interface FastEthernet0/1
External_Router#sho ip int br
Gateway1:
interface FastEthernet0/0
encapsulation dot1Q 10
interface FastEthernet0/1.20
encapsulation dot1Q 20
Gateway1#sho ip int br
Any interface listed with OK? value NO does not have a valid
configuration
Gateway2:
interface FastEthernet0/0
interface FastEthernet0/1.10
encapsulation dot1Q 10
interface FastEthernet0/1.20
encapsulation dot1Q 20
Gateway2#sho ip int br
Any interface listed with OK? value NO does not have a valid
configuration
Note: you can use both real workstations or routers for PC1 and PC2. We have choosen to use routers
for this exercise for simplicity. In order to configure a router to react as a workstation with 1 NIC, just
disable IP routing, set the default gateway and the IP address on the interface.
We will also configure the default gateway on PC1 and PC2. This is the HSRP address of VLAN10 for
PC1(config)#no ip routing
PC1(config)#int fa0/0
PC2(config)#int fa0/0
3. Configure EIGRP between the External_Router and Gateway1, advertise 8.8.8.8/32 towards
External_Router(config-router)#no auto-summary
Gateway1(config-router)#no auto-summary
Q Seq
(sec) (ms)
Cnt Num
04
Gateway1#show ip eigrp neighbors
Q Seq
(sec) (ms)
Cnt Num
03
FastEthernet0/0
We can see the 8.8.8.8/32 network is being learned by Gateway1 via EIGRP.
4. Configure OSPF between the External_Router and Gateway2, advertise 8.8.8.8/32 towards
the internal network via OSPF. Yes, we will advertise the same subnet via both EIGRP and
External_Router(config)#int fa0/1
External_Router(config-if)#lo0
Gateway2(config)#int fa0/1
Interface
FastEthernet0/1
Interface
FastEthernet0/0
We can see the 8.8.8.8/32 network is being learned by Gateway2 via OSPF.
5. Configure HSRP for both VLANs. Gateway1 will be the primary gateway for VLAN10 and
Gateway2 will be the primary gateway for VLAN20. If either of the routers fails, the other
We will configure Gateway1 with priority 110 for VLAN 10 and with priority 100 for VLAN
Gateway1(config)#int fa0/1.10
Gateway1(config-subif)#standby 10 ip 10.0.10.3
Gateway1(config-subif)#standby 10 priority 110
Gateway1(config-subif)#standby 10 preempt
Gateway1(config)#int fa0/1.20
Gateway1(config-subif)#standby 20 ip 10.0.20.3
Gateway1(config-subif)#standby 20 preempt
Gateway2(config)#int fa0/1.10
Gateway2(config-subif)#standby 10 ip 10.0.10.3
Gateway2(config-subif)#standby 10 preempt
Gateway2(config)#int fa0/1.20
Gateway2(config-subif)#standby 20 ip 10.0.20.3
Gateway2(config-subif)#standby 20 preempt
Virtual IP
10.0.10.3
10.0.20.3
Virtual IP
10.0.10.3
10.0.20.3
6. Configure NAT.
On Gateway1 we want to translate the internal address for any packet sourced from VLAN 10 to
192.168.1.10. In the same time, we want to translate the internal address for any packet souced
from VLAN 20 to 192.168.1.11. Even though traffic originated in VLAN 20 will not reach Gateway1 in
a normal day of operations, this will happen if Gateway2 is down, as Gateway1 will assume the role
of primary HSRP gateway. So we want to configure rules for both VLAN 10 and VLAN 20 on both
routers.
On Gateway2, we will assign an external IP address of 192.168.2.10 for traffic sourced in VLAN 10
We will also configure PAT (also known NAT overload) on both devices, so multiple internal sources
Gateway1(config)#int fa0/0
Gateway1(config)#int fa0/1.10
Gateway1(config)#int fa0/1.20
overload
overload
netmask 255.255.255.0
netmask 255.255.255.0
Gateway2(config)#int fa0/0
Gateway2(config)#int fa0/1.10
Gateway2(config)#int fa0/1.20
overload
overload
netmask 255.255.255.0
netmask 255.255.255.0
7. Test connectivity from PC1 and PC2 towards the external network. We will issue a ping
both from PC1 and PC2 towards the external destination and we will then check traffic
from each PC will hit a different gateway router. In this way traffic is load balanced
PC1#ping 8.8.8.8
.!!!!
ms
PC2#ping 8.8.8.8
.!!!!
ms
8.8.8.8:3
global
8.8.8.8:5
As you can see from the output of show ip nat translation, traffic sourced from 10.0.10.10 (VLAN 10)
is translated on Gateway1 and traffic sourced from 10.0.20.10 (VLAN 20) is translated on Gateway2.
Show Runs
External_Router#show run
Building configuration...
version 15.1
no service password-encryption
hostname External_Router
boot-start-marker
boot-end-marker
no aaa new-model
memory-size iomem 5
ip cef
no ip domain lookup
archive
log config
hidekeys
ip tcp synwait-time 5
ip ssh version 1
interface Loopback0
ip ospf 1 area 0
interface FastEthernet0/0
duplex auto
speed auto
!
interface Serial0/0
no ip address
shutdown
interface FastEthernet0/1
ip ospf 1 area 0
duplex auto
speed auto
interface Serial0/1
no ip address
shutdown
network 192.168.1.0
no auto-summary
router ospf 1
log-adjacency-changes
ip forward-protocol nd
no ip http server
no ip http secure-server
!
control-plane
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
End
Gateway1#show run
Building configuration...
version 15.1
no service password-encryption
hostname Gateway1
!
boot-start-marker
boot-end-marker
no aaa new-model
memory-size iomem 5
ip cef
no ip domain lookup
archive
log config
hidekeys
ip tcp synwait-time 5
ip ssh version 1
interface FastEthernet0/0
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
www.howtonetwork.com Copyright Reality Press Ltd.
interface Serial0/0
no ip address
shutdown
interface FastEthernet0/1
no ip address
duplex auto
speed auto
interface FastEthernet0/1.10
encapsulation dot1Q 10
ip nat inside
ip virtual-reassembly
standby 10 ip 10.0.10.3
standby 10 preempt
interface FastEthernet0/1.20
encapsulation dot1Q 20
ip nat inside
ip virtual-reassembly
standby 20 ip 10.0.20.3
standby 20 preempt
interface Serial0/1
no ip address
shutdown
network 192.168.1.0
no auto-summary
ip forward-protocol nd
no ip http server
no ip http secure-server
255.255.255.0
255.255.255.0
!
control-plane
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
End
Gateway2#show run
Building configuration...
version 15.1
no service password-encryption
hostname Gateway2
boot-start-marker
boot-end-marker
!
no aaa new-model
memory-size iomem 5
ip cef
no ip domain lookup
archive
log config
hidekeys
ip tcp synwait-time 5
ip ssh version 1
interface FastEthernet0/0
ip nat outside
ip virtual-reassembly
ip ospf 1 area 0
duplex auto
speed auto
interface Serial0/0
no ip address
shutdown
interface FastEthernet0/1
no ip address
duplex auto
speed auto
interface FastEthernet0/1.10
encapsulation dot1Q 10
ip nat inside
ip virtual-reassembly
standby 10 ip 10.0.10.3
standby 10 preempt
interface FastEthernet0/1.20
encapsulation dot1Q 20
ip nat inside
ip virtual-reassembly
standby 20 ip 10.0.20.3
standby 20 preempt
interface Serial0/1
no ip address
shutdown
router ospf 1
log-adjacency-changes
ip forward-protocol nd
no ip http server
no ip http secure-server
255.255.255.0
255.255.255.0
control-plane
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
End
PC1#show run
Building configuration...
version 15.1
no service password-encryption
hostname PC1
boot-start-marker
boot-end-marker
no aaa new-model
memory-size iomem 5
no ip routing
no ip cef
no ip domain lookup
archive
log config
hidekeys
ip tcp synwait-time 5
ip ssh version 1
interface FastEthernet0/0
no ip route-cache
duplex auto
speed auto
interface Serial0/0
no ip address
no ip route-cache
shutdown
interface FastEthernet0/1
no ip address
no ip route-cache
shutdown
duplex auto
speed auto
interface Serial0/1
no ip address
no ip route-cache
shutdown
ip default-gateway 10.0.10.3
ip forward-protocol nd
no ip http server
no ip http secure-server
control-plane
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
end
PC2#show run
Building configuration...
version 15.1
no service password-encryption
hostname PC2
boot-start-marker
boot-end-marker
no aaa new-model
memory-size iomem 5
no ip routing
no ip cef
!
no ip domain lookup
ip tcp synwait-time 5
ip ssh version 1
interface FastEthernet0/0
no ip route-cache
duplex auto
speed auto
interface Serial0/0
no ip address
no ip route-cache
shutdown
interface FastEthernet0/1
no ip route-cache
shutdown
duplex auto
speed auto
interface Serial0/1
no ip address
no ip route-cache
shutdown
ip default-gateway 10.0.20.3
ip forward-protocol nd
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
end