DHCP (Dynamic Host Configuration Protocol) is a protocol that dynamically provides IP addresses to hosts. The host use DHCP protocol to obtain IP address from DHCP server. The protocol creates database of IP addresses leased to clients. DHCP server can be configured in Juniper EX series switches to provide IP addresses to its hosts. You can configure DHCP server for one or multiple VLANs. Here we will configure DHCP server for multiple VLANs in JunOS. DHCP configuration for Juniper switch and Juniper routers is basically the same. This is because they all have same operating system i.e. JunOS operating system. JunOS operating system is different from CIsco IOS.
Configure DHCP Server for Multiple VLANs in JunOS
The diagram above represents our network scenario. We will create two different VLANs and assign ports to each of them. Let’s get started by logging into EX3200 switch.
Let’s create two VLAns first, vlan 10 as Marketing and vlan 20 as Finance.root@MustBeGeek# set vlans marketing vlan-id 10
root@MustBeGeek# set vlans finance vlan-id 20 root@MustBeGeek# commit
Issue the commit command after creating VLANs. Otherwise you won’t be able to see the VLANs by issuing “show vlans” command. To view the created VLANs issue the following command,root@MustBeGeek# run show vlans
The command will show you the list of VLANs and its interfaces.
Now to make the interfaces ge-0/0/08 and ge-0/0/9 member of its corresponding VLANs hit the following commands: –[edit interfaces ge-0/0/8]
root@MustBeGeek# set unit 0 family ethernet-switching vlan members marketing [edit interfaces ge-0/0/9]
root@MustBeGeek# set unit 0 family ethernet-switching vlan members finance [edit interfaces ge-0/0/9] root@MustBeGeek# commit
Create Layer 3 interface for both VLANsroot@MustBeGeek# set interface vlan unit 10 family inet address 192.168.1.1/24 root@MustBeGeek#set interface vlan unit 20 family inet address 192.168.2.1/24
Configure DHCP Server
Lets configure for VLAN 10 first,root@MustBeGeek# set system services dhcp pool 192.168.1.0/24 root@MustBeGeek# set system services dhcp pool 192.168.1.0/24 address-range low 192.168.1.11 high 192.168.1.20 root@MustBeGeek# set system serivces dhcp pool 192.168.1.0/24 router 192.168.1.1 root@MustBeGeek# set vlan marketing l3-interface vlan.10
Now configure for VLAN 20,root@MustBeGeek# set system services dhcp pool 192.168.2.0/24 root@MustBeGeek# set system services dhcp pool 192.168.2.0/24 address-range low 192.168.2.11 high 192.168.2.20 root@MustBeGeek# set system serivces dhcp pool 192.168.2.0/24 router 192.168.2.1 root@MustBeGeek# set vlan finance l3-interface vlan.20
To view the various statistics of DHCP server issue any of following commands.root@MustBeGeek> show system services dhcp root@MustBeGeek> show system services dhcp pool root@MustBeGeek> show system services dhcp binding
- Configure DHCP Server – Juniper.net
Understanding DHCP Services for EX Series Switches – Juniper.net
You may also like -
Latest posts by Bipin (see all)
- Why Backup your Microsoft Office 365 - November 27, 2020
- What’s New in VMware vSphere 7 - September 18, 2020
- Steps to Configure IP Address and Hostname in vSphere ESXi 7 - September 1, 2020