[젠투] 부팅할때 네트워크가 제대로 설정되지 않습니다.

hiseob의 이미지

gentoo-vm ~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:17:05:83
inet addr:192.168.0.25 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:94 errors:0 dropped:0 overruns:0 frame:0
TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9443 (9.2 KiB) TX bytes:9391 (9.1 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

gentoo-vm ~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
loopback - 255.0.0.0 ! 0 - 0 -
loopback localhost 255.0.0.0 UG 0 0 0 lo
gentoo-vm ~ # /etc/init.d/net.eth0 restart
* Stopping sshd... [ ok ]
* Unmounting network filesystems... [ ok ]
* Stopping apache2... [ ok ]
* Bringing down interface eth0
* Removing addresses
* 192.168.0.25/24
* Bringing up interface eth0
* 192.168.0.25... [ ok ]
* Adding routes
* default via 192.168.0.1... [ ok ]
gentoo-vm ~ # * Starting sshd...
* Mounting network filesystems... [ ok ]
* Starting apache2... [ ok ]

gentoo-vm ~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:17:05:83
inet addr:192.168.0.25 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:187 errors:0 dropped:0 overruns:0 frame:0
TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17737 (17.3 KiB) TX bytes:20421 (19.9 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

gentoo-vm ~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
loopback - 255.0.0.0 ! 0 - 0 -
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 2 0 0 eth0
gentoo-vm ~ #

그러니까 net.eth0 스크립트가 부팅할때는 게이트웨이르 제대로 못잡고 쉘에서 /etc/init.d/net.eth0 restart 를 해줘야 네트워크가 제대로 돌아갑니다.

/etc/conf.d/net 은
config_eth0=( "192.168.0.25 netmask 255.255.255.0 broadcast 192.168.0.255" )
routes_eth0=( "default via 192.168.0.1" )
dns_servers_eth0=( "168.126.63.1 168.126.63.2" )

이렇게 설정되어있구요... 뭐가 문제일까요? 어차피 버추얼 머신이라 관리상 큰 문제는 없는데 켜줄때마다 리스타트 해주기가 참 귀찮네요...

Necromancer의 이미지

저는 net.eth0 귀찮아서 수작업 셋팅해서 씁니다.

/etc/conf.d/local.start에 집어 넣으시면 됩니다.

ifconfig eth0 {IP주소} netmask {넷마스크} broadcast {broadcast주소} up
route add default gw {게이트웨이} metric 1 dev eth0

유동ip면

dhcpcd eth0

Written By the Black Knight of Destruction

Written By the Black Knight of Destruction

aqua의 이미지

저는 /etc/runlevels/boot에 network를 지우고
net.eth0를 넣었더니 잘되더군요;;

# rc-update add net.eth0 boot

원래는 /etc/conf.d/net에 정보만 잘 주면 제대로 되야 하는데 말이죠;;

======
깔깔깔
======

hiseob의 이미지

/etc/conf.d/net 만 잘 설정 되면 정상 동작해야되는게 맞는데, 요즘들어 뭔가 바뀐것 같습니다 ㅎㅎ
전 /etc/conf.d/network 에서 defaultroute="192.168.0.1" 의 주석을 해제시켰더니 원하는대로 동작하긴 하네요.
답변주신분들 감사합니다 __)*

송효진의 이미지

데스크탑이시면 init.d/net.lo 외의 모든 net.* 를 지워버리시고,
wicd 로 하시는 것을 추천합니다.

네트워크에 따라 dhcpcd, dhclient 를 타기도 합니다.
모듈로 해 놓으셨다면, 모듈로딩 문제일 수도 있을 것 같네요.

emerge money
http://wiki.kldp.org/wiki.php/GentooInstallSimple - 명령어도 몇 개 안돼요~
http://xenosi.de/

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.