First you want to set the name of the switch and configure a inband management IP and default route.
changeme#conf t gXX-sw1(config)#hostname gXX-sw1 gXX-sw1(config)#int management 1 gXX-sw1(config-if-Ma1)#ip address 10.XX.0.5/24 gXX-sw1(config-if-Ma1)#no shut gXX-sw1(config-if-Ma1)#exit gXX-sw1(config)#ip route 0.0.0.0/0 10.XX.0.1
Next activate the vlans on the switch. XX is your group number and YY is your neighbors group. You will use vlan XX1 and XX2 for net1 and net2 respectivly. You will also make use of vlan YY1 which will carry your neighbors net1.
gXX-sw1#conf t gXX-sw1(config)#vlan XX1,XX2,YY1 gXX-sw1(config-vlan-YY1,XX1-XX2)#state active gXX-sw1(config-vlan-YY1,XX1-XX2)#exit gXX-sw1(config)#Eth1/eth2 are access ports for net1 and net2 respectivly, eth3 connects to R2 eth1/1 and eth4 connects to R3 eth1/1. Eth1/eth2 will be access ports for the appropriate vlans, and eth3 and eth4 will be trunked ports with both vlans on them.
gXX-sw1(config)#conf terminal gXX-sw1(config)#int eth1 gXX-sw1(config-if-Et1)#switchport mode access gXX-sw1(config-if-Et1)#switchport access vlan XX1 gXX-sw1(config-if-Et1)#no shut gXX-sw1(config-if-Et1)#exit gXX-sw1(config)# gXX-sw1(config)#int eth2 gXX-sw1(config-if-Et1)#switchport mode access gXX-sw1(config-if-Et1)#switchport access vlan XX2 gXX-sw1(config-if-Et1)#no shut gXX-sw1(config-if-Et1)#exit gXX-sw1(config)# gXX-sw1(config)#int eth3 gXX-sw1(config-if-Et3)#switchport mode trunk gXX-sw1(config-if-Et3)#switchport trunk allowed vlan XX1,XX2 gXX-sw1(config-if-Et3)#no shut gXX-sw1(config-if-Et3)#exit gXX-sw1(config)# gXX-sw1(config)#int eth4 gXX-sw1(config-if-Et3)#switchport mode trunk gXX-sw1(config-if-Et3)#switchport trunk allowed vlan XX1,XX2 gXX-sw1(config-if-Et3)#no shut gXX-sw1(config-if-Et3)#exit gXX-sw1(config)#
Now we go back to R2/R3 and change eth1/1 on each from a access port to a tagged truck port which will instantiate both networks (10.XX.1.0/25 on vlan XX1 and 10.XX.1.128/26 on vlan XX2).
Also we have to redo the ospf on R2 and R3. Remove the /30's that dont exist anymore and add the /25 and /26 which are now instantiated on R2/R3.
R2(config)#int eth1/1 R2(config-if)#no ip address R2(config-if)#no ip ospf cost R2(config-if)#no ip ospf authentication R2(config-if)#no ip ospf message-digest-key 1 R2(config-if)#exit R2(config)#int ethernet 1/1.XX1 R2(config-subif)#encapsulation dot1Q XX1 R2(config-subif)#ip address 10.XX.1.2 255.255.255.128 R2(config-subif)#ip ospf cost 5000 R2(config-subif)#ip ospf authentication message-digest R2(config-subif)#ip ospf message-digest-key 1 md5 password R2(config-subif)#exit R2(config)#int ethernet 1/1.XX2 R2(config-subif)#encapsulation dot1Q XX2 R2(config-subif)#ip address 10.XX.1.130 255.255.255.192 R2(config-subif)#ip ospf cost 5000 R2(config-subif)#ip ospf authentication message-digest R2(config-subif)#ip ospf message-digest-key 1 md5 password R2(config-subif)#exit R2(config)# R2(config)#router ospf 1 R2(config-router)#no network 10.XX.1.192 0.0.0.3 area 1 R2(config-router)#network 10.XX.1.0 0.0.0.127 area 1 R2(config-router)#network 10.XX.1.128 0.0.0.63 area 1 R2(config-router)#exit R2(config)# R3(config)#int eth1/1 R3(config-if)#no ip address R3(config-if)#no ip ospf cost R3(config-if)#no ip ospf authentication R3(config-if)#no ip ospf message-digest-key 1 R3(config-if)#exit R3(config)#int ethernet 1/1.XX1 R3(config-subif)#encapsulation dot1Q XX1 R3(config-subif)#ip address 10.XX.1.3 255.255.255.128 R3(config-subif)#ip ospf cost 4000 R3(config-subif)#ip ospf authentication message-digest R3(config-subif)#ip ospf message-digest-key 1 md5 password R3(config-subif)#exit R3(config)#int ethernet 1/1.XX2 R3(config-subif)#encapsulation dot1Q XX2 R3(config-subif)#ip address 10.XX.1.131 255.255.255.192 R3(config-subif)#ip ospf cost 4000 R3(config-subif)#ip ospf authentication message-digest R3(config-subif)#ip ospf message-digest-key 1 md5 password R3(config-subif)#exit R3(config)# R3(config)#router ospf 1 R3(config-router)#no network 10.XX.1.196 0.0.0.3 area 1 R3(config-router)#network 10.XX.1.0 0.0.0.127 area 1 R3(config-router)#network 10.XX.1.128 0.0.0.63 area 1 R3(config-router)#exit R3(config)#Now we set up dhcp relay on R2/R3 for net1 and net2, Since R2 and R3 are both access routers for those nets now.
R2(config)#int eth1/1.XX1 R2(config-subif)#ip helper-address 10.XX.0.20 R2(config-subif)#ex R2(config)#int eth1/1.XX2 R2(config-subif)#ip helper-address 10.XX.0.20 R2(config-subif)#ex R2(config)# R3(config)#int eth1/1.XX1 R3(config-subif)#ip helper-address 10.XX.0.20 R3(config-subif)#ex R3(config)#int eth1/1.XX2 R3(config-subif)#ip helper-address 10.XX.0.20 R3(config-subif)#ex R3(config)#Now we set up VRRP on R2 and R3. We use XX as VRRP group ID for net1 and 1XX as VRRP group id for net2. Both R2 and R3 use 10.XX.1.1 as virtual address on net1 (vlan XX1) and 10.XX.1.129 on net2 (vlan XX2).
R2(config)#int eth1/1.XX1 R2(config-subif)#vrrp XX priority 110 R2(config-subif)#vrrp XX ip 10.XX.1.1 R2(config-subif)#exit R2(config)# R2(config)#int eth1/1.XX2 R2(config-subif)#vrrp 1XX priority 110 R2(config-subif)#vrrp 1XX ip 10.XX.1.129 R2(config-subif)#exit R2(config)# R3(config)#int eth1/1.XX1 R3(config-subif)#vrrp XX priority 120 R3(config-subif)#vrrp XX ip 10.XX.1.1 R3(config-subif)#exit R3(config)# R3(config)#int eth1/1.XX2 R3(config-subif)#vrrp 1XX priority 120 R3(config-subif)#vrrp 1XX ip 10.XX.1.129 R3(config-subif)#exit R3(config)#Now we want to set up tagged trunks between your group GXX and your neighbor GYY. This will be done on eth5 and eth6 of the switches. Both links will carry the vlans for your net1 and your neighbors net1 as 802.1q tagged trucks. Since there will be two links between the switches spanning tree will prevent loops.
gXX-sw1(config)#int eth5 gXX-sw1(config-if-Et3)#switchport mode trunk gXX-sw1(config-if-Et3)#switchport trunk allowed vlan XX1,YY1 gXX-sw1(config-if-Et3)#no shut gXX-sw1(config-if-Et3)#exit gXX-sw1(config)# gXX-sw1(config)#int eth6 gXX-sw1(config-if-Et3)#switchport mode trunk gXX-sw1(config-if-Et3)#switchport trunk allowed vlan XX1,YY1 gXX-sw1(config-if-Et3)#no shut gXX-sw1(config-if-Et3)#exit gXX-sw1(config)#