Hello IsabellaFletcher,
Hope you are doing great!
So If I understand, you want to create two new vlans in the EX2200, and then connect it to the SRX to access the internet, right?
So, you configured vlan/network C.C.C.C in the EX, but the laptop got an ip from subnet A.A.A.A, right? My guess is that vlan A and vlan C are using the same vlan-id/tag, so the DHCP packets were able to reach the DHCP server. I see from the configuration you provided that you are using the default vlan.
For the second part, I'm a bit confused.
Q/ is it possible to assign other ports on EX to be under different VLANs and connect those ports to ports on SRX for both VLAN A: A.A.A.A/24 and VLAN B: B.B.B.B/24
A/ Yes, you can assing ports to different vlans for example.
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members v10
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members v20
if you want to do a trunk port for all vlans
set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk vlan members all (or specific ones)
https://kb.juniper.net/InfoCenter/index?page=content&id=KB11013&actp=METADATA
If you are planning to get access to the internet through vlans A and B, I think is not necessary to configure different vlans/subnets in the EX, you can simply use the same vlans that are present in the SRX and configure a trunk port for both vlans.
Something like this
PC -----vlan A ge-0/0/0 EX2200 ge-0/0/1 ----trunk vlan all-----SRX
PC -----vlan B ge-0/0/0 EX2200 ge-0/0/1 ----trunk vlan all-----SRX
If you want the switch to be the gateway for two new vlans, you will need to add some routing protocols and configure DHCP relay depending in where is the DHCP server.
PC ---- vlan C ge-0/0/0 EX2200 ge-0/0/1 x.x.x.1 ------- x.x.x.2SRX
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members vlan-C
set interfaces ge-0/0/1 unit 0 family inet x.x.x.1/30 (SRX with .2)
set interfaces vlan unit 0 family inet address C.C.C.C/24
set vlans vlan-C l3-interface vlan.0
set vlans vlan-C vlan-id 10
set routing-options static route 0.0.0.0/0 next-hop x.x.x.2 (this will work for all the vlans you configure in the EX)
https://www.juniper.net/documentation/en_US/junos/topics/topic-map/dhcp-relay-agent-security-devices.html#id-example-minimum-dhcp-relay-agent-configuration
Q/ On EX I can apply routing-options static route 0.0.0.0/0 next-hop for one VLAN on SRX, but what about the second one?
A/ what ip are you using as a next-hop?
If you have in the EX for example vlan.0 C.C.C.C/vlan.1 D.D.D.D, and in the SRX vlan A/vlan B. Doing a static route won't help unless the vlans are in the same subnet, otherwise, the switch won't be able to resolve the next-hop.
Hope this helps!
If this solves your problem, please mark this post as "Accepted Solution".