EIGRP OSPF Redistribution Sim Configuration On GNS3
EIGRP OSPF Redistribution Sim Configuration On GNS3
In following topology there are four router, R1, R2 and R3 are running in EIGRP AS 100. While R2s
s1/2 is running in OSPF area 24, R3s f2/0 interface is running in OSPF area 34. In this Sim you need
to redistribute OSPF into EIGRP so that they can communicate with each other. At the end of your
configuration ping from R1 to Test IP 172.16.100.1 must be successful.
You can practice this simulation in GNS3 very easily; first you need to create above topology in
GNS3 with following configurations. I have run EIGRP on R1, R2 and R3 and OSPF on R2 and R3
according to above diagram. In real Exam you don't have any concerned regarding routing protocols
configuration you just need to redistribute OSPF and EIGPR
GNS3 Configuration:
R1 Configuration:
R1(config)#int s1/0
R1 (config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config)#exit
R1(config)#router eigrp 100
R1(config)#network 192.168.1.0 0.0.0.255
R2 Configuration:
Router(config)#hostname R2
R2(config)#interface s1/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#interface s1/1
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#interface s1/2
R2(config-if)#ip address 192.168.3.1 255.255.255.0
R2(config-if)#ip ospf 1 area 24
R2(config-if)#no shut
R2(config)#router EIGRP 100
R2(config-router)#network 192.168.2.0
R2(config-router)#network 192.168.1.0
R3 Configuration:
Router(config)#hostname R3
R3(config)#interface s1/0
R3(config-if)#ip address 192.168.2.2 255.255.255.0
R3(config-if)#interface f2/0
R3(config-if)#ip address 192.168.4.1 255.255.255.0
R3(config-if)#ip ospf 1 area 34
R3(config)#router EIGRP 100
R3(config-router)#network 192.168.2.0
R4 Configuration:
Router(config)#hostname R4
R4(config)#interface s1/0
R4(config-if)#ip address 192.168.3.2 255.255.255.0
R4(config-if)#ip ospf 1 area 24
R4(config-if)#interface f2/0
R4(config-if)#ip address 192.168.4.2 255.255.255.0
R4(config-if)#ip ospf 1 area 34
After complete the above configuration you are at same stage where you need to configure this lab
in exam.
We have done so much as given in exam and from now on word you have to handle this complete
the configuration.
R3#config terminal
R3(config)#router ospf 1
R3(config-router)#redistribute eigrp 100 metric-type 1 subnets
R3(config)#exit
R3(config-router)#router eigrp 100
R3(config-router)#redistribute ospf 1 metric 100000 100 255 1 1500
1. you need to short out the wrong virtual-link configurations that you will find on R3 & R4 i.e.
GNS3 configuration:
Create this lab in GNS3 with following configuration, after these configurations you can start real
lab configuration as you need to complete in exam.
R1 Configuration:
R1(config)#ipv6 unicast-routing
R1(config)#interface Loopback1
R1(config-if)# ipv6 address FEC0:11::1/64
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#EXIT
R1(config-if)#interface FastEthernet1/0
R1(config-if)#ipv6 address FEC0:1::1/64
R1(config-if)#no shut
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#exit
R1(config)#ipv6 router ospf 1
R1(config-rtr)#router-id 1.1.1.1
R2 Configuration:
R2(config)#ipv6 unicast-routing
R2(config)#int loopback 1
R2(config-if)#ipv6 address fec0:22::2/64
R2(config-if)#ipv6 ospf 1 area 0
R2(config-if)#EXIT
R2(config-if)#interface FastEthernet1/0
R2(config-if)#ipv6 address FEC0:1::2/64
R2(config-if)#no shut
R2(config-if)#ipv6 ospf 1 area 0
R2(config-if)#exit
R2(config-if)#interface serial2/0
R2(config-if)#ipv6 address FEC0:2::1/64
R2(config-if)#no shut
R2(config-if)#ipv6 ospf 1 area 11
R2(config-if)#EXIT
R2(config)#ipv6 router ospf 1
R2(config-rtr)#router-id 2.2.2.2
R3 Configuration:
R3(config)#ipv6 unicast-routing
R3(config)#int loopback 1
R3(config-if)#ipv6 address fec0:33::3/64
R3(config-if)#ipv6 ospf 1 area 11
R3(config-if)#EXIT
R3(config-if)#interface FastEthernet1/0
R3(config-if)#ipv6 address FEC0:3::1/64
R3(config-if)#no shut
R3(config-if)#ipv6 ospf 1 area 54
R3(config-if)#exit
R3(config-if)#interface serial2/0
R3(config-if)#ipv6 address FEC0:2::2/64
R3(config-if)#no shut
R3(config-if)#ipv6 ospf 1 area 11
R3(config-if)#EXIT
R3(config)#ipv6 router ospf 1
R3(config-rtr)#router-id 3.3.3.3
Follow virtual-link configuration are wrong i have added these because in real exam you will find
such wrong configuration and you need to removes these and need to configure R2 & R3 for virtual-
link. Also in exam configuration i shall removes this area 54 virtual-link 4.4.4.4 command from R3 so
that all routers can communicate with each other.
R3(config-rtr)# area 54 virtual-link 4.4.4.4
R4 Configuration:
R4(config)#ipv6 unicast-routing
R4(config)#int loopback 1
R4(config-if)#ipv6 address fec0:44::4/64
R4(config-if)#ipv6 ospf 1 area 54
R4(config-if)#EXIT
R4(config-if)#interface FastEthernet1/0
R4(config-if)#ipv6 address FEC0:3::2/64
R4(config-if)#no shut
R4(config-if)#ipv6 ospf 1 area 54
R4(config-if)#exit
R4(config)#ipv6 router ospf 1
R4(config-rtr)#router-id 4.4.4.4
So please remove this. You need to make the virtual link on R2 & R3. We create virtual links when
some OSPF area is not physically connected with backbone area (Area 0). The area through which you
configure the virtual link is known as a transit area. Routers R2 and R3 are belonging to transit area
that way need to add commands on these routers.
R4#configure terminal
R4(config)#ipv6 router ospf 1
R4(config-rtr)#no area 54 virtual-link 3.3.3.3
Step-2:
Complete the virtual links configurations on R2 & R3.
R3>enable
R3#configure terminal
R3(config)#ipv6 router ospf 1
R3(config-rtr)#no area 54 virtual-link 4.4.4.4
R3(config-rtr)#area 11 virtual-link 2.2.2.2
R2>enable
R2#configure terminal
R2(config)#ipv6 router ospf 1
R2(config-rtr)#area 11 virtual-link 3.3.3.3
R4>enableR4#show running-config
You will see a wrongly configured virtual-link command. To get full mark we have to disable this
command:
Verification:
After configuration use command Show IPv6 route on R1, if you found the R4 route in routing table
its mean you have done this lab successfully. And ping from R1 to R4 should be successful.
Important Tip: Please dont forget to use IPV6 in every command e.g.
Show IPV6 route, IPv6 router ospf 54 etc.
Question
By increasing the first distant office, PNG manufactures has extended their business. They configured
the remote office router (R3) from which they can reach all corporate subnets. In order to raise
network stableness and lower the memory usage and broadband utilization to R3, RB manufactures
makes use of route summarization together with the EIGRP Stub Routing feature. Another network
engineer is responsible for the implementing of this solution. However, in the process of configuring
EIGRP stub routing connectivity with the remote network devices off of R3 has been missing.
Presently PNG has configured EIGRP on all routers in the network R2, R3, and R4. Your duty is to find
and solve the connectivity failure problem with the remote office router R3. You should then configure
route summarization only to the distant office router R3 to complete the task after the problem has
been solved.
The success of pings from R4 to the R3 LAN interface proves that the fault has been corrected and the
R3 IP routing table only contains two 10.0.0.0 subnets.
GNS3 Configuration:
Create the above lab with following configurations in GNS3 and then practice this SIm with Real Exam
configuration for your Route Exam.
R3 Configuration: R3(config)# interface Loopback1 R3(config-if)#ip address 172.16.1.1 255.255.255.0
R3(config-if)#interface Serial1/0 R3(config-if)#ip address 10.2.3.3 255.255.255.0 R3(config-if)# No
shut
R3(config-if)#end
R3(config)#router eigrp 123 R3(config-rtr)#network 10.2.3.0 0.0.0.255
R3(config-rtr)#network 172.16.1.0 0.0.0.255
R3(config-rtr)#no auto-summary
R3(config-rtr)#eigrp stub receive-only
R4 Configuration: R4(config)# interface Serial1/0 R4(config-if)#ip address 10.2.3.4 255.255.255.0
R4(config-if)# No shut
R4(config-if)#interface FastEthernet2/0
R4(config-if)#ip address 10.2.2.4 255.255.255.0
R4(config-if)# No shut
R4(config-if)#end
R4(config -rtr)#router eigrp 123
R4(config -rtr)#network 10.2.2.0 0.0.0.255
R4(config -rtr)#network 10.2.3.0 0.0.0.255
R4(config -rtr)#no auto-summary
R2 Configuration:
R2(config)#interface Loopback2
R2(config-if)#ip address 10.2.4.2 255.255.255.0
R2(config-if)# interface Loopback3
R2(config-if)#ip address 10.2.5.2 255.255.255.0
R2(config-if)#interface Loopback5
R2(config-if)#ip address 10.2.6.2 255.255.255.0
R2(config-if)#interface Loopback6
R2(config-if)#ip address 10.2.7.2 255.255.255.0
R2(config-if)#interface Loopback7
R2(config-if)#ip address 10.2.8.2 255.255.255.0
R2(config-if)#interface Loopback8
R2(config-if)#ip address 10.2.9.2 255.255.255.0
R2(config-if)#interface FastEthernet1/0
R2(config-if)#ip address 10.2.2.2 255.255.255.0
R2(config-if)# No shut R2(config-if)# end
R2(config)# router eigrp 123
R2(config -rtr)#network 10.2.2.0 0.0.0.255
R2(config -rtr)#network 10.2.4.0 0.0.0.255
R2(config -rtr)#network 10.2.5.0 0.0.0.255
R2(config -rtr)#network 10.2.6.0 0.0.0.255
R2(config -rtr)#network 10.2.7.0 0.0.0.255
R2(config -rtr)#network 10.2.8.0 0.0.0.255
R2(config -rtr)#network 10.2.9.0 0.0.0.255
R2(config -rtr)#no auto-summary
For R3 only have 2 subnets we need Summarization at the R4's serial 1/0 interface which is connected
with R3.
To fulfill this requirement we configure R4 as follow, R4>enable
R4#configure terminal
R4(config)#interface s1/0
R4(config-if)#ip summary-address eigrp 123 10.2.0.0 255.255.0.0
Testing:
Now show ip route command to verify the effect, the output is shown below:
In your real exam IPs might be different so you need configure R4 according to requirements.
GNS3 Labs | CCNP |
CCNA Labs
Blog is related to most famous network simulator i.e. "GNS3", here you can find
different Labs, typologies and configuration regarding ICND, CCENT, CCNA, CCNP
on GNS3.
Home
ICND1 and ICND2 Labs | CCENT Sim
CCNP Route (300-101 Exam) Labs
CCNP Switch (300-115) Practice Labs
CCNA 200-120 Labs
A company has three routers Protland, Amsni and Lynaic. OSPF is configured on routers Amani and
Lynaic. Amanis S0/0 interface and Lynaics S0/1 interface are in Area 0. Lynaics Loopback0 interface
is in Area 2. Details of configuration are as follow:
First you need to create this topology in GNS3 as show above with following configurations.
Portland Router:
R1#config t
Anami Router:
R2#config t
Anami (config)#exit
Lynaic Router:
R3#config t
Lynaic (config-if)# ex
Lynaic (config)#exit
From above configuration you have notice that Portland router and Anamis S1/0 interface is not
running OSPF that way they are not able to communicate with other. In order to complete the
configuration you need to run OSPF on these. For appropriate mask for 192.168.4.5\30 you need to find
out the network ID for this subnet.
1 2 3 4 5 6 7 8
128 64 32 16 8 4 2 0
As we know that \30 is 6th bit of 4th octet that way from above table these subnets are divided into four
number differences as follow.
0 3
4 7
8 11
12 15
And so on. ..
And from above we can see that 192.168.4.5 lie in 4-7 range therefore
Subnet ID=192.168.4.4
Portland#configure terminal
Portland(config)#router ospf 1
Area 1 should not receive any external or inter-area routes configure area 1 as totally stubby area.
Portland(config-router)#area 1 stub
Portland(config-router)#end
Portland#copy running-config startup-config
Amani#configure terminal
Amani(config)#router ospf 1
Amani(config-router)#network 192.168.4.4 0.0.0.3 area 1
Ping from Lynaic to Portland should be successful and Lynaic have all route in its routing table.
Solution:
I have created above lab in GNS3. BorderRouter and R1 are configured with EIGRP 11. I have used a
cloud for generating HTTP Traffic. I connect the e3/0 interface with PCs NIC using cloud and assigned
the following IP.
And also add a manual route for 13.13.13.2 so that my PC can access internal R1 Router.
For this go to Run\cmd (make sure you have admin rights) and use the following command.
Route add 13.13.13.2 mask 255.255.255.255 14.14.14.1 p
You can use Route print command to verify. In testing part I will show you how I generate HTTP
traffic from using GNS3 cloud.
GNS3 Configurations:
To made communication between R1 and Borderrouter I use the EIGRP, in real exam lab you dont have
any concerned with routing protocol for this Sim you just need to create ACL and Route map in real
exam.
BorderRouter Configurations:
R3#config t
R3(config)#hostname Borderrouter
Borderrouter(config)#interface e3/0
Borderrouter(config-if)# ip address 14.14.14.1 255.255.255.0
Borderrouter(config-if)#no shut
Borderrouter(config)#interface s1/0
Borderrouter(config-if)# ip address 13.13.13.1 255.255.255.0
Borderrouter(config-if)#no shut
Borderrouter(config)#router eigrp 11
Borderrouter(config-router)#network 13.13.13.0 0.0.0.255
Borderrouter(config-router)#network 14.14.14.0 0.0.0.255
Borderrouter(config)#ip default-gateway 13.13.13.2
R1 Configurations:
R1#config t
R1(config)#interface s1/0
R1(config-if)# ip address 13.13.13.2 255.255.255.0
R1(config-if)#no shut
R1(config)#router eigrp 11
R1(config-router)# network 13.13.13.0 0.0.0.255
First you need to create an access-list, which allows all HTTP traffic.
Secondly you need to create route-map to send the traffic through Frame-relay interface.
In Real Examthere is a Host for Testing, click on that. Then click on this Generate HTTP traffic
button to generate some packets for HTTP traffic. Jump back to the BorderRouter and type the
command show route-map.
BorderRouter#show route-map
You will see that 9 packets matches which verify that your configurations is correct.
Testing in GNS3:
To test your configurations in GNS3 you just type http://13.13.13.2 in web browser. Result will be
cannot fine this page but this will pass some http packets to frame-relay ISP.
Now type the command show route-map.
BorderRouter#show route-map
//////Switch
VLAN Ids 40 41
1. Configure the above VTP information with the distribution layer switch (Dswitch) as the VTP server
2. Configure the VTP information with the access layer switch (Aswitch) as a VTP client
3. Configure VLANs on the Dswitch
4. Configure inter-VLAN routing on the Dswitch
5. Specific VLAN port assignments will be made as users are added to the access layer switches in the
future.
Note: All VLANs and VTP configurations are to completed in the global configuration of Switch.
---------------------------------------------------------------------------------------
DSwitch>enable
DSwitch#configure terminal
Dswitch(config)#vtp mode server
Dswitch(config)#vtp domain Cisco
2) Configure the VTP information with the access layer switch as a VTP client
Access the console of Access layer switch Aswitch for performing the following configurations:
ASwitch>enable
Aswitch#configure terminal
Aswitch(config)#vtp mode client
Aswitch(config)#vtp domain Cisco
According to lab requirement create VLANs on a Dswitch by using the vlan vlanID# command in
global configuration mode instead of database vlan command:
Dswitch(config)#vlan 40
Dswitch(config)#vlan 41
Dswitch(config)#interface vlan 40
Dswitch(if-config)#ip address 172.16.71.40 255.255.255.0
Dswitch(if-config)#no shutdown
Dswitch(if-config)#interface vlan 41
Dswitch(if-config)#ip address 172.16.132.41 255.255.255.0
Dswitch(if-config)#no shutdown
Dswitch(if-config)#exit
Dswitch(config)#ip routing
Dswitch(config)#exit
Dswitch#Write (save configurations)
5) Configure the VTP information with the access layer switch as a VTP client
Aswitch#configure terminal
Aswitch(config)#vtp mode client
Aswitch(config)#vtp domain cisco
Aswitch(config)#exit
You need to configure multilayer Switch according to topology diagram and such that both hosts i.e.
Host-A and Host-B are able to successfully ping the Internet server Server_S1.
You are not allowed to add/delete VLANs, changes VLAN port assignments or create trunk links. Also you
cant use a static or default routing. All routes must be learned via EIGRP 300 routing protocol. RouterC
is correctly configured and no trunking has been configured on RouterC.
Routed interfaces should use the lowest host on a subnet when possible. The following subnets are
available to implement this solution:
10.10.10.0/24
192.168.100.32/27
192.168.100.64/27
Hosts H1 and H2 are configured with the correct IP address and default gateway. The enable password
for Multi-Switch is Cisco. Routing must only be enabled for the specific subnets shown in the diagram.
Solution:
Step to perform:
-Find gateways of PCs with ipconfig command in Exam simulator, these gateways are use to
configured as the virtual interface on multilayer switch for given VLANs and in our case we have the
following:
Host1:
IP Address: 192.168.100.36
Host2:
IP Address: 192.168.100.66
VLAN 22 and 33 are created on multilayer switch and interfaces (connected to hosts) were configured
as access ports so we dont need to configure them in this sim, you also use the show vlan command
for checking VLANs .
According to SIM requirement we are not allow to use trunking therefore we will configure the Multi-
Switch as a Layer 3 switch with SVIs for interVLAN routing and will configure these VLAN interfaces with
gateways of PCs for respective VLANs.
Multi-Switch(config-if)# no shutdown
Multi-Switch(config-if)# exit
Multi-Switch(config)# int vlan 22
Multi-Switch(config-if)# ip address 192.168.100.35 255.255.255.224
Multi-Switch(config-if)# no shutdown
Multi-Switch(config-if)# int vlan 33
Multi-Switch(config-if)# ip address 192.168.100.65 255.255.255.224
Multi-Switch(config-if)# no shutdown
Multi-Switch(config-if)#exit
ASW1(config-if)#end
ASW1#write
Packets from devices in the address range of 172.120.10.0/24 should be passed on VLAN 20.
Define an access-list:
DSW1(config)#ip access-list standard 10
DSW1(config-std-nacl)#permit 172.120.10.0 0.0.0.255
DSW1(config-std-nacl)#exit
Suppose your company has installed a new Switch in your existing network to connect 24 additional
users. You need to configure the switch correctly so that it will not disturb your existing configuration of
your network. You also have to ensure that the switch does not participate in VTP (VLAN trunking
protocols) but forwards VTP updates and advertisements that are received on trunk ports.
Because of errors that have been experienced on office computers, all nontrunking interfaces (all Fast
Ethernet ports) should transition immediately to the forwarding state of Spanning tree.
Ensure the following configurations on Switch:
Configure all port of Switch as access-ports and assign the VLAN 20 to Fast Ethernet ports 1/12 to 1/24
in global configuration mode.
Switch does not participate in VTP but forwards VTP advertisements received on trunk ports.
Ensure all access interfaces (1-24) of switch transition immediately to the forwarding state of
Spanning-Tree.
Switch>enable
Switch#configure terminal
Switch(config)#interface range fa1/1 24
Switch(config-if-range)#switchport mode access
Assign the VLAN 20 to Fast Ethernet ports 1/12 to 1/24 in global configuration mode.
By default, all ports on the switch are in VLAN 1. To change the VLAN associated with a port, you need to
go to each interface (or a range of interfaces) and tell it which VLAN to be a part of.
Switch(config-if-range)#interface range fa1/12 24
Switch(config-if-range)#switchport access vlan 20
Switch(config-if-range)#exit
Ensure all access interfaces (1-24) of switch transition immediately to the forwarding state of
Spanning-Tree.
Switch(config-if-range)#spanning-tree portfast
Switch does not participate in VTP but forwards VTP advertisements received on trunk ports.
And finally you can save the configuration with one of following command.
OR
Switch#Write
Configure the SwitchA as root switch for vlans 11, 12, 13, 21, 22 and 23
and need to have the same configuration as the SwitchB for successful
configuration.
SwitchA>enable
SwitchA #configure terminal
SwitchA (config)#spanning-tree vlan 11,12,13,21,22,23 root primary
SwitchA (config)#vlan 21
SwitchA (config-vlan)#name HR
SwitchA (config-vlan)#exit
SwitchA (config)#vlan 22
SwitchA (config-vlan)#name Finance
SwitchA (config-vlan)#exit
SwitchA (config)#vlan 23
SwitchA (config-vlan)#name Marketing
SwitchA (config-vlan)#exit
SwitchA (config)#interface range Fa1/3 4
SwitchA (config-if-range)#switchport mode trunk
SwitchA (config-if-range)#switchport trunk native vlan 100
SwitchA (config-if-range)#switchport trunk allowed vlan 1,21,23
SwitchA (config-if-range)#channel-group 1 mode active
SwitchA (config-if-range)#channel-protocol lacp
SwitchA (config-if-range)#no shutdown
SwitchA (config-if-range)#end
Vlans 1, 21, 22 and 23 should tagged when traversing the trunk link:
Question:
A company has an existing network comprised of 5 switches;
CoreSwitch
DSW1
DSW2
AcessSwitch1
AcessSwitch2
This switch network has pre-VLAN spanning tree mapping. You has the following tasks to complete this
Lab:
CoreSwitch should be the root bridge for VLAN 20, but currently DSW1 is the root bridge for VLAN
20.
Traffic for VLAN 30 should be forwarding over the gig 1/0/6 trunk port between DSW1 and
DSW2. However VLAN 30 is currently using gig 1/0/5.
Traffic for VLAN 40 should be forwarding over the gig 1/0/5 trunk port between DSW1 and
DSW2. However VLAN 40 is currently using gig 1/0/6.
You task is complicated by the fact that you only have full access to DSW1, with the enable password
cisco. You are allowed and provided only limited show commands access is provided on CoreSwitch,
and DSW2 using the enable 2 level with a password of Cisco. You are not allowed to made configuration
changes on these Switches. Also you dont have access to ASW1 or ASW2. So you are only limited to
make configuration on DSW1.
DSW1>enable
DSW1#show spanning-tree
To make the CoreSwitch the root bridge we need to increase the DSW1s priority value, the best value
should be you can use another value but make sure it is higher than the CoreSwitch priority value by
checking if the CoreSwitch becomes the root bridge or not; and that value must be in increments of
4096.
DSW1#configure terminal
DSW1(config)#spanning-tree vlan 20 priority 61440
2.Traffic for VLAN 30 should be forwarding over the gig 1/0/6 trunk port
between DSW1 and DSW2.
VLAN 30 is currently using gig 1/0/5 and gig 1/0/6 is in blocking state, you can find these information
by using command show spanning-tree. We know that spaning tree protocol make the forwarding
port base on
Bridge-ID
Port-Cost
Interface-ID
Since both ports have same bridge-ID and both interfaces are fastethernet therefore they will have the
same port-cost. When the both ports have same port-cost and bridge-ID then the port with the lower
interface will be in forwarding state while other will be in blocking state. Same happen in this case
that both switches DSW1 and DSW2 have same bridge-ID and Cost therefore gig 1/0/5 is forwarding port
for VLAN 30. Now you can make the gig 1/0/6 as forwarding port by lowering the Priority Number of
the port gig 1/0/6 you can see the currently priority numbers of ports by show show spanning-
tree
Notice that we only need to change this value for VLAN 30, not for all VLANs.
DSW1(config)#interface g1/0/6
DSW1(config-if)#spanning-tree vlan 30 port-priority 64
DSW1(config-if)#exit
3. Traffic for VLAN 40 should be forwarding over the gig 1/0/5 trunk port between
DSW1 and DSW2.
However VLAN 40 is currently using gig 1/0/6 and our task is to make the forwarding of VLAN 40
through gig 1/0/5. It is a similar job, but we are not allowed to make any configurations on DSW2, and
in this case we cant change the port-priority for VLAN 40. There is another solution for this you can
change the cost (set the lower value) on an interface of DSW1 then only DSW1 will learn the change.
By default, the cost of a 100Mbps link is 19 but we can change this value to make sure that VLAN 40
will use interface Gig1/0/5.
DSW1(config)#interface g1/0/5
DSW1(config-if)#spanning-tree vlan 40 cost 1
DSW1(config-if)#exit