Raspbian restart network without reboot

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2














When I am using raspbian with a 4g USB modem, sometimes the network goes down and there is no option to bring back the network unless I reboot the raspbian.



In such cases, I try:



service networking restart


with a cron every hour; this doesn't work.



I tried also ifdown -a && ifup -a -- not much better.



The thing is, when I execute these commands in a terminal, I get no output.



What is the solution to bring network as if I rebooted?



root@raspberrypi:/home/pi# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::48f5:e07c:1544:2d24 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:38:6e:29 txqueuelen 1000 (Ethernet)
RX packets 23902 bytes 8949877 (8.5 MiB)
RX errors 0 dropped 17 overruns 0 frame 0
TX packets 30039 bytes 6388288 (6.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Boucle locale)
RX packets 20996 bytes 8495857 (8.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20996 bytes 8495857 (8.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:6d:3b:7c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0









share|improve this question



















  • 1




    how exactly do you connect initially? Did you set up a configuration in /etc/network/interfaces or did you have to do more than that to connect in the first place?
    – rudib
    Dec 15 at 18:37






  • 1




    no config at all i have to do plug usb modem and it works like ethernet wire
    – user1335838
    Dec 15 at 19:17











  • Could you post the outputs of ifconfig -a? In the case in which everything is handled by the usb device, power cycling the usb device might help, altough it might not be the best of solutions.
    – rudib
    Dec 15 at 19:28










  • post edited with ifconfig
    – user1335838
    Dec 15 at 20:12










  • Did you do this while the modem was plugged in? Because it's not showing up. If it's showing up in the future I'd recommend editing out the ip address for security reasons. Right now, you seem to be connected to your local ethernet only.
    – rudib
    Dec 15 at 20:18















2














When I am using raspbian with a 4g USB modem, sometimes the network goes down and there is no option to bring back the network unless I reboot the raspbian.



In such cases, I try:



service networking restart


with a cron every hour; this doesn't work.



I tried also ifdown -a && ifup -a -- not much better.



The thing is, when I execute these commands in a terminal, I get no output.



What is the solution to bring network as if I rebooted?



root@raspberrypi:/home/pi# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::48f5:e07c:1544:2d24 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:38:6e:29 txqueuelen 1000 (Ethernet)
RX packets 23902 bytes 8949877 (8.5 MiB)
RX errors 0 dropped 17 overruns 0 frame 0
TX packets 30039 bytes 6388288 (6.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Boucle locale)
RX packets 20996 bytes 8495857 (8.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20996 bytes 8495857 (8.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:6d:3b:7c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0









share|improve this question



















  • 1




    how exactly do you connect initially? Did you set up a configuration in /etc/network/interfaces or did you have to do more than that to connect in the first place?
    – rudib
    Dec 15 at 18:37






  • 1




    no config at all i have to do plug usb modem and it works like ethernet wire
    – user1335838
    Dec 15 at 19:17











  • Could you post the outputs of ifconfig -a? In the case in which everything is handled by the usb device, power cycling the usb device might help, altough it might not be the best of solutions.
    – rudib
    Dec 15 at 19:28










  • post edited with ifconfig
    – user1335838
    Dec 15 at 20:12










  • Did you do this while the modem was plugged in? Because it's not showing up. If it's showing up in the future I'd recommend editing out the ip address for security reasons. Right now, you seem to be connected to your local ethernet only.
    – rudib
    Dec 15 at 20:18













2












2








2







When I am using raspbian with a 4g USB modem, sometimes the network goes down and there is no option to bring back the network unless I reboot the raspbian.



In such cases, I try:



service networking restart


with a cron every hour; this doesn't work.



I tried also ifdown -a && ifup -a -- not much better.



The thing is, when I execute these commands in a terminal, I get no output.



What is the solution to bring network as if I rebooted?



root@raspberrypi:/home/pi# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::48f5:e07c:1544:2d24 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:38:6e:29 txqueuelen 1000 (Ethernet)
RX packets 23902 bytes 8949877 (8.5 MiB)
RX errors 0 dropped 17 overruns 0 frame 0
TX packets 30039 bytes 6388288 (6.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Boucle locale)
RX packets 20996 bytes 8495857 (8.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20996 bytes 8495857 (8.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:6d:3b:7c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0









share|improve this question















When I am using raspbian with a 4g USB modem, sometimes the network goes down and there is no option to bring back the network unless I reboot the raspbian.



In such cases, I try:



service networking restart


with a cron every hour; this doesn't work.



I tried also ifdown -a && ifup -a -- not much better.



The thing is, when I execute these commands in a terminal, I get no output.



What is the solution to bring network as if I rebooted?



root@raspberrypi:/home/pi# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::48f5:e07c:1544:2d24 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:38:6e:29 txqueuelen 1000 (Ethernet)
RX packets 23902 bytes 8949877 (8.5 MiB)
RX errors 0 dropped 17 overruns 0 frame 0
TX packets 30039 bytes 6388288 (6.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Boucle locale)
RX packets 20996 bytes 8495857 (8.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20996 bytes 8495857 (8.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:6d:3b:7c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0






networking usb raspberry-pi raspbian 3g






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 16 at 13:34









Jeff Schaller

38.5k1053125




38.5k1053125










asked Dec 15 at 17:48









user1335838

112




112







  • 1




    how exactly do you connect initially? Did you set up a configuration in /etc/network/interfaces or did you have to do more than that to connect in the first place?
    – rudib
    Dec 15 at 18:37






  • 1




    no config at all i have to do plug usb modem and it works like ethernet wire
    – user1335838
    Dec 15 at 19:17











  • Could you post the outputs of ifconfig -a? In the case in which everything is handled by the usb device, power cycling the usb device might help, altough it might not be the best of solutions.
    – rudib
    Dec 15 at 19:28










  • post edited with ifconfig
    – user1335838
    Dec 15 at 20:12










  • Did you do this while the modem was plugged in? Because it's not showing up. If it's showing up in the future I'd recommend editing out the ip address for security reasons. Right now, you seem to be connected to your local ethernet only.
    – rudib
    Dec 15 at 20:18












  • 1




    how exactly do you connect initially? Did you set up a configuration in /etc/network/interfaces or did you have to do more than that to connect in the first place?
    – rudib
    Dec 15 at 18:37






  • 1




    no config at all i have to do plug usb modem and it works like ethernet wire
    – user1335838
    Dec 15 at 19:17











  • Could you post the outputs of ifconfig -a? In the case in which everything is handled by the usb device, power cycling the usb device might help, altough it might not be the best of solutions.
    – rudib
    Dec 15 at 19:28










  • post edited with ifconfig
    – user1335838
    Dec 15 at 20:12










  • Did you do this while the modem was plugged in? Because it's not showing up. If it's showing up in the future I'd recommend editing out the ip address for security reasons. Right now, you seem to be connected to your local ethernet only.
    – rudib
    Dec 15 at 20:18







1




1




how exactly do you connect initially? Did you set up a configuration in /etc/network/interfaces or did you have to do more than that to connect in the first place?
– rudib
Dec 15 at 18:37




how exactly do you connect initially? Did you set up a configuration in /etc/network/interfaces or did you have to do more than that to connect in the first place?
– rudib
Dec 15 at 18:37




1




1




no config at all i have to do plug usb modem and it works like ethernet wire
– user1335838
Dec 15 at 19:17





no config at all i have to do plug usb modem and it works like ethernet wire
– user1335838
Dec 15 at 19:17













Could you post the outputs of ifconfig -a? In the case in which everything is handled by the usb device, power cycling the usb device might help, altough it might not be the best of solutions.
– rudib
Dec 15 at 19:28




Could you post the outputs of ifconfig -a? In the case in which everything is handled by the usb device, power cycling the usb device might help, altough it might not be the best of solutions.
– rudib
Dec 15 at 19:28












post edited with ifconfig
– user1335838
Dec 15 at 20:12




post edited with ifconfig
– user1335838
Dec 15 at 20:12












Did you do this while the modem was plugged in? Because it's not showing up. If it's showing up in the future I'd recommend editing out the ip address for security reasons. Right now, you seem to be connected to your local ethernet only.
– rudib
Dec 15 at 20:18




Did you do this while the modem was plugged in? Because it's not showing up. If it's showing up in the future I'd recommend editing out the ip address for security reasons. Right now, you seem to be connected to your local ethernet only.
– rudib
Dec 15 at 20:18















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489174%2fraspbian-restart-network-without-reboot%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489174%2fraspbian-restart-network-without-reboot%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)