03-17-2019 08:45 PM
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?
Solved! Go to Solution.
03-20-2019 03:26 AM
03-17-2019 09:02 PM
Hi @j9678 ,
Could you share the subinterface configurations of the router and the DHCP pool?
Regards
03-17-2019 09:40 PM
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"
03-18-2019 02:13 AM
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, ?
03-18-2019 07:13 PM
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
03-19-2019 01:45 AM
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
03-19-2019 06:42 PM - edited 03-19-2019 06:45 PM
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
03-19-2019 07:54 PM
Hello,
Try it:
set it on gi 1/0/47 on 2960X
switchport trunk native vlan 2
switchport trunk allowed vlan 2
03-20-2019 12:41 AM
Hello,
This is same as the settings on SG200. I tried that already. Not work.
03-20-2019 03:26 AM
03-20-2019 04:49 AM
03-20-2019 07:02 PM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide