LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-19-2018, 06:37 AM   #1
digit99
LQ Newbie
 
Registered: Mar 2016
Posts: 4

Rep: Reputation: Disabled
Configure Raspberry Pi as a DHCP router and 3G connection


Hi i have a rb pi3 with one lan on board and one lan card external and a 3G modem D-link for external connection over teamviewer.
So i try to bridge 2 lan card to be like middle router on some network, and a 3G Modem to can i connect to the router. But when i start rc.local :

sleep 10
sudo sh /home/pi/python/ifconfig.sh

sleep 30
sudo wvdial

where ifconfig.sh is
#!/bin/sh -e
sudo ifconfig eth0 0.0.0.0
sudo ifconfig eth1 0.0.0.0
sudo brctl addbr bridge0
sudo brctl addif bridge0 eth0
sudo brctl addif bridge0 eth1
sudo dhclient bridge0
sudo ifconfig bridge0 up

something was happened and 3g modem not connect or connection going trought lan cards.
Anybody can help me?
 
Old 09-20-2018, 01:19 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
the script is run as root anyhow, you do not need sudo at all.
 
Old 09-20-2018, 01:25 AM   #3
digit99
LQ Newbie
 
Registered: Mar 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Yes , thats my fool mistake, but not correct the problem.
 
  


Reply

Tags
networking, raspberry pi, switch



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure this DHCP <-> Router <-> 2 networks stenlyto Slackware 4 07-15-2009 09:54 AM
Connection, Router, DHCP Sapient Linux - Networking 1 08-25-2005 10:05 PM
router box - unable to configure DHCP server BrianNJ Linux - Networking 1 06-09-2004 07:11 AM
Broadband Connection Via Router Intermittent - DHCP Conflict? JamboUK Linux - Networking 1 05-06-2004 08:01 PM
Cannot Configure DHCP on my LAN connection nodumping14 Linux - General 4 12-01-2003 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration