Hi All:
I am trying to understand the logic of how DHCP is being assigned in the example using the ROUTER.RSC file in this post.
I have applied this entire file to a Hex Lite with 6 total ports. I removed ether 6,7, and sfp1 from any rule that contained it.
so, in basic form I see this:
add bridge=BR1 interface=ether2,3,4,5
Below as written in the file:
add bridge=BR1 tagged=BR1,ether2,ether3,ether4,ether5 vlan-ids=10
add bridge=BR1 tagged=BR1,ether2,ether3,ether4,ether5 vlan-ids=20
add bridge=BR1 tagged=BR1,ether2,ether3,ether4,ether5 vlan-ids=30
add bridge=BR1 tagged=BR1,ether2,ether3,ether4,ether5 vlan-ids=99
Then we add DHCP:
Blue VLAN interface creation, IP assignment, and DHCP service
/interface vlan add interface=BR1 name=BLUE_VLAN vlan-id=10
/ip address add interface=BLUE_VLAN address=10.0.10.1/24
/ip pool add name=BLUE_POOL ranges=10.0.10.2-10.0.10.254
/ip dhcp-server add address-pool=BLUE_POOL interface=BLUE_VLAN name=BLUE_DHCP disabled=no
/ip dhcp-server network add address=10.0.10.0/24 dns-server=192.168.0.1 gateway=10.0.10.1
Green VLAN interface creation, IP assignment, and DHCP service
/interface vlan add interface=BR1 name=GREEN_VLAN vlan-id=20
/ip address add interface=GREEN_VLAN address=10.0.20.1/24
/ip pool add name=GREEN_POOL ranges=10.0.20.2-10.0.20.254
/ip dhcp-server add address-pool=GREEN_POOL interface=GREEN_VLAN name=GREEN_DHCP disabled=no
/ip dhcp-server network add address=10.0.20.0/24 dns-server=192.168.0.1 gateway=10.0.20.1
Red VLAN interface creation, IP assignment, and DHCP service
/interface vlan add interface=BR1 name=RED_VLAN vlan-id=30
/ip address add interface=RED_VLAN address=10.0.30.1/24
/ip pool add name=RED_POOL ranges=10.0.30.2-10.0.30.254
/ip dhcp-server add address-pool=RED_POOL interface=RED_VLAN name=RED_DHCP disabled=no
/ip dhcp-server network add address=10.0.30.0/24 dns-server=192.168.0.1 gateway=10.0.30.1
Then some interface lists...
/interface list add name=WAN
/interface list add name=VLAN
/interface list add name=BASE
/interface list member
add interface=ether1 list=WAN
add interface=BASE_VLAN list=VLAN
add interface=BLUE_VLAN list=VLAN
add interface=GREEN_VLAN list=VLAN
add interface=RED_VLAN list=VLAN
add interface=BASE_VLAN list=BASE
Then Vlan security...
Only allow packets with tags over the Trunk Ports
/interface bridge port
set bridge=BR1 ingress-filtering=yes frame-types=admit-only-vlan-tagged [find interface=ether2]
set bridge=BR1 ingress-filtering=yes frame-types=admit-only-vlan-tagged [find interface=ether3]
set bridge=BR1 ingress-filtering=yes frame-types=admit-only-vlan-tagged [find interface=ether4]
set bridge=BR1 ingress-filtering=yes frame-types=admit-only-vlan-tagged [find interface=ether5]
Now my question....
If I plug my pc into ether2, what DHCP address am I going to get? Nowhere was DHCP assigned to a specific interface.
The way I see how the VLANS were set up in the above rules, DHCP is assigned to each specific VLAN. But each VLAN Blue, Green, and Red are assigned to 1 Bridge interface, BR1.
Bridge BR1 has tagged all ether interfaces with all VLAN id's 10,20,30,99. So, each interface is a member of each VLAN.
What this says to me is: DHCP for each VLAN (as written above) is being answered on all ether interfaces 2,3,4,5.
What am I missing here? I know not all rules are in this post, but I think the important ones for my question are here.
Please help, I am trying to learn how this works, and I am failing to see the light.
Thanks
Glenn