lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

can a pi be a router by default?

Mon Jun 23, 2014 11:25 pm

I think it cannot . Unless it has software and routing table.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: can a pi be a router by default?

Mon Jun 23, 2014 11:42 pm

lilzz wrote:I think it cannot . Unless it has software and routing table.
I think it can. If it has software and a routing table.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: can a pi be a router by default?

Mon Jun 23, 2014 11:49 pm

Hi,
lilzz wrote:I think it cannot . Unless it has software and routing table.
Please define "by default".

Actually each functionality needs software. This software could be (part of) operating system, a daemon, an application...

According to the routing table... I believe that each and every computer that has working network card contains routing table. You can see its content by executing route command (sudo route). Similarly, for example, on Windows you can execute route print command to see the table's content on your desktop computer.

What one box makes the router is that it has (roughly):
- at least two configured network cards (it could be done also with a single network card, but there are very rare cases where it makes sense... I cannot think of a single right now) and
- configured some proper records in routing table.

This is also the answer how you can create a router from your RasPi:
- add a second network card,
- add records to your routing table,
- enable forwarding,
- and, not to forget... configure firewall on it.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: can a pi be a router by default?

Tue Jun 24, 2014 12:04 am

Oh, yeah, forgot to add "with a USB wifi interface or USB ethernet interface", but I suppose you could do it via the serial port.

lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Re: can a pi be a router by default?

Tue Jun 24, 2014 12:46 am

FLYFISH TECHNOLOGIES wrote:Hi,
lilzz wrote:I think it cannot . Unless it has software and routing table.
Please define "by default".

Actually each functionality needs software. This software could be (part of) operating system, a daemon, an application...

According to the routing table... I believe that each and every computer that has working network card contains routing table. You can see its content by executing route command (sudo route). Similarly, for example, on Windows you can execute route print command to see the table's content on your desktop computer.

What one box makes the router is that it has (roughly):
- at least two configured network cards (it could be done also with a single network card, but there are very rare cases where it makes sense... I cannot think of a single right now) and
- configured some proper records in routing table.

This is also the answer how you can create a router from your RasPi:
- add a second network card,
- add records to your routing table,
- enable forwarding,
- and, not to forget... configure firewall on it.


Best wishes, Ivan Zilic.
Why 2 network cards? How about 1 WiFi adapter with ad_hoc ability?

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: can a pi be a router by default?

Tue Jun 24, 2014 12:55 am

Hi,
lilzz wrote:Why 2 network cards?
Router is by definition a device which routes network traffic between (at least) two networks. If it doesn't perform this, then this is not a router.
To have a device connected to two networks at the same time, you (typically) need two network cards.
lilzz wrote:How about 1 WiFi adapter with ad_hoc ability?
Can you make one WiFi adapter in ad-hoc mode to be connected to two networks at the same time ?


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

Return to “General discussion”