-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure-lost-default-route-in-debian.html
83 lines (72 loc) · 3.53 KB
/
configure-lost-default-route-in-debian.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Configure lost default route in Debian - kb.haeringer.org</title>
<link href="http://fonts.googleapis.com/css?family=Arimo:400,700|Inika" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/theme/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/theme/pastie.css" />
<link href="/" type="application/atom+xml" rel="alternate" title="kb.haeringer.org Atom Feed" />
</head>
<body>
<div class="container">
<div class="row">
<div class="span10">
<div id="content">
<div class="header">
<h1>Configure lost default route in Debian</h1>
</br>
</div>
<p class="meta"><small><span><a href="/author/ben/">ben</a> - </span><span>Mo 04 Januar 2010</span> - <span class="tags"><a href="/tag/Debian/">Debian</a>, <a href="/tag/Linux networking/">Linux networking</a></span></small></p>
<div class="entry-content">
<p>Recently, my Debian server had no internet connection anymore and I
didn't know why.</p>
<p>I was able to ping the default gateway, and it was also configured in
/etc/network/interfaces.</p>
<p>But when I did a traceroute to any internet address, I got a "connect:
Network is unreachable" immediately, showing that the packets did <em>not</em>
go to the default gateway.</p>
<p>The command</p>
<div class="highlight"><pre><span class="o">/</span><span class="n">sbin</span><span class="o">/</span><span class="n">route</span>
</pre></div>
<p>now showed that there was no route to 0.0.0.0 (no default route)</p>
<p>After adding the route (which already was configured in
/etc/network/interfaces) with the command</p>
<div class="highlight"><pre><span class="o">/</span><span class="n">sbin</span><span class="o">/</span><span class="n">route</span> <span class="n">add</span> <span class="k">default</span> <span class="n">gw</span> <span class="mf">192.168.1.100</span>
</pre></div>
<p>...the default route also showed up in /sbin/route, and the internet
connection was working again.</p>
<p>I have no clue how my default route got lost! If I find the reason, I
will add it to this post.</p>
<p>Edit: We had a power outage due to construction works, and when adding
the default route via <code>route add ..</code>, it will be lost after a reboot.
However, I think it should have been set anyway when configured in
/etc/network/interfaces...</p>
</div><!-- /.entry-content -->
</div>
</div>
<div class="span2">
<div class="well">
<ul class="nav nav-list">
<li class="nav-header">Blog</li>
<!-- <li ><a href="">Home</a></li> -->
<li ><a href="index.html">Home</a></li>
<li ><a href="/tags/">Tags</a></li>
<li ><a href="/archives/">Archive</a></li>
<li class="nav-header">Pages</li>
<li><a href="/pages/about.html">About</a></li>
</ul>
</div><!-- /#menu -->
</div>
</div>
<hr />
<div class="row">
<div class="span12">
<div id="about">
<p>Proudly powered by <a href="http://twitter.github.com/bootstrap/">bootstrap</a>, <a href="http://docs.notmyidea.org/alexis/pelican/">pelican</a>, <a href="http://python.org">python</a> and <a href="http://www.julo.ch/about/">Alex</a></p>
</div><!-- /#about -->
</div><!-- /#contentinfo -->
</div>
</div>
</body>
</html>