Community discussions

MikroTik App
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Static routing

Thu Nov 22, 2012 4:51 am

Hello everybody! I have got a little bit problem:

I am now learning the routing, started with static routing. I tried this:http://wiki.mikrotik.com/wiki/Manual:Si ... ic_Routing

The problem is the following:in Lan1:PC, Lan2: Laptop can not communicate.

The 2 Routerboard (172.16.1.1-172.16.1.2) is communicate fine.

From the laptop i can ping both RBs, but can not communicate in the Lan 1's PC.

The distant adress and gateway is configured.

What is it would the problem?
Last edited by Trackboy on Fri Jun 09, 2017 7:38 pm, edited 1 time in total.
 
fxx
newbie
Posts: 33
Joined: Tue Nov 20, 2012 11:54 am
Location: Prague - Czech Republic

Re: Static routing

Thu Nov 22, 2012 9:44 am

Can you attach some connection schema?
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Thu Nov 22, 2012 7:42 pm

My setup is the following:

RB 750 GL:172.16.1.1/30=ether2
RB 751U-2HnD:172.16.1.2/30=ether1

RB 750 GL:10.10.10.1/24=ether3:this is the Lan1 with PC:10.10.10.2/24

RB 751U-2HnD:192.168.5.1/24=ether2 this is the Lan2 with Laptop:192.168.5.2/24

In this case i don't need Internet,i just want to learning the static routing,and then the dynamic routing.

The problem is the laptop and the pc can not communicate.But seems to be everything properly configured.

The connection the RB 750 GL and RB 751U-2HnD between is working fine.

RB 750 GL:dst-address=192.168.5.0/24 gateway=172.16.1.2

RB 751U-2HnD:gateway=172.16.1.1
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Re: Static routing

Thu Nov 22, 2012 8:07 pm

On RB 751U-2HnD, add static route to 10.10.10.0/24
/ip route
add dst-address=10.10.10.0/24 gateway=172.16.1.1 disabled=no distance=10
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Thu Nov 22, 2012 8:11 pm

Still i can not ping the PC:10.10.10.2/24
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Re: Static routing

Thu Nov 22, 2012 8:14 pm

Can you ping PC:10.10.10.2 for RB 750 GL?
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Thu Nov 22, 2012 8:14 pm

Yes,i can,working fine that connection too
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Re: Static routing

Thu Nov 22, 2012 8:17 pm

Post the routing tables of both routers
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Thu Nov 22, 2012 8:21 pm

How can i post picture?
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Re: Static routing

Thu Nov 22, 2012 8:24 pm

Type
/ip route print
into a terminal window. Then copy and paste the output to the forum
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Thu Nov 22, 2012 8:32 pm

[trackboy@Laci Mikrotik 750 GL] > ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 192.168.1.1 0
1 ADC 10.10.10.0/24 10.10.10.1 ether3 0
2 ADC 172.16.1.0/30 172.16.1.1 ether2 0
3 ADC 192.168.1.0/24 192.168.1.120 ether1 0
4 A S 192.168.5.0/24 172.16.1.2 1
5 S 192.168.5.0/24 172.16.1.2 10
Last edited by Trackboy on Thu Nov 22, 2012 8:35 pm, edited 1 time in total.
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Thu Nov 22, 2012 8:33 pm

[trackboy@Laci Mikrotik 751U-2HnD] > ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 172.16.1.1 1
1 A S 10.10.10.0/24 172.16.1.1 1
2 S 10.10.10.0/24 172.16.1.1 10
3 ADC 172.16.1.0/30 172.16.1.2 ether1 0
4 ADC 192.168.5.0/24 192.168.5.1 ether2 0
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: Static routing

Thu Nov 22, 2012 9:30 pm

The two routes to 10.10.10.0/24 here are actually not needed because the default route already points at the same remote address:
0 A S 0.0.0.0/0 172.16.1.1 1
1 A S 10.10.10.0/24 172.16.1.1 1
2 S 10.10.10.0/24 172.16.1.1 10
but on the other router you have:
0 ADS 0.0.0.0/0 192.168.1.1 0
You need an entry to pass traffic for non-locally attached networks to 172.16.1.2 - i.e. the other router. One way would be to change the entry above to address 172.16.1.2 as the gateway.
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Fri Nov 23, 2012 6:03 pm

And how should i set this?
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: Static routing

Fri Nov 23, 2012 6:15 pm

That existing entry is dynamic (see D flag below) - do you have the router connected to a DHCP source?

0 ADS 0.0.0.0/0 192.168.1.1 0
You could set the default router on each router to be the other router - but that will cause packets to loop when they are not destined for any of the locally attached networks.

A better idea is to add the routes for the locally attached networks on router B to router A's routing table (gateway being router B's IP address) and add the routes for the locally attached networks on router A to router B's routing table (gateway being router A's IP address).
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Fri Nov 23, 2012 8:16 pm

Yes,my RB 750 GL get 192.168.1.120 from my friend router via 1 km Wifi connection,but in this case i don't need internet connection,only the static routing,but i am beginner in routing,and i don't know,how is should set these things as you said
 
fxx
newbie
Posts: 33
Joined: Tue Nov 20, 2012 11:54 am
Location: Prague - Czech Republic

Re: Static routing

Fri Nov 23, 2012 9:40 pm

Check, if the laptop can ping router RB750, but on this address: 10.10.10.1. If yes routing is OK. You must look for problem locally on the PC or laptop. What's the default route on PC and laptop? PC - 10.10.10.1, laptop - 192.168.5.1?
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Sat Nov 24, 2012 4:37 am

There are some interesting things:Ib both RB seems to be everything ok,the networks reachable.

From the laptop i can reach both RB,i can ping them,i can enter via winbox or webfig.

But on the PC there is another situation,i can ping 10.10.10.1,that is the gateway for the PC.

But still i can not communicate with the Laptop or vice versa PC

I very appreciate your help,i am a beginner in Mikrotik devices
 
TigraDV
just joined
Posts: 2
Joined: Sat Nov 24, 2012 10:29 am

Re: Static routing

Sat Nov 24, 2012 10:44 am

If you can ping 10.10.10.1(ip address on ether3 RB750GL) from your laptop, and
can ping 192.168.5.1 (ip address on ether2 RB751U-2HnD) from PC, this means that the static routing work OK.
You need check firewall setting on your PC and laptop. For example, a firewall in Windows blocks by default ICMP and other requests from others subnets.
 
ISOTone
just joined
Posts: 4
Joined: Sat Nov 24, 2012 10:26 am

Re: Static routing

Sat Nov 24, 2012 12:26 pm

Does the attached drawing look like your network goals?

Respectfully,

ISO
You do not have the required permissions to view the files attached to this post.
 
fxx
newbie
Posts: 33
Joined: Tue Nov 20, 2012 11:54 am
Location: Prague - Czech Republic

Re: Static routing

Sat Nov 24, 2012 12:31 pm

OK, once again: What is the result of ping from laptop to 10.10.10.1? In my opinion, there is no problem on RB, but on computers, or there is no routing problem.
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Sat Nov 24, 2012 5:12 pm

When i ping from the laptop RB 750 GL,working fine,but i can not ping the PC via 750 GL,and the message is "timeout"

Laptop:Win 7
PC:Ubuntu 12.04 LTS
 
fxx
newbie
Posts: 33
Joined: Tue Nov 20, 2012 11:54 am
Location: Prague - Czech Republic

Re: Static routing

Sat Nov 24, 2012 8:23 pm

What address did you ping, when you ping RB750? RB 750 has three addresses. Which one did you try ping?
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Sat Nov 24, 2012 9:08 pm

This is my setup now:

RB 750 GL:

ip address add address=172.16.1.1/30 interface=ether2
ip address add address=192.168.5.1/24 interface=ether3
ip route add dst-address=192.168.10.0/24 gateway=172.16.1.2

RB 751U-2HnD:

ip address add address=172.16.1.2/30 interface=ether1
ip address add address=192.168.10.1/24 interface=ether2
ip route add dst-address=192.168.5.0/24 gateway=172.16.1.1

In the Lan1 there is a PC(Ubuntu 12.04,connected to RB 750 GL of interface ethernet3):

IP ADDRESS=192.168.5.2./24
NETMASK:255.255.255.0
GATEWAY=192.168.5.1

In the Lan2 there is a Laptop(WIN7,connected to RB 751U-2HnD of interface ethernet2):

IP ADDRESS=192.168.10.2/24
NETMASK=255.255.255.0
GATEWAY=192.168.10.1

I tried this with these IP Adress,In the 2 RBs everything seems to be ok,but can not communicate the PC and the Laptop
 
ISOTone
just joined
Posts: 4
Joined: Sat Nov 24, 2012 10:26 am

Re: Static routing

Sun Nov 25, 2012 5:44 pm

That config should work. Are the firewalls turned off, or at least allowing ICMP through on the PC and the laptop?

Respectfully,

--ISO
 
Trackboy
Member Candidate
Member Candidate
Topic Author
Posts: 215
Joined: Mon Oct 31, 2011 11:19 am
Location: Hungary

Re: Static routing

Sun Nov 25, 2012 8:26 pm

Yes,i am thinking of that something not ok in the pc and the laptop,but i don't know how is should solve this problem

Who is online

Users browsing this forum: No registered users and 12 guests