Jump to content

Bring up eth0, but no network connection


zhex900
 Share

Recommended Posts

I can bring up my eth0 but I only can ping itself. I cannot ping even the router. I have two ethernet cards, I want to get both of them working. Can some please help me. As you can see I am using static ip. I cannot even bring up eth0 using DHCP.

 

%cat /etc/resolv.conf
search nsw.optushome.com.au
nameserver 203.2.75.132
nameserver 198.142.0.51

%lspci | grep Ethernet
00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL -8129/8139C/8139C+ (rev10)
00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL -8129/8139C/8139C+ (rev10)

%ifconfg
eth0 Link encap:Ethernet HWaddr 00:02:44:11:DD:24
inet6 addr: fe80::202:44ff:fe11:dd24/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:195 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b ) TX bytes:33386 (32.6 Kb)
Interrupt:9 Base address:0x9f00

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:243 errors:0 dropped:0 overruns:0 frame:0
TX packets:243 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20570 (20.0 Kb) TX bytes:20570 (20.0 Kb)

 

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

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.11
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
onBOOT=yes
MII_NOT_SUPPORTED=yes

 

# route
Kernel IP routing table
Destination        Gateway           Genmask     Flags Metric Ref Use Iface
192.168.0.0       * 255.255.255.0                  U 0 0 0 eth0
127.0.0.0           *                     255.0.0.0    U 0 0 0 lo
default               192.168.0.1      0.0.0.0       UG 0 0 0 eth0

 

%time /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
1.90user 0.66system 1:38.44elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+64810minor)pagefaults 0swap

 

% /etc/init.d/network status
Configured devices:
lo eth0
Currently active devices:
lo eth0

:help::help::help::help::help:

Link to comment
Share on other sites

ifconfig is not reporting an IP address for eth0, did you configure the static IP address using mcc?

 

It also appears that you don't have anything configured for the second card at all.

 

I tried to setup static IP mcc, but it doesn't work.

 

I want to get my first NIC work first. :help: I have no idea how to configure the second card.

Edited by zhex900
Link to comment
Share on other sites

How did you attempt to configure the card, did you use the new LAN connection wizard in mcc? Ensure this was LAN and not ADSL or similar. Try setting a static IP address of something like 10.0.0.1 with a netmask of 255.255.254.0, just to see if this is repeated in ifconfig.

Link to comment
Share on other sites

How did you attempt to configure the card, did you use the new LAN connection wizard in mcc? Ensure this was LAN and not ADSL or similar. Try setting a static IP address of something like 10.0.0.1 with a netmask of 255.255.254.0, just to see if this is repeated in ifconfig.

 

Thank you very much for your reply. I just find out one of my router ports is not working, so I put the cable into a port that works. Now its working fine.

 

However I still need your help.

I want my linux box work like the following:

 

Internet --- Cable Modem --- (eth0) Linux box (eth1) --- router ---internal network.

 

So I want my linux box to act like a gateway. (I hope this is what a gateway do)

 

Two question:

1) How do I get my eth1 working.

2) How do I set the routering table to pass all eth0 packets to eth1.?

 

I hope this is not too much to ask.

Link to comment
Share on other sites

You should be able to configure the second card in mcc - does it not show up there? If it doesn't it might be worth having a look through dmesg to see if that gives any clues (look for anything network related and if eth1 is mentioned).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...