Community discussions

MikroTik App
 
marlborolights
just joined
Topic Author
Posts: 5
Joined: Fri Oct 05, 2018 11:56 am

No internet connection on my switch

Fri Oct 05, 2018 12:00 pm

Hello guys,
Im new here so bear with me
I just got a new Mikrotik switch and i can't set it up correctly for the life of me.
I have a modem which connects to eth1 and 3 other switches that connect to eth2, eth3 and eth4.
I set up the ips supplied by the isp and the dhcp and vpn range but i still have no internet connection.
When i set up DHCP server, my laptop gets an IP in leases but it has no internet connection.
Only time when I managed to get internet is when i Bridged all the ports together but then i cant use DHCP server.
Can someone please help me?
Thanks in advance!
 
WeWiNet
Long time Member
Long time Member
Posts: 597
Joined: Thu Sep 27, 2018 4:11 pm

Re: No internet connection on my switch

Sat Oct 06, 2018 4:42 pm

Which device does DHCP server? Any router in your network and which device is it?
If it worked with all ports bridged it looks like the Modem is L3 router.
In that case you can't use DHCP server on bridge, will be down by the Router.
 
marlborolights
just joined
Topic Author
Posts: 5
Joined: Fri Oct 05, 2018 11:56 am

Re: No internet connection on my switch

Tue Oct 09, 2018 12:23 pm

Which device does DHCP server? Any router in your network and which device is it?
If it worked with all ports bridged it looks like the Modem is L3 router.
In that case you can't use DHCP server on bridge, will be down by the Router.
the thing is this CCR was already set up to work as described (modem connected to eth1 and providing internet to devices connected to other ports) but then it had to be reset and the configuration is gone.
On other router i've managed to set it up by using master/slave port configuration but my CCR does not have that option so im kinda stuck, im searching for days now and people have posted that i have to use bridge but the problem is that when i put all other ports except eth1 in a bridge I dont have internet connection but when i bridge them all internet works.
Thing is that i cant even ping 8.8.8.8 from the router itself.
ive set the IP's, DNS and NAT masquerade rule but still no luck.
If you could help me i would appreciate it a lot
 
User avatar
Steveocee
Forum Guru
Forum Guru
Posts: 1120
Joined: Tue Jul 21, 2015 10:09 pm
Location: UK
Contact:

Re: No internet connection on my switch

Tue Oct 09, 2018 1:45 pm

I actually thought that a CCR didn't have much of a config on it straight out of the box.

If you can't get connection from the router, go back to basics, is the CCR getting an IP? Does the interface have an IP?
 
marlborolights
just joined
Topic Author
Posts: 5
Joined: Fri Oct 05, 2018 11:56 am

Re: No internet connection on my switch

Tue Oct 09, 2018 2:14 pm

I actually thought that a CCR didn't have much of a config on it straight out of the box.

If you can't get connection from the router, go back to basics, is the CCR getting an IP? Does the interface have an IP?
Bare with me this is a stupid question but how do i check that?
I enter the predefined IP addresses into the Quick Set tab in winbox, create a new route to ISP gateway, create a masquerade NAT rule, plug modem cable into eth1 and put all other ports into a bridge called LAN, when i use that bridge in DHCP server it leases ips to devices i connect to those ports but they dont have internet and neither does the switch, when i try to ping 8.8.8.8 for example it just says timeout and than it tries to ping ISP's IP and says "no connection to host"

EDIT: When i connect CCR to the other mikrotik router and bridge all ports together internet works, I've mirrored settings from the working router to CCR but it still does not work. I'm kinda afraid to disconnect the working mikrotik router and connect only CCR but could it be that CCR cant connect to the internet because the other router is already connected?
 
User avatar
bramwittendorp
Member Candidate
Member Candidate
Posts: 101
Joined: Thu Jun 16, 2016 3:48 pm
Location: The Netherlands
Contact:

Re: No internet connection on my switch

Tue Oct 09, 2018 3:05 pm

To check if the correct interface has an IP-address, you'll need to do an
/ip address export 
from the terminal and check whether the correct IP-address has been assigned to ether1. Alternatively you could also use the IP > Address tab in WinBox of Webfig.

If you want proper help, please post the config of your non-working situation by doing the following export. We than have the possibility to walk trough and give you proper suggestion on what to do.
/export hide-sensitive
 
marlborolights
just joined
Topic Author
Posts: 5
Joined: Fri Oct 05, 2018 11:56 am

Re: No internet connection on my switch

Wed Oct 10, 2018 11:01 am

To check if the correct interface has an IP-address, you'll need to do an
/ip address export 
from the terminal and check whether the correct IP-address has been assigned to ether1. Alternatively you could also use the IP > Address tab in WinBox of Webfig.

If you want proper help, please post the config of your non-working situation by doing the following export. We than have the possibility to walk trough and give you proper suggestion on what to do.
/export hide-sensitive
Here is my config on non woring router:
# Oct/10/2018 10:01:03 by RouterOS 6.43.2
# software id = U4HH-T9YF
#
# model = CCR1009-7G-1C-1S+
# serial number = 8498089B2E72
/interface bridge
add name=LAN
/interface vlan
add interface=ether1 name=vlan1 use-service-tag=yes vlan-id=2334
/interface list
add name=WAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=172.xxx.xxx.10-172.xxx.xxx.254
add name=VPN ranges=172.xxx.xxx.10-172.xxx.xxx.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=LAN name=defconf
/ppp profile
add local-address=172.xxx.xxx.1 name=remote remote-address=VPN use-encryption=yes
/interface bridge port
add bridge=LAN interface=ether2
add bridge=LAN interface=ether3
add bridge=LAN interface=ether4
add bridge=LAN interface=ether5
add bridge=LAN interface=ether6
add bridge=LAN interface=ether7
/interface list member
add interface=ether1 list=WAN
add interface=LAN
/interface pptp-server server
set default-profile=remote enabled=yes
/ip address
add address=172.xx.xx.1/24 interface=LAN network=172.xxx.xx.0
add address=195.xxx.xx.254/30 interface=ether1 network=195.xxx.xx.252
/ip dhcp-server network
add address=172.xxx.xx.0/24 gateway=172.xxx.xx.1 netmask=24
/ip dns
set servers=8.8.8.8,8.8.4.4
/ip dns static
add address=172.xxx.xx.1 name=router
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add distance=1 gateway=195.xxx.xx.253
/system routerboard settings
set silent-boot=no
[/code}
Last edited by marlborolights on Wed Oct 10, 2018 11:59 am, edited 2 times in total.
 
User avatar
vecernik87
Forum Veteran
Forum Veteran
Posts: 882
Joined: Fri Nov 10, 2017 8:19 am

Re: No internet connection on my switch

Wed Oct 10, 2018 11:44 am

I dont see any mistake - it should work.. In addition, your IP is real-world-routable and when I try to ping it, it responds. I can even see open winbox port which is not good at all! You have no firewall rules and such device should not be connected to any untrusted network, especially when your admin interfaces are open to anyone.
As I can see your mikrotik (Well, I guess it is your device), I don't really understand, why it can't ping 8.8.8.8 as you suggested.
Only possible reason I can imagine is, that what I can reach is not your device and you are using IP which is not routed to you properly (i.e. the IP belongs to someone else who has incorrectly set up router as well. However, that would be really weird coincidence)

Ohh.. I just realized: What is your real "WAN? Is it supposed to be Eth1 or the vlan1? Because your NAT and your public IP is assigned to Eth1 instead of vlan1 and it is very unusual to have vlan on public interface which has assigned public IP.
 
marlborolights
just joined
Topic Author
Posts: 5
Joined: Fri Oct 05, 2018 11:56 am

Re: No internet connection on my switch

Wed Oct 10, 2018 12:17 pm

I dont see any mistake - it should work.. In addition, your IP is real-world-routable and when I try to ping it, it responds. I can even see open winbox port which is not good at all! You have no firewall rules and such device should not be connected to any untrusted network, especially when your admin interfaces are open to anyone.
As I can see your mikrotik (Well, I guess it is your device), I don't really understand, why it can't ping 8.8.8.8 as you suggested.
Only possible reason I can imagine is, that what I can reach is not your device and you are using IP which is not routed to you properly (i.e. the IP belongs to someone else who has incorrectly set up router as well. However, that would be really weird coincidence)

Ohh.. I just realized: What is your real "WAN? Is it supposed to be Eth1 or the vlan1? Because your NAT and your public IP is assigned to Eth1 instead of vlan1 and it is very unusual to have vlan on public interface which has assigned public IP.
that should not be my device as my device is not connected to anything right now.
So what should I do?
 
User avatar
vecernik87
Forum Veteran
Forum Veteran
Posts: 882
Joined: Fri Nov 10, 2017 8:19 am

Re: No internet connection on my switch

Wed Oct 10, 2018 1:45 pm

As I can see you masked your IP now, I will not share it but that also means other people will be unable to come up with some idea if they can't test it.


Fact is that previously specified IP is reachable. Even now. If you are sure your device is disconnected (or at least it was disconnected when I originally replied you), it is not surprising it didn't work when it was connected. I guess there are only following possible reasons:
- You had a typo in the IP and it belongs to someone else
- You have correct IP but your ISP does not route it correctly and it ends up somewhere else
- Your ISP is proxying it and catching some/all protocols/ports (ICMP, 8291-winbox, maybe others)

Personally I would follow these steps:
1) check if you typed your IP, network and gateway correctly according to data provided by ISP. (the 195.x.x.x addresses)
2) check with your ISP if they gave you correct data.
3) if they insist they gave you correct data, disconnect your device (and make sure there is no other device connected), test if you can ping it from independent network and if you can, then confront your ISP with such finding. (If device is not connected, there should be no response from the IP, right? If there is such response, it means some other device/connection is using the IP)

That is the best I can do right now. Maybe other people will come up with better idea but at this point, I guess your ISP is next step.


edit: gosh.. i feel like stupid now... Your modem! are you sure your modem is not doing NAT? e.g. - what happens when you connect any computer directly to it? What IP does it get? Or what happens when you create DHCP client on Eth1 of your mikrotik and connect your modem to Eth1 on Mikrotik?

Who is online

Users browsing this forum: Majestic-12 [Bot] and 20 guests