Community discussions

 
vitaly777
newbie
Topic Author
Posts: 39
Joined: Wed Jan 23, 2013 10:35 am
Location: Estonia

Two networks and DHCP server

Wed Feb 06, 2013 10:22 am

Hello everyone!

Maybe somebody could suggest me..
I have 2 networks 192.168.1.0/24 and 192.168.2.0/24
Network 192.168.1.0/24 only for static IP.
Network 192.168.2.0/24 for other devices.. like mobile phones, ipad.. etc.

I made 2 DHCP servers (one for first network(static), one for second network(dynamic, with pool 192.168.2.2-192.168.2.254))
Problem: I can't connect to second network(192.168.2.0) dynamically. Only if I write static for mobile(example: 192.168.2.10 for mobile phone)

OS: Routeros, 6.0RC8

Thanks for reading! and sorry for my speech.. English is not my native language.
 
CelticComms
Forum Guru
Forum Guru
Posts: 1766
Joined: Wed May 02, 2012 5:48 am

Re: Two networks and DHCP server

Wed Feb 06, 2013 2:21 pm

Make sure that you have an IP Pool assigned to the relevant DHCP server. Post output from /ip dhcp-server for comment.
Interlynx | Networking and Information Security Consultants & Trainers | Email: routerlynx@gmail.com
BGP | EIGRP | OSPF | MPLS | Firewall | VPN | IPsec | Multicast | QOS | IPv4/6 | STP | VLAN | PON | AE | M2M | and more!

 
vitaly777
newbie
Topic Author
Posts: 39
Joined: Wed Jan 23, 2013 10:35 am
Location: Estonia

Re: Two networks and DHCP server

Wed Feb 06, 2013 3:21 pm

Make sure that you have an IP Pool assigned to the relevant DHCP server. Post output from /ip dhcp-server for comment.
0 name="Primary DHCP Server" interface=ether1 lease-time=2h address-pool=primary_pool bootp-support=static authoritative=after-2sec-delay lease-script=""

1 name="Secondary DHCP server" interface=ether1 relay=255.255.255.255 lease-time=2h address-pool=secondary_pool bootp-support=static authoritative=after-2sec-delay


and my pools:
0 primary_pool 192.168.1.100-192.168.1.254
1 secondary_pool 192.168.2.2-192.168.2.254

in primary DHCP Server address-pool was static. (now changed to primary_pool because with static it's doesn't work)
 
CelticComms
Forum Guru
Forum Guru
Posts: 1766
Joined: Wed May 02, 2012 5:48 am

Re: Two networks and DHCP server

Wed Feb 06, 2013 3:39 pm

Are these on the same router? Both DHCP servers show Ether1.
Interlynx | Networking and Information Security Consultants & Trainers | Email: routerlynx@gmail.com
BGP | EIGRP | OSPF | MPLS | Firewall | VPN | IPsec | Multicast | QOS | IPv4/6 | STP | VLAN | PON | AE | M2M | and more!

 
vitaly777
newbie
Topic Author
Posts: 39
Joined: Wed Jan 23, 2013 10:35 am
Location: Estonia

Re: Two networks and DHCP server

Wed Feb 06, 2013 4:06 pm

Are these on the same router? Both DHCP servers show Ether1.
Yes, it's same router.

I made two networks by 'alias'

/ip addresses print
0 ;;; primary net only for static ip
192.168.1.1/24 192.168.1.0 ether1
1 ;;; additional net for dynamic ip
192.168.2.1/24 192.168.2.0 ether1
 
CelticComms
Forum Guru
Forum Guru
Posts: 1766
Joined: Wed May 02, 2012 5:48 am

Re: Two networks and DHCP server

Wed Feb 06, 2013 4:21 pm

Don't try to use two DHCP servers. One server can do both the dynamic and static clients even in the different subnets on that one interface. Make sure that you also have the relevant Networks entries for both subnets under /IP DHCP Server.
Interlynx | Networking and Information Security Consultants & Trainers | Email: routerlynx@gmail.com
BGP | EIGRP | OSPF | MPLS | Firewall | VPN | IPsec | Multicast | QOS | IPv4/6 | STP | VLAN | PON | AE | M2M | and more!

 
vitaly777
newbie
Topic Author
Posts: 39
Joined: Wed Jan 23, 2013 10:35 am
Location: Estonia

Re: Two networks and DHCP server

Thu Feb 07, 2013 12:02 pm

Don't try to use two DHCP servers. One server can do both the dynamic and static clients even in the different subnets on that one interface. Make sure that you also have the relevant Networks entries for both subnets under /IP DHCP Server.
I have resolved it. Thanks for helping.

I've added in /ip/dhcp server/networks new subnet (192.168.2.0/24)
and set to Address Pool (pool for second subnet.. 192.168.2.2-192.168.2.254)
Static address assigned automatically.

Maybe it will useful for somebody.
 
User avatar
dunga
Member Candidate
Member Candidate
Posts: 254
Joined: Fri Jan 23, 2009 9:51 am
Location: Nigeria

Re: Two networks and DHCP server

Tue Jun 28, 2016 5:08 pm

I have a challenge to setup such network, where there are some systems that required to only access their software but will be on static with different ip range like the server/software, then other on hotspot.

How will I achieve such setup where some systems will have a static only on the range of 192.68.0.x while the hotspot on a different ip range, but all must pass thru the same interface.

Thanks
 
haik01
Member
Member
Posts: 406
Joined: Sat Mar 23, 2013 10:25 am
Location: Netherlands

Re: Two networks and DHCP server

Thu Jun 30, 2016 11:30 am

you can separate them by VLAN's, or use networks in DHCP options to assign static IP's to specific MAC's.,
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8290
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Two networks and DHCP server

Thu Jun 30, 2016 2:37 pm

How will I achieve such setup where some systems will have a static only on the range of 192.68.0.x while the hotspot on a different ip range, but all must pass thru the same interface.
the only problem I see is you'll need to add static subnet to Walled Garden on Hotspot so they won't be asked for authorization
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.

Who is online

Users browsing this forum: No registered users and 26 guests