Professional Documents
Culture Documents
The ping always runs from the "root" level. So, we have 1 of the 3 options to use
pmg:
• Option t: quit the "identity" folder and go back to the root level and do the
ping ·command from there. However, this is not what we want. The mission
i s to do ping without exiting the "identity" folder.
You see that I did the ping will I am still on the "identity" folder.
Now I will do ping again. The ping will keep running until you press "Ctrl + C".·
On RouterOS, "Ctrl + C" doesn't . .
mean copy but this will stop a process happemng
on the CLI like ping.
[a =n~~ / s ys tem/identity> ping 8.8.8.8
0 8.8.8.8 SIZB TTL TIMR STATUS
1 8 . 8.8.8 56 117 9ms602us
2 8.8.8.8 56 117 9ms756us
3 8.8.8 . 8 56 117 20ms701us
4 8.8.8 . 8 . 56 117 9ms265us
s e nt ~s r e c e 1ved=5 pac ket- ! _ . 56 117 9ms7 4 o
os s - 0% m1 n -rt t - 9 us
[ a d mi· n @Rl ] 1 s ys t em/iden tit y> - ms 265Us avg - r t t =llms812us max - r t t ; 2Qms?OlU5
I
MyNetworkTraining.com _ M ah Pr u n...l -1 _ ,
So now we know that using the "slash" will take me back to the root mode and using
"dot dot" will take me one level back.
Let's go to the root mode now. I will use the "slash" for this.
[admin@Rl ] /system/identity> /
[admin@Rl ] > I
Excellent!!! I am on the root mode. Now If I click one "Tab" I should see what
commands I can use from that root level as we already know:
Rl ) >
j[admin@
fiaps-ma, disk ip metarouter port radius special-login user export ping undo
ertificate file ipv6. mpls PPP routi ng system beep import quit
onsole interface log partitions queue snmp tool blink password redo
admin@ Rl ) > I
What if I use another time the "Tab"? What will happen then?
Rl J >
1ladmin@
terminal error for if nothing put rndnurn time tobool toip6 tot ime
( delay execute foreach len parse resolve rndstr tirnestamp toid tonum typeof
~nvironment do find global local pick return set toarray toip tostr while
Rl ) > I
i[admin@
Once I have pressed on the "Tab" another time, I have some other commands shown.
Actually, those are programming syntaxes that you can use in case you want to run
scripts on the MikroTik,router. As being based on Linux kernel, we can run scripts
on the MikroTik RouterOS to achieve some tasks. For example, we can run a script
that the .bandwidth speed changes during the night to a faster one than the one
allocated to the daytime. We can run a script for failover, for routing, for anything
we want. Of course, scripting is out of scope of this course, and it is not part of the
MTCNA certification exam.
The last step that I want to do in this LAB, is to close the Terminal without using
the mouse. We can do that using "Ctrl+D". Once you do it, you will see that the
Terminal has closed.
st
Let's start direct ly with the 1 LAB of this chapter.
192.168.88.0/24 .2
Eth1 Eth2
R1
on
I am still on the same LAB scenario. My router is conne cted to the ISP router
need to
Etherl interface. To be able to make the router able to go to the internet, I
DHCP
enable the DHCP client on the interface Etherl becau se the ISP router has
server enabled.
on that
Once I enable d the DHCP client on Etherl interface, then I will receive
ea
interface an IP and a subne t mask from the ISP DHCP server. Also, I will receiv
to the
DNS and NTP server addresses, as well as a default route so the router can go
internet.
subne t
If we check now on the router, we see no IP is set on Ether I interface, no
mask, no DNS and no defaul t route. Let me show you.
k 49
yNetworkTraining.com - Maher Haddad
-
; <llskSol
~
.. -
! ~
1111 -
;a PPP
~
)'( Ml!lo
I_J Vatfy lloH ~
~--s
-:-
~
~ IP
:Jt lb.-.g
Max UDP Peclcat Size· [◄Oil&
·-
f;l ~
19a--
' - 1~
'+J=-l ffi§ ! J
iii Log
a• RADIUS
;.,;, r.-
■ -r.
<I> DollX
~ l4olallOI.ITTR
c-
o--
~ -~
■ ea
You can see clearl y; I don't have any of those information on the router.
Let's enabl ed the DHCP client on Ether ! and see if I get all those information.
8 admin@0 8:SS:31 :47:88:58 (R1) -WinBox (64bit) v7.1.2 on hAP ac lite (mipsbe)
Session Settings Dashb oard
@J~ 1 Safe ~ Session=□
/ QuaSet
~ CAPsMAN
• lnlerfaoes
~ Wnless
ff Wir&Guard
)( Bridge
~ PPP
~ Switch
ARP
Addresses
-----·~
DHCPClient l o HCPC11ent 0ptions l
t,[S''
I have enabl ed DHCP client on Ether I interface. I have also left the "Use peer Dfroitl
and "Use Peer NTP" check ed so I can get the DNS and NTP server addresses
It
the provi der. Also, I have put the "Add Defau lt Route " to yes so I can get the defall
Let's see if I have received all those information from the ISP router .
BEJ c-:~.:. -□
·--
/, QDSII
~ CAPJMAN
.
! _~
~-
~
)( lllillgt
~ PPP
-;: .....
~ -I!' .
0 lol!I.S
!ifiii.o !·
·-
~ Aallq
~ -!!Jia-, r·
■ Fh l~ i . ; .
wlJ,g
&f
RADIUS _,
~ T- ~
■ N■-TIIIIINI
: r l•:··----=--------;----~E-:-
♦ DotllC
~
~ SWitch
-i: Mesh Packet Count: L
::::::._------=---==-=====:....:: - - ~ ,. ~
Tmeout: [ 1000
~ IP ----, I
- rns
0 MPLS - - - - - J
liJ 1M
Tmo (ms} R91»1Size
~ TTl- -;-tus
9.886 50 58
.:Ji Rouing 9.460 50 58
2 8.8.8.8
.;. System I· 10.192 50 58
38.8 .8.8
~ Queues 9.553 50 58
4 8.8 .8 .8
Emai 9.400 50 58
11 Fies 5 8.8 .8 .8
10.460 50 58
Flood Ping 6 8.8.8.8
~ Log 9.562 50 58
Graplw,g 7 8.8.8.8
I• RADIUS 20.674 50 58
IP Scan
~ Tools
MACSerw r
B New Teminal
Nelwatch
<I> DctlX
Packet Sniffer
~ MelaROUTER
C Partition Gil
PingSpeed
il Make~
~ -- ... - Prolie
It is working! ! !!
Now I wish to ping to googl e.com just to check if the DNS is also working.
··s.381 50 116
8 172.217.168.206 T 5.178 ~ •· 50 116
Now we have the router fully connected to the internet, I wish to share the internet
from the router to my PC which is connected on internet Ether2 of the router. Let's
do this task in the upcoming LAB.
192.188.88.0/24 .2
Eth1 Eth2
R1
We are still in the same LAB scenario. Rl is fully connected to the internet. I want
now that my PC get connected to the internet. To do this, we require to do couple
P' thing let's check if the PC is able to ping to the router IP 192.168_ _1 beca
88
. Use
this is going to be his gateway to go to the mtemet.
Rfflameth
1 ac II earm
p _; 'l t:,
a 1· ,, :::,
a u,u.u.
" Q ,;;: u
" ,, 1· ....l n 3 2 b Vt
I '
_ e s Of d at a :
Re J u e s t t 1111 e ,J o u t .
Re J u e s t t i r, e d o u t .
Re _1ues t -t.:. 11: ::-L1 ;.:,,ut .
1
The exact problem is that we did not configu re the Networ k Address Translation
(NAT) on the router.
The PC has a private IP from the range of 192.168 .88.0/24. This IP is not routed to
the internet. It should be translated to the IP that is provide d from the ISP to the
WAN interface on the router which is Ether 1.
Someon e can say that the WAN IP on Ehter 1 is also a private IP, so how it is going
to the internet. Well actually , it is also NAT to a public IP from the ISP router. But
for us we need to have the NAT configured on the router. On MikroT ik, this is called
"masqu erade".
~--
,.= CN'.......
'<J WNQuad
INAH
)( ll!idlJa
" • PPP
s_i 9111id>
··-
.
0
IP
MPlS
- F-
r
~
Cloud
DHCPCllnl
"-I, w~,\'
0.-11
11 I•
t~
I
Eldra ,·Acllon Stallltics
Chaln: jilalal L -_ -- --- - .
~-~ ~ II 1 !,, _
j
[= canc.f
===i
OK
~ Cl
OHCPRay
¥ .... ,..
OHCPS...
Sn:.Adchu[ - . ---- - - --- ~
_--=---1 • I
=
Af/(llf
:Jt ~ i'
~ ......
ONS
Ollallle
... .
~ S,0-,
9Q.- Hollpat
Oamilwlt
CCII¥
ti Lag l(ldoan.d ~
l' MONJS Arri Pofl R..iecur,ln
~ nm In. tni.i- [ r= ===-~=-=-_=_=_=_=_=_=_
=_
=-~=-=_=_=
_,I • ReeelMCour.s
<I> Qat1X
Plld
Raia
J out lnler!aee O ietlllf1 1-:-. :: __ _ . ..:.....-:. __ -;-:_ ::: _~~ I
la;! MllaAOl.lTER
SN8 In. lnwf-Lill: L_ - -- - ···-- ·- - I· I
0FwWan SNMP OW. lni.i-lllt: r-·-- • I
1614411 □ X
General Advanced · Exira Action Statistics I OK
• cancel
- □ Log - ---- - - · - --~-- -- - - - - - - - ---- Apptf I
Log PrefilC:
' - -- - - -- - -_ -_-_-
_ -_ - __--_-~_-_-_-
_ -:::_-
_ -_-_-
_ -_ -_ -__--_-_ -_ -_ -_ -_ _ ....J
,.. Disable I
To Ports:
Comment I
'----------,--------'----- -- . . . .l ,.. I
Cop/
RerncJV9 I
j Reset Counters I
I R~tAIComtefs I
With this NAT rule, I am saying that any IP going out of the interface Ether 1, then
the action is to masquerade, that means to be natted.
C: Us er s f·lAICT >
. . . . . Mikfo'fik
Also 1t 1s working . So now my PC is fully connec ted to the mtemet via the
router.
do tl1e
I will do some changes on the router and PC settings , so we can learn hoW to
192.168.88.0/24 .2 ·
Eth1 Eth2
R1
We are still on the same LAB scenario. We are going to work into different cases to
do troubleshooting. Let's start with case 1.
Case 1:
You got an issue that PCs in your LAN aren't able to go to the internet.
Let's login to the router and see what the issue is.
I will ping 1st from my Router to the ISP router interface which is my gateway. In
my case, the ISP router's interface which is connected to me is: 192.168.23.1/24
(normally the ISP should tell you what your g_ateway IP address)
ay IP, that
I can see that I can reach that IP. Let's try now to ping after that gatew
means an IP on the internet. I will ping to 8.8.8 .8:
Ping
li!EI
I
General Advancsd l Start ]
I Stop J
t
/
Ping To: ~:•~•~·~tj
~ ============================:_J
,. [ CloS8 J
Interface:
~---------------_j
0 ARPPilg [ NeW~
Packet Count •
Tmeout: j 1000r.~~=========================~jms
Seq# / Host Tme (ms) Reply Size TTL Statu s
0 no route to h05t
timeout
1 no route to t,oSt
timeout
2 no route to h()St
timeout
3 no route to h()St
timeout no route to h()St
4
timeout 1
5 no route to h05
timeout
6 no route to i,ost
timeout
60
MyNetworkTraining.com - M
aherHaddad
Aha!!!! I see "no route to host" from the ping to 8.8.8.8
This clearly tells me that the problem is on the route. Let's check if my router has
still the default route on his routing table:
~ ..
•• Nesh
liFl.S
r·
~
0Dud
OHCPClllnl
OHCPAmf
~ PAI r· OHCPS.-
:Ji RDulir,g DNS
~~ ,,._
9~ Habpot
• Flis
IPsec
mlag KidOonlrol
1' RADIUS NlqDllS
j( Tools
Pactq
■ --T......al Pool
♦ oanx
!! MalaR(JUTI:R I
Aolas
5141
I
CParlian SIM'
~ -·- . - . -
Ooopssss! !! The default route is missing. Looks like some engineer has played with
the config. To get the default route back, I have to go to the DHCP client again and
enable it from there. The otlier way is to add it manually, but for this LAB I will
enable it from the DHCP client.
~~Das~bh oar~dn_-------~==========------
~5 5: 31 :.. 47 :8
8: 58 !R1l - WlnBo P ac lite (mlpsbe)
(
~SessiOn~·
@ J~~ [SetSa llt ModeJ seaion:O
---
~tin ·QS
/ . Qd dc sel
~
.. ---
~~
jlll~
x~
~
:it PPP
~ SMlch
Adm9SS85
Mesh
IP Cloud
•
...- l.5
I' IDHCP Clart i
I' DH CP Rll ay
~ IM r- - - .
DH CP
~ Rcuing Se Mr
I' ·OHS
.:~
~ Sp lln l
I' Fiv wa l Int erf ace: lether1 I l
~Q ua lB S -
~ Us e
l• I I Cancel
I
Ii Flis Ha lsp at Pe er OHS
~ Log
IP9a: ~ Use Pe er NTP
I ~
I
,, RADJJS KidConlrol
Add DefatA Ro ute: - - - -- - I Di sab le
I
j( Tools I' Paclalg
no
• I Comment
I
IIN N T. ... .i
♦ Da tlX Pm I Co py
l
l!!tl MllaBOt.JTER
Aoulls
I Remow
l
SMB
I Re lea se
l
I ~
I
Indeed. It is disabled
. I w il l enable it no w .
MyNet\l,
DHCP Client <el her 1 > [i) Cl
DHCP IAdvanced •stitusJ OK
tnterface: 0.therl a cance1
~ Use Peer DNS
I Appt/
I
~ Use Peer NTP
f dd DefaullRoute: i'-'-
yes_· ·_- _ ___
, _ _-_- ~ -
I
I
Disable
Comment
I
I
I Copy
I
I Remove
I
I Release I
I Renew
I
Let's check ifl have received the default route again on the router:
''\ , · i- • t .... ♦
~El
Routes L
Rues
. -
•I I I•
3 items out of 7
Here it is.
Now the problem should be solved. I will ping from my router again to 8.8.8.8:
t
◄
Ping
I I I Start J
Ping To:
General nced
l[=====;;;;;;;;;;;;;;=-=-=--;;_;;_~
IJl!1!1!j
Adval~ '
Interface: ~=== = = = = = = - - - - - - .., I
=- ! I· Stop
Close
J
-
]
□
;=_ARP
__ _:___________7 ..,
Ping I New Window]
Packet Count ~==============================i
Tlffl80Ut: \~1000~--------=-========
Seq# I Host
Time (ms) Reply Size TTL Status
0 8.8.8.8 9.874 50 58
1 8.8.8.8 -10.019 50 58
2 8.8.8.8 9.n4 50 58
3·8.8.8.8 9.695 50 58'
4 8.8.8.8 9.526 50 58
5 8.8.8.8 9.826 50 58
Now the ping is working, and the LAN PCs are able to go to the internet.
Case 2:
A Junior engineer has contact you saying that the Router can ping to 8.8.8.8 but
cannot ping to google.com. He is asking for your assistance on this.
If the router is able to ping to 8.8.8.8 that means the connectivity to the internet is
working. The problem is only when pinging to the domain names like google.coro.
For me, this means that the DNS is not functioning on the router.
Let's check if the router has a DNS set on it:
-
v71 2 .
MP lite .
O ectmin@08:SS:31:47:88:S8 (R1) - WN'IBox (64bit) · • on ac (mipsbe)
Session Settings Dashboard
K)lt~l ~~J ~...,tJ
/ 01.ickS.C
~ CAPIMAN
. . lnlerfa ces
~ Wirlllllss
.. WhGuard
)( Bridge
: . PPP
~ Slliich M:hsses
-i• Mesh
Cloud
.., IP t-
DHCPClllnt
I ...
U.Dc iHS. .: ' - - - - - --.- J ~
r·
.
~ MPLS
I'
DHC P~ 0 Vir ftD oH~
lj_l1Pv6 DHCP s.r_. cache
~ Rouq
I IDNS I •0 Aluw'Remote R81p15ts •
@ ~an I' Fnwal . Mai UbP Padait'Sl_zlt .._l_ _ _ _ ____.
-4096
9Qa,es Hotspo(
• Fies IPsec a
ro Log KldCcntrol
II RADIUS
Nai!1lbors
j( Tools I'
Paclcing
■ New Terminal Pool
-- ··-·---·~
ct, DotlX Routes
65
. • _ M.,,, _ Maher Haddad
-uu110
I
DHCP Advanced Status j I OK
~--
Interface: etherl ___ _
I Cancel
I will enable it now then check if I have received the DNS addresses automatically.
I
OHCP ,~ ,l~,
DHCP Chem! <Ol~lrn 1>
Interface: cance1
I~ Use Peer DNS I Apply
~ Use Peer NTP Disable
This has been enabled. Let's check if I have received the DNS addresses on the
router.
DNS Settings ~ 13
*· OK
-·-_j. _ mc
_Oyna _·_.
Sawn:
~.;...:•1:•:•~•: ~ ,.:::~::
Serwrs : _=-~- _:-_,
-::e_=_:'.'_= cance1
Static
Use OoH Server: 1 - - - - - - - - - - - - ' ,..
0 Verify DoH Certificate cache
67
MyNetworkTraining.com - Maher Haddad
Inde ed, they have been received.
t.
I will ping now to google.com from my router and see the resul
I
Gene ral Advanced 1
Start
J
Ping To: [B@hiM,h
...
Stop
J
Interf ace: l . __ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _~ Close
J
NewWindow]
□ ARP Ping
'
Packe t Coun t:.=-== ====
_ _
====
_
====
_ _
====
_ _
====
_
====
_ _
====
_ _
====
~ j
; ..,
ms
::....::.._
Tmeo ut Ll1~000
It is work ing now. So, we have solved the prob lem of this case.
Case 3:
that his PC can ping to
You have recei ved a call from one of your colle ague s sayin g
have checked the
the gatew ay 192.168.88.1 but not to the internet. You
well. So, you have
conf igura tion on the router, and everything look s work ing
conc lude d that the prob lem is on the PC itsel f.