cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4065
Views
0
Helpful
1
Replies

How to set up Vlans and DHCP relay

myself255
Level 1
Level 1

Hello!

 

My cisco phone 7841 is connected to a Huawei (HG8245H5) router with  an IP address (192.168.100.XX) provided by the router. The DHCP server on the hand is installed in a Virtual Machine hosted by my Laptop meaning the server belong to a different network segment (192.168.177.XX).

 

Q: How do i get the phone to take an IP address from the scope of addresses, i created within the DHCP server ?

 

Someone suggested that i should set Vlan and a DHCP relay but i am new to this.

I need a step by step instructions on how to set the Vlans in my router and the Virtual Machine server and get the phone to take an IP address from the DHCP server

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hello,

The gist of the configuration is to be performed on the router but since it is a non-Cisco router, we cannot provide exact instructions on how to do it on a Cisco forum. I hope you understand.

This being said, in general, what needs to be done is this:

  1. Have two interfaces configured on your router. One interface will be in the 192.168.100.x network for the IP phone, another interface will be in the 192.168.177.x network for the DHCP server. If you already have the interfaces, perfect.
  2. On the interface for the 192.168.100.x network, you need to start the DHCP Relay Agent service to forward DHCP packets from the network toward the DHCP server and vice versa.
  3. Your DHCP server must know the route back to the 192.168.100.x network. If it is already using the router as its default gateway, that should be enough.

On a Cisco IOS-based router, the configuration would look as follows:

interface GigabitEthernet0/0
 description => IP Phone network <=
 ip address 192.168.100.1 255.255.255.0
 ip helper-address 192.168.177.123
!
interface GigabitEthernet0/1
 description => DHCP Server network <=
 ip address 192.168.177.1 255.255.255.0

The ip helper-address command is the DHCP Relay Agent and it is configured to forward DHCP packets to 192.168.177.123 which is assumed to be the DHCP server address. You will need to adapt this configuration as necessary into the syntax used by your router and for the particular addresses you are using.

As for the VLANs, unless your router has a built-in switch where the IP phone and/or the DHCP server connect to, you don't need them.

Best regards,
Peter

 

View solution in original post

1 Reply 1

Peter Paluch
Cisco Employee
Cisco Employee

Hello,

The gist of the configuration is to be performed on the router but since it is a non-Cisco router, we cannot provide exact instructions on how to do it on a Cisco forum. I hope you understand.

This being said, in general, what needs to be done is this:

  1. Have two interfaces configured on your router. One interface will be in the 192.168.100.x network for the IP phone, another interface will be in the 192.168.177.x network for the DHCP server. If you already have the interfaces, perfect.
  2. On the interface for the 192.168.100.x network, you need to start the DHCP Relay Agent service to forward DHCP packets from the network toward the DHCP server and vice versa.
  3. Your DHCP server must know the route back to the 192.168.100.x network. If it is already using the router as its default gateway, that should be enough.

On a Cisco IOS-based router, the configuration would look as follows:

interface GigabitEthernet0/0
 description => IP Phone network <=
 ip address 192.168.100.1 255.255.255.0
 ip helper-address 192.168.177.123
!
interface GigabitEthernet0/1
 description => DHCP Server network <=
 ip address 192.168.177.1 255.255.255.0

The ip helper-address command is the DHCP Relay Agent and it is configured to forward DHCP packets to 192.168.177.123 which is assumed to be the DHCP server address. You will need to adapt this configuration as necessary into the syntax used by your router and for the particular addresses you are using.

As for the VLANs, unless your router has a built-in switch where the IP phone and/or the DHCP server connect to, you don't need them.

Best regards,
Peter

 
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card