top of page

 

Summary:

 

1. Configure R1 to perform routing for VLANs 2 and 5 (router-on-a-stick). For each sub-interface, R1 should use the first valid IP

   address from each VLAN.
2. Configure R1 as a DHCP server for VLANs 2 and 5. The DHCP server should distribute client IP addresses between

   .100 and .150 for each subnet, a DNS server of 4.2.2.2 (with a secondary 8.8.8.8), and the appropriate default gateway.

3. To test, assign PC A to the IT VLAN and PC B to the accounting VLAN. Verify (using show ip interface brief) that they

   receive an IP address via DHCP. Verify routing by pinging from PC A to PC B.

 

 

1. Configure R1 to perform routing for VLANs 2 and 5 (router-on-a-stick). For each sub-interface, R1 should use the first valid IP

   address from each VLAN.

S1.

int f1/0
switchport mode trunk


R1.

int fastEthernet 0/0.2
 encapsulation dot1Q 2
 ip address 10.24.2.1 255.255.255.0

int fastEthernet 0/0.5
 encapsulation dot1Q 5
 ip address 10.24.5.1 255.255.255.0

 

2. Configure R1 as a DHCP server for VLANs 2 and 5. The DHCP server should distribute client IP addresses between

   .100 and .150 for each subnet, a DNS server of 4.2.2.2 (with a secondary 8.8.8.8), and the appropriate default gateway.

R1.

ip dhcp excluded-address 10.24.2.1 10.24.2.99
ip dhcp excluded-address 10.24.2.151 10.24.2.255
ip dhcp excluded-address 10.24.5.1 10.24.5.99
ip dhcp excluded-address 10.24.5.151 10.24.5.255


ip dhcp pool IT
 network 10.24.2.0 /24
 dns-server 4.2.2.2 8.8.8.8
 default-router 10.24.2.1

ip dhcp pool ACCOUTING
 network 10.24.5.0 /24
 dns-server 4.2.2.2 8.8.8.8
 default-router 10.24.5.1

 

 

​​

 

3. To test, assign PC A to the IT VLAN and PC B to the accounting VLAN. Verify (using show ip interface brief) that

 

    they receive an IP address via DHCP. Verify routing by pinging from PC A to PC B.

PC-A.

no ip routing
int fa0/0
 no shut
 ip address dhcp


PC-B.

no ip routing
int fa0/0
 no shut
 ip address dhcp


S2.

int fa1/1
 switchport mode access
 switchport access vlan 2 !!!!!! Assign the port to belong to a VLAN


S3.

int fa1/1
 switchport mode access
 switchport access vlan 5

#Test:

 

 

 -Yu

 

bottom of page