Yes, you need to have different subnet for each vlan.
Let us consider you are having 3 vlans 10, 20 and 30.
Vlan 10 : 192.168.10.0/24
Vlan 20 : 192.168.20.0/24
Vlan 30 : 192.168.30.0/24
This switch interface vlan is the default gateway for the respective hosts in respective vlans.
Configure vlan 10, 20 and 30.
! interface Vlan10 ip address 192.168.10.1 255.255.255.0
no shut ! interface Vlan20 ip address 192.168.20.1 255.255.255.0
no shut ! interface Vlan30 ip address 192.168.30.1 255.255.255.0
no shut !
ip dhcp excluded-address 192.168.10.1 192.168.10.10 ip dhcp excluded-address 192.168.20.1 192.168.20.10 ip dhcp excluded-address 192.168.30.1 192.168.30.10 ! ip dhcp pool vlan10 network 192.168.10.0 255.255.255.0 default-router 192.168.10.1 lease infinite ! ip dhcp pool vlan20 network 192.168.20.0 255.255.255.0 default-router 192.168.20.1 lease infinite ! ip dhcp pool vlan30 network 192.168.30.0 255.255.255.0 default-router 192.168.30.1 lease infinite !
There are multiple options in DHCP configuration.
Configure as per your requirement.
Cisco-switch(config)#ip dhcp pool vlan10 Cisco-switch(dhcp-config)#? DHCP pool configuration commands: accounting Send Accounting Start/Stop messages address Configure a reserved address bootfile Boot file name class Specify a DHCP class client-identifier Client identifier client-name Client name default-router Default routers dns-server DNS servers domain-name Domain name exit Exit from DHCP pool configuration mode hardware-address Client hardware address host Client IP address and mask import Programatically importing DHCP option parameters lease Address lease time netbios-name-server NetBIOS (WINS) name servers netbios-node-type NetBIOS node type network Network number and mask next-server Next server in boot process no Negate a command or set its defaults option Raw DHCP options origin Configure the origin of the pool relay Function as a DHCP relay remember Remember released bindings renew Configure renewal policy reserved-only Only allocate reserved addresses server Configure the server ID option value subnet Subnet allocation commands update Dynamic updates utilization Configure various utilization parameters vrf Associate this pool with a VRF
To check if its working fine please use command below,
Cisco-switch#show ip dhcp binding Bindings from all pools not associated with VRF: IP address Client-ID/ Lease expiration Type Hardware address/ User name !
Question We run asr9001 with XR 6.1.3, and we have a very long delay to
login w/ SSH 1 or 2 to the device compare to IOS device. After
investigation, the there is 1s delay between the client KEXDH_INIT and
the server (XR) KEXDH_REPLY. After debug ssh serv...
Introduction The purpose of this document is to demonstrate the Open
Shortest Path First (OSPF) behavior when the V-bit (Virtual-link bit) is
present in a non-backbone area. The V-bit is signaled in Type-1 LSA only
if the router is the endpoint of one or ...
Hi, I am seeing quite a few issues with patch install and wanted to
share my experience and workaround to this. Login to admin via CLI, then
access root with the “shell” command Issue “df –h” and you’ll probably
see the following directory full or nearly ...