Professional Documents
Culture Documents
In this culminating activity, you will configure VLANs, trunks, DHCP Easy
IP, DHCP relay agents, and configure a router as a DHCP client.
Our first steps, using the table above, is to create VLANs on S2 and
assign them to the appropriate interfaces/ports. We need to configure them
for trunking, non-trunk ports as Access Ports, and other as needed.
S2>en
S2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S2(config)#vlan 10
S2(config-vlan)#name Sales
S2(config-vlan)#vlan 20
S2(config-vlan)#name Production
S2(config-vlan)#vlan 30
S2(config-vlan)#name Marketing
S2(config-vlan)#vlan 40
S2(config-vlan)#name HR
S2(config-vlan)#exit
S2(config)#int range fa0/5-9
S2(config-if-range)#switchport access vlan 10
S2(config-if-range)#int range f0/10-14
S2(config-if-range)#switchport access vlan 20
S2(config-if-range)#int range f0/15-19
S2(config-if-range)#switchport access vlan 30
S2(config-if-range)#int range f0/20-24
S2(config-if-range)#switchport access vlan 40
S2(config-if-range)#ex
S2(config)#int range fa0/5-9
S2(config-if-range)#switchport mode access
S2(config-if-range)#ex
S2(config)#int range f0/10-14
S2(config-if-range)#switchport mode access
S2(config-if-range)#ex
S2(config)#int range f0/15-19
S2(config-if-range)#switchport mode access
S2(config-if-range)#ex
S2(config)#int range f0/20-24
S2(config-if-range)#switchport mode access
S2(config-if-range)#ex
S2(config)#int range fa0/1-4
S2(config-if-range)#switchport mode trunk
S2(config-if-range)#ex
S2(config)#int range fa0/1-4
S2(config-if-range)#switchport mode trunk
S2(config-if-range)#int range fa0/5-24, g0/1-2
S2(config-if-range)#switchport mode access
R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int g0/0.10
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#ip add 172.31.10.1 255.255.255.224
R1(config-subif)#int g0/0.20
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip add 172.31.20.1 255.255.255.240
R1(config-subif)#int g0/0.30
R1(config-subif)#encapsulation dot1Q 30
R1(config-subif)#ip add 172.31.30.1 255.255.255.128
R1(config-subif)#int g0/0.40
R1(config-subif)#encapsulation dot1Q 40
R1(config-subif)#ip add 172.31.40.1 255.255.255.192
R1(config-subif)#ex
R1(config)#int g0/0
R1(config-if)#no sh
R1(config)#int g0/1
R1(config-if)#ip add dhcp
R1(config-if)#no sh
to make this network function. The next instructions were to configure the devices so that the
DNS server would work.
Note that G0/1 is going to obtain an address via DHCP-- which is fine--
but many missed this, which caused the network to not work. We have to configure R1 to act as
a DHCP server for VLANs attached to S2, to which we must assign a name for each VLAN and
the respective addresses, as well as providing the Default Gateway address, as well as
preventing the first 10 addresses from being assigned.
So what we're going to do is start off with the blocking of the 10 assigned addresses, so enter
the following:
R1(config-if)#ex
R1(config)#ip dhcp pool VLAN_10
R1(config)#ip dhcp excluded-address 172.31.10.1 172.31.10.10
*NOTE: There was an error here (the middle code snippet line was not there previously), it has
been fixed. Credits to Michael Manlulu (see comments).
*NOTE: There was also an error in this segment. The middle line (ip dhcp pool VLAN_10) was
previously 'VLAN_20', but was incorrect. It is now 'VLAN_10'. Thank you, Pat K (see
comments)!
Now, we can go ahead and create our DHCP pools, since the addressing ranges have been
blocked properly, as well as creating the proper addressing pools for the DHCP part.
Do you sort of see how the repition is here? Specifically, the excluded-
address command: You exclude the range of the next VLAN over to
nothing else exists (we don't have any further VLAN configurations,
Many people have issues with the scoring (either at 80 or 84). You may need to do/check
the following:
S1(config-vlan)#ex