Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

linux router

Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2004, 05:37 AM
Default linux router



I am trying to network my SuSE Linux 9.1 machine and an ibook with mac
OS X version 10.2.8. The linux box is behind a cable modem and is
hooked up to the modem via eth1 and the laptop is hooked up through a
switch to eth0. I have made changes to /etc/sysconfig/sysctl,
IP_FORWARD="yes", and /proc/sys/net/ipv4/ip_forward, 1. route -vn
gives this:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref
Use Iface
12.216.158.0 0.0.0.0 255.255.255.0 U 0 0
0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0
0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0
0 lo
0.0.0.0 12.216.158.1 0.0.0.0 UG 0 0
0 eth1

Both ethernet interfaces are activated. eth1 (connected to the cable
modem) boots DHCP and automatic. eth0 boots static and manual. The
modem's ip is 12.216.158.1, eth1 12.216.158.156, eth0 192.168.0.254,
laptop 192.168.0.1. All interfaces are active, ifconfig on the linux
box gives:

eth0 Link encap:Ethernet HWaddr 00:04:5A:54:E7:FE
inet addr:192.168.0.254 Bcast:192.168.0.255
Mask:255.255.255.0
inet6 addr: fe80::204:5aff:fe54:e7fe/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:49 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:6 dropped:0 overruns:0 carrier:12
collisions:0 txqueuelen:1000
RX bytes:3420 (3.3 Kb) TX bytes:546 (546.0 b)
Interrupt:12 Base address:0xdc00

eth1 Link encap:Ethernet HWaddr 00:04:5A:54:E8:41
inet addr:12.216.158.156 Bcast:255.255.255.255
Mask:255.255.255.0
inet6 addr: fe80::204:5aff:fe54:e841/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500
Metric:1
RX packets:355907 errors:0 dropped:0 overruns:0 frame:0
TX packets:86954 errors:0 dropped:0 overruns:0 carrier:0
collisions:425 txqueuelen:1000
RX bytes:156438156 (149.1 Mb) TX bytes:9298630 (8.8 Mb)
Interrupt:5 Base address:0xe000
....

and the laptop indicates it's active as well. I am not sure how to
use route to display the routing table for the laptop but netstat -r
seems to give me what I'm looking for. But I am not sure what should
and what should not be there. But I know this, the default gateway is
192.168.0.254.

iptables -L gives this (right now thought i have tried many things and
have no idea what's wrong):

Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 12-216-158-1.client.mchsi.com 192.168.0.1

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere

I am running the default linux kernel and I checked /proc/config.gz
and the kernel should have routing enables; zcat /proc/config.gz
|fgrep ROUTE:

CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_ROUTE_FWMARK=y
CONFIG_IP_ROUTE_NAT=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_TOS=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_MROUTE=y

It seems as though everything is enables in the default kernel.

Any help would be very appreciated. I am new at this (never networked
before) so I don't really know what I'm doing.

Thanks!

Jordan


Jordan Fleming
Reply With Quote
  #2  
Old 07-26-2004, 03:36 PM
David Efflandt
Guest
 
Posts: n/a
Default Re: linux router

On 25 Jul 2004 21:37:56 -0700, Jordan Fleming <(E-Mail Removed)> wrote:
> I am trying to network my SuSE Linux 9.1 machine and an ibook with mac
> OS X version 10.2.8. The linux box is behind a cable modem and is
> hooked up to the modem via eth1 and the laptop is hooked up through a
> switch to eth0. I have made changes to /etc/sysconfig/sysctl,
> IP_FORWARD="yes", and /proc/sys/net/ipv4/ip_forward, 1. route -vn
> gives this:
>
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref
> Use Iface
> 12.216.158.0 0.0.0.0 255.255.255.0 U 0 0
> 0 eth1
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0
> 0 eth0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0
> 0 lo
> 0.0.0.0 12.216.158.1 0.0.0.0 UG 0 0
> 0 eth1


You forgot to say what is, or is not, working. Can the Mac reach Linux?
If so, but it cannot reach internet, you likely just need to configure
/etc/sysconfig/SuSEfirewall2 to masquerade your LAN as your public IP.
The internet is not going to know how to route private 192.168.x.x
addresses.


> Both ethernet interfaces are activated. eth1 (connected to the cable
> modem) boots DHCP and automatic. eth0 boots static and manual. The
> modem's ip is 12.216.158.1, eth1 12.216.158.156, eth0 192.168.0.254,
> laptop 192.168.0.1. All interfaces are active, ifconfig on the linux
> box gives:
>
> eth0 Link encap:Ethernet HWaddr 00:04:5A:54:E7:FE
> inet addr:192.168.0.254 Bcast:192.168.0.255
> Mask:255.255.255.0
> inet6 addr: fe80::204:5aff:fe54:e7fe/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:49 errors:0 dropped:0 overruns:0 frame:0
> TX packets:7 errors:6 dropped:0 overruns:0 carrier:12
> collisions:0 txqueuelen:1000
> RX bytes:3420 (3.3 Kb) TX bytes:546 (546.0 b)
> Interrupt:12 Base address:0xdc00
>
> eth1 Link encap:Ethernet HWaddr 00:04:5A:54:E8:41
> inet addr:12.216.158.156 Bcast:255.255.255.255
> Mask:255.255.255.0
> inet6 addr: fe80::204:5aff:fe54:e841/64 Scope:Link
> UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500
> Metric:1
> RX packets:355907 errors:0 dropped:0 overruns:0 frame:0
> TX packets:86954 errors:0 dropped:0 overruns:0 carrier:0
> collisions:425 txqueuelen:1000
> RX bytes:156438156 (149.1 Mb) TX bytes:9298630 (8.8 Mb)
> Interrupt:5 Base address:0xe000
> ...
>
> and the laptop indicates it's active as well. I am not sure how to
> use route to display the routing table for the laptop but netstat -r
> seems to give me what I'm looking for. But I am not sure what should
> and what should not be there. But I know this, the default gateway is
> 192.168.0.254.
>
> iptables -L gives this (right now thought i have tried many things and
> have no idea what's wrong):
>
> Chain INPUT (policy ACCEPT)
> target prot opt source destination
> ACCEPT all -- anywhere anywhere
>
> Chain FORWARD (policy ACCEPT)
> target prot opt source destination
> ACCEPT all -- 12-216-158-1.client.mchsi.com 192.168.0.1
>
> Chain OUTPUT (policy ACCEPT)
> target prot opt source destination
> ACCEPT all -- anywhere anywhere
>
> I am running the default linux kernel and I checked /proc/config.gz
> and the kernel should have routing enables; zcat /proc/config.gz
>|fgrep ROUTE:
>
> CONFIG_IP_ADVANCED_ROUTER=y
> CONFIG_IP_ROUTE_FWMARK=y
> CONFIG_IP_ROUTE_NAT=y
> CONFIG_IP_ROUTE_MULTIPATH=y
> CONFIG_IP_ROUTE_TOS=y
> CONFIG_IP_ROUTE_VERBOSE=y
> CONFIG_IP_MROUTE=y
>
> It seems as though everything is enables in the default kernel.
>
> Any help would be very appreciated. I am new at this (never networked
> before) so I don't really know what I'm doing.
>
> Thanks!
>
> Jordan

Reply With Quote
Reply

Tags
linux, router

Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:09 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.