NAT

Issues related to configuring your network
Post Reply
rslyon
Posts: 13
Joined: 2006/12/15 09:18:08

NAT

Post by rslyon » 2007/03/02 15:01:46

Hi,

I am trying to setup Centos on a NAT however i cannot get it to ping anything, not even the gateway.

I get the error "destination host is unreachable" or simlar.

The PC has 2 NIC which both boot up.

Both ifcfg-eth0 and ifcfg-eth1 look fine:
DEVICE=eth0
BOOTPROTO=static
IPADDR=10.0.1.150
NETMASK=255.255.255.0
GATEWAY=10.0.1.1
ONBOOT=yes
TYPE=Ethernet

Any idea's why this cannot connect to any of the network ?

User avatar
WhatsHisName
Posts: 1547
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: NAT

Post by WhatsHisName » 2007/03/02 16:13:06

Not much to go on here. The output of ifconfig would be useful.

If you are running both NICs on the same subnet, that tends to be very unstable. Disable one and restart the other.

Greenman
Posts: 20
Joined: 2007/02/25 16:08:44

Re: NAT

Post by Greenman » 2007/03/04 20:44:16

Hi Rslyon:


I think the problem is that your NIC's are not forwarding IP packets (No Source Routing Enabled), check /etc/sysctl.conf in the first group of lines you look at #net.ipv4.ip_forward=1 if its =0 change it to =1 also check
#net.ipv4.conf.default.accept_source_routing=1 this option comes =0 by default change it to =1, check them and try to ping and tell me what happens

Best Regards


Green

rslyon
Posts: 13
Joined: 2006/12/15 09:18:08

Re: NAT

Post by rslyon » 2007/03/12 14:55:09

Hi,

I tried what you said and its still now working.
Here is my config:
eth0 Link encap:Ethernet HWaddr 00:04:23:60:95:D2
inet addr:10.0.1.150 Bcast:10.0.1.255 Mask:255.255.255.0
inet6 addr: fe80::204:23ff:fe60:95d2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:102 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13759 (13.4 KiB) TX bytes:3402 (3.3 KiB)
Base address:0xdcc0 Memory:fcfa0000-fcfc0000

eth1 Link encap:Ethernet HWaddr 00:04:23:60:95:D3
inet addr:10.0.1.151 Bcast:10.0.1.255 Mask:255.255.255.0
inet6 addr: fe80::204:23ff:fe60:95d3/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2646 (2.5 KiB) TX bytes:654 (654.0 b)
Base address:0xdc80 Memory:fcf80000-fcfa0000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5040 (4.9 KiB) TX bytes:5040 (4.9 KiB)



00:00.0 Host bridge: Broadcom GCNB-LE Host Bridge (rev 32)
00:00.1 Host bridge: Broadcom GCNB-LE Host Bridge
00:03.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID (rev 01)
00:04.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
00:05.0 IDE interface: Silicon Image, Inc. PCI0680 Ultra ATA-133 Host Controller (rev 02)
00:0f.0 Host bridge: Broadcom CSB6 South Bridge (rev a0)
00:0f.1 IDE interface: Broadcom CSB6 RAID/IDE Controller (rev a0)
00:0f.2 USB Controller: Broadcom CSB6 OHCI USB Controller (rev 05)
00:0f.3 ISA bridge: Broadcom GCLE-2 Host Bridge
00:10.0 Host bridge: Broadcom CIOB-E I/O Bridge with Gigabit Ethernet (rev 12)
00:10.2 Host bridge: Broadcom CIOB-E I/O Bridge with Gigabit Ethernet (rev 12)
01:03.0 Ethernet controller: Intel Corporation 82546EB Gigabit Ethernet Controller (Copper) (rev 01)
01:03.1 Ethernet controller: Intel Corporation 82546EB Gigabit Ethernet Controller (Copper) (rev 01)


I installed the e1000 drivers from both dell and intel.
e1000-7.4.27 and Intel_LAN_9.0_Linux_src_A00.tar
Also installed dells dkms-2.0.13-1.noarch.rpm

What is strange is the broadcast IP 10.0.1.253
On my windows pc i have the following:
Gateway = 10.0.1.1
sub = 255.255.255.0
IP = 10.0.1.20

I can ping 10.0.1.253 for some reason which is the switch.
Also when i do ping -b i get this IP listed but dont know what the 253 is.

My switch is 10.0.1.253 and my firewall is doing the NATing on 10.0.1.254
Gateway on my windows pc is 10.0.1.1

It could be the switch so i tested on the same port etc, using the windows pc and it works.
So something is missing on Centos.

rslyon
Posts: 13
Joined: 2006/12/15 09:18:08

Re: NAT

Post by rslyon » 2007/03/12 15:35:42

found the problem.
It was my switch.
I had to untag the port the linux server was plug into.
Something to do with vlan

Post Reply

Return to “CentOS 4 - Networking Support”