LinuxQuestions.org
Help answer threads with 0 replies.
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 11-16-2004, 08:51 PM   #1
zhex900
LQ Newbie
 
Registered: Nov 2004
Posts: 16

Rep: Reputation: 0
Angry Mandrake 10.1 - "Bringing up eth0: FAILED"


After installing Mandrake 10.1 eth0 is running good. However after reboot, "Bringing up eth0: FAILED" . I am only basic linux user can someone help me.

%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)

I assume this means that my box can see the two ethernet cards, so the driver is working.

%ifconfig eth0 192.168.0.11

%ping 192.168.0.5
PING 192.168.0.5 (192.168.0.5) 56(84) bytes of data.
From 192.168.0.11 icmp_seq=1 Destination Host Unreachable
From 192.168.0.11 icmp_seq=2 Destination Host Unreachable
From 192.168.0.11 icmp_seq=3 Destination Host Unreachable

--- 192.168.0.5 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3998ms
, pipe 3

%ping 192.168.0.11
PING 192.168.0.11 (192.168.0.11) 56(84) bytes of data.
64 bytes from 192.168.0.11: icmp_seq=1 ttl=64 time=0.065 ms

--- 192.168.0.11 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.065/0.065/0.065/0.000 ms

%ifconfg
eth0 Link encap:Ethernet HWaddr 00:02:44:11D: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

eth0:9 Link encap:Ethernet HWaddr 00:02:44:11D:24
inet addr:127.255.255.255 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0x9f00

eth1 Link encap:Ethernet HWaddr 00:50:22:E9:8E:A4
inet6 addr: fe80::250:22ff:fee9:8ea4/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:2538 (2.4 Kb)
Interrupt:11 Base address:0xae00

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)

%ifup eth0

Determining IP information for eth0... done.

/sbin/ifup: line 433: 7771 Hangup /etc/init.d/tmdns reload >/dev/null 2>&1

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

%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 0swaps

%ping 192.168.0.11
connect: Network is unreachable

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

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
MII_NOT_SUPPORTED=yes
NEEDHOSTNAME=yes

check_link_down(){
return 1;
}
:-?
 
Old 11-17-2004, 03:17 AM   #2
Xolo
Member
 
Registered: Jul 2004
Location: The Netherlands
Distribution: Mandrake, Knoppix, Coyote Linux, RedHat
Posts: 354
Blog Entries: 3

Rep: Reputation: 31
Are your NIC's configured to use IPv6 ? Because I don't see any valid (IPv4) IP's on the ifconfigs..
 
Old 11-17-2004, 06:02 AM   #3
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
Try:

# ifconfig eth0 inet 192.168.0.11 netmask 255.255.255.0

Do the same with eth1 may be with your ISP's public IP if you have.

To be able to connect to the internet try:

# route add default gw your_isp_gateway_address

Try to change BOOTPROTO = static
 
Old 11-29-2004, 07:48 PM   #4
zhex900
LQ Newbie
 
Registered: Nov 2004
Posts: 16

Original Poster
Rep: Reputation: 0
trouble with setting up static IP

My windows machine have the following
#ipconfig /alll

Windows IP Configuration

Host Name . . . . . . . . . . . . : zhex900
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : Yes

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network Connection
Physical Address. . . . . . . . . : 08-00-46-99-B6-28
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.22
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 203.2.75.132
198.142.0.51

This is what I did to setup the static ip on my mandrake10 box.

# ifconfig eth0 inet 192.168.0.11 netmask 255.255.255.0

# route add default gw 192.168.0.1 eth0

The linux box can only ping it self but cannot ping 192.168.0.1

Another thing is that `route` takes a long to terminate

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

#iptables -nVL
iptables v1.2.9

Last edited by zhex900; 11-29-2004 at 08:34 PM.
 
Old 11-29-2004, 08:24 PM   #5
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
Are you going to use your Mandrake box to be your network's internet gateway/router or do you already have a router box with an address 192.168.0.1? Because this is the default route you are applying to your Mandrake box. Since you have two NICs, I assumed that you want to use this as your internet gateway/NAT.

If so you should put as default route your isp's provided public IP gateway address and don't forget to put your ISP's public IP account to your other interface (external interface).

Post "ifconfig -a" output.

Make sure that your internal network is really connected to your internal interface which I think in your case is eth0 and eth1 will be your external interface?

I didn't see your public IP account in your routing table.
 
Old 11-29-2004, 10:51 PM   #6
zhex900
LQ Newbie
 
Registered: Nov 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Thank your for your help.
Yes I am trying to use the Linux box as a gateway, where I already have a router with ip 192.168.0.1

Now I can ping internal machines, but still cannot ping anything outside my router.

#ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:02:44:11D:24
inet addr:192.168.0.11 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::202:44ff:fe11:dd24/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43267 errors:0 dropped:0 overruns:0 frame:0
TX packets:48004 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3231016 (3.0 Mb) TX bytes:32218728 (30.7 Mb)
Interrupt:9 Base address:0xaf00

eth1 Link encap:Ethernet HWaddr 00:50:22:E9:8E:A4
BROADCAST 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:11 Base address:0xbe00

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

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


#ping 198.142.0.51
PING 198.142.0.51 (198.142.0.51) 56(84) bytes of data.
From 192.168.0.11 icmp_seq=1 Destination Host Unreachable
From 192.168.0.11 icmp_seq=2 Destination Host Unreachable
From 192.168.0.11 icmp_seq=3 Destination Host Unreachable

--- 198.142.0.51 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3998ms
, pipe 3


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

# ppp temp entry

Any ideas?

Last edited by zhex900; 11-29-2004 at 10:52 PM.
 
Old 12-02-2004, 02:29 AM   #7
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
Is your iptables disabled?

Can you try iptables -L again?

Try to disable eth1 for the moment and just use your router box as gateway.

If route -n takes long, something is wrong with your network configuration.
 
Old 12-07-2004, 05:16 PM   #8
zhex900
LQ Newbie
 
Registered: Nov 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Although I want to use the linux box as a gateway, but now I am only using the router as a gateway. So I am not using eth1.

`route -n` is fine, not delays.

Currently the firewall on the linux box is disabled.
Code:
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
If I turn the firewall on, the following is what happens. Also iptables -L take a while to terminate.
Code:
# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
DROP      !icmp --  anywhere             anywhere            state INVALID
eth0_in    all  --  anywhere             anywhere
eth1_in    all  --  anywhere             anywhere
common     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:INPUT:REJECT:'
reject     all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
DROP      !icmp --  anywhere             anywhere            state INVALID
eth0_fwd   all  --  anywhere             anywhere
eth1_fwd   all  --  anywhere             anywhere
common     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:FORWARD:REJECT:'
reject     all  --  anywhere             anywhere

Chain OUTPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
DROP      !icmp --  anywhere             anywhere            state INVALID
fw2net     all  --  anywhere             anywhere
all2all    all  --  anywhere             anywhere
common     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:OUTPUT:REJECT:'
reject     all  --  anywhere             anywhere

Chain all2all (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
newnotsyn  tcp  --  anywhere             anywhere            state NEW tcp flags:!SYN,RST,ACK/SYN
common     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:all2all:REJECT:'
reject     all  --  anywhere             anywhere

Chain common (5 references)
target     prot opt source               destination
icmpdef    icmp --  anywhere             anywhere
reject     udp  --  anywhere             anywhere            udp dpt:135
reject     udp  --  anywhere             anywhere            udp dpts:netbios-ns:netbios-ssn
reject     udp  --  anywhere             anywhere            udp dpt:microsoft-ds
reject     tcp  --  anywhere             anywhere            tcp dpt:netbios-ssn
reject     tcp  --  anywhere             anywhere            tcp dpt:microsoft-ds
reject     tcp  --  anywhere             anywhere            tcp dpt:135
DROP       udp  --  anywhere             anywhere            udp dpt:1900
DROP       all  --  anywhere             255.255.255.255
DROP       all  --  anywhere             224.0.0.0/4
reject     tcp  --  anywhere             anywhere            tcp dpt:auth
DROP       udp  --  anywhere             anywhere            udp spt:domain state NEW
DROP       all  --  anywhere             192.168.0.255

Chain dynamic (4 references)
target     prot opt source               destination

Chain eth0_fwd (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state NEW
net2all    all  --  anywhere             anywhere

Chain eth0_in (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state NEW
net2all    all  --  anywhere             anywhere

Chain eth1_fwd (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state NEW
loc2net    all  --  anywhere             anywhere

Chain eth1_in (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state NEW
all2all    all  --  anywhere             anywhere

Chain fw2net (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
newnotsyn  tcp  --  anywhere             anywhere            state NEW tcp flags:!SYN,RST,ACK/SYN
ACCEPT     all  --  anywhere             anywhere

Chain icmpdef (1 references)
target     prot opt source               destination

Chain loc2net (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
newnotsyn  tcp  --  anywhere             anywhere            state NEW tcp flags:!SYN,RST,ACK/SYN
ACCEPT     all  --  anywhere             anywhere

Chain net2all (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
newnotsyn  tcp  --  anywhere             anywhere            state NEW tcp flags:!SYN,RST,ACK/SYN
common     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:net2all:DROP:'
DROP       all  --  anywhere             anywhere

Chain newnotsyn (4 references)
target     prot opt source               destination
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:newnotsyn:DROP:'
DROP       all  --  anywhere             anywhere

Chain reject (11 references)
target     prot opt source               destination
REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     icmp --  anywhere             anywhere            reject-with icmp-host-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain shorewall (0 references)
target     prot opt source               destination

Last edited by zhex900; 12-07-2004 at 05:30 PM.
 
Old 12-07-2004, 10:47 PM   #9
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
These rules is too complex for me. Maybe somebody out there can assist you. Is this created by the system during install? I just know little about iptables complexity and this is the main reason that I considered OpenBSD's PF human readable rules' syntax over iptables that can allow you to create very secured but with just few rules for a small internet/firewall.

Anyway, hope this short howto from Slackware can reduce you firewall's complexity:

If this works with you, make this a script that can be started thru rc.local:

#iptables -F INPUT
#iptables -F OUTPUT
#iptables -F FORWARD
#iptables -P INPUT DROP
#iptables -P OUTPUT ACCEPT
#iptables -P FORWARD DROP
#iptables -A INPUT -m state --state ESTABLISHED, RELATED -j ACCEPT
#iptables -A INPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -i lo -j ACCEPT
#iptables -A INPUT -p icmp -j ACCEPT
#echo 1 > /proc/sys/net/ipv4/ip_forward

To create a NAT/Firewall you should have two NICs (which is already your case now). One of your NIC shall be designated as "internal" that connects to your LAN and the other one as "external" that connects to the public network.

In my case I have ADSL modem with ethernet port that is connected to my Realtek 8139 NIC (external) with a public IP provided by my ISP. The other NIC (internal) is Linksys LNE100 configured with private IP address. I have once made this worked with my Slackware 10.

#!/bin/bash
#
# My Linux Box Simple Internet Sharing Script
#
# file: /etc/rc.d/rc.nat
#
#----------------------------------------------------------------------
# Don't forget to make this file executable by doing
# chmod 755 /etc/rc.d/rc.nat
#
# Then in your /etc/rc.d/rc.local script add this after the last line:
# . /etc/rc.d/rc.nat
#
# There should be space between "." and "/".
# You may put a header comment to identify this.
#-----------------------------------------------------------------------
#
# eth0 = internal interface - (localnet) - This depends on your setup.
# eth1 = external interface - (DSL connected)
#
IPTABLES="/usr/sbin/iptables"
EXTIF="eth1" # To where my DSL is connected.
INTIF="eth0" # Connected to my local network.
#
echo ""
echo "Loading my INTERNET SHARER & rc.firewall ruleset....."
echo "My Box Internal Interface = $EXTIF"
echo "My Box External Interface = $INTIF"
echo "Clearing existing rules and setting default policy..."
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
sleep 1
echo "FWD: Allow all connections OUT and ONLY existing and related ones IN..."
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG
sleep 1
echo "Enabling IP NAT (MASQUERADING)...."
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
sleep 1
echo "Enabling IP FORWARDING...."
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "Checking if IP FORWARDING is enabled = '`cat /proc/sys/net/ipv4/ip_forward`'"
#
if [ `cat /proc/sys/net/ipv4/ip_forward` = 1 ]; then
echo "It's enabled!..."
else
echo "IP forwarding is not enabled. Enable it now by typing 'echo 1 > /proc/sys/net/ipv4/ip_forward'"
echo "at the command line."
fi
#
echo ""
#
# End of my personal /etc/rc.d/rc.nat.

rc.local could be located in /etc in your distro. Just look for it.

Then finally, your internal NIC private IP should be your XP/Windows gateway.
 
Old 12-07-2004, 11:49 PM   #10
zhex900
LQ Newbie
 
Registered: Nov 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Right now I do not want my linux box to work as a gateway yet. I am only using it as a client. So I want to get internet working with out any firewall.
 
Old 12-07-2004, 11:59 PM   #11
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: Linuxmint, Slackware
Posts: 356

Rep: Reputation: 34
The group of steps above is what you may only need and enable only one NIC - the one connected to your LAN - and just use your router's IP as your gateway.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
"Bringing up interface eth0" and wait... josejose Linux - Networking 0 10-16-2004 03:22 PM
"Bringing up interface eth0: failed" pikatu Linux - Networking 7 10-03-2004 02:25 AM
"Bringing up interface eth0: failed" on 3com NIC zoinkedzonker Linux - Networking 3 08-17-2004 12:18 AM
rh8.0 boot up stuck on "bringing up interface eth0" tnf Linux - Wireless Networking 7 03-22-2004 07:41 AM
RHL7.3 stops loading at "Bringing interface of eth0" rvijay17 Linux - General 1 10-10-2002 01:02 PM

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

All times are GMT -5. The time now is 12:43 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