Monday, March 19, 2012

Gateway Server Setup


Example: IP range from 192.168.1.0 to 192.168.1.31

Ethernet0 setup:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

BROADCAST=192.168.1.31

IPADDR=192.168.1.1

NETMASK=255.255.255.0

NETWORK=192.168.1.0

ONBOOT=yes

USERCTL=no

PREDNS=192.168.1.25

TYPE=ETHERNET

:wq

Ethernet1 setup:

# vi /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1

BOOTPROTO=static

BROADCAST=172.16.1.15

IPADDR=172.16.1.1

NETMASK=255.255.0.0

NETWORK=172.16.1.0

ONBOOT=yes

USERCTL=no

PREDNS=NONE

GATEWAY= IP [given by ISP]

TYPE=ETHERNET

:wq

# vi /etc/sysctl.conf

net.ipv4.ip_forward=1

:wq

# service network restart

# netstat -rn [v.c]

No comments:

Post a Comment