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.
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.
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.
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
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.
@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
@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.
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?
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?
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?
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.
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.
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.