Community discussions

MikroTik App
 
sashavl
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Mon Nov 01, 2010 8:19 pm
Contact:

File sharing over routed interface?

Sat Sep 14, 2013 3:39 pm

I tryed to use windows file sharing between host (Win 7 Pro) and virtual os (Win XP Pro) running in VirtualBox. They were connected over ROS v6 also running in VirtualBox with this ip configuration:

Win 7: 192.168.10.10/24
Gateway: 192.168.10.1

Win XP: 192.168.2.10/24
Gateway: 192.168.2.1

ROS: 192.168.10.1/24 and 192.168.2.1/24

ROS only had in firewall chain=forward action=accept (nothing else).

All VirtualBox network adapters were configured to "Internal network" except adapter which connects to host (Win 7).

What suprised me is that Win 7 successfully opens Win XP shared folder, how and why that worked?

Thanks.
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: File sharing over routed interface?

Sat Sep 14, 2013 5:48 pm

I tryed to use windows file sharing between host (Win 7 Pro) and virtual os (Win XP Pro) running in VirtualBox. They were connected over ROS v6 also running in VirtualBox with this ip configuration:

Win 7: 192.168.10.10/24
Gateway: 192.168.10.1

Win XP: 192.168.2.10/24
Gateway: 192.168.2.1

ROS: 192.168.10.1/24 and 192.168.2.1/24

ROS only had in firewall chain=forward action=accept (nothing else).

All VirtualBox network adapters were configured to "Internal network" except adapter which connects to host (Win 7).

What suprised me is that Win 7 successfully opens Win XP shared folder, how and why that worked?

Thanks.
Why are you surprised that it works? Of course it works! You don't have any drop/deny forward rules, so everything is allowed through. If you want to deny, you have to add those rules!
 
sashavl
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Mon Nov 01, 2010 8:19 pm
Contact:

Re: File sharing over routed interface?

Sat Sep 14, 2013 9:20 pm

Why am suprised? Broadcast shouldn't pass L3 device, so how ARP gets to another subnet?
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: File sharing over routed interface?

Sat Sep 14, 2013 9:33 pm

Why am suprised? Broadcast shouldn't pass L3 device, so how ARP gets to another subnet?
windows file sharing can go over any network. people do this all the time. smb uses tcp ports 137,138,139,445
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: File sharing over routed interface?

Sat Sep 14, 2013 9:34 pm

Why am suprised? Broadcast shouldn't pass L3 device, so how ARP gets to another subnet?
You obviously don't understand how smb/windows sharing works. Windows file sharing can be allowed to go over any networks, or through routes to different networks. people do this all the time. windows sharing would be useless if it had to stay on the same L2 network!

smb uses tcp ports 137,138,139,445. TCP is an L3 routable protocol.
 
sashavl
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Mon Nov 01, 2010 8:19 pm
Contact:

Re: File sharing over routed interface?

Sat Sep 14, 2013 9:53 pm

I knew smb uses 137-139 and 445 tcp ports, but also thought it must be on same L2 network... don't know where i get that. I read all the time on internet how people have problems with file sharing over router in different subnets... ok, thank you.
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: File sharing over routed interface?

Sat Sep 14, 2013 9:57 pm

I knew smb uses 137-139 and 445 tcp ports, but also thought it must be on same L2 network... don't know where i get that. I read all the time on internet how people have problems with file sharing over router in different subnets... ok, thank you.
what you are referring to is the windows DISCOVERY feature, where it automatically shows all the other computers in your same network in the "my network places" or "network neighborhood"... but that has nothing to do with file sharing. people even use windows sharing across the Internet sometimes.
 
sashavl
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Mon Nov 01, 2010 8:19 pm
Contact:

Re: File sharing over routed interface?

Sun Sep 15, 2013 1:05 am

Yes, possible. You're right, thank you again.