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 02-01-2002, 04:43 AM   #1
kjelle
LQ Newbie
 
Registered: Feb 2002
Distribution: redhat
Posts: 6

Rep: Reputation: 0
Question Linux Router problem


Hi everyone!
I'm trying to connect two networks togheter with a linux server(redhat7.2).
To do this i did the following on the gateway.
1. installed 2 nics(3com card), linux founds them(dmesg | grep eth)

2. edited /etc/sysconfig/network

NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=gw.test.domain.se
DOMAINNÄME=test.domain.se
GATEWAY=192.168.110.1

3.echo 1 > /proc/sys/net/ipv4/ip_forward

4. edited /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=192.168.110.96
NETMASK=255.255.255.0
NETWORK=192.168.110.0
BROADCAST=192.168.110.255
ONBOOT=yes

5. edited
DEVICE=eth1
IPADDR=192.168.111.1
NETMASK=255.255.255.0
NETWORK=192.168.111.0
BROADCAST=192.168.111.255
ONBOOT=yes

6.restared the interfaces
ifdown eth0
ifup eth0
ifdown eth1
ifup eth1

To do this i did the following on the clients of the subnetted net

7. edited /etc/sysconfig/network
NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=gw.test.domainn.se
DOMAINNÄME=test.domainn.se
GATEWAY=192.168.111.1
GATEWAYDEV=eth0


8.echo 1 > /proc/sys/net/ipv4/ip_forward

9 edited /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=192.168.111.2
NETMASK=255.255.255.0
NETWORK=192.168.1110
BROADCAST=192.168.111255
ONBOOT=yes


10.startat om interfacet med
ifdown eth0
ifup eth0

And this is were i am now.
I can ping the internet and the 192.168.111 net

I cannot ping 192.168.111.2 from 192.168.110.1

I cannot ping 192.168.110.1 from 192.168.111.2
but I can ping all configured host on the 192.168.111.0 net
from the 192.168.111.0 net



mvh
Anders
 
Old 02-02-2002, 04:47 PM   #2
rusty
LQ Newbie
 
Registered: Feb 2002
Location: Twin Cities Metro Area
Distribution: Debian and Mandrake
Posts: 8

Rep: Reputation: 0
last steps in routing...

In step 9, you appear to have ommited periods on the network and broadcast errors. There is a vast difference between 1110 and 111.0 in the ip scheme of things. 1110 will map to 4.90, which does not fit in the netmask.

In any case, you will need to add a routing statement on your default gateway machine in your 192.168.110.0 network. This will look like:

route add -net 192.168.111.0 gw 192.168.110.96

Note that this is not set up on 192.168.110.96, if your default gateway to the internet is for example 192.168.110.1, then that device needs to have the 'route add...' statement set up.

Alternatively if there are only a few devices in the 192.168.110.0 network that need to talk to devices in the 192.168.111.0 network those could be set up with the 'route add...' statement. In this case I am not sure how to set up a windows9x machine. For these machines you will need to have the route set up on their default gateway.

-Rusty
 
Old 02-04-2002, 07:32 AM   #3
kjelle
LQ Newbie
 
Registered: Feb 2002
Distribution: redhat
Posts: 6

Original Poster
Rep: Reputation: 0
Thumbs up

ahhh. of course.
This solved my problem. Thanks!!
//Anders
 
  


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
linux router problem dawn_angel Linux - Networking 7 02-07-2005 02:26 PM
Slow Linux router problem e88z4 Linux - Networking 3 01-03-2005 03:14 PM
Linux Router problem makapacs Linux - Networking 3 07-01-2004 03:11 AM
Linux Router Hardware problem TooToon Linux - Hardware 4 02-20-2004 03:50 AM
linux router problem(HELP ME OUT) bally Linux - Networking 5 06-21-2002 08:26 AM

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

All times are GMT -5. The time now is 08:57 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