Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setup 2 different network in one linux box



Oops. I replied to Dave without replying to the entire list. :) This 
corrects that.

Dave Peters wrote:

> Hi all,
> 
> One of my friend needs help.
> Here is the case:
> he needs to setup a redhat9.0 linux box with two
> different subnet.
> eth0 192.168.1.200
> eth1 10.1.1.100
> so eth0 can talk to 192.168.X.X subnet and eth1 can
> talk to 10.1.X.X.
> I have no ideal how this can be setup because they
> have 2 different gateway 192.168.1.2 and 10.1.1.2
> Any help are very appreciated.
> 
> DP

To give a complete answer, we need to know the following:

- Default gateway IP address(es) (i.e., how he can get to the global
internet, if at all)

- Netmask for the 10.1.1.100 network

- Netmask for the 192.168.1.200 network

If we can assume that both networks are /24's, e.g. a netmask of
255.255.255.0, then he should set up the following:

In /etc/sysconfig/network-scripts/ifcfg-eth0:
---
DEVICE=eth0
BOOTPROTO=
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no
IPADDR=192.168.1.200
BROADCAST=192.168.1.255
NETMASK=255.255.255.0
GATEWAY=[i don't know; he will have to put this in]
---
In /etc/sysconfig/network-scripts/ifcfg-eth1:
---
DEVICE=eth1
BOOTPROTO=
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no
IPADDR=10.1.1.100
BROADCAST=10.1.1.255
NETMASK=255.255.255.0
GATEWAY=[i don't know; he will have to put this in]
---

Once we know the gateway, I can specify the proper 'route add' syntax.

-- 
Dwight A. Ernest, dwight at significant dot com.     KA2CNN
Cell: +1-508-523-1416  FAX: +1-978-405-2504 YIM: dwight_ernest
Papa, partner, pilot, net geek, sysadmin, consultant, cohouser.
Red Hat (Linux) Certified Engineer (RHCE) #803004293310030






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org