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

C2960X cannot get the IP from correct DHCP

j9678
Level 1
Level 1

The router is Juniper ScreenOS. An interface (with 1 sub-interface) was set to has 2 IP (192.168.1.1 & 192.168.2.1) as gateway. Each has a DHCP server.

192.168.1.1 as VLAN 1 and 192.168.2.1 as VLAN 2

 

The C2960X up-link interface connected to router set as below

interface GigabitEthernet1/0/48
  switchport trunk allowed vlan 1-2
  switchport mode trunk

An interface connected to a PC set as below

interface GigabitEthernet1/0/47
 switchport access vlan 2
 switchport mode access

Expect the PC should get IP as 192.168.2.x. But it get 192.168.1.x

What configuration should I make to get IP from correct DHCP?

1 Accepted Solution

Accepted Solutions

Well. May be no one believe that. Reload the C2960X fix the problem. Cisco network device need restart to make things work?

View solution in original post

11 Replies 11

luis_cordova
VIP Alumni
VIP Alumni

Hi @j9678 ,

 

Could you share the subinterface configurations of the router and the DHCP pool?

 

Regards

Hello luis,

May be you think the problem happen on the router side. But it works on a Cisco SG200. Although the configuration on SG200 is not same as above. I'd try the SG200 settings on C2960X. Not work too.

Below show SG200 settings

interface gi48
  switchport trunk allowed vlan add 2
  description "connected to router"
interface gi47
  switchport trunk native vlan 2
  switchport trunk allowed vlan add 2
  description "connected to computer"

Can you post Juniper side Config and DHCP Pool. By Default Cisco Uses Native VLAN1 in the trunk.

 

so we need to look Juniper side how you configured, ?

 

BB

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

How to Ask The Cisco Community for Help

Below show the settings of "get config" in ScreenOS. I only paste those related to DHCP

bgroup is the interface group which has 2 interface eth06 & eth07

eth06 connected to SG200 which the DHCP works. eth07 connected to C2960X

set interface "bgroup0/0" zone "Trust"
set interface "bgroup0/0.2" tag 2 zone "Trust"

set interface bgroup0/0 port ethernet0/6
set interface bgroup0/0 port ethernet0/7

set interface bgroup0/0 ip 192.168.1.1/24
set interface bgroup0/0 nat
set interface bgroup0/0.2 ip 192.168.2.1/24
set interface bgroup0/0.2 nat

set interface bgroup0/0 dhcp server service
set interface bgroup0/0.2 dhcp server service
set interface bgroup0/0 dhcp server enable
set interface bgroup0/0.2 dhcp server enable
set interface bgroup0/0 dhcp server option lease 720
set interface bgroup0/0.2 dhcp server option lease 720
set interface bgroup0/0 dhcp server option dns1 10.1.1.1
set interface bgroup0/0 dhcp server ip 192.168.1.100 to 192.168.1.200
set interface bgroup0/0.2 dhcp server ip 192.168.2.100 to 192.168.2.200
unset interface bgroup0/0 dhcp server config next-server-ip
unset interface bgroup0/0 dhcp server config updatable
unset interface bgroup0/0.2 dhcp server config next-server-ip

Hello,

 

looking at your configurations, the difference seems to be that the port on the SG200 connected to your PC is configured as a trunk port with native Vlan 2. What if you configure the port on the 2960X the same way ?

 

interface GigabitEthernet1/0/47
switchport mode trunk

switchport trunk native vlan 2

Hello Georg,

Tested that using the SG200 settings on C2960X not work too. Thanks. 

The only difference is, below config not show the "add" in C2960X

in SG200

switchport trunk allowed vlan add 2

in C2960X

switchport trunk allowed vlan 2

Hello,

Try it:

 

set it on gi 1/0/47 on 2960X

switchport trunk native vlan 2

switchport trunk allowed vlan 2 

Jaderson Pessoa
*** Rate All Helpful Responses ***

Hello,

This is same as the settings on SG200. I tried that already. Not work.

Well. May be no one believe that. Reload the C2960X fix the problem. Cisco network device need restart to make things work?

No, i never need reboot my devices to make changes.

^^
Jaderson Pessoa
*** Rate All Helpful Responses ***

I have no idea too. I found that the config show "crypto pki ..." lines after I restart the switch. Suppose these lines were automatically added after I enable ssh.

The final configuration is same as my 1st message.