cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1834
Views
0
Helpful
21
Replies

ip

pcfreak49
Level 1
Level 1

i have a question i have 2960 switchs this is directly connected to a cable modem on this switch i always get public ips instead of my dhcp and vlan, does somebody know a solution?

21 Replies 21

Hello,

 

post the config of your 2960...

Okay

 

version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
username Tim privilege 15 secret 4 KCCfGJ1CE9grxbgQzJyAGHs4zW.m9qRHnx6XdB4/oOw
aaa new-model
!
!
!
!
!
!
!
!
aaa session-id common
system mtu routing 1500
!
ip dhcp pool Lan1
 import all
 network 10.21.21.0 255.255.255.0
 default-router 84.197.88.1
 dns-server 195.130.130.4 195.130.131.4
 netbios-name-server 10.21.21.1
 domain-name LAN1
 lease infinite
!
!
ip dhcp-server 195.130.137.21
!
!
crypto pki trustpoint TP-self-signed-1917011072
 enrollment selfsigned
 subject-name cn=IOS-Self-Signed-Certificate-1917011072
 revocation-check none
 rsakeypair TP-self-signed-1917011072
!
!
crypto pki certificate chain TP-self-signed-1917011072
 certificate self-signed 01
  3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 05050030
  31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274
  69666963 6174652D 31393137 30313130 3732301E 170D3933 30333031 30303031
  30345A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649
  4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D31 39313730
  31313037 3230819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281
  8100B21C C2E30EA7 BED30DE0 971389FC 55030191 55C5067F 1E6524AD F8BCF206
  F13B0A56 E4490A47 03CB5E7C 7F728BA9 BD09883B 8442C361 0624493C DBF9E6BE
  4022083E 20DA7088 5BE20946 7486D8EC 5DB4F417 82E0D6EB 29001B5B 6D5A8089
  388FCFF4 4D0881DE EDF25EE0 80E7C22F E2B22F7F 2CF4413F 4CBDEF50 4E458476
  CA310203 010001A3 53305130 0F060355 1D130101 FF040530 030101FF 301F0603
  551D2304 18301680 14429465 C2EFEEEF 6CBB0EFD 92105306 28A1950F F3301D06
  03551D0E 04160414 429465C2 EFEEEF6C BB0EFD92 10530628 A1950FF3 300D0609
  2A864886 F70D0101 05050003 81810002 A98F85F6 33FE0F1D 229CDA8D 25A6BF8F
  F6085321 ADE4113E 63CB4DE1 25F40389 19385ADE A9BEBFEA 4F07AF20 6164FC09
  D35DE287 602E500A EF9213D7 A8C846F2 437126FB 174F5D7D DEAE882D ACADBD77
  947872CA 9B84AAD8 1218B1FB 5C9B56DC E7662FBE 25C6B74A D96682A9 20F7F449
  60C507C2 820DAAD4 FFF9BE5C 29C5E1
        quit
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
 switchport access vlan 2
 switchport mode access
!
interface GigabitEthernet0/8
 ip dhcp client client-id GigabitEthernet0/8
!
interface Vlan1
 no ip address
!
interface Vlan2
 description Wired CISCO892W_R1_LAN_100Mbps
 ip address 10.21.21.1 255.255.255.0
!
ip default-gateway 84.197.88.1
ip http server
ip http secure-server
ip route 84.197.88.0 255.255.255.0 Vlan2
!
ip access-list extended ACLG
 permit ip 10.21.21.0 0.0.0.255 any
!
!
!
!
!
line con 0
line vty 5 15
 transport input all
!
end

Hello,

 

your DHCP confguration is wrong. I have made some changes (in bold):

 

version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
username Tim privilege 15 secret 4 KCCfGJ1CE9grxbgQzJyAGHs4zW.m9qRHnx6XdB4/oOw
aaa new-model
!
aaa session-id common
system mtu routing 1500

!
ip dhcp excluded-address 10.21.21.1
!
ip dhcp pool Lan1
import all
network 10.21.21.0 255.255.255.0
default-router 10.21.21.1
dns-server 195.130.130.4 195.130.131.4
netbios-name-server 10.21.21.1
domain-name LAN1
lease infinite
!
!
--> no ip dhcp-server 195.130.137.21
!
crypto pki trustpoint TP-self-signed-1917011072
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-1917011072
revocation-check none
rsakeypair TP-self-signed-1917011072
!
crypto pki certificate chain TP-self-signed-1917011072
certificate self-signed 01
3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 05050030
31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274
69666963 6174652D 31393137 30313130 3732301E 170D3933 30333031 30303031
30345A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649
4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D31 39313730
31313037 3230819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281
8100B21C C2E30EA7 BED30DE0 971389FC 55030191 55C5067F 1E6524AD F8BCF206
F13B0A56 E4490A47 03CB5E7C 7F728BA9 BD09883B 8442C361 0624493C DBF9E6BE
4022083E 20DA7088 5BE20946 7486D8EC 5DB4F417 82E0D6EB 29001B5B 6D5A8089
388FCFF4 4D0881DE EDF25EE0 80E7C22F E2B22F7F 2CF4413F 4CBDEF50 4E458476
CA310203 010001A3 53305130 0F060355 1D130101 FF040530 030101FF 301F0603
551D2304 18301680 14429465 C2EFEEEF 6CBB0EFD 92105306 28A1950F F3301D06
03551D0E 04160414 429465C2 EFEEEF6C BB0EFD92 10530628 A1950FF3 300D0609
2A864886 F70D0101 05050003 81810002 A98F85F6 33FE0F1D 229CDA8D 25A6BF8F
F6085321 ADE4113E 63CB4DE1 25F40389 19385ADE A9BEBFEA 4F07AF20 6164FC09
D35DE287 602E500A EF9213D7 A8C846F2 437126FB 174F5D7D DEAE882D ACADBD77
947872CA 9B84AAD8 1218B1FB 5C9B56DC E7662FBE 25C6B74A D96682A9 20F7F449
60C507C2 820DAAD4 FFF9BE5C 29C5E1
quit
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
switchport access vlan 2
switchport mode access
!
interface GigabitEthernet0/8
ip dhcp client client-id GigabitEthernet0/8
!
interface Vlan1
no ip address
!
interface Vlan2
description Wired CISCO892W_R1_LAN_100Mbps
ip address 10.21.21.1 255.255.255.0
!
ip default-gateway 84.197.88.1
ip http server
ip http secure-server
ip route 84.197.88.0 255.255.255.0 Vlan2
!
ip access-list extended ACLG
permit ip 10.21.21.0 0.0.0.255 any
!
line con 0
line vty 5 15
transport input all

Ok the dhcp works but I do not get internet anymore

Hello,

 

put this line back into the config:

 

ip dhcp-server 195.130.137.21

 

Is your modem connected to GigabitEthernet8 ?

Okay that is happening yes that's right modem is connected to interface GigabitEthernet0 / 8

Hello,

 

which IP address is being assigned to GigabitEthernet8 ?

That is a public ip address 84.197.90.146 this is allocated from the cable modem

Hello,

 

it won't work. It looks like your modem is in bridge mode, and the outside public IP address assigned to your switch. The problem is that the 2960 does not do NAT (Network Address Translation). What type/brand is the modem ? Can you log into the modem and check if there is an option to put it into routed mode ? 

The type of modem is 24 * 8 DOC 3 EMTA (DOCSIS)

Hello,

 

as far as I know the DOCSIS 3 devices do not operate at layer 3, so you cannot change the configuration.They are meant for a single connection, which in your case is the GigabitEthernet8 interface.

You would need to NAT your internal addresses to the IP address provided by the modem, but the 2960 does not support NAT, hence your setup won't work. You need a router connected to the DOCSIS...

and with a C3560 switch does it work with that?

No. None of the switches support NAT...

First you have a cable modem that is connected to the two switches because the modem has only one port, the switches are connected to a router