Tuesday, 12 June 2018

Mikrotik DHCP Config

First setup the topology as above.

Configure VLANS
/interface vlan
add interface=ether4 name=100-RED vlan-id=100
add interface=ether4 name=200-GREEN vlan-id=200
add interface=ether4 name=300-BLACK vlan-id=300
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
Create an IP POOL
/ip pool
add name=100-RED ranges=10.10.10.1-10.10.10.254
add name=200-GREEN ranges=172.16.1.1-172.16.1.254
add name=300-BLACK ranges=192.168.1.1-192.168.1.254
Configure DHCP Server
/ip dhcp-server
add address-pool=100-RED interface=ether4 name=dhcp1
add address-pool=200-GREEN interface=ether4 name=dhcp2
add address-pool=300-BLACK interface=ether4 name=dhcp3

/ip dhcp-server network
add address=10.10.10.0/24 comment=100-RED dns-server=8.8.8.8 gateway=10.10.10.1
add address=172.16.1.0/24 comment=200-GREEN dns-server=8.8.8.8 gateway=172.16.1.1
add address=192.168.1.0/24 comment=300-BLACK dns-server=8.8.8.8 gateway=192.168.1.1

Configure IP ADDRESSES
/ip address
add address=103.7.248.206/29 comment=WAN interface=ether1 network=103.7.248.200
add address=10.10.10.1/24 interface=100-RED network=10.10.10.0
add address=172.16.1.1/24 interface=200-GREEN network=172.16.1.0
add address=192.168.1.1/24 interface=300-BLACK network=192.168.1.0
Configure DNS
/ip dns
set allow-remote-requests=yes cache-size=5000KiB servers=8.8.8.8,4.4.4.4
Configure IP NAT
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1 src-address=192.168.1.0/24
add action=masquerade chain=srcnat out-interface=ether1 src-address=172.16.1.0/24
add action=masquerade chain=srcnat out-interface=ether1 src-address=10.10.10.0/24
Configure Default Route
/ip route
add distance=1 dst-address=0.0.0.0/32 gateway=103.7.248.201


 

Configure Cisco Switch as Follows



CISCO>enable

CISCO#configuration terminal

CISCO(config)#interface fastethernet 0/1

CISCO(config-if)#switchport mode trunk

CISCO(config-if)#switchport trunk allowed vlan all

CISCO(config-if)#switchport nonegotiate

CISCO(config)#vlan 100

CISCO(config-vlan)#name RED

CISCO(config)#vlan 200

CISCO(config-vlan)#name GREEN

CISCO(config)#vlan 300

CISCO(config-vlan)#name BLACK

CISCO(config)#interface fastethernet 0/2

CISCO(config-if)#switchport mode access

CISCO(config-if)#switchport access vlan 100

CISCO(config)#interface fastethernet 0/3

CISCO(config-if)#switchport mode access

CISCO(config-if)#switchport access vlan 200

CISCO(config)#interface fastethernet 0/4

CISCO(config-if)#switchport mode access

CISCO(config-if)#switchport access vlan 300

CISCO#wr 

Wi-Fi CERTIFIED 6™ IEEE 802.11ax

Wi-Fi CERTIFIED 6™, the industry certification program based on the IEEE 802.11ax standard, enables next generation Wi-Fi connectivity which...