cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4687
Views
0
Helpful
15
Replies

How to make Layer 3 Switch assign DHCP from Cable Modem

AndrewGibbons8
Level 1
Level 1

Hey everyone, I have a Layer 3 Switch that I'd like to assign DHCP addresses from a Cable Modem to the connected devices. In this instance my Switch has a Cable Modem (connected to the ISP), a Wireless Router providing WiFi, and a Laptop connected to 3 of its ports. I'd like for the Laptop to be able to access the internet through a wired connection to the switch. How should I configure the switch such that that is the outcome? 

15 Replies 15

balaji.bandi
Hall of Fame
Hall of Fame

Not sure, if the switch configured as Layer 3 or you have Layer 3 switch.

 

If you can configure your switch in Layer 2 and put All device in same VLAN as Cablemodem connected, So users get DHCP IP from directly from cable Modem so you no need to do anything much.

 

here is high level - configure the port as access port vlan X

 

switch port 1 - put them in VLAN X

Device connected port also configuied as VLAN X

 

or send us the config of the switch to suggest better

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname ParPrinSw
!
!
no aaa new-model
ip subnet-zero
ip dhcp relay information trust-all
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
interface FastEthernet0/1
 switchport mode access
!
interface FastEthernet0/2
 switchport mode access
!
interface FastEthernet0/3
 switchport mode access
!
interface FastEthernet0/4
 switchport mode access
!
interface FastEthernet0/5
 switchport mode access
!
interface FastEthernet0/6
 switchport mode access
!
interface FastEthernet0/7
 switchport mode access
!
interface FastEthernet0/8
 switchport mode access
!
interface FastEthernet0/9
 switchport mode access
!
interface FastEthernet0/10
 switchport mode access
!
interface FastEthernet0/11
 switchport mode access
!
interface FastEthernet0/12
 switchport mode access
!
interface FastEthernet0/13
 switchport mode access
!
interface FastEthernet0/14
 switchport mode access
!
interface FastEthernet0/15
 switchport mode access
!
interface FastEthernet0/16
 switchport mode access
!
interface FastEthernet0/17
 switchport mode access
!
interface FastEthernet0/18
 switchport mode access
!
interface FastEthernet0/19
 switchport mode access
!
interface FastEthernet0/20
 switchport mode access
!
interface FastEthernet0/21
 switchport mode access
!
interface FastEthernet0/22
 switchport mode access
!
interface FastEthernet0/23
 switchport mode access
!
interface FastEthernet0/24
 switchport mode access
!
interface FastEthernet0/25
 switchport mode access
!
interface FastEthernet0/26
 switchport mode access
!
interface FastEthernet0/27
 switchport mode access
!
interface FastEthernet0/28
 switchport mode access
!
interface FastEthernet0/29
 switchport mode access
!
interface FastEthernet0/30
 switchport mode access
!
interface FastEthernet0/31
 switchport mode access
!
interface FastEthernet0/32
 switchport mode access
!
interface FastEthernet0/33
 switchport mode access
!
interface FastEthernet0/34
 switchport mode access
!
interface FastEthernet0/35
 switchport mode access
!
interface FastEthernet0/36
 switchport mode access
!
interface FastEthernet0/37
 switchport mode access
!
interface FastEthernet0/38
 switchport mode access
!
interface FastEthernet0/39
 switchport mode access
!
interface FastEthernet0/40
 switchport mode access
!
interface FastEthernet0/41
 switchport mode access
!
interface FastEthernet0/42
 switchport mode access
!
interface FastEthernet0/43
 switchport mode access
!
interface FastEthernet0/44
 switchport mode access
!
interface FastEthernet0/45
 switchport mode access
!
interface FastEthernet0/46
 switchport mode access
!
interface FastEthernet0/47
 switchport mode access
!
interface FastEthernet0/48
 switchport mode access
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface Vlan1
 ip address 192.168.86.1 255.255.255.0
!
ip default-gateway 192.168.86.1
ip classless
ip http server
!
!
!
control-plane
!
!
line con 0
line vty 0 4
 no login
line vty 5 15
 no login
!
!
end
 

Here is my running config. Every FastEthernet Port is accessing vlan 1.

the VLAN 1 IP configured from cable Modem IP -

 

for testing

 

you can connect your Cable Modem Cable to one of the Port, and PC also one of the port, you should get IP address from Cable Modem and you able to get internet access since switch is default config.

 

once that is done you can do securing the device part later.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

That is how I'm currently connected. No IP is being assigned to the PC.

what port  the cable modem connected. what port user PC connected.

 

what is the IP address you have allocated for VLAN1 ?

 

For testing

 

1. create a VLAN2

2. Allocated cable modem connected port to access port vlan 2

3. same change to Pc connected to VLAN 2 and let us know how it goes.

 

Do the cable modem offer DHCP IP when you Pc you connect directly without PC ?

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Just tried putting the modem and PC on vlan 2, and I didn't have any luck with DHCP.

Can you clarify what you meant in your last sentence?

 

Do the cable modem offer DHCP IP when you Pc you connect directly without PC ?

 

Have you tested Cable modem working  and able to give DHCP IP address, you can browse Internet.

 

Can you post the config and give us information what port Cable modem connected and what port PC connected to understand better

 

show interface x/x - where cable modem connected

show interface x/y - where PC  connected

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Fa0/1 (PC)

 

FastEthernet0/1 is up, line protocol is up (connected)
Hardware is Fast Ethernet, address is 0018.b968.3d83 (bia 0018.b968.3d83)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, media type is 10/100BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:13:15, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 1000 bits/sec, 1 packets/sec
5 minute output rate 1000 bits/sec, 1 packets/sec
2323 packets input, 286215 bytes, 0 no buffer
Received 2323 broadcasts (0 multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 2096 multicast, 0 pause input
0 input packets with dribble condition detected
9526 packets output, 1104244 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 PAUSE output
0 output buffer failures, 0 output buffers swapped out

 

Fa 0/2 (Modem)

 


FastEthernet0/2 is up, line protocol is up (connected)
Hardware is Fast Ethernet, address is 0018.b968.3d84 (bia 0018.b968.3d84)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 3/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, media type is 10/100BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 1441000 bits/sec, 190 packets/sec
5 minute output rate 133000 bits/sec, 91 packets/sec
839366 packets input, 943639678 bytes, 0 no buffer
Received 2127 broadcasts (0 multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 1973 multicast, 0 pause input
0 input packets with dribble condition detected
553820 packets output, 113731597 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 PAUSE output
0 output buffer failures, 0 output buffers swapped out

 

About to test the Modem direct wired DHCP to PC.

About to test the Modem direct wired DHCP to PC

Let us know how the test go, also send full configuration when ever you change or modify teh config.

attachement is the best option rather posting.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Yeah the Direct connection has no issue DHCP-ing to the PC. 

Ok in that case.

 

your Default VLAN1 / VLAN2  should work.

 

remove VLAN 1 config and Default route config

 

try below config : (make sure you console to switch)

 

interface FastEthernet0/1
switchport mode access
switchport access vlan 1
!
interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
!
!
interface Vlan1
no ip address 192.168.86.1 255.255.255.0
!
no ip default-gateway 192.168.86.1
ip classless
ip http server

 

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hey sorry for the delay we lost internet connection until right now. I just saw your previous suggestion, and I thought I'd update you on the new scenario. I completely reset the switch's config. I'm having the Modem plug into Fa0/1 and the PC plug into Fa0/2. I've attached the new config which, to my knowledge, is what you proposed. Let me know if there is anything incorrect with this config. Also I will be unable to test the results until tomorrow morning (about 8:30 central). 

 

Thanks for all your help,

Andy

Please post the out come, not sure why VLAN 1 has IP address when you reset the switch - this should gone away.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

I have looked at the config and I question the logic of making the interface connecting to the ISP modem into a trunk. There is only one vlan in this configuration. When there are not multiple vlans to transport what is the point of configuring a trunk?

 

In this config the PC is connected to an interface in the same vlan as the interface where the ISP modem is connected. So it looks to me like the PC should work just fine.

 

I wonder about the IP address on interface vlan 1. Was that configured manually? How was that address chosen? Or is it some type of dynamic address? Can the PC ping the address of vlan 1? I wonder how it would work if the config were changed and interface vlan 1 had ip address negotiated?

 

The original post mentions that in addition to the PC that there was a wireless router connected to the switch. So far all of our discussion has been about the PC. Do we need to address anything about the wireless router?

HTH

Rick

Review Cisco Networking for a $25 gift card