View previous topic :: View next topic |
Author |
Message |
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Wed Dec 29, 2004 11:13 pm Post subject: Setting up static ip [SOLVED] |
|
|
I have been trying to use a static address and my ISP says I have one.Here is what I get after dhcpcd eth0 but it takes a long time,and I have to do it a few times. Code: |
gentoo david :/home/david# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:F1:E4:80:F6
inet addr:192.168.1.97 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::20c:f1ff:fee4:80f6/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1839289 errors:0 dropped:0 overruns:0 frame:0
TX packets:1357373 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2367343230 (2257.6 Mb) TX bytes:97935232 (93.3 Mb)
gentoo david :/home/david# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default launchmodem 0.0.0.0 UG 0 0 0 eth0 |
I have tried this in /etc/conf.d/net
Code: | (For static IP)
iface_eth0="192.168.1.97 broadcast 255.255.255.255 netmask 255.255.255.0"
gateway="eth0/192.168.1.0"
| What am I doing wrong? _________________ http://dev.gentoo.org/~dabbott/
Last edited by comprookie2000 on Fri Dec 31, 2004 9:48 pm; edited 1 time in total |
|
Back to top |
|
|
deflin39 Tux's lil' helper
Joined: 06 Jun 2004 Posts: 105 Location: /dev/BIYJ
|
Posted: Wed Dec 29, 2004 11:28 pm Post subject: |
|
|
Are you using a router?
deflin39 _________________ The musicians today, who don't do drugs, and in fact speak out against it-"We're rockers against drugs"-boy, they suck. Suck. Ball-less, soul-less, spirit-less, corporate little bitches, suckers of Satan's cock, each and every one of themBillHicks |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
|
Back to top |
|
|
deflin39 Tux's lil' helper
Joined: 06 Jun 2004 Posts: 105 Location: /dev/BIYJ
|
Posted: Wed Dec 29, 2004 11:36 pm Post subject: Re: Setting up static ip |
|
|
comprookie2000 wrote: | I have been trying to use a static address and my ISP says I have one.Here is what I get after dhcpcd eth0 |
Why are you trying to dhcp if you have a static IP address? Just plug in the numbers your ISP has provided into /etc/conf.d/net and restart /etc/init.d/net.eth0
deflin39 _________________ The musicians today, who don't do drugs, and in fact speak out against it-"We're rockers against drugs"-boy, they suck. Suck. Ball-less, soul-less, spirit-less, corporate little bitches, suckers of Satan's cock, each and every one of themBillHicks |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Wed Dec 29, 2004 11:45 pm Post subject: |
|
|
Because the numbers they provided don't seem to work and they have no clue about linux,I'm doing something wrong or the numbers are wrong.I'm going to ask them the numbers again.This is my first time setting up a static ip so I have no clue except for the doc's and some help from the nice people on this forum. _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Thu Dec 30, 2004 2:50 am Post subject: |
|
|
O.K. now they say Your static ip is - 65.12.210.216 How do I configure this,thanks _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
popcan n00b
Joined: 27 Nov 2004 Posts: 33 Location: bath, ny
|
Posted: Thu Dec 30, 2004 3:10 am Post subject: |
|
|
i have one of those westell dsl modems too, but it's really a NAT router
if you want to have your pc be directly on the internet, without the modem managing the firewall, you have to use the web interface for the modem to set up the single static ip configuration. so open up your browser and go to http://launchmodem and turn on the static ip (it should be in the configuration drop down menu if you have the same model i do). |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Thu Dec 30, 2004 3:30 am Post subject: |
|
|
No launchmodem not found, here is my /etc/resolv.conf
Code: | nameserver 192.168.1.254
nameserver 192.168.1.254
search launchmodem.com
domain tux
|
Should I just keep doing it the way I have been and forget about the static address? _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
popcan n00b
Joined: 27 Nov 2004 Posts: 33 Location: bath, ny
|
Posted: Thu Dec 30, 2004 3:49 am Post subject: |
|
|
i saw launchmodem was your default gateway from the route output you posted before, odd that it didn't find it. can you get on the internet at all? judging from the resolv.conf the modem's ip should be 192.168.1.254, so try to browse to that |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Thu Dec 30, 2004 4:27 am Post subject: |
|
|
I'm connected with dhcp, most times I do
to get connected, just was trying to set-up a static set-up, here is what I get from the modem;
DSL
Up
Connection
Up
User ID
abbottdavid@bellsouth.net
IP Address
65.12.210.216
IP Gateway
65.14.252.17
Primary DNS
205.152.144.23
dns.mia.bellsouth.net
Secondary DNS
205.152.132.23
dns.msy.bellsouth.net
thanks _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
Keyed Tux's lil' helper
Joined: 26 Jul 2002 Posts: 135 Location: Tennessee
|
Posted: Thu Dec 30, 2004 4:41 am Post subject: |
|
|
I have the Westell ethernet modem with bellsouth also. Before i put in my router, I used rp-pppoe for my connection even after I changed to the static ip and it worked like a charm. _________________ Windows is not a virus: Viruses are well supported by their authors, are running on most systems, their program code is fast, compact and efficient and they tend to become more sophisticated as they mature. |
|
Back to top |
|
|
popcan n00b
Joined: 27 Nov 2004 Posts: 33 Location: bath, ny
|
Posted: Thu Dec 30, 2004 10:51 pm Post subject: |
|
|
you have a static ip from your isp. the modem acts as a router at the same time and that's what it uses to get online. the modem also has dhcp/dns services, which is what your computer attached behind it actually sees, and gets its address from.
if you want you can set gentoo up to use a static ip to communicate with the modem, which has the static ip from your isp. so to people on the outside, your ip address will always be 65.12.210.216, but you can set your local ip address in /etc/conf.d/net to something like 192.168.1.5 and set the gateway and resolv.conf information to 192.168.1.254 (the modem's internal ip)
it's just a matter of personal preference, since the modem is all your isp sees |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Fri Dec 31, 2004 3:27 am Post subject: |
|
|
Thanks for the replys,I can't get it to work Code: | gentoo david :/home/david# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:F1:E4:80:F6
inet addr:192.168.1.97 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::20c:f1ff:fee4:80f6/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:196 errors:0 dropped:0 overruns:0 frame:0
TX packets:202 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:170168 (166.1 Kb) TX bytes:20538 (20.0 Kb)
| If I use these numbers it will work sometimes,I never reboot so I'm not going to worry about it,just wanted to be able to do it.I just don't seem to get it If I put another inet addr It says it is connected but it is not,then if I try ifconfig eth0 up it says network unreachable.I can allways run dhcpcd eth0 but it takes awhile or I have to redo it a few times to get connected.thanks again _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
DarKRaveR Guru
Joined: 11 Oct 2003 Posts: 500 Location: Old Europe/G-Many
|
Posted: Fri Dec 31, 2004 7:23 am Post subject: |
|
|
Code: | inet addr:192.168.1.97 Bcast:255.255.255.255 Mask:255.255.255.0
|
Humm, setting the broadcast adress for your adapter to the whole internet (or actually all networks) seems a little odd idea, esp, when your netmask ist /24
Bcast should rather read 192.168.1.255, in case the Net-Mask is right.
Aside from that: did you setup the gateway properly (which should be your modems ip on the internal interface) ? |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Fri Dec 31, 2004 5:05 pm Post subject: |
|
|
Thanks, the modem ip is 65.12.210.216 here is the other numbers my isp gave me;
Your static ip is - 65.12.210.216
Your subnet mask is 255.255.255.255 and the default gateway is 192.168.1.2. We apologize, but we're not quite sure what you're asking for when you also askedfor the Broadcast.Should I try; Code: |
ifconfig eth0 192.168.1.97 broadcast 192.168.1.255 netmask 255.255.255.255 up
route add default gw 65.12.210.216 |
Not sure of the syntax? _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
DarKRaveR Guru
Joined: 11 Oct 2003 Posts: 500 Location: Old Europe/G-Many
|
Posted: Fri Dec 31, 2004 7:42 pm Post subject: |
|
|
ifconfig eth0 192.168.1.97 broadcast 192.168.1.255 netmask 255.255.255.255 up
route add default gw 192.168.1.2
Shoudl read like that .... I assume .... in /etc/conf.d/net
iface_eth0="192.168.1.97 broadcast 192.168.1.255 netmask 255.255.255.255"
gateway="eth0/192.168.1.2"
And restart neth.eth0 after chnign /etc/conf.d/net
good luck ..... |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Fri Dec 31, 2004 7:57 pm Post subject: |
|
|
I was going to try it manually,so I don't have to reboot to get /etc/conf.d/net to be read.Should my default gateway be my modem address 65.12.210.216 or the one they gave me,thanks again _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
DarKRaveR Guru
Joined: 11 Oct 2003 Posts: 500 Location: Old Europe/G-Many
|
Posted: Fri Dec 31, 2004 8:26 pm Post subject: |
|
|
The one they gave you, well, as soon as you edit the conf.d/net file as I described...
you can run /etc/init.d/net.eth0 restart and everything will be set up - of course you can aswell enter the command by hand |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Fri Dec 31, 2004 9:43 pm Post subject: |
|
|
popcan wrote: | you have a static ip from your isp. the modem acts as a router at the same time and that's what it uses to get online. the modem also has dhcp/dns services, which is what your computer attached behind it actually sees, and gets its address from.
if you want you can set gentoo up to use a static ip to communicate with the modem, which has the static ip from your isp. so to people on the outside, your ip address will always be 65.12.210.216, but you can set your local ip address in /etc/conf.d/net to something like 192.168.1.5 and set the gateway and resolv.conf information to 192.168.1.254 (the modem's internal ip) |
SUCCESS
Thanks DarKRaveR and popcan here is what I ended up with,I learned something today Code: | # We can also specify a broadcast
#config_eth0=( "192.168.0.2/24 brd 192.168.0.255" )
config_eth0=( "192.168.1.97 netmask 255.255.255.0 broadcast 255.255.255.255" )
gateway="eth0/192.168.1.254"
| I quess subnet mask is broadcast? from my isp
Your subnet mask is 255.255.255.255 _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
|