• MikroTik.com
  • RouterBOARD
  • User Meeting
  • Training
  • User Manual
  • Support
  • Downloads
  • Videos
Register |   * Login | HOME

View unanswered posts | View active topics

RB450 help needed - basic 2 lan config  Page 1 of 1
 [ 10 posts ]  Post new topic Reply to topic
  Print view Previous topic | Next topic 
Author Message
cybertron
 Post subject: RB450 help needed - basic 2 lan config
PostPosted: Mon Aug 31, 2009 6:54 am 
Offline
just joined

Joined: Tue Jan 06, 2009 7:37 am
Posts: 23
Karma: 0
Hey guys... I recently purchased a new RB450 and RB450G and had the pleasure of working with Dmitry to configure one of these units. But I'm trying to configure the second unit on my own and I'm running into some trouble. Hopefully this isnt basic stuff that I just missed in the manual--if so, my apologies.

I have the following ip addresses:
[admin@MikroTik] /ip address> print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.0.0.240/24 10.0.0.0 10.0.0.255 WAN-0
1 10.0.0.253/24 10.0.0.0 10.0.0.255 LAN-1
2 10.0.1.253/24 10.0.1.0 10.0.1.255 WiFi-2
3 D 10.0.0.46/24 10.0.0.0 10.0.0.255 WAN-0
[admin@MikroTik] /ip address>

but when I plug a cable into LAN-1 (1 being the port number...0-4) I'm unable to ping the ip or access ssh. The machine I'm working from does receive an ip from dhcp server though. How can I access ssh from the second port.. or any port for that matter?

I also cant get internet access even though I've added what I think is the right stuff, but I'll figure that out after I get access to the router from this side. I can post any more screens needs, but I'm new to this so not sure which are relevant.


Top
 Profile  
 
SurferTim
 Post subject: Re: RB450 help needed - basic 2 lan config
PostPosted: Mon Aug 31, 2009 12:53 pm 
Offline
Forum Guru
Forum Guru

Joined: Mon Jan 07, 2008 10:31 pm
Posts: 3764
Karma: 106

Location: Miramar Beach, Florida
What is the ip/netmask of the interface of the other router that is connected to WAN-0? That should be the gateway, and I need that ip to help you finish the route. I would have used 10.0.0.1/24

BTW, you have two interfaces with duplicate networks on them (WAN-0 and LAN-1). And a dynamic assignment on WAN-0 (bottom entry).


Top
 Profile  
 
cybertron
 Post subject: Re: RB450 help needed - basic 2 lan config
PostPosted: Mon Aug 31, 2009 3:56 pm 
Offline
just joined

Joined: Tue Jan 06, 2009 7:37 am
Posts: 23
Karma: 0
I knew i would leave info out... sorry.

The WAN is being connected to a comcast cable modem(DHCP) and has been configured with dhcp-client. the 10.0.0.46 port you see is reassigned(or is supposed to be) once i plug the unit into the cable modem. the 10.0.0.240 was just a static ip i set for configuring the unit. Is it possible for an interface to have 2 networks like that? I will remove that ip once I can figure out how to SSH into the unit from port2 (LAN-1)

On the LAN-1 interface, I went with 10.0.0.253 because my current router is .254 and I'll be changing that once this router is working successfully.

I assume the gatway will be assigned via dhcp on the wan side right?


Top
 Profile  
 
SurferTim
 Post subject: Re: RB450 help needed - basic 2 lan config
PostPosted: Mon Aug 31, 2009 4:04 pm 
Offline
Forum Guru
Forum Guru

Joined: Mon Jan 07, 2008 10:31 pm
Posts: 3764
Karma: 106

Location: Miramar Beach, Florida
Quote:
On the LAN-1 interface, I went with 10.0.0.253 because my current router is .254 and I'll be changing that once this router is working successfully.

Good idea, but that presents routing problems. That interface needs:
a separate localnet,
or
bridged to ether1, which means semi-public net on LAN-1, not private. 10.x.x.x net is all private.

If you change that interface to 10.0.2.1/24, and reassign your other router between the 10.0.0.254 and 10.0.2.254 as you move it from one net to the other, then it should work ok.


Top
 Profile  
 
cybertron
 Post subject: Re: RB450 help needed - basic 2 lan config
PostPosted: Mon Aug 31, 2009 9:42 pm 
Offline
just joined

Joined: Tue Jan 06, 2009 7:37 am
Posts: 23
Karma: 0
SurferTim wrote:
Quote:
..


How about SSH to the RB450 on LAN-1 (port 1 in 0-4)? Or should I have just made port 0 the LAN port?


Top
 Profile  
 
SurferTim
 Post subject: Re: RB450 help needed - basic 2 lan config
PostPosted: Mon Aug 31, 2009 10:05 pm 
Offline
Forum Guru
Forum Guru

Joined: Mon Jan 07, 2008 10:31 pm
Posts: 3764
Karma: 106

Location: Miramar Beach, Florida
No problem as long as the interface networks are not identical. ether2 is ok for ssh into the router. It better be. That is what I use most of the time! Assign 10.0.2.1/24 to the LAN-1 interface. Then get on the LAN-1 interface with a 10.0.2.x/24 ip, and
ssh admin@10.0.2.1.


Top
 Profile  
 
cybertron
 Post subject: Re: RB450 help needed - basic 2 lan config
PostPosted: Tue Sep 01, 2009 12:36 am 
Offline
just joined

Joined: Tue Jan 06, 2009 7:37 am
Posts: 23
Karma: 0
SurferTim wrote:
No problem as long as the interface networks are not identical. ether2 is ok for ssh into the router. It better be. That is what I use most of the time! Assign 10.0.2.1/24 to the LAN-1 interface. Then get on the LAN-1 interface with a 10.0.2.x/24 ip, and
ssh admin@10.0.2.1.


done and done. Thanks so much. Its working now on the LAN side. Now I just have to figure out how to setup NAT on the WiFi side. Is that even possible?


Top
 Profile  
 
SurferTim
 Post subject: Re: RB450 help needed - basic 2 lan config
PostPosted: Tue Sep 01, 2009 12:55 am 
Offline
Forum Guru
Forum Guru

Joined: Mon Jan 07, 2008 10:31 pm
Posts: 3764
Karma: 106

Location: Miramar Beach, Florida
Yes it is. Easy.

/ip firewall nat
add chain=srcnat action=src-nat to-addresses=10.0.0.46

This will srcnat all localnet ips as 10.0.0.46. I normally would use "action=masquerade", but since there are two ips assigned to WAN-0 (ether1), that is unpredictable.

ADD: This applies only if 10.0.0.46/24 is a "persistent ip" (you always get that ip by dhcp).


Top
 Profile  
 
cybertron
 Post subject: Re: RB450 help needed - basic 2 lan config
PostPosted: Tue Sep 01, 2009 3:37 am 
Offline
just joined

Joined: Tue Jan 06, 2009 7:37 am
Posts: 23
Karma: 0
SurferTim wrote:
Yes it is. Easy.

/ip firewall nat
add chain=srcnat action=src-nat to-addresses=10.0.0.46

This will srcnat all localnet ips as 10.0.0.46. I normally would use "action=masquerade", but since there are two ips assigned to WAN-0 (ether1), that is unpredictable.

ADD: This applies only if 10.0.0.46/24 is a "persistent ip" (you always get that ip by dhcp).


Alright, so I had already added "chain=srcnat action=maq..." and so on for what I thought was port 1 (of 0-4) only, but once I removed the static WAN ip, it looks like everything is working fine now.

So I have a dynamic WAN, and a LAN & WiFi with DHCP + NAT and all is able to get online now.

The last 2 questions I have are: can I set IP's based on MAC address? & how can i restrict access between the LAN and Wifi ports? or how can I allow traffic (for printing, etc) from the wifi port to the LAN?

I want to setup a hotspot but that can wait until I have more time tomorrow. Thanks again for all the help.


Top
 Profile  
 
SurferTim
 Post subject: Re: RB450 help needed - basic 2 lan config
PostPosted: Tue Sep 01, 2009 10:38 am 
Offline
Forum Guru
Forum Guru

Joined: Mon Jan 07, 2008 10:31 pm
Posts: 3764
Karma: 106

Location: Miramar Beach, Florida
To make a dhcp lease static (not static ip assignment).

/ip dhcp-server lease
print
make-static X

Change X to the line number of the lease. Then that mac address will always be issued that ip. Some call this a "persistent ip".

If you want to restrict access, then you can do that with
/ip firewall filter
add chain=forward action=drop src-address=10.0.1.0/24 dst-address=10.0.2.0/24
add chain=forward action=drop src-address=10.0.2.0/24 dst-address=10.0.1.0/24


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 10 posts ] 

Board index » RouterOS » Beginner Basics

All times are UTC + 2 hours


Who is online

Users browsing this forum: torjon and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Karma functions powered by Karma MOD © 2007, 2009 m157y