VLAN TRUNK и ACCESS с помощью switch chip

Router R1 ether1 – WAN ether4 – trunk/tagged ether2 – access/untugged ether3 – access/untagged (на схеме не указан) Switch SW1 ether24 – trunk/tagged ether15 – access/untagged ether16 – access/untagged 1) СОЗДАЕМ БРИДЖ ИНТЕРФЕЙС /interface bridge  add name=bridge-LAN 2) СОЗДАЕМ ИНТЕРФЕЙС ВЛАНЫ ПОД ИНТЕРФЕЙСОМ bridge-LAN /interface vlan add interface=bridge-LAN name=vlan36 vlan-id=36 add interface=bridge-LAN name=vlan50 vlan-id=50 3) ДОБАВЛЯЕМ ИНТЕРФЕЙСЫ В БРИДЖ /interface bridge port add bridge=bridge-LAN interface=ether2 add bridge=bridge-LAN interface=ether3 add bridge=bridge-LAN interface=ether4 4) НАЗНАЧАЕМ IP АДРЕСА НА ИНТЕРФЕЙСЫ VLAN /ip address add address=10.10.36.1/24 interface=vlan36 network=10.10.36.0 add address=10.10.50.1/24 interface=vlan50 network=10.10.50.0 5) НАСТРАИВАЕМ DHCP сервера 6) ДОБАВЛЯЕМ В SWITCH1 ПОРТЫ И ВЛАН КОТОРЫЕ БУДУТ ИСПОЛЬЗОВАТЬ ВЛАН /interface ethernet switch vlan add ports=ether2,ether4,switch1-cpu switch=switch1 vlan-id=36 add ports=ether3,ether4,switch1-cpu switch=switch1 vlan-id=50 7) НАСТРАИВАЕМ ПОРТЫ …

Continue reading ‘VLAN TRUNK и ACCESS с помощью switch chip’ »

Mikrotik – NAT, DHCP, Firewall, L2TP

Шаги c 5 по 8 касаются VPN: IP — Address List IP– Pool IP — DHCP Server — Network, DHCP IP — Firewall — NAT IP –Poll PPP — Profiles — Secrets, L2TP Server IP — Firewall Interfaces — Interface List — LAN (proxy-arp) Address List где – ether1 это WAN, ether2 – LAN. Pool …

Continue reading ‘Mikrotik – NAT, DHCP, Firewall, L2TP’ »

DHCP на VLAN-ах

Задача разбить сеть на VLAN и поднять каждому DHCP-server VLAN Создаем vlan по образу и подобию. # cat /etc/sysconfig/network-scripts/ifcfg-enp5s9.10 VLAN=yes DEVICE=enp5s9.10 PHYSDEV=enp5s9 ONBOOT=yes BOOTPROTO=”static” IPADDR=10.10.15.1 PREFIX=24 # cat /etc/sysconfig/network-scripts/ifcfg-enp5s9.90 VLAN=yes DEVICE=enp5s9.90 PHYSDEV=enp5s9 ONBOOT=yes BOOTPROTO=”static” IPADDR=10.90.90.1 PREFIX=24 DHCP If more than one network interface is attached to the system, but the DHCP server should only be started …

Continue reading ‘DHCP на VLAN-ах’ »

DHCP debugging with tcpdump

Monitoring on interface eth0 tcpdump -i eth0 -n port 67 and port 68 tcpdump filter to match DHCP packets including a specific Client MAC Address: tcpdump -i br0 -vvv -s 1500 ‘((port 67 or port 68) and (udp[38:4] = 0x3e0ccf08))’ tcpdump filter to capture packets sent by the client (DISCOVER, REQUEST, INFORM): tcpdump -i br0 …

Continue reading ‘DHCP debugging with tcpdump’ »