Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Static IP issue [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
markisthejob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2008
Posts: 143
Location: Cork, Republic of Ireland

PostPosted: Thu Feb 24, 2011 4:12 pm    Post subject: Static IP issue [SOLVED] Reply with quote

Hi All. I've recently come back to Gentoo after a long absence.Everything is exactly the way I want it except my static ip.When I set one, I have no internet connectivity.Im sure im just missing something small.After following the handbook and forum heres what i've got

my desired ip is 192.168.1.199 and my router is 192.168.1.254 (these are the settings I always use)
Code:
localhost / # cat /etc/conf.d/net
config_eth0=( "192.168.1.199 netmask 255.255.255.0" )
routes_eth0=( "default via 192.168.1.254" )

mabye im missing something?

Code:
cat /etc/resolv.conf
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
domain WAG160N
nameserver 213.94.190.194
nameserver 213.94.190.236
# /etc/resolv.conf.tail can replace this line

I've checked and these are the correct nameservers for my provider.When I comment out the lines in /etc/conf.d/net, dhcp starts without any problems
Thanks for any help, this is driving me crazy as i've had a static ip on my previous gentoo install a few years ago which I set up with no problems

cheers,

Mark


Last edited by markisthejob on Thu Feb 24, 2011 4:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Thu Feb 24, 2011 4:24 pm    Post subject: Reply with quote

Just try the following.

config_eth0=( "192.168.1.199" )
routes_eth0=( "default via 192.168.1.254" )
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Thu Feb 24, 2011 4:37 pm    Post subject: Reply with quote

This
Code:
routes_eth0=( "default via 192.168.1.254" )
doesn't look right

The router/gateway address is usually 192.168.1.1, unless you've manually changed it.
I see from a follow on post that that is your IP - so disregard this

When you uncomment the lines in net, can you "ping 192.168.1.254" and does it respond?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland


Last edited by Anon-E-moose on Thu Feb 24, 2011 4:39 pm; edited 2 times in total
Back to top
View user's profile Send private message
markisthejob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2008
Posts: 143
Location: Cork, Republic of Ireland

PostPosted: Thu Feb 24, 2011 4:37 pm    Post subject: Reply with quote

Hi and thanks for the reply, ive made the changes you suggested
Code:
localhost / # cat /etc/conf.d/net
config_eth0=( "192.168.1.199" )
routes_eth0=( "default via 192.168.1.254" )


unfortunately I still have no internet connectivity.

I dont know if its any help but when dhcp starts the output is:
Code:
/etc/init.d/net.eth0 restart
 * Caching service dependencies ...
 *  Cannot add provide 'net', as a service with the same name exists!     [ ok ]
 * Unmounting network filesystems ...                                     [ ok ]
 * Stopping eth0
 *   Bringing down eth0
 *     Shutting down eth0 ...                                             [ ok ]
 * Starting eth0
 *   Configuration not set for eth0 - assuming DHCP
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...
dhcpcd[22834]: version 5.2.8 starting
dhcpcd[22834]: eth0: waiting for carrier
dhcpcd[22834]: eth0: carrier acquired
dhcpcd[22834]: eth0: rebinding lease of 192.168.1.104
dhcpcd[22834]: eth0: acknowledged 192.168.1.104 from 192.168.1.254
dhcpcd[22834]: eth0: checking for 192.168.1.104
dhcpcd[22834]: eth0: leased 192.168.1.104 for 86400 seconds
dhcpcd[22834]: forked to background, child pid 22863                      [ ok ]
 *       eth0 received address 192.168.1.104/24
 * Mounting network filesystems ...             
Back to top
View user's profile Send private message
markisthejob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2008
Posts: 143
Location: Cork, Republic of Ireland

PostPosted: Thu Feb 24, 2011 4:39 pm    Post subject: Reply with quote

Yes I did manually change the router address as I had an older router with this address and It just seemed easier to keep it the same.Ive used these settings with arch and they worked fine.
Code:
ping 192.168.1.254ping 192.168.1.254
PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
64 bytes from 192.168.1.254: icmp_req=1 ttl=64 time=0.745 ms
64 bytes from 192.168.1.254: icmp_req=2 ttl=64 time=0.670 ms
64 bytes from 192.168.1.254: icmp_req=3 ttl=64 time=0.628 ms
64 bytes from 192.168.1.254: icmp_req=4 ttl=64 time=0.665 ms
64 bytes from 192.168.1.254: icmp_req=5 ttl=64 time=0.678 ms
64 bytes from 192.168.1.254: icmp_req=6 ttl=64 time=0.674 ms
64 bytes from 192.168.1.254: icmp_req=7 ttl=64 time=0.673 ms
64 bytes from 192.168.1.254: icmp_req=8 ttl=64 time=0.656 ms
64 bytes from 192.168.1.254: icmp_req=9 ttl=64 time=0.679 ms
64 bytes from 192.168.1.254: icmp_req=10 ttl=64 time=0.648 ms
64 bytes from 192.168.1.254: icmp_req=11 ttl=64 time=0.672 ms
64 bytes from 192.168.1.254: icmp_req=12 ttl=64 time=0.670 ms
64 bytes from 192.168.1.254: icmp_req=13 ttl=64 time=0.667 ms
64 bytes from 192.168.1.254: icmp_req=14 ttl=64 time=0.649 ms
64 bytes from 192.168.1.254: icmp_req=15 ttl=64 time=0.665 ms
^X64 bytes from 192.168.1.254: icmp_req=16 ttl=64 time=0.657 ms
PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
64 bytes from 192.168.1.254: icmp_req=1 ttl=64 time=0.745 ms
64 bytes from 192.168.1.254: icmp_req=2 ttl=64 time=0.670 ms
64 bytes from 192.168.1.254: icmp_req=3 ttl=64 time=0.628 ms
64 bytes from 192.168.1.254: icmp_req=4 ttl=64 time=0.665 ms
64 bytes from 192.168.1.254: icmp_req=5 ttl=64 time=0.678 ms
64 bytes from 192.168.1.254: icmp_req=6 ttl=64 time=0.674 ms
64 bytes from 192.168.1.254: icmp_req=7 ttl=64 time=0.673 ms
64 bytes from 192.168.1.254: icmp_req=8 ttl=64 time=0.656 ms
64 bytes from 192.168.1.254: icmp_req=9 ttl=64 time=0.679 ms
64 bytes from 192.168.1.254: icmp_req=10 ttl=64 time=0.648 ms
64 bytes from 192.168.1.254: icmp_req=11 ttl=64 time=0.672 ms
64 bytes from 192.168.1.254: icmp_req=12 ttl=64 time=0.670 ms
64 bytes from 192.168.1.254: icmp_req=13 ttl=64 time=0.667 ms
64 bytes from 192.168.1.254: icmp_req=14 ttl=64 time=0.649 ms
64 bytes from 192.168.1.254: icmp_req=15 ttl=64 time=0.665 ms
^X64 bytes from 192.168.1.254: icmp_req=16 ttl=64 time=0.657 ms


Last edited by markisthejob on Thu Feb 24, 2011 4:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Thu Feb 24, 2011 4:42 pm    Post subject: Reply with quote

Can you "ping 192.168.1.199"

with the config and route lines uncommented.


Edit to add: and what does "route -n" return
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
markisthejob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2008
Posts: 143
Location: Cork, Republic of Ireland

PostPosted: Thu Feb 24, 2011 4:45 pm    Post subject: Reply with quote

Yes, When I can ping the router @ 192.168.1.254 with the with the uncommented net file, yet I still can't browse the net.

I've just realised that transmission will download a torrent with these settings but opera and firefox "cannot connect to server"
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Thu Feb 24, 2011 4:45 pm    Post subject: Reply with quote

If you can ping the 192.168.1.254 router as you have shown then I wonder is there may be a internet connectivity issue?
What happens when you ping google.com or try pinging this google ip address also
ping 209.85.143.99
Back to top
View user's profile Send private message
markisthejob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2008
Posts: 143
Location: Cork, Republic of Ireland

PostPosted: Thu Feb 24, 2011 4:49 pm    Post subject: Reply with quote

I can't ping www.google.com but I can ping 209.85.143.99
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Thu Feb 24, 2011 4:50 pm    Post subject: Reply with quote

DNS issue :wink:

Change your resolf.conf DNS settings to point to the router ip
Back to top
View user's profile Send private message
markisthejob
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2008
Posts: 143
Location: Cork, Republic of Ireland

PostPosted: Thu Feb 24, 2011 4:57 pm    Post subject: Reply with quote

Thats sorted it :D

I didnt think to change it to the router address as dhcp was using the dns addresses

Thanks a million
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum