cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
485
Views
0
Helpful
11
Replies

DHCP on 2600

coolboarderguy
Level 1
Level 1

Hi All,

below is an example config for DHCP for a 2600 router, which I'm using.

ip dhcp pool My_Network

network 192.168.0.0 255.255.255.0

domain-name my_network.com

dns-server 192.168.0.3

default-router 192.168.0.1

!

1 question, what is the significance of the line,

default-router 192.168.0.1

My setup, for study purposes is like this,

1900 switch, with 4 PCs attached, wanting a dynamic IP. A 2600 router, with 2 ethernet ports. Settings below.

ethernet 0/0 = 192.168.1.1/24

ethernet 0/1 = 192.168.0.3/24

ethernet 0/1 will be attached to another switch(192.168.0.2), which then is attached to my work's ADSL router(192.168.0.1).

Below is my show run for the 2600 router,

Router#sh ru

Building configuration...

Current configuration:

!

version 12.0

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname Router

!

!

!

!

!

!

ip subnet-zero

!

ip dhcp pool my_network

network 192.168.1.0 255.255.255.0

domain-name my_network.com

dns-server 192.168.0.1

default-router 192.168.0.1

!

cns event-service server

!

!

crypto isakmp policy 10

hash md5

authentication pre-share

!

!

crypto ipsec transform-set SEC ah-md5-hmac esp-des

!

!

!

process-max-time 200

!

interface Ethernet0/0

ip address 192.168.1.1 255.255.255.0

ip access-group 1 in

no ip directed-broadcast

ip nat inside

!

interface Serial0/0

no ip address

no ip directed-broadcast

shutdown

!

interface Ethernet0/1

ip address 192.168.0.3 255.255.255.0

no ip directed-broadcast

ip nat outside

!

interface Serial0/1

no ip address

no ip directed-broadcast

shutdown

!

ip nat inside source list 1 interface Ethernet0/1 overload

ip classless

no ip http server

!

access-list 1 permit 192.168.1.0 0.0.0.255

!

!

line con 0

transport input none

line aux 0

line vty 0 4

login

!

!

end

Is everything correct.? Cheers.

coolboarderguy...

11 Replies 11

coolboarderguy
Level 1
Level 1

Hi All,

also, the switch is @ 192.168.1.2. I have just tried this, and the PCs can't get an IP. Can ping between the local switch(just upgraded to a 3500 from the 1900) and the 2600 router. Router can ping to other 3500 switch(192.168.0.2) and ADSL router(192.168.0.1). Anything above look incorrect at all.? Cheers.

coolboarderguy...

spremkumar
Level 9
Level 9

Hi

i would make few suggestions here inline with ur DHCP config as well as on ur routing part.

Regarding your dhcp configs you are configuring a pool in 192.168.1.0/24 but assigning 0.1 as default router.

pls change the default router to 192.168.1.1 which will be used as default gateway by the hosts.

while the client negotiates with the DHCP server which is basically the router here it will send the parameters like the ip address,dns and the gateway to be used and which is very much required for the clients..

Also u neeed to exclude the ip address 192.168.1.1 since it has been already assigned to the ethernet interface.

ip dhcp excluded-address 192.168.1.1

also u need to add a static route there in the router so that the packets destined for the outside world can travel off using that entry .

ip route 0.0.0.0 0.0.0.0 ethernet0/1 192.168.0.1

i feel u can simplify the stuffs by aliging all the devices in single ip space..

you can assign them with 192.168.0.1 and avoid using the NAT funda here.

Also u can configure the DHCP services to allot the ips from 192.168.0.0 pool excluding the ips being used for switch,router and the ADSL router..

regds

Hi All,

tnx 4 that. I don't want to mess with the main switch and ADSL router etc. This is just a small off-side project, to learn about nat/dhcp etc. Great help. Cheers.

EDIT: But, still can't get an IP from the router. Can only ping once I set a static one(192.168.1.13). Below is the updated config.

coolboarderguy...

Router(config)#ip dhcp pool my_network

Router(dhcp-config)#ip dhcp excluded-address 192.168.1.1

Router(config)#ip route 0.0.0.0 0.0.0.0 ethernet0/1 192.168.0.1

Router(config)#ip dhcp pool my_network

Router(dhcp-config)#default-router 192.168.1.1

Router(dhcp-config)#^Z

Router#copt

06:37:12: %SYS-5-CONFIG_I: Configured from console by consoly run start

Destination filename [startup-config]?

Building configuration...

Router#sh dhcp lease

Router#sh dhcp server

DHCP server: ANY (255.255.255.255)

Leases: 0

Offers: 0 Requests: 0 Acks: 0 Naks: 0

Declines: 0 Releases: 0 Bad: 0

Router#sh run

Building configuration...

Current configuration:

!

version 12.0

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname Router

!

!

!

!

!

!

ip subnet-zero

ip dhcp excluded-address 192.168.1.1

!

ip dhcp pool my_network

network 192.168.1.0 255.255.255.0

dns-server 192.168.0.1

default-router 192.168.1.1

!

cns event-service server

!

!

crypto isakmp policy 10

hash md5

authentication pre-share

!

!

crypto ipsec transform-set SEC ah-md5-hmac esp-des

!

!

!

process-max-time 200

!

interface Ethernet0/0

ip address 192.168.1.1 255.255.255.0

ip access-group 1 in

no ip directed-broadcast

ip nat inside

!

interface Serial0/0

no ip address

no ip directed-broadcast

shutdown

!

interface Ethernet0/1

ip address 192.168.0.3 255.255.255.0

no ip directed-broadcast

ip nat outside

!

interface Serial0/1

no ip address

no ip directed-broadcast

shutdown

!

router eigrp 1

network 192.168.0.0

network 192.168.1.0

!

ip nat inside source list 1 interface Ethernet0/1 overload

ip classless

ip route 0.0.0.0 0.0.0.0 Ethernet0/1 192.168.0.1

no ip http server

!

access-list 1 permit 192.168.1.0 0.0.0.255

!

!

line con 0

transport input none

line aux 0

line vty 0 4

login

!

!

end

Hi All,

with the above setup, the 2600 is not allocating any IPs, nor is it routing anything. I can ping from any node on the 192.168.0.0 subnet to 192.168.0.3(2600 router IP), and can also reach it from any node(static IP set) on the 192.168.1.0 subnet. Anyone got any suggestions on how to trouble shoot this further.? Please see ip route and ip protocols output below. Cheers.

coolboarderguy...

Router#sh ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is 192.168.0.1 to network 0.0.0.0

C 192.168.0.0/24 is directly connected, Ethernet0/1

C 192.168.1.0/24 is directly connected, Ethernet0/0

S* 0.0.0.0/0 [1/0] via 192.168.0.1, Ethernet0/1

Router#sh ip protocols

Routing Protocol is "eigrp 1"

Outgoing update filter list for all interfaces is

Incoming update filter list for all interfaces is

Default networks flagged in outgoing updates

Default networks accepted from incoming updates

EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

EIGRP maximum hopcount 100

EIGRP maximum metric variance 1

Redistributing: eigrp 1

Automatic network summarization is in effect

Automatic address summarization:

192.168.0.0/24 for Ethernet0/0

192.168.1.0/24 for Ethernet0/1

Routing for Networks:

192.168.0.0

192.168.1.0

Routing Information Sources:

Gateway Distance Last Update

Distance: internal 90 external 170

Also, I'm not seeing any natting for the static IP'd node on the 192.168.1.0 subnet.

Router#sh ip nat translations

Router#sh ip nat stat

Total active translations: 0 (0 static, 0 dynamic; 0 extended)

Outside interfaces:

Ethernet0/1

Inside interfaces:

Ethernet0/0

Hits: 0 Misses: 0

Expired translations: 0

Dynamic mappings:

-- Inside Source

access-list 1 interface Ethernet0/1 refcount 0

Hi

In ur first post u didnt mention anything about EIGRP process being run in ur router.

Since you are natting out there in ur router box theres no need to announce the local (inside) network in the eigrp process.

And as i said the simple statci default route is enough..

I would suggest to post out some schematic topology with the connectivity which you are trying here..

regds

Hi All,

yes, I was also leaning towards the conflict of static and eigrp routing. I'll remove the eigrp process for now, just to see how it goes. Cheers.

P.S. This is all just a process of learning by trial and error etc.

coolboarderguy...

EDIT: Still can't ping the 192.168.0.1 router from any node on 192.168.1.0. What am I not doing right here.? Cheers, again.

Hi All,

my topology is very simple. 1 host, connected to a 3500 switch, which is connected to a 2600 router. The host is not getting assigned an IP nor is it being natted(which naturally is due to the fact that it can't be natted without an IP). Can someone at least confirm, with the above settings, that it should in fact be working.? That way, I can then decide if it's just a faulty router. Cheers.

coolboarderguy...

Hi,

I assume, your 3500 is connected to Etherenet 0/0 and you have ur hosts connected to it. With your configs the clients should get the IP and you shud be able to ping 192.168.0.1. Let me know if you assing a Static IP on the hosts are you ab;e to reach the router 192.168.0.1.

Just take the NAT config out of the ports and see if you are able to ping all the other devices.

regards,

-amit singh

Hi All,

yes, as said above, I can ping if the host is asssigned a static IP. But, no natting with the static and no dynamic at all, along with natting, naturally. Cheers.

coolboarderguy...

Hi All,

well, talk about weirdness. It is now natting, but, still no dynamic ip or any access to the net from a browser on the host. Any suggestions for further troubleshooting.? Cheers.

coolboarderguy...

Router#sh ip nat stat

Total active translations: 1 (0 static, 1 dynamic; 1 extended)

Outside interfaces:

Ethernet0/1

Inside interfaces:

Ethernet0/0

Hits: 4 Misses: 1

Expired translations: 0

Dynamic mappings:

-- Inside Source

access-list 1 interface Ethernet0/1 refcount 1

Router#sh ip nat trans

Pro Inside global Inside local Outside local Outside global

icmp 192.168.0.3:12827 192.168.1.13:12827 192.168.0.1:12827 192.168.0.1:12827

Router#

I'm guessing this' the result of the 2 pings I did from the host(192.168.1.13). Why isn't it giving out dynamic IPs.?

Hi All,

still playing with this. I did the following,

Router#debug ip dhcp server events

Router#

01:22:28: DHCPD: checking for expired leases.

but found nothing. I also tetherealed the linux host, and confirmed that the dhcp client request was being sent. What can I run on the switch, 3500, to confirm the switch is receiving and delivering the client dhcp request frame.? Cheers.

EDIT: Ok, got it,

Switch#debug ip udp

UDP packet debugging is on

Switch#

01:35:33: UDP: rcvd src=0.0.0.0(68), dst=255.255.255.255(67), length=308

01:35:40: UDP: rcvd src=0.0.0.0(68), dst=255.255.255.255(67), length=308

01:35:52: UDP: rcvd src=0.0.0.0(68), dst=255.255.255.255(67), length=308

01:36:06: UDP: rcvd src=0.0.0.0(68), dst=255.255.255.255(67), length=308

Next step, I guess, is to confirm that the packet is being received by the router, yes.?

EDIT1: Done,

Router#debug ip udp

UDP packet debugging is on

Router#

01:38:19: UDP: rcvd src=192.168.0.1(520), dst=255.255.255.255(520), length=72

01:38:28: DHCPD: checking for expired leases.

What's next.?

coolboarderguy...