public IP inside mikrtok network & bandwidth control

Dear All,

Please help to find out a way to assign a public IP to a user inside the Mikrotik network and control his bandwidth 256kb/128kb

the ip i want to alot to a user is 69.69.69.69 and want to a lot a bandwidht 256/128

my public ip is 69.69.69.68/28 and the natting is 192.168.0.0/24

Please help me…Thanks in Advance

Vasi Akhter

response_vasi -
This depends on whether you want to put the public IP at the user space or you want to nat the address at the router and then send it via private IP to the user.

If you want the public IP at the user space you will have to route it 69.69.69.68/30. This means what ever is connected to the end user would have to have IP 69.69.69.69/30 and the user would have 69.69.69.70/30. Then just do a simple queue on the IP address 69.69.69.70/32

If you are nat’ing then use src-nat and dst-nat 69.69.69.69/32 to 192.168.x.x (user private IP). Simple queue on the 192.168.x.x address… You could also use mark connection, then mark packet in Mangle. Then use the simple queue and the packet mark to control bandwidth.

This is all in the manual and there is a section in the wiki on this as well. Do some reading - it will help you understand what you are trying to do.

Thanks Thom Lawless for your support.

I want to assign public IP at the user space. So if i understand you. I can assign public IP at user space for eg. 69.69.69.70/30 and then create a simple quiue 69.69.69.70/32 and then how do i route it.

May i know please do i have to create mangling or marking of packet for this.

Thanks & best regards

Vasi Akhter

response_vasi -
You need to do some reading on how basic routing etc works. I will give you an answer but it is in your own self interest to get an understanding of what you are doing…


public interface<>MT router<>private IP space<>another router maybe<>client (router) IP
69.69.69.68/28 <>69.69.69.69<>192.168.x.x<>client side interface 69.69.69.71<> 69.69.69.72/30

In the MT router, add route 69.69.69.70 gateway = ‘another router maybe’ IP address from the private IP space (from the above). Place 69.69.69.71 on the ‘another router maybe’ client side, this router will know that 69.69.69.72 is connected to it…

Thanks a ton for your help buddy.

I will try to implement this thanks again.

I did tried but seems like it is not working. Can you help me further please.

My Schenario is like this

ISP Gateway
GW1- 82.150.84.105/29
GW2- 61.155.99.95/28

Mikrotik OS
WAN1- 82.150.84.110/29
WAN2- 61.155.99.96/29
LAN - 192.168.0.1/24
Routes:
0.0.0.0/0 GW 82.150.84.105

Client:

LAN 82.150.84.107/29


What Wrong am i doing can you tell me please. What gateway i should use at Client PC.

Thanks in Advance

Vasi Akhter

response_vasi -

Ok - so it where is the client connected? LAN or WAN 1?

WAN 1 has to have an IP in the range of 82.150.84.105 - 82.150.84.110 (.104 would be the ‘network address’ and .111 would be the broadcast address… making a total of 8 ip addresses for a /29 subnet). So you do have WAN in range 82.150.84.110

Your client - has to be in the same IP range as above - it is at 82.150.84.107

The problem I see is if your client is on the LAN side of your MT then you’ll need to figure out where you can ‘steal’ 4 IP addresses to put on you LAN side. A /30 subnet is the smallest one that can be used and it requires 4 IP addresses - one for the ‘network address’, 2 are free to be used and the last one is the broadcast address…

With your current setup - .105 is your ISP gateway, .110 is the MT WAN 1 address… There is no way to get a /30 in there. You’d have to change the MT to .106 then you could put on the LAN side of the MT - 82.150.84.109/30 and then 82.150.84.110/30 on the client. This gives you a subnet of 82.150.84.108 - network address, .109 and 110 as usable IP addresses and .111 as the broadcast address. The gateway for the client would be the LAN IP of the MT - 82.150.84.109

Thom

Thanks tom very much for your support. Our client is on LAN Side of the Mikrotik because i want to control his bandwidth. I hope we can’t control his bandwidth once i put him on WAN side. Thats why to control his bandwidth to 256k/128k and its manditory to give them Public IP i want to put him on LAN Side.

I appreicate your help buddy. I am actually new for this Mikrotik thats why i am stuck something. But your help will solve my problem i believe.

Thanks once again.

Regards
Vasi