cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
786
Views
0
Helpful
8
Replies

DHCP Server

Harmeet Singh
Level 1
Level 1

Hello,

I create a topology in my lab (See attached file). I want to allocate ip address to different Vlan's members through DHCP and communicate with different network that is outside my LAn network. Firstly tell me that does my topology match with a

live senrio? If does not then help me to cprrect it. If my topology is correct then help me to configure it.

My configuration:--

Create DHCP server on window 2003. Create 4 different pools with different gateway.

pool 1--- ip 10.0.0.11 to 10.0.0.20 Gateway 10.0.0.10

pool 2--- ip 20.0.0.11 to 20.0.0.20 Gateway 20.0.0.10

pool 3--- ip 30.0.0.11 to 30.0.0.20 Gateway 30.0.0.10

pool 4--- ip 40.0.0.11 to 40.0.0.20 Gateway 40.0.0.10

Create 4 VLans on switch and assign ip address

Vlan 1-- ip 10.0.0.10

Vlan 2-- ip 20.0.0.10

Vlan 3-- ip 30.0.0.10

Vlan 4-- ip 40.0.0.10

created a lo 1 on router and assigned ip -- 20.0.0.1

assigned ip on F0/0 10.0.0.99.

router rip network 10.0.0.0 and 20.0.0.0

But my pc's didn't get ip address. i know there is a big misconfiguration in my topology. plz help me to solve it. I want my pc get ip from dhcp and communicate with 20.0.0.1.

8 Replies 8

Harmeet Singh
Level 1
Level 1

p.mcgowan
Level 3
Level 3

can you post switch config

As i show switch configuration above:--

Create 4 VLans on switch and assign ip address

Vlan 1-- ip 10.0.0.10

Vlan 2-- ip 20.0.0.10

Vlan 3-- ip 30.0.0.10

Vlan 4-- ip 40.0.0.10

there is no other configuraton on switch.

can you please post output of show run command from the switch

thanks

!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
no aaa new-model
vtp mode transparent
ip subnet-zero
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
vlan 2-4
!
interface FastEthernet0/1
!
interface FastEthernet0/2
  switchport access vlan 2
!
interface FastEthernet0/3
  switchport access vlan 2
!
interface FastEthernet0/4
  switchport access vlan 3
!
interface FastEthernet0/5
  switchport access vlan 3
!
interface FastEthernet0/6
  switchport access vlan 4
!
interface FastEthernet0/7
  switchport access vlan 4
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
  ip address 10.0.0.10 255.0.0.0
!
interface Vlan2
  ip address 20.0.0.10 255.0.0.0
!
interface Vlan3
  ip address 30.0.0.10 255.0.0.0
!
interface Vlan4
  ip address 40.0.0.10 255.0.0.0
!
ip classless
ip http server
!
!
control-plane
!
!
line con 0
line vty 5 15
!
end

Harmeet,

If the dhcp server is on R2 or R3, you'll need to direct your traffic to that vlan. For example, if you dhcp server is on vlan 4, you wouldn't put anything on vlan 4, but you would put a helper-address on all other vlans to direct the dhcp broadcast to vlan 4:

DHCP Address: 40.0.0.50

interface Vlan1

  ip address 10.0.0.10 255.0.0.0

  ip helper-address 40.0.0.50

!

interface Vlan2

  ip address 20.0.0.10 255.0.0.0

  ip helper-address 40.0.0.50

!

interface Vlan3

  ip address 30.0.0.10 255.0.0.0

  ip helper-address 40.0.0.50

!

interface Vlan4

  ip address 40.0.0.10 255.0.0.0

!

So, you only have to do this on the vlans that are not on the same subnet as the dhcp server.

HTH,

John

HTH, John *** Please rate all useful posts ***

Thanx blakley,

My DHCP server's address is 10.0.0.1. I configurd my switch as u said but pc didn't get ip address yet.

you need to configure a dhcp helper address on your vlan interfaces which will point to your DHCP server.

e.g.

if your DHCP server is 10.0.0.9 then config will be

conf t

interface vlan 2

ip helper-address 10.0.0.9

!

interface vlan 3

ip helper-address 10.0.0.9

!

interface vlan 4

ip helper-address 10.0.0.9

you will also need to enable routing on your switch;

conf t

ip routing

you could also configure your switch to be a DHCP server is you wish;

http://www.cisco.com/en/US/docs/ios/12_0t/12_0t1/feature/guide/Easyip2.html

please rate if helpful

Review Cisco Networking products for a $25 gift card