cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1469
Views
0
Helpful
3
Replies

how to dhcp auto interface port 3560

karel1971
Level 1
Level 1

                   Hello

question

i have a adsl modem that is sending dhcp reqeust and i want to use that on my cisco switchs 3560 48 ports.

i want to use the interface port 0/48 as a WAN connection and i want to use the other interfaceports for DCHP pool.

i have an d-link (dir655) router at home and i want to have the same situation on my cisco switch

my WAN interface get from a DHCP reqeust an ip adress from  the provider like 10.10.123.44 (for the cisco switch would this interface port gig 0/48)

then i want to configere my  LAN as a DHCP pool like 192.168.0.1 (for the cisco switch would this interface port gig 0/1 - 47 .

can some one help me .

thanks

greetings

Frank

3 Replies 3

Bilal Nawaz
VIP Alumni
VIP Alumni

Hello Frank,

There are a few things to consider in this scenario, but i'll try to go through them here.

You have your interface fa0/48 which is your WAN interface, so lets see how we should configure it to pick up DHCP
remember that this is a switchport and we want to make it a routed port! Also by default your d-link router is doing NAT by default so we will also configure NAT. This will allow your devices on your LAN to be translated to your WAN IP and will enable you to browse etc...
Another think that your d-link has is a default route out to the internet - but this will be given out via DHCP so no need to worry about this.

Conf t
!
interface fa0/48
no switchport
ip address DHCP
ip nat outside

Now we need to configure the dhcp for your LAN and also the gateway for your devices which will be vlan 1

!
ip dhcp pool MY_LAN
network 192.168.0.0 255.255.255.0
default-router 192.168.0.1
dns-server 4.4.4.4 8.8.8.8
!
interface vlan 1
ip address 192.168.0.1 255.255.255.0
ip nat inside

We'll need to configure a NAT statement for the switch to perform the NAT translation.

!
ip nat inside source list 101 interface fa0/48 overload
!
ip access-list extended 101
permit ip 192.168.0.0 0.0.0.255 any

Now we will make sure all your switchports apart from the WAN interface is in vlan 1 and as a switchport access mode.

interface range fa0/1 - 47
switchport
switchport mode access
switchport access vlan 1
no shut
!
end
copy run start

This should be it for the majority of the config. Just be careful, you may want to put access-list on your WAN interface to protect your network. Just a reminder, you do need an IP image of some sort and to a LAN base image : )

Hope this helps

Please rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Hi Bilal,

the 3560 doesn't support NAT, only the 6500( and maybe 4500 but i'm not sure about this one) support NAT.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Hello Alain,
Thank you for clarifying this. I was able to configure NAT in packet tracer on the 3560, but I guess in real life, a dedicated router will probably be best to do this kind of thing :-)

Sent from Cisco Technical Support iPhone App

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Review Cisco Networking for a $25 gift card