Community discussions

MikroTik App
 
aaj
just joined
Topic Author
Posts: 21
Joined: Wed Jun 17, 2015 4:37 am

Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Wed Jun 24, 2015 10:22 am

Hi,

I connected 2 PC to the MikroTik Router Board 750 I don’t want to use internet I just want to do routing between two PC using 2 LAN port of single router.

Following is the configuration.
Connected PC-01 to port-3 of router board
Connected PC-02 to port-4 of router board

Please see the attached snapshot of WinBox in which detailed configuration is shown.

After configuring the router, when I try to ping from one machine to another I am getting following error.
PING: transmit failed. General failure.

Please guide me on this.
Do I need to any modification in router’s configuration?
I refereed following link:
http://wiki.mikrotik.com/wiki/NAT_Tutorial

Thanks
You do not have the required permissions to view the files attached to this post.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Wed Jun 24, 2015 11:59 am

Because you have both ports as slaves in the switch. You do switching, not routing.

What is the rason for this? I would connect the computers by cable directly and use the same subnet for them. You do not need any active device in between.
 
Rudios
Forum Veteran
Forum Veteran
Posts: 973
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Wed Jun 24, 2015 3:00 pm

How about the IP configuration of the two PC's?
And also there is an overlap on your 2 IP segments 10.140.0.0/16 includes 10.140.1.0/26
And last but not least I go with jarda about the switching settings.
 
aaj
just joined
Topic Author
Posts: 21
Joined: Wed Jun 17, 2015 4:37 am

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Thu Jun 25, 2015 3:29 am

Thanks Jarda and Rudios for a quick reply.
I want to do it with routing and want to know how to set NAT. But I am getting error as mention in the query.
@Rudios:
Regarding IP configuration on 2PC’s
PC-01:
IP address : 192.168.1.3 Subnet mask: 255.255.255.0
PC-02:
IP address : 10.140.1.55 Subnet mask: 255.255.255.192
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Thu Jun 25, 2015 7:26 am

Release the involved ports from switch. Be sure involved computers have appropriate routes to know where to send packets. Be sure there are no firewall rules in the computers that would block communication. Then the routing should start.
 
aaj
just joined
Topic Author
Posts: 21
Joined: Wed Jun 17, 2015 4:37 am

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Thu Jun 25, 2015 8:30 am

@jarda:
I disable the Firewalls on both the PC's but still not able to communicate between two PC getting same error
Ie. PING: transmit failed. General failure.

And as shown in the previous image I configured ports

Thanks
 
Rudios
Forum Veteran
Forum Veteran
Posts: 973
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Thu Jun 25, 2015 9:14 am

Did you change your routerboard config as jarda mentioned.
Remove port 3 and 4 from slaving and make them individual ports
 
aaj
just joined
Topic Author
Posts: 21
Joined: Wed Jun 17, 2015 4:37 am

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Thu Jun 25, 2015 10:06 am

@Rudios:
Just now I made those changes
i.e. removed port 3 and 4 from slaving by making MasterPort: none from Interface List for these two ports
but still getting same behavior.

Thanks
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Thu Jun 25, 2015 11:10 am

Have you checked the routes of the computers? do they have at least default route to the mikrotik router for 0.0.0.0/0?
Because, first of all, the operating system on the first computer has to know where to send the first packet. Once it arrives to router, it will process it and send it to the right way. Then the second computer should be able to handle it, not to drop and has to know where to send the response...

I see your problem mainly in the ip/routes configuration of the computers now, when you (hopefully) corrected the switching.

At least, is the router able to ping both computers? Are the both computers able to ping the router?
 
aaj
just joined
Topic Author
Posts: 21
Joined: Wed Jun 17, 2015 4:37 am

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Thu Jun 25, 2015 12:33 pm

@jarda:

Please correct me if I am wrong.
I am using window-7 PC’s and to check the routes of a computer I used “route print” command.
But didn’t find address 0.0.0.0 in router table of both the PC’s.

Please guide me for this -> How to ping from router to computer?

From PC-01 able to ping the router, Used following command
>ping 192.168.1.1

But from PC-02 not able to ping the router, Used following command
>ping 10.140.1.30

Also I Observed that
When I added NAT Rule as
Chain:dstnat
Dst Address : 10.140.1.30
Action: dst-nat
To Address : 192.168.1.3

after this configuration I am not able to connect to the Router through WinBox from PC-02 using IP address. If try it gives me error with the message: “could not connect to 10.140.1.30:80 – no response!”
I didn’t understand this behavior could you please tell whether am I making some mistake while configuring?

Thanks,
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Thu Jun 25, 2015 1:27 pm

ok. Looks like my expectations are getting to be confirmed.

In case the computers are not connected to any other networks simultaneously, make two dhcp servers in mikrotik running on both devices and let the computers to take IP from the dhcp servers. At the same moment the correct routes will be built in the windows also.

After that, there is no need for nat, so remove all rules from firewall. Computers will be talking together just by their adddresses directly, because both will know that everything has to be sent to router and the router knows where to send what.

You have not answered my question why are you doing such complicated thing in order to connect two computers together?
 
aaj
just joined
Topic Author
Posts: 21
Joined: Wed Jun 17, 2015 4:37 am

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Fri Jun 26, 2015 3:38 am

@jarda:

You are right using DHCP it works but I don’t want to change address of my PC’s.
But I am not able to understand why routing is not working in my case.

And as I mention in previous post that I am not able to ping to the router from PC-02 so what will be the reason for this?

Also Please tell me how to ping from router to PC’s ?

And to answer your question why I am doing such complicated thing to connect two computer?
Is that I want to learn routing practically and because of that I am doing this,
Please guide me for this.

Thanks
 
aaj
just joined
Topic Author
Posts: 21
Joined: Wed Jun 17, 2015 4:37 am

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Mon Jun 29, 2015 11:29 am

Hi,

Still not able to access/ping the PC's, not able find where the configuration goes wrong.
Please guide me to configure NAT.

Thanks
 
Rudios
Forum Veteran
Forum Veteran
Posts: 973
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Mon Jun 29, 2015 3:11 pm

Please post your current /export and the IP addresses of the 2 PC's.

Maybe just start without NAT and check whether that is working fine.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Mon Jun 29, 2015 3:55 pm

If you want to learn, just elaborate. I told you that each computer needs to have at least default route that would select the interface to use. If you are missing matching route on the computer, you cannot send packets out. The problem is not in the router in between as you saw when routes were set by dhcp. If you decide to use manual settings, set your computers correctly. Routes including.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Mon Jun 29, 2015 3:55 pm

You don't need for nat in this case.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Mon Jun 29, 2015 3:57 pm

You can use dhcp to assign address statically so no change in ip occurs if you set dhcp static leases.
 
aaj
just joined
Topic Author
Posts: 21
Joined: Wed Jun 17, 2015 4:37 am

Re: Query regarding routing between two PC using 2-LAN ports of a single MikroTik router

Tue Jun 30, 2015 9:08 am

Thanks jarda and Rudious for your valuable time and inputs.

@jarda: as you have stated earlier router configuration is correct, after adding Default gateway on both the PC’s routing works. Thanks again for the guidance.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Wed Jul 01, 2015 12:16 pm

Your welcome. Enjoy the routed network!

Who is online

Users browsing this forum: GoogleOther [Bot], raiser and 117 guests