The first two files below should already be set up, as they would have been configured during the installation of Red Hat 6.0. The order of the lines in the files does not matter, and some minor modifications may need to be made as shown below:
The purpose of the /etc/sysconfig/network file is to determine the host name and default gateway details of the system. In this example, GATEWAY points to the ISP-provided gateway via eth1.
NETWORKING=yes FORWARD_IPV4=yes GATEWAYDEV=eth1g0 GATEWAY=126.96.36.199 HOSTNAME=fw2The file /etc/sysconfig/network-scripts/ifcfg-eth0 is used to configure eth0 for connection to the local LAN.
DEVICE=eth0 IPADDR=192.168.0.1 NETMASK=255.255.255.0 NETWORK=192.168.0.0 BROADCAST=192.168.0.255 ONBOOT=yes BOOTPROTO=noneYou will need to create the following file, and its permissions should be set to 644 (chmod 644 ifcfg-eth1). Use the file variation below that pertains to your setup. If your ISP has given you a static IP address, use the first example. If your ISP told you to use DHCP, use the second example. See the main text for more information on setting up the second Ethernet port.
The file /etc/sysconfig/network-scripts/ifcfg-eth1 configures eth1 for connection to the ISP using a static IP address assigned by the ISP.
DEVICE=eth1 USERCTL=no ONBOOT=yes BOOTPROTO=none BROADCAST=188.8.131.52 NETWORK=184.108.40.206 NETMASK=255.255.255.0 IPADDR=220.127.116.11The file /etc/sysconfig/network-scripts/ifcfg-eth1<\n> configures eth1 for connection to the ISP using a dynamically allocated IP address assigned (via DHCP) on the fly by the ISP.
DEVICE=eth1 USERCTL=no ONBOOT=yes BOOTPROTO=dhcp BROADCAST= NETWORK= NETMASK= IPADDR=