Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-14-2010, 08:05 AM   #1
LQ Newbie
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
Unhappy hi, how to connect two different ip classes in lan in linux.

in our lan connection setup. having and how do i connected intermediately. server are RHEL5. Kindly help to setup.
Old 06-14-2010, 08:23 AM   #2
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
You need a router to connect 2 networks.
0 members found this post helpful.
Old 06-14-2010, 08:31 AM   #3
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,443
Blog Entries: 15

Rep: Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439Reputation: 1439
You have to create a static route.

Whichever one is on eth0 should be your "default route" (the one you list as "GATEWAY=" in /etc/sysconfig/network.) This would typically be the IP to the router/switch.

You then setup a route for your secondary card (e.g. eth1) in /etc/sysconfig/network-scripts in a route-<device> file (e.g. route-eth1).
In that file you would need:

Where GATEWAY0 is the IP of the switch/router that the second network's IP goes to and NETMASK is appropriate to your /24 network. ADDRESS0 is the IP range you want.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 connect a pc with xp to a computer with linux using lan lyonm Linux - Networking 1 04-13-2009 02:42 PM
how to connect linux pc with xp pc through lan? hridyesh Linux - Newbie 3 12-24-2008 12:23 AM
Linux unable to connect to my new home LAN tallmtt Linux - Networking 5 03-07-2008 02:11 PM
how to connect 2 different LAN using linux router madm21 Linux - Networking 2 09-14-2007 01:30 AM
No Internet but LAN and VPN connect LAN work fine??? xavior SUSE / openSUSE 7 11-09-2005 01:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:34 PM.

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