View previous topic :: View next topic |
Author |
Message |
ivanradanov n00b
Joined: 22 Feb 2013 Posts: 1
|
Posted: Fri Feb 22, 2013 4:02 pm Post subject: Network configuration |
|
|
So I installed gentoo, managed to boot it, but cant get the inet to work. I have a router with 192.168.1.1 address and I have reserved 192.168.1.100 for my pc.
/etc/conf.d/hostname:
Code: | hostname="ivan-desktop" |
/etc/conf.d/net
I emerged dhcpcd.
What should I have in my /etc/hosts file? I couldn't find how to configure it for dhcp. Sorry if it has already been explained somewhere, I did not manage to find it.
Edit: with /etc/hosts
Code: | 127.0.0.1 ivan-desktop localhost
::1 ivan-desktop localhost |
the output of ifconfig is:
Code: | eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::21a:92ff:fe3e:b756 prefixlen 64 scopeid 0x20<link>
ether 00:1a:92:3e:b7:56 txqueuelen 1000 (Ethernet)
RX packets 12 bytes 7128 (6.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 99 bytes 11130 (10.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17 memory 0xcfee0000-cff00000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 8 bytes 560 (560.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 560 (560.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
And there is no internet (When I try pinging google it says "unknown host") |
|
Back to top |
|
|
druggo Apprentice
Joined: 24 Sep 2003 Posts: 289 Location: Hangzhou, China
|
Posted: Fri Feb 22, 2013 4:55 pm Post subject: |
|
|
forget it:) _________________ HighWayToHell(blog)
http://blog.druggo.org/
Last edited by druggo on Fri Feb 22, 2013 5:55 pm; edited 1 time in total |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Feb 22, 2013 5:29 pm Post subject: |
|
|
druggo wrote: | you need a dhcpclient, just install one:
|
druggo ... the OP stated "I emerged dhcpcd" ... so that isn't the issue.
ivanradanov ... it looks as though your routers dhcp server isn't handing out the address, a possible misconfiguration on your part. How did you assign 192.168.1.100 to your machine? I would look at the router again, as it doesn't seem to be configured to hand out addresses correctly.
As for your configuration, you could self assign the address and not use dhcp like so:
Code: | modules_eth0="!plug iproute2"
config_eth0="192.168.1.100/24"
routes_eth0="default via 192.168.1.1"
enable_ipv6_eth0="false"
dns_servers_eth0="192.168.1.1" # assuming your router is also providing DNS |
Otherwise, a dhcp configuration doesn't require anything in /etc/conf.d/net as its automatically assumed if nothing is provided therein. However, here is an example dhcpcd configuration.
Code: | modules_eth0="!plug dhcpcd"
dhcpcd_eth0="-t 10" # passed as parameters to dhcpcd, here a timeout of 10
enable_ipv6_eth0="false"
dhcp_eth0="nodns" # don't request DNS
dns_servers_eth0="8.8.8.8 8.8.4.4" # for using google's DNS servers |
HTH & best ... khay |
|
Back to top |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Fri Feb 22, 2013 6:57 pm Post subject: |
|
|
didja as root
Code: |
rc-update add dhcpcd default
|
??????
merging the package is half the battle, you need to add the service to your startup scripts or on reboot it will not fire up or pull your ip info from the router.
after that ping 192.168.1.1
after that
Code: |
cat /etc/resolv.conf
|
to show your dns is in it.... |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Feb 22, 2013 7:22 pm Post subject: |
|
|
666threesixes666 wrote: | Code: | rc-update add dhcpcd default |
merging the package is half the battle, you need to add the service to your startup scripts or on reboot it will not fire up or pull your ip info from the router. |
666threesixes666 ... that is incorrect, you do not need dhcpcd in a runlevel as net.${IFACE} calls the dhcpcd client if its is configured to do so, or by default if no configuration is provided in /etc/conf.d/net.
So, this ... again ... has nothing to do with the issue.
best ... khay |
|
Back to top |
|
|
|