博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Have to run sudo dhclient eth0 automatically every boot
阅读量:6371 次
发布时间:2019-06-23

本文共 2283 字,大约阅读时间需要 7 分钟。

0

 

 

I just installed ubuntu 12.04.1 alternative install (for raid 0 on some disks). I Have some problems with the net. I'm at school, we use cable, and it got IPv6.

If I run ifconfig eth0 heres my output:

eth0      Link encap:Ethernet  HWaddr e0:cb:4e:87:ff:db          inet addr:128.39.194.217  Bcast:128.39.194.223  Mask:255.255.255.224          inet6 addr: 2001:700:1100:8008:e2cb:4eff:fe87:ffdb/64 Scope:Global          inet6 addr: fe80::e2cb:4eff:fe87:ffdb/64 Scope:Link          inet6 addr: 2001:700:1100:8008:48f7:c23:1d87:da6c/64 Scope:Global          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:1063378 errors:0 dropped:0 overruns:0 frame:0          TX packets:489811 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:1577173461 (1.5 GB)  TX bytes:37043669 (37.0 MB)          Interrupt:68 Base address:0x6000

My /etc/network/interfaces look like this:

# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback network interfaceauto loiface lo inet loopback# The primary network interfaceauto eth0# NetworkManager#iface eth0 inet dhcp# NetworkManager#hostname 2001:700:1100:1::4# This is an autoconfigured IPv6 interfaceiface eth0 inet6 auto

(I had to remove the hash tags, because of the BIGFONT i get on ask ubuntu)

The "network manager" says that I'm not connected.

Let me know if you need any more information. :)

|
 
 
comment all lines except auto lo and
iface lo inet loopback
– 
user91632
feedback

2 Answers

 

1

 

accepted

Ok so I have a way better answer then I had before.

How about we try this.

Open a terminal.

gksu gedit /etc/rc.local

Add: sudo dhclient eth0 like so.

#!/bin/sh -e## rc.local## This script is executed at the end of each multiuser runlevel.# Make sure that the script will "exit 0" on success or any other# value on error.## In order to enable or disable this script just change the execution# bits.## By default this script does nothing.sudo dhclient eth0exit 0

Save & Close. Reboot and should work.

|
 
 
Just make sure you place it before exit 0 and you should be good to go. – 
 
Glad to see that it worked for you. – 

转载地址:http://mfuqa.baihongyu.com/

你可能感兴趣的文章
第七天,还是盒子
查看>>
XAMPP软件包下载
查看>>
XXL-JOB初体验-ORACLE版
查看>>
沉思录:别人的棺材
查看>>
jersey + spring + mybatis + redis项目搭建
查看>>
PAT 1006 部分正确_另一种解法
查看>>
在Keil环境下使用JLink实现printf输出重定向至debug窗口
查看>>
postgres的\d命令不显示全部的用户表
查看>>
poj 3468 A Simple Problem with Integers
查看>>
OOA/OOD/OOP细讲
查看>>
Tomcat 系统架构与设计模式_ 设计模式分析
查看>>
Quartz的使用
查看>>
Spring Boot Quartz集成(一)
查看>>
java 、js 字符串中提取中英文+数字
查看>>
2014新浪校招笔试题:取水果
查看>>
通过nginx访问静态文件配置
查看>>
IP子网划分
查看>>
海哥:再谈粉丝经济,你所知道的99%都是错误的。
查看>>
mac 配置以太坊本地开发环境
查看>>
mongodb(二)
查看>>