Community discussions

MikroTik App
 
Razbezhkin
just joined
Topic Author
Posts: 4
Joined: Sat Sep 05, 2009 6:17 pm

How to connect via ethernet with dynamic ip address then vpn

Sat Sep 05, 2009 6:31 pm

Hello.
My ISP use following method for connect users to Internet:
Ethernet interface of router connected to provider switch and receive ip address of the private network, then router must establish pptp connection with provider's vpn server.
i have the problem with default gateways, I do next steps:
1. confugure dhcp client, linked with ISP ethernet interface, set "Add default route" option. In result i have route: 0.0.0.0/0 with 0 distance.
2. set up pptp client interface to vpn server and set "Add default route". result - second route 0.0.0.0/0 with distance is 1.

then I try to connect with internet host, router send packages to first gateway in private network of ISP, and don't reach destination.

my routeros is 3.10

How to right configure router in this situation?
 
eneimi
Member
Member
Posts: 387
Joined: Sun Sep 09, 2007 12:55 pm

Re: How to connect via ethernet with dynamic ip address then vpn

Sat Sep 05, 2009 9:26 pm

Your description isn't quite clear.

From what i could gather: wan interface of your router (connection to your isp) is pppoe client, while you have dhcp server setup on one of your ether interfaces (local network)?

Please let's have a well labelled diagram to give us a clearer picture.
 
Razbezhkin
just joined
Topic Author
Posts: 4
Joined: Sat Sep 05, 2009 6:17 pm

Re: How to connect via ethernet with dynamic ip address then vpn

Sat Sep 05, 2009 9:39 pm

ether1 - 192.168.6.1/24 - connected to LAN
ether3 -conected to ISP
DHCP Client bind to ether3, got ip address from isp
ufanet (is interface) - PPTP Client connect to 10.8.0.1 (ISP vpn server)

while DHCP Client receive default gateway, new route created: 0.0.0.0/0, distance 0 via ether3 interface; 0.0.0.0/0, distance 1 via ufanet interface

But correct config must have main default gateway with lower distance via ufanet interface.
 
eneimi
Member
Member
Posts: 387
Joined: Sun Sep 09, 2007 12:55 pm

Re: How to connect via ethernet with dynamic ip address then vpn

Tue Sep 08, 2009 1:49 am

This i understand.
ether1 - 192.168.6.1/24 - connected to LAN
ether3 -conected to ISP
DHCP Client bind to ether3, got ip address from isp
This i don't understand.
ufanet (is interface) - PPTP Client connect to 10.8.0.1 (ISP vpn server)
Do you have two connections to your isp? Dhcp client and pptp client? Running on the same interface? Strange!
Please clarify this.
 
dog
Member Candidate
Member Candidate
Posts: 186
Joined: Wed Aug 12, 2009 3:37 pm
Location: Germany

Re: How to connect via ethernet with dynamic ip address then vpn

Tue Sep 08, 2009 2:20 am

Do not add the default route supplied by the DHCP server - you won't need it.

Also: Is the pptp server in the same subnet as the dhcp ip you receive?
If not you might need to add a host route.
 
Maksim
just joined
Posts: 1
Joined: Sun Apr 11, 2010 2:05 am
Location: Russia, Ufa

Re: How to connect via ethernet with dynamic ip address then

Sun Apr 11, 2010 2:19 am

hello everybody!
I find this topic and i try to build connect to ISP ufanet (that ISP used by topicstarter)
a i have a global question - how i need configured ROS to start correctly working my router.

That i have:
2 interfaces
eth0 - local 192.168.2.5/24
eth1 - isp - wan port (getting ip from DHCP from ISP, DHCP server ISP is 10.8.0.1)
i add DHCP client without Default route rule. After this eth1 get ip from ISP DHCP server - its seems like 10.165.30.0/25
Then i must to authentificate on a ISP server by the PPTP. For this i have a login an password.

How i can make it ? How to up the PPTP connection, and make a routing from local interface to ISP channel ?

simple scheme of that i need

10.8.0.1 -> microtik wan
microtik lan -> switch -> lan (192.168.2.X) - users computers (that must use the internet channel of ISP 10.8.0.1)
 
rsrinivashan
just joined
Posts: 3
Joined: Wed Mar 03, 2010 12:34 pm

Re: How to connect via ethernet with dynamic ip address

Thu May 06, 2010 4:31 pm

hi gays this is srinivashan new bee to this mikrotik router

my ISP use following method for connect users to Internet

my wan Ethernet interface of router connected to service provider cable which is dhcp .

so i just want to know that who to assign dynamic address to mikrotik router

please let me know to if any one knows

thanks in advance

thanks & regards
srinivashan.R