The network configuration
You need to network interfaces in the router. One has to be connected with the modem (eth0=GATEWAY to the Internet) and the other one (eth1) has to connected to internal network . In the example-configuration I use the networkrange 192.168.20.x for the
network-configuration. The router gets the IPADDR 192.168.20.1 (=eth0) and 192.168.20.5 (=eth1). The internet connection will be established with a modem. To reduce error-sources, we edit the config-files directly.
I use vi as editor. Feel free to use anotherone.
log in as root at the router.
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVIVE=eth0
BOOTPROTO=static
BROADCAST=192.168.20.255
IPADDR=192.168.20.1
NETMASK=255.255.255.0
NETWORK=192.168.20.0
ONBOOT=yes
in the same way :
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVIVE=eth1
BOOTPROTO=static
BROADCAST=192.168.20.255
IPADDR=192.168.20.5
NETMASK=255.255.255.0
NETWORK=192.168.20.0
ONBOOT=yes
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=thisisthename
FORWARD_IPV4=true ########### only seen at mandrake
if there is a GATEWAY-Entry, comment it out #.
service network restart
restart network, with the new confihuration.
./ifconfig
shows the actual nw-configuration.
delete the default route:
/sbin/route del default
client-configuration :
Linux:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.20.50
NETMASK=255.255.255.0
GATEWAY=192.168.20.5
check the following file :
more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=another
GATEWAY=192.168.20.5
service network restart
./ifconfig
Windows :
Properties NW-Environment --> TCP/IP NW-Interface :
IP-Address: 192.168.20.50
Gateway : 192.168.20.5
DNS: 194.25.2.129 you may have another ip-address
Domain: t-online.de you may have another one
and of course - reboot !
test the network :
ping -c5 192.168.20.1
ping -c5 192.168.20.5
ping -c5 192.168.20.50
===> Connect to ISP