LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-28-2001, 07:43 PM   #1
pjrestrepo
LQ Newbie
 
Registered: Nov 2001
Location: Boulder, Colorado
Distribution: Red Hat
Posts: 10

Rep: Reputation: 0
How to specify a gateway IP address for a linux client


Hi:
I apologize for posting this thread both under the Installation and Networking forums. I realized that Networking was a more a ppropriate forum. Anyway, here is the problem:

I have been trying to setup a gateway for my network. The gateway computer is using RedHat 7.0. There are two more computers: one using RedHat 7.0 and a new one using RedHat 7.2.

RH 7.0 comes with netcfg, which allows to specify the IP address of the gateway (192.168.0.1). RH 7.2 has a different network configuration program that does not allow the user to enter that information. The RH 7.0 client computer can see the internet through the gateway without any problem. The RH 7.2 computer insists that the gateway IP is 192.168.0.254. How do I tell the RH 7.2 computer that the gateway IP address is 192.168.0.1?

Thanks for any suggestions.

Pedro
 
Old 11-30-2001, 06:26 AM   #2
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
as root type: "eth0 is the interface I picked, yours could be eth0 or eth1 depending on how many nic's you have installed"

route add default gw 192.168.0.1 eth0

route -n "this shows you the routing tables on linux"

/raz
 
Old 11-30-2001, 09:53 AM   #3
pjrestrepo
LQ Newbie
 
Registered: Nov 2001
Location: Boulder, Colorado
Distribution: Red Hat
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for responding.

I tired that and, although it did work for the current session, once I rebooted it went back to the old gateway.

I also tried editing the file /etc/sysconfig/network. That did not work either.

The final solution was to execute /usr/sbin/setup. I guess RH 7.2 keep some networking information in non-standard files.


 
Old 11-30-2001, 10:10 AM   #4
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Just add that line to the end of the /etc/rc.d/rc.local file.

/Raz
 
  


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
how to get gateway address in C under linux alqama Programming 2 04-13-2005 05:42 AM
linux ICS client with XP gateway bcal Linux - Networking 44 01-20-2005 05:38 PM
*** REVERSE DHCP - Linux assumes ip according client gateway request *** domingo-br Linux - Networking 0 07-01-2003 07:53 PM
RH Linux 7.3 (Gateway) and W2K server as client gogo Linux - Networking 7 06-24-2002 10:51 AM
Sharing an internet connection with a Linux client through a 2000 server gateway thuan Linux - Networking 1 08-02-2001 01:55 PM

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

All times are GMT -5. The time now is 07:40 AM.

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