LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-24-2006, 01:23 AM   #1
Kanon
Member
 
Registered: Sep 2004
Location: Norge
Distribution: Debian
Posts: 116

Rep: Reputation: 15
Gateway: netcard up or not?


Im trying to setup a gateway and found this Setting up a Linux Home Gateway. I did not include anything with ipchain in any of the scripts since I use iptable.

But now I run in to a snag... I cant figure out why my eth0 will not have an address from my ISP.

Code:
server:~# /etc/init.d/networking restart
Setting up IP spoofing protection: rp_filter.
Reconfiguring network interfaces...ifup: interface lo already configured
Internet Software Consortium DHCP Client 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html

Listening on LPF/eth0/00:01:02:b6:0c:9c
Sending on   LPF/eth0/00:01:02:b6:0c:9c
Sending on   Socket/fallback/fallback-net
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database.

Exiting.

Failed to bring up eth0.
done.
server:~# ifconfig
Code:
server:# dmesg | grep eth0

server:# dmesg | grep eth1
e100: eth1: Intel(R) PRO/100 Network Connection
e100: eth1 NIC Link is Up 100 Mbps Full duplex
e100: eth1 NIC Link is Up 100 Mbps Full duplex

server:/etc/init.d# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:01:02:B6:0C:9C
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:18 Base address:0xbc00

eth1      Link encap:Ethernet  HWaddr 00:10:DC:A5:65:A0
          inet addr:192.168.0.118  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2119 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1308 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:170554 (166.5 KiB)  TX bytes:303471 (296.3 KiB)
          Interrupt:20 Base address:0xb800 Memory:dfefe000-dfefe038

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:35 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2873 (2.8 KiB)  TX bytes:2873 (2.8 KiB)

server:#
My interfaces:

Code:
server:/etc/network# more interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

# The primary network interface
auto eth1
iface eth1 inet static
        address 192.168.0.118
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers <dns1> <dns2>
        dns-search <example.com>
server:/etc/network#
 
Old 12-24-2006, 06:10 AM   #2
Kanon
Member
 
Registered: Sep 2004
Location: Norge
Distribution: Debian
Posts: 116

Original Poster
Rep: Reputation: 15
Seems like I had a faulty net card.

Well, put in an other one, reinstalled and set it up so this PC have to get thru the gateway to the router and internet. So far I can ping both nic ont the gateway, but I cant ping the router or get on the net. I put my PC and the nic on this side on other sub net. So now it looks like this:

Code:
internet -        router      -       gateway        -    gateway    -      PC
   *     - 192.168.0.1 (DHCP) - (DHCP) 192.168.0.200 - 192.168.1.118 - 192.168.1.102
Code:
gateway:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:10:A7:04:10:1D
          inet addr:192.168.0.200  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:721 errors:0 dropped:0 overruns:0 frame:0
          TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:54471 (53.1 KiB)  TX bytes:9590 (9.3 KiB)
          Interrupt:18 Base address:0xbc00

eth1      Link encap:Ethernet  HWaddr 00:10:DC:A5:65:A0
          inet addr:192.168.1.118  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1473 (1.4 KiB)  TX bytes:0 (0.0 b)
          Interrupt:20 Base address:0xb800 Memory:dfefe000-dfefe038

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)
Code:
gateway:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.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
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
gateway:~#
Any suggestions as to what might be the resson I cant get thru?
 
Old 05-03-2007, 06:30 PM   #3
UhhMaybe
Member
 
Registered: Jul 2004
Location: Salt Lake City, Utah
Distribution: Absolute 12.0 Studio 64 1.3.0
Posts: 470

Rep: Reputation: 30
Cool

Did YOU enable ipforwarding? Is YOUR firewall setup to allow traffic out, but not in? Does YOUR ISP give YOU both nameservers, Primary Nameserver and Secondary Nameserver? Does YOUR router have the nameservers included in the setup? YOUR ifconfig looks good. My thoughts are that YOUR not getting out because the networking wasn't told to let YOUR traffic out.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
IRQ netcard rafaelspotto Linux - Networking 1 08-27-2003 02:42 PM
netcard deactivates itself elever Linux - Networking 0 08-12-2003 06:31 AM
tulip and netcard dai Linux - Networking 2 02-19-2003 12:41 PM
netcard setup c0c0deuz Linux - Software 5 08-26-2001 02:13 PM
how to setup my NetCard shierly Linux - Software 3 02-25-2001 07:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration