R1
sys
sysname R1
int g0/0/1
ip add 10.0.4.1 24
R3
sys
sysname R3
int g0/0/1
ip add 10.0.8.1 24
S1
sys
sysname S1
vlan batch 4 8
int g0/0/1
port link-t acc
port default vlan 4
int g0/0/3
port link-t acc
port default vlan 8
int g0/0/2
port link-type trunk
port trunk allow-pass vlan 4 8
R2
sys
sysname R2
int g0/0/1.1
ip add 10.0.4.254 24
dot ter vid 4
arp broad enable
int g0/0/1.3
ip add 10.0.8.254 24
dot ter vid 8
arp broad en
R1
ip route-s 0.0.0.0 0.0.0.0 10.0.4.254
R3
ip route-s 0.0.0.0 0.0.0.0 10.0.8.254