Scenario
Scenario
In this scenario, you are setting up inter-VLAN routing on a router and configuring DHCP for each VLAN
on a switch.
- **VLANs**:
#### Assumptions
```plaintext
Switch> enable
! Create VLAN 10
Switch(config)# vlan 10
Switch(config-vlan)# name HR
Switch(config-vlan)# exit
! Create VLAN 20
Switch(config)# vlan 20
Switch(config-vlan)# name IT
Switch(config-vlan)# exit
! Create VLAN 30
Switch(config)# vlan 30
Switch(config-vlan)# exit
```
```plaintext
Switch(config-if-range)# exit
Switch(config-if-range)# exit
Switch(config-if-range)# exit
```
```plaintext
Switch(config-if)# exit
```
```plaintext
Router> enable
! Create sub-interfaces for each VLAN on the router's trunk port (e.g., GigabitEthernet0/1)
Router(config-subif)# exit
Router(config-subif)# exit
Router(config-subif)# exit
```
```plaintext
Router(config)# ip routing
Router(config)# exit
```
```plaintext
Switch> enable
Switch(dhcp-config)# exit
! Configure DHCP for VLAN 20
Switch(dhcp-config)# exit
Switch(dhcp-config)# exit
```
```plaintext
```
### Summary
In this scenario, you've configured inter-VLAN routing on a router and set up DHCP for each VLAN on a
switch. By following these steps, you ensure that devices in each VLAN can communicate with each
other through the router and obtain IP addresses dynamically via DHCP.