Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Other discussions > Linux and software for Linux
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 01-11-2010, 06:58 AM
Stream Recorder
 
Posts: n/a
Default

Sharing Internet connection over firewire (IEEE1394) in Ubuntu 9.10


Suppose we have 2 computers, one of them has an Internet connection. We can connect them over firewire and get a local network:
Code:
sudo modprobe eth1394
sudo ifconfig eth2 192.168.200.1 up

sudo modprobe eth1394
sudo ifconfig eth8 192.168.200.2 up
Suppose that we connect to the Internet via LAN from 192.168.200.1. How to share this Internet connection over firewire onto 192.168.200.2?

On 192.168.200.1 do the following:
Code:
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
If the latter command gives the following error:
Code:
bash: /proc/sys/net/ipv4/conf/all/forwarding: Permission denied
uncomment the "net.ipv4.conf.default.forwarding = 1" line in the "/etc/sysctl.conf":
Code:
sudo gedit /etc/sysctl.conf
and remove the # in front of the "net.ipv4.conf.default.forwarding = 1"
Then apply the changes:
Code:
sudo sysctl -p
If the forwarding is enabled you will get 1
Code:
cat /proc/sys/net/ipv4/ip_forward  
1
otherwise you will get 0
Code:
cat /proc/sys/net/ipv4/ip_forward  
0
Now on the on the 192.168.200.2 do the following:
Code:
sudo route add default gw 192.168.200.1
That's it. You should have Internet connection on 192.168.200.2 now!

p.s. Windows XP allowed to share Internet connection over firewire, but you can't do that in Windows Vista and Windows 7.
But you still can use Windows XP, Linux or Mac OS...
Reply With Quote
  #2  
Old 01-12-2010, 11:50 AM
Stream Recorder
 
Posts: n/a
Default

Re: Sharing Internet connection over firewire (IEEE1394) in Ubuntu 9.10


Although Internet connection over firewire works fine, it stops working after rebooting.

You can repeat the following steps:

on computer #1
Code:
sudo modprobe eth1394
sudo ifconfig eth2 192.168.200.1 up
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
on computer #2
Code:
sudo modprobe eth1394
sudo ifconfig eth8 192.168.200.2 up
sudo route add default gw 192.168.200.1
You can also create a couple of .SH scripts and run them when needed. Any better ideas on how to restore the Internet connection on the second computer?
Reply With Quote
  #3  
Old 01-12-2010, 12:11 PM
Stream Recorder
 
Posts: n/a
Default

Re: Sharing Internet connection over firewire (IEEE1394) in Ubuntu 9.10


Please note that eth2 is used on my computer #1 for firewire, while eth8 is used on my computer #2 for firewire.

See what interfaces are used on your computer by running:
Code:
sudo ifconfig -a
Sample output of ifconfig -a:
Code:
sudo ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:16:76:cf:be:25  
          inet addr:10.01.255.01  Bcast:10.01.255.255  Mask:255.255.255.250
          inet6 addr: fexx::xxx:xxff:fecf:bexx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10129 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11417 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:7581084 (7.5 MB)  TX bytes:2162724 (2.1 MB)
          Memory:92200000-92220000 

eth2      Link encap:UNSPEC  HWaddr 00-90-27-00-01-B3-AE-DC-00-00-00-00-00-00-00-00  
          inet addr:192.168.200.1  Bcast:192.168.200.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5247 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4945 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:685021 (685.0 KB)  TX bytes:4312734 (4.3 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
As you can see the output of the above mentioned command doesn't mention 1394/iLink/Firewire.
Reply With Quote
  #4  
Old 03-21-2010, 03:46 PM
elch elch is offline
Member
 
Join Date: Mar 2010
Posts: 78
elch is on a distinguished road
Default

Re: Sharing Internet connection over firewire (IEEE1394) in Ubuntu 9.10


Great tutorial. I did not even know that I could share the internet connection via Firewire.

I haven't tried it out but it looks alright to me.

echo 1 > /proc/sys/net/ipv4/conf/all/forwarding

fails for you because you did not execute it as root. I'm saying this as sysctl is not recommended anymore. It will be removed in the next kernel releases. If the above command fails with sudo, try this:

sudo sh -c 'echo 1 > /proc/sys/net/ipv4/conf/all/forwarding'
Reply With Quote
  #5  
Old 03-21-2010, 04:00 PM
Stream Recorder
 
Posts: n/a
Default

Re: Sharing Internet connection over firewire (IEEE1394) in Ubuntu 9.10


Thank you, elch.
Code:
sudo echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
was giving the permission denied error.

But I tried the following
Code:
sudo -i
echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
and it worked just fine.

My firewire Internet connection sharing has stopped working. I couldn't find the reason. And I was really tired to type all the commands. I just got a router... didn't really want to waste my time onto the problem anymore.
Reply With Quote
  #6  
Old 03-21-2010, 11:06 PM
elch elch is offline
Member
 
Join Date: Mar 2010
Posts: 78
elch is on a distinguished road
Default

Re: Sharing Internet connection over firewire (IEEE1394) in Ubuntu 9.10


What about
sudo sh -c 'echo 1 > /proc/sys/net/ipv4/conf/all/forwarding'. This should create a shell and execute the "echo 1 > /proc/..." command within it.

The speed also interests me: Is this firewire connection faster than a Gbit ethernet connection?

If you're going to retry it some day and then run into problems again, "dmesg" will most likely contain the culprit.

Good luck.
Reply With Quote
  #7  
Old 03-22-2010, 01:04 AM
Stream Recorder
 
Posts: n/a
Default

Re: Sharing Internet connection over firewire (IEEE1394) in Ubuntu 9.10


Quote:
Originally Posted by elch View Post
What about
sudo sh -c 'echo 1 > /proc/sys/net/ipv4/conf/all/forwarding'. This should create a shell and execute the "echo 1 > /proc/..." command within it.
Works fine, thank you.

Quote:
Originally Posted by elch View Post
The speed also interests me: Is this firewire connection faster than a Gbit ethernet connection?
When I tried to transfer pictures, the speed was about 25MB/s (if I recall everything correctly). At least it didn't impress me much.

Quote:
Originally Posted by elch View Post
If you're going to retry it some day and then run into problems again, "dmesg" will most likely contain the culprit.
thank you. will try dmesg.
Reply With Quote
Reply Post New Thread
Tags: , , , , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 08:14 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons