LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-16-2007, 07:40 AM   #1
linux_related
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Rep: Reputation: 0
How to set up static IP/Broadband Router on CentOS to use Internet?


My configuration is simple.
ISP cable box -> Broadband Router (IP: 192.168.0.1) -> 2 PCs.
One PC is running Windows XP with DHCP -- no problem connecting to Internet. The other PC is CentOS 4.5 64-bit. On this box, if I configure DHCP, I can connect Internet easily but when trying to configure with Static IP -- it's not working (I just can ping to 192.168.0.1 but no traceroute or anything else). I tried all possile avenues & can't make it working. Can somebody please tell what I need to do set up this Static IP.
The IP address of my CentOS box I want is 194.170.3.104.
Thanks a lot.
 
Old 09-16-2007, 07:59 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
To use the 194 address the router has to provide addresses in that range. By default most home routers provide 192 addresses instead which is why you see those when you do DHCP.

To use 194 you'd either have to configure the router itself to provide the 194 address OR have it simply be a pass through to the ISP who would then have to provide the 194 address.

P.S. A lot of folks do change their routers not to use 192 addresses if possible because since that is a known "default" hackers that find there way into your router can easily guess the addresses of attached PCs.
 
Old 09-16-2007, 08:27 AM   #3
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
sorry...misunderstood the problem..

you are trying to put ip 194.170.3.104 ..? where ?..

Last edited by soroccoheaven; 09-16-2007 at 08:37 AM.
 
Old 09-16-2007, 09:01 AM   #4
linux_related
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Some information about my system

Appliction -> System Setings -> Network ->
Network Configuration

Ethernet Device (for eth0)

Statically set IP addresses
Address: 194.170.3.104
Subnet mask: 255.255.255.0
Default gateway address: 192.168.0.1

Route (also tried without configuring it)

Destination network: 192.168.0.0 (also tried with 194.170.3.0)
Prefix (Netmask): 255.255.255.0
Gateway: 192.168.0.1


The file /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.0.255
HWADDR=00:0b:db:e7:1d:81
IPADDR=194.170.3.104
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
GATEWAY=192.168.0.1
USERCTL=no
IPV6INIT=no
PEERDNS=yes

The file /etc/network

NETWORKING=yes
HOSTNAME=linxdell

The file /etc/resolv.conf

nameserver 194.170.3.104
nameserver 127.0.0.1

THe file /etc/hosts

127.0.0.1 localhost.localdomain localhost
194.170.3.104 linxdell.systems.com linxdell linxdell

Output of route:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
194.170.3.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 et

Output of ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:0BB:E7:1D:81
inet addr:194.170.3.104 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20b:dbff:fee7:1d81/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:202 errors:0 dropped:0 overruns:0 frame:0
TX packets:130 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44368 (43.3 KiB) TX bytes:8476 (8.2 KiB)
Interrupt:11

Do I really need to change mu machin'es IP to 192.168.....?

Thanks a lot for all your help.
 
Old 09-16-2007, 09:15 AM   #5
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
you can not use IP 194.170.3.104 with this 192.168.0.0 network which is configured in your router ..any reason behind why you are trying to put 194.170.3.104 to eth0 ?
 
Old 09-16-2007, 09:17 AM   #6
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
else @jlightner
Quote:
To use the 194 address the router has to provide addresses in that range. By default most home routers provide 192 addresses instead which is why you see those when you do DHCP.
so configure your router accordingly.
 
Old 09-16-2007, 10:20 AM   #7
linux_related
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Changed IP address but still problem ....

I changed my machine's IP to 192.168.0.104, configured Network/Route -- recycled the box but still can't connect (I need Static IP -- not DHCP)! Any help will be highly appreciated.
Some latest information (if need more, I will provide).



Output of 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
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0


Output of traceroute 192.168.0.1:

traceroute to 192.168.0.1 (192.168.0.1), 30 hops max, 38 byte packets
1 192.168.0.1 (192.168.0.1) 1.444 msIcmp checksum is wrong
Icmp checksum is wrong
0.528 ms 0.498 ms

The file /etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0b:db:e7:1d:81
IPADDR=192.168.0.104
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
GATEWAY=192.168.0.1
USERCTL=no
IPV6INIT=no
PEERDNS=yes

The file /etc/hosts:
127.0.0.1 localhost.localdomain localhost
192.168.0.104 linxdell.systems.com linxdell linxdell



THanks for your help.
 
Old 09-16-2007, 10:29 AM   #8
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0b:db:e7:1d:81
IPADDR=192.168.0.104
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
GATEWAY=192.168.0.1
USERCTL=no
IPV6INIT=no
PEERDNS=yes

..make bootproto=static
and where is BROADCAST= ??
add BROADCAST=192.168.0.255
after editing dont forget to run command service network restart or /etc/init.d/network restart

Last edited by soroccoheaven; 09-16-2007 at 10:40 AM.
 
Old 09-16-2007, 10:43 AM   #9
linux_related
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Still not working!!

Application -> System Setings -> Network ->
Network Configuration

Ethernet Device (for eth0)
Statically set IP address
Address: 192.168.0.104
Subnet mask: 255.255.255.0
Default gateway address: 192.168.0.1

Route

Destination network: 192.168.0.0
Prefix (Netmask): 255.255.255.0
Gateway: 192.168.0.1

The file /etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.104
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
ONBOOT=yes
TYPE=Ethernet
GATEWAY=192.168.0.1
USERCTL=no
IPV6INIT=no
PEERDNS=yes
HWADDR=00:0b:db:e7:1d:81


Output of ifconfig eth0:

eth0 Link encap:Ethernet HWaddr 00:0BB:E7:1D:81
inet addr:192.168.0.104 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20b:dbff:fee7:1d81/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:403 errors:0 dropped:0 overruns:0 frame:0
TX packets:835 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:227361 (222.0 KiB) TX bytes:105492 (103.0 KiB)
Interrupt:11

Output of traceroute 192.168.0.1:
traceroute to 192.168.0.1 (192.168.0.1), 30 hops max, 38 byte packets
1 linxdell (192.168.0.104) 3000.444 ms !H 192.168.0.1 (192.168.0.1) 1001.723 msIcmp checksum is wrong
Icmp checksum is wrong
0.530 ms



I sincerely appreciate all your responses. THanks.
 
Old 09-16-2007, 10:48 AM   #10
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
try ping 192.168.0.1
 
Old 09-16-2007, 10:53 AM   #11
linux_related
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Original Poster
Rep: Reputation: 0
ping & traceroute

ping works fine but traceroute (both on 192.168.0.1) gives "Icmp checksum is wrong"
I am really baffled but appreciate your patience & help.
 
Old 09-16-2007, 10:56 AM   #12
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
what about browsing ?

try traceroute -I 192.168.0.1 and post you ping and traceroute outputs
 
Old 09-16-2007, 11:09 AM   #13
linux_related
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Original Poster
Rep: Reputation: 0
ping & traceroute outputs (browsing doesn't work -- can't find the server)

ping 192.168.0.1

PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=0 ttl=255 time=0.493 ms
64 bytes from 192.168.0.1: icmp_seq=1 ttl=255 time=0.486 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=255 time=0.484 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=255 time=0.480 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=255 time=0.486 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=255 time=0.480 ms

traceroute -I 192.168.0.1

traceroute to 192.168.0.1 (192.168.0.1), 30 hops max, 38 byte packets
1 192.168.0.1 (192.168.0.1) 0.517 msIcmp checksum is wrong
Icmp checksum is wrong
0.497 ms 0.422 ms

http://www.yahoo.com

Server not found
Firefox can't find the server at www.yahoo.com.

* Check the address for typing errors such as ww.example.com instead of www.example.com
* If you are unable to load any pages, check your computer's network connection.
* Ifputer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.


Note: All these problem are happening when trying to use STATIC IP. If I use DHCP, there is no problem but I want to use STATIC IP for several reasons. Thanks.
 
Old 09-16-2007, 11:16 AM   #14
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
and what about traceroute linuxquestions.org

be sure to put nameserver ipof_your_dns in /etc/resolv.conf

I think is it is related with firewall disable it and see

Last edited by soroccoheaven; 09-16-2007 at 11:22 AM.
 
Old 09-16-2007, 11:18 AM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You need to add your ISP's DNS addresses to /etc/resolv.

Another thing you can do is to configure your dhcp client to tell the server what IP address you should give your interface. The other values like /etc/resolve and the gateway address will be provided automatically then.

Last edited by jschiwal; 09-16-2007 at 11:19 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Have internet connection, but router doesn't 'see' me after switching to static IP Ariox Ubuntu 4 05-06-2007 03:30 PM
How do I set upBSNL Broadband with a USB router? savio_mit_glug Linux - Networking 4 12-02-2005 10:24 AM
internet router for multiple static ips shizzilla Linux - Networking 3 11-23-2005 11:20 PM
compusa 4 port 10\100 switch internet cable\dsl broadband router mcslinux Linux - Networking 1 11-22-2003 08:29 PM
telewest broadband internet connection/router and SuSE 8.2 solar_neutrino Linux - Networking 2 10-07-2003 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration